User manual
2.3.16 Acqrs_logicDeviceIO
Purpose
Reads/writes a number of 32-bit data values from/to a user-defined register in on-board logic devices, such
as user-programmable FPGAs. It is useful for AC/SC Analyzers only.
Parameters
Input
Name Type Description
instrumentID ViSession Instrument identifier
deviceName ViChar [ ] Identifies which device to read from or write to.
For the AC210/AC240 and SC210/SC240 modules
this string must be "Block1Dev1". Alternatively it can
be "ASBUS::n::Block1Dev1" with n ranging from 0
to the number of modules -1
registerID ViInt32 Register Number, can typically assume 0 to 127
nbrValues ViInt32 Number of data values to read
dataArray ViInt32 [ ] User-supplied array of data values
readWrite ViInt32 Direction 0 = read from device, 1 = write to device
flags ViInt32 Currently unused, set to “0”
Return Value
Name Type Description
status ViStatus Refer to Table 2-1 for error codes.
Discussion
This function is only useful if the user programmed the on-board logic device (FPGA).
Typically, nbrValues is set to 1, but it may be larger if the logic device supports internal address auto-
incrementation. The following example reads the (32-bit) contents of register 5 to reg5Value:
ViStatus status =
Acqrs_logicDeviceIO(ID, "Block1Dev1", 5, 1, ®5Value, 0, 0);
Note that dataArray must always be supplied as an address, even when writing a single value.
Programmer’s Reference Manual Page 35 of 210