Mezurit 2

Online documentation - Channel functions

All of the channel functions listed below are usable in both virtual channel definitions and trigger test expressions, with one exception: GPIB-based functions which should not be used in trigger tests unless an identical function call exists in a channel definition. This ensures that arming the trigger does not generate a new gpib slot outside the parse phase, which can cause instability (see technical details here).

Table of Contents

General functions

panel ()

return valueintIndex of the current panel, e.g. 0 for Panel 0

see also: get_panel()

time ()

return valuefloatTime in seconds since the current panel was first started or its timer was reset

see also: get_time()

ch (channel)

channel int Index of virtual channel, i.e. 2 for X2
return valuefloatCurrent value of Xvci, sans SI prefix. For example, if X3 = 3.4 mV, ch(4) would return 0.0034.

see also: channel_value()

Warning: To avoid undefined behavior, ch() should refer only to channels with lower index than the channel in which it is used. For example, X2 may contain ch(0) or ch(1) but not ch(3), ch(4), etc.

DAQ functions

DAC (brd, n)

brd int Index of a DAQ board: 0 or 1 for physical boards, 2 for virtual board.
n int Index of a physical channel: 0 ... NDAC, where NDAC is board-dependent.
return valuefloatCurrent analog output voltage.

ADC (brd, n)

brd int Index of a DAQ board: 0 or 1 for physical boards, 2 for virtual board.
n int Index of a physical channel: 0 ... NDAC, where NDAC is board-dependent.
return valuefloatCurrent analog input voltage.

DAC0 ()
DAC1 ()

return valuefloatCurrent voltage of analog output 0/1 on board 0.

VDAC0 ()
VDAC1 ()

return valuefloatCurrent voltage of analog output 0/1 on virtual board.

ADC0 ()

ADC15 ()

return valuefloatCurrent voltage of analog input 0/1/.../15 on board 0.

GPIB functions

Don't see your instrument/parameter on this list? Learn how to quickly and easily add your own functions here.

A8648_Freq (brd, pad)

brd int Index of GPIB board: 0 or 1 for physical boards, 2 for virtual board.
pad int Primary address of the instrument: 1 ... 31 (typ.: 18).
return valuefloatAgilent 8648 signal generator output frequency in Hz.

command: FREQ:CW (read and write)

A8648_Ampl (brd, pad)

brd int Index of GPIB board: 0 or 1 for physical boards, 2 for virtual board.
pad int Primary address of the instrument: 1 ... 31 (typ.: 18).
return valuefloatAgilent 8648 signal generator output amplitude in Volts (rms).

command: POW:AMPL (read and write)

SR830_SineOut (brd, pad)

brd int Index of GPIB board: 0 or 1 for physical boards, 2 for virtual board.
pad int Primary address of the instrument: 1 ... 31 (typ.: 18).
return valuefloatSRS SR830 lock-in amplifier output amplitude in Volts (rms).

command: SLVL (read and write)

SR830_SensIn (brd, pad)

brd int Index of GPIB board: 0 or 1 for physical boards, 2 for virtual board.
pad int Primary address of the instrument: 1 ... 31 (typ.: 18).
return valuefloatSRS SR830 lock-in amplifier input sensitvity in V/V.

command: SENS (read-only)

ITC503_Temp (brd, pad)

brd int Index of GPIB board: 0 or 1 for physical boards, 2 for virtual board.
pad int Primary address of the instrument: 1 ... 31 (typ.: 18).
return valuefloatOxford ITC503 temperature controller sensor #1 temperature in Kelvin.

command: R1 (read-only)

IPS120_Field (brd, pad)

brd int Index of GPIB board: 0 or 1 for physical boards, 2 for virtual board.
pad int Primary address of the instrument: 1 ... 31 (typ.: 18).
return valuefloatOxford IPS120 superconducting magnet power supply flux density in Tesla.

command: R8 (read-only)

Utility functions

mag (X, Y)

X floatNumber
Y floatNumber
return valuefloatMagnitude of X + iY

divide (N, D, level)

N floatNumerator
D floatDenominator
level floatMinimum denominator value for safe division
return valuefloatN/D unless abs(D) < level, in which case return 0