For Windows, Linux and Unix. Mac OS X not supported (TCL incompatible)
--> M38XR
function [repout] = M38XR(command,arg,arg2)
out = M38XR(command, arg, arg2)
Scilab driver for the Meterman 38XR or Amprobe 38XR-A multimeters
The device should be switched on. It must be connected to the computer
through its serial optical output and cable. The serial output must be
activated (RS232 button). Beware about the auto power off.
DEPENDENCY: The Serial TCL toolbox must be installed and loaded:
http://atoms.scilab.org/toolboxes/serial
Commands are case-unsensitive
COMMANDS ARG EFFECT
M38XR Displays this help (no argument)
'open' port Open M38XR session on COM port
(9600 bits/s, no parity, 8 data bits, 1 stop bit)
out = id of the opened RS-232 communication (scalar string)
Example: M38XR open 1 or id = M38XR('open',1)
'close' Close M38XR serial connexion & clean session parameters
out = 0 if no error has occured (real)
Example: M38XR close or err = M38XR('close')
'isOn' 1|-, dt Checks output activity on the RS-232 connexion
arg = 1 : Verbose mode ; else: Quiet mode
arg2 = testing duration [s] (default=Long)
out = Number of bytes delivered during dt
'monitor' dt, Dt * Open a graphic window
* Do 1 measurement each dt [s] (integration time ~ periode)
* Dynamically plot any forthcoming measurement
* if Dt is provided (in [s]), data are ranged and plotted
over the last Dt seconds (slipping window). Otherwise,
all data from the beginning are kept and plotted.
out: No value is returned
Examples:
M38XR monitor 1 or M38XR('Monitor',1)
M38XR monitor 1 60 or M38XR('Monitor',1,60)
Remarks:
* The refresh rate of the device is ~2/s => dt must be >0.5
* If the data flow is suspended, the plot is suspended and a
message is displayed. When the data flow is retrieved, the plot
is resumed. The origin of time is unchanged.
* If 'Data flow suspended' appears time to time in a transient way,
you should increase the integration time.
* If the measurement mode is changed (e.g. V => A, etc) while
monitoring is running, the current plot is erased and
automatically adapted.
* Default legends are displayed in english. They are in french
if the Scilab session is in french.
'getdata' After monitoring, returns displayed data, in (N,2) columns
of reals. out(:,1): time out(:,2): values
Example: out = M38XR('getdata')
'mesure' dt Returns 1 measurement done over dt [s] (integration time)
dt = integration time
out: 3x1 column of STRINGS
out(1): Name of the output mesurande and related unit
Possible values are:
'Voltage ~ [V]', 'Delta(Voltage) ~ [V]', 'Voltage ~ [dBm]'
'Voltage DC [V]', 'Delta(Voltage) DC [V]',
'Current DC [A]', 'Delta(Current) DC [A]',
'Current AC [A]', 'Delta(Current) AC [A]',
'Current AC+DC [A]','Delta(Current) AC+DC [A]',
'Current 4-20 [mA] --', 'Capacity [µF]',
'Resistance [Ohm]', 'Test diode [V]',
'Temperature [°C]', 'Temperature [°F]',
'Frequency [Hz]', 'Cyclic Rate [%]'
These labels are returned in french whether the Scilab
session is in french.
out(2): Measured value.
evstr(out(2)) gives it as a float number
out(3): Value of integration time dt.
evstr(out(3)) gives it as a float number