|
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 value | int | Index of the current panel, e.g. 0 for Panel 0 |
see also: get_panel()
time ()
return value | float | Time 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 value | float | Current 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 value | float | Current 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 value | float | Current analog input voltage. |
DAC0 () DAC1 ()
return value | float | Current voltage of analog output 0/1 on board 0. |
VDAC0 () VDAC1 ()
return value | float | Current voltage of analog output 0/1 on virtual board. |
ADC0 () ⋮ ADC15 ()
return value | float | Current 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 value | float | Agilent 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 value | float | Agilent 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 value | float | SRS 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 value | float | SRS 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 value | float | Oxford 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 value | float | Oxford IPS120 superconducting magnet power supply flux density in Tesla. |
command: R8 (read-only)
Utility functions
mag (X, Y)
X | float | Number |
Y | float | Number |
return value | float | Magnitude of X + iY |
divide (N, D, level)
N | float | Numerator |
D | float | Denominator |
level | float | Minimum denominator value for safe division |
return value | float | N/D unless abs(D) < level, in which case return 0 |
|