VXI Technology, Inc.

PROGRAMMING

With the introduction of VISA, sending a command to a register-based device is as simple as sending a command to a message-based device. Whether the application is graphical or standard, sending commands to the register-based device is just as intuitive. The VISA template for transferring data to a register-based device, utilizing A32 extended memory space, is as follows:

viOut16 (Handle, VI_A32_SPACE, Offset, Data)

Handle is passed by reference whenever a VISA session to a particular device is opened.

VI_A32_SPACE is defined in the VISA header file.

(VI_A16_SPACE

and

 

VI_A24_SPACE are also valid.)

Offset is determined from the memory map and is in decimal format.

Data is a 16-bit signed integer value representing the state of the relays.

The following example is for a SM5001, 80 channel SPST relay card utilizing A32 extended memory space. To close relays K1, K33 and K48 while leaving the other relays open, the following commands would be sent:

viOut16

(Handle,

VI_A32_SPACE,

0,

1)

'closes relay 1

viOut16

(Handle,

VI_A32_SPACE,

4,

32769)

'closes relay 33 and 48

VISA is the software architecture standard instituted by the VXIplug&play Alliance and is at a very high level of communication to a VXIbus device. The same philosophy and simplicity applies if the instrument is being programmed via lower level commands of an API (Application Programmer's Interface).

The device Relay Register Map is shown in the following table.

34

SM7100 Programming

Page 34
Image 34
VXI Microwave Matrix, SM7100 user manual VIA16SPACE