Appendix A
Using the NI-VISA Code Instrument
©
National Instruments Corporation
A-3
Notice that with the INSTR register access operations
viOut16()
and
viIn16()
, you pass a device-relative offset in the specified address space.
This is different from the GPIB-VXI/C local command set, which accepts
absolute addresses. If your application currently uses absolute addressing
and you do not want to convert to device-relative offsets, you may consider
the MEMACC resource, which accepts absolute addressing. The form of
the resource string for that class is
"GPIB-VXI<system>::MEMACC"
.
You also can use the operations
viOut8()
and
viIn8()
to perform 8-bit
accesses, which is not a feature supported by the local command set. VISA
also defines 32-bit operations and accesses to A32 space, but because these
are not implemented by the GPIB-VXI/C itself, they return errors.
DMAmove and VISA
If you have used the
DMAmove
code instrument in the past, you can use
the
viMoveInxx()
and
viMoveOutxx()
operations instead. Refer to
Appendix B,
Using the DMAmove and CDS-852 Adapter Code
, for more information. They make use of the GPIB-VXI’s
DMA functionality but require only a single operation call, instead of the
multiple calls required to send the command and data blocks and then poll
waiting for the operation to complete. Using VISA to move blocks of data
also means that you no longer need to load the
DMAmove
code instrument,
as NI-VISA automatically downloads a separate code instrument
(the NI-VISA CI) to handle these and other operations. NI-VISA is the
recommended way to do DMA with the GPIB-VXI.
Additional Programming Issues
For advanced users, the GPIB-VXI Mainframe Backplane resource
encapsulates the operations and properties of each mainframe
(or chassis) in a VXIbus system. This resource type lets a controller
query and manipulate specific lines on a specific mainframe in a given
VXI system. The form of the resource string for this class is
"
GPIB-VXI<system>::BACKPLANE
". Services in this resource class
allow the user to map, unmap, and assert hardware triggers, and also to
assert various utility signals.
Refer to the
NI-VISA User Manual
and the
NI-VISA Programmer
Reference Manual
for more information about using NI-VISA and
the subset of NI-VISA supported on the GPIB-VXI.