Variables in RDE are a common interface for managing (displaying, setting, etc.) numeric quantities (and strings) in a way that is completely independent of the device connected and the instrument used.
For example, the same variable can be displayed in a command shell, used as a trace in an oscilloscope, or used as a source/destination for a button in an I/O panel.
Variable syntax
An RDE variable has the following syntax:
[<scope>:]<var0>[.<var1>[.<var2> ....]] [[,]<repeat>=1] |
where:
•scope is the group to which the variable belongs (e.g., variables of a specific program or variables of a homogeneous feature group). If omitted, the variable is searched over all available groups.
•var0 is the top-level, mandatory variable in the format<name> [<indexes>], where:
•name is the name of the variable;
•indexes are any indexes of the variable, in the format [<index1>[, <index2> [, <index3>]].
•varN is the N-th level, optional, child variable of varN-1, with the same syntax as var0.
•repeat is the number of repeats, when applicable: if omitted, 1 is assumed as the default.
The characters [ and ] (in bold) indicate just the square brackets, while [...] indicates something optional.
Simplified array syntax
For past compatibility, when using a variable with a single array index, you can omit the [ and ] characters when specifying the index value. For example instead of using the canonical syntax RR [1] you can write RR 1 in an abbreviated way.
Compatibility Notes
The old-style I/O registers and channels are still present, for most devices, in the SYS group. Specifically:
•SYS:RR, real registers
•SYS:R, integer registers
•SYS:INP, digital input channels
•SYS:INP_W, 16bit input words
•SYS:OUT, output channels
•SYS_OUT_W, 16ibt output word
The old-style memory dump commands are still present, when available and authorized, in the HW group. For example, to reference the first 100 bytes at address 0x1000, use the variable HW:U8 [0x1000], 100.