Reading Algorithm Variables Directly - VXI VT1422A User Manual

Remote channel multi-function dac module user’s and scpi programming manual
Table of Contents

Advertisement

Reading Algorithm
Variables Directly
Chapter 4
Reading the Latest FIFO Values (FIFO mode OVER)
In this mode, the FIFO always contains the latest values (up to the FIFO's
capacity of 65,024 values) from running algorithms. In order to read these
values, the algorithms must be stopped (use ABORT). This forms a record
of the algorithm's latest performance. In the OVERwrite mode, the FIFO
cannot be read while it is accepting readings from algorithms. Algorithm
execution must be stopped before the application program reads the FIFO.
Here is an example command sequence that can be used to read values from
the FIFO after algorithms are stopped (ABORT sent).
SENS:DATA:FIFO:COUNT?
input n_values here
if n_values
SENS:DATA:FIFO:PART? n_values
input read_data here
end of if
For VXIplug&play Users: See the functions hpe1422_sensDataFifoCoun_Q,
hpe1422_readFifo32_Q in the VT1422A plug&play driver Help file.
To directly read algorithm variables that are not stored in the FIFO or CVT,
simply specify the memory space (algorithm name or globals) and the name
of the variable. To read the values of scalar variables or single array
elements, use the ALG:SCALar? query. To read an entire array, use the
ALG:ARRay? query. The former returns data in ASCII and the later returns
data in REAL,64 (8-byte IEEE-754 format). This coincides with the
ALG:SCAL and ALG:ARR commands form writing data to these variables.
Here are some examples:
ALG:SCAL? 'globals','my_var'
ALG:SCAL? 'alg1','my_array[6]'
ALG:SCAL? 'alg1','S108'
ALG:ARR? 'alg2','my_other_array'
The ALG:ARR? response data will consist of a block header and real-64
data bytes. For example, if my_other_array was ten elements, the block
header would be #280 which says there are two bytes of count that specify
80 bytes of data to follow. Data from the VT1422A is terminated with the
GPIB EOI signal.
For VXIplug&play Users: See the functions hpe1422_algScal_Q (for
scalar variables) and hpe1422_algArray_Q (for array variables) in the
VT1422A plug&play driver Help file.
Programming the VT1422A for Data Acquisition and Control
query count of values in FIFO
if any values...
Format of values set by FORMat
get remaining values from FIFO
read global variable
read single element of array
read scan status variable
read all elements of array
137

Advertisement

Table of Contents
loading

Table of Contents