For Windows, Linux, Unix. Mac OS X not supported (TCL required)
-->osciOX80
function [out] = osciOX80(command, ...)
DEPENDENCY:
* Serial TCL toolbox is required: http://atoms.scilab.org/toolboxes/serial
GENERAL equivalent SYNTAXES:
osciOX80(<command>[, <parameter#1>[, <parameter#2>]])
osciOX80 <command> <parameter#1> <parameter#2>
<command> is a case-unsensitive string specifying the action to perform.
COMMANDS
========
SERIAL OPERATIONS:
-----------------
open <port_number> :
Opens the specified serial port numbered from 1 to 254.
Default is '1'. The communication parameters are set to
19200 bauds, no parity, 8 databits, 1 stop bit.
Example: osciOX80('open',1) // Connexion on COM1 port
close : Unlocks the front panel,
Closes the serial port communication, and
Destroys the related TCL session.
clean : Destroys the TCL session (whether for some reasons the
osciOX80 session has been avorted)
GENERAL SETTINGS (for both analog and digital modes)
------------------------------------------------
lock : Disables all commands on the device (buttons and knobs / front panel)
unlock : Enables all commands on the device (buttons and knobs of front panel)
lock? : returns %T if buttons and knobs are disabled, %F otherwise.
autoset: Triggers the autoset
save, filename: Saves the current device's settings in a binary file
The binary settings block is returned as a string
restore, filename: Resets the devices according to parameters saved in the
specified binary file.
model? : Returns either 'OX8040', 'OX8050', 'OX8100', or 'OX8042,OX8062'
vers? : Returns the version of the firmware (string 'YYYY.n' where YYYY is
the year, and n is the version number in this year)
MEASUREMENT MODES
-----------------
analog : Turns the device into analog mode
digital?: returns %T if the oscillo runs in digital mode, %F in analog mode
digital : Turns the device into digital mode (in refresh mode: For each
channel, when the memory is filled by a sweep, the next sweep
starts recording the forthcoming points at the BEGINNING of the
previous trace and goes on overwriting it from left to right.
envelope: Turns the device into digital envelope mode:
For each channel and for each horizontal position, the minimum
and the maximum values reached over time are displayed.
rolling : Turns the device into digital rolling mode: For each channel,
when the memory is filled by the sweep and a new point is measured,
the trace is shifted to the left by one point (dropping the first
point queued) and the new point is appended to the right at the
freed position.
MEASUREMENT SETTINGS (in analog or digital modes)
--------------------
dispSig, 'CH1' | 'CH2' | '-CH2' | 'DUAL' | 'XY' | 'ADD' | 'DIFF'
Chooses the signal(s) to be displayed
dispSig? : Returns 'CH1' | 'CH2' | '-CH2' | 'DUAL' | 'XY' | 'ADD' | 'DIFF'
timeScale? : Returns the sweeping time over 1 division (real number)
Possible values are: 10ns,20ns,50ns,100ns,200ns,500ns,1µs,
2µs,5µs,10µs,20µs,50µs,100µs,200µs,500µs,1ms,2ms,5ms,10ms,
20ms,50ms,100ms,200ms,500ms,1s,2s,5s,10s,20s,50s,100s,200s
For OX8042 & OX8062 models, 5ns is also available.
timeScale, dt : Sets to dt seconds the sweeping time over 1 division
Possible values are listed above. If the given value is not
listed, the closest one in the list is set.
Vscale?, #channel : Returns the Voltage over 1 vertical division (in V)
for the given #channel (1 | 2). output is a real number
All possible Vscale are: 1mV,2mV,5mV,10mV,20mV,50mV,100mV,
200mV,500mV,1V,2V,5V,10V,20V,50V,100V,200V
The exact range depends on the model (see full help)
Vscale, #channel, value : Sets the Vscale to value for the given #channel
#channel = 1 | 2
value must be a real (in V) in the list given above.
Otherwise, the listed value closest to the given one is used.
Lower & upper bounds are checked: Overflow goes to the bound
Examples:
osciOX80 Vscale 1 0.01 // sets CH1 to 10mV/div
osciOX80('Vscale',2,5e-3) // sets CH2 to 5mV/div
Coupling?, #channel : Returns the coupling mode for the specified signal
#channel may be 1 (CH1) or 2 (CH2)
Answers are: 'AC' | 'DC' | 'GND'
Coupling, #channel, mode : Sets the coupling mode for the given #channel
Available modes: 'AC'|'DC'|'GND' (case-unsensitive)
Example: osciOX80 coupling 1 DC // or equivalently
osciOX80('coupling',1,'DC')
CAPTURING SIGNALS
-----------------
This feature is possible only in digital mode. However, if the device is
currently in analog mode, it is switched to digital, the signal is caught,
and finally the initial analog mode is restored.
getSig, channel [,NbPoints] : Returns the querried signal (2 columns of
reals (time[s],V)).
channel may be: 1 | '1' | 'CH1', or 2 | '2' | 'CH2'
In enveloppe mode, additional channels are available:
'CH1L': Low enveloppe of CH1
'CH1H': Hight enveloppe of CH1
'CH2L': Low enveloppe of CH2
'CH2H': Hight enveloppe of CH2
NbPoints : Number of points to be sampled. Possible
values (real) are 1000, 8000, or 160000. Default value
= 1000, corresponding to signals displayed within the
screen's width.
Example: dat = osciOX80('getsig',1)
clf, plot(dat(:,1),dat(:,2))
AUTOMATIC MEASUREMENTS of SIGNAL PARAMETERS (for analog and digital modes)
-------------------------------------------
'getParam', channel, type, number, timeStep, hAxes
channel: 1 | 2 XY display mode is forbidden
number : Number of consecutive measurements to be done (default = 1)
timeStep: Delay (approximate) [s] between 2 consecutive measurements
default value = 1 s. minimum value = 0.3 s
type : VOLTAGES (in [V]):
'Vpp' = Peak-to-Peak Voltage amplitude
'Vrms' = Effective Voltage amplitude (Root Mean Square)
'Vavg' = Average Voltage (over the displayed time interval)
'Vmin' = Minimum Voltage
'Vmax' = Maximum Voltage
'Vhigh'= (not clear... see the device's doc)
'Vlow' = (not clear... see the device's doc)
'Vamp' = Voltage amplitude (= Vhigh - Vlow)
TIME PARAMETERS:
'Freq' = Frequency [Hz]
'T' = Periode [µs]
'phase'= Phase offset between CH1 and CH2, in [-180, 180]°
DUAL display mode is required
'tR' = Rising time [µs]
'tF' = Falling time [µs]
'W+' = Time width of positive impulse [µs]
'W-' = Time width of negative impulse [µs]
'DC+' = Duty cycle of positive impulse, in [0,100]%
'DC-' = Duty cycle of negative impulse, in [0,100]%
hAxes : Handle of the Figure or Axes in which dynamic plotting is
required. The axes is not cleared before starting.
hAxes may also be %T. Then the figure and axes are created.
hAxes is used only is several measurements are expected.
OUTPUT : For 1 single measurement, its real numerical value is returned
For a serie of measurements, a (number,2) matrix of reals
is returned, with out(:,1)=times [s] and out(:,2) = values
DIGITAL MODE
------------
digital : Turns the device into digital normal mode (= refresh. See above)
envelope: Turns the device into digital envelope mode (see above)
rolling : Turns the device into digital rolling mode (see above)
run : Runs acquisition and dynamical display (no effect in analog)
stop : Stops acquisition and dynamical display (idem)
abort : Stops immediately a running acquisition (idem)
clearTrace : Clear the trace(s). This command can be particularly useful
when using the envelope mode.
sample? : Returns the (maximal) number of sampled points.
Possible values (real) are 1000, 8000, or 16000
sample, nbPoints: Sets the (maximal) sample's length
Possible values (real) are given above. Returns the
actual number set (the closest in the list)(real)
rollLength, length: in Rolling acquisition mode, sets the number of points
to be sampled (max = nbPoints)
length is an integer in [0,100] = % of nbPoints.
Possible values are: 0 25 50 75 100
For OX8042, OX8062 and OX8100 models, in addition,
. length=1000 is a possible value if nbPoints = 8000
. length=1000|2000 are possible values if nbPoints = 16000
After sampling <length> points, the acquisition stops.
length=-1 enables a continuous rolling acquisition.
The command returns the actual number of points set as length
(real number)(-1 for 'OFF')
rollLength? : Querries and returns the number of points in rolling mode