User`s manual
Example Programs
This section shows example programs to read the ID and Device Type
Registers and write to the Control Register.
Reading the
Registers
The examples in this section show how to use the VXI:READ? command to
read the ID and Device Type Registers. Reading the Status Register is similar.
Register Definitions ID Register: Reading the ID Register (register 00
h
) returns FFFF
h
which
indicates the manufacturer is Agilent Technologies and the module is an
A16 register-based device.
Device Type Register: Reading the Device Type Register (register 02
h
)
returns FF60
h
which indicates the device is the Agilent E1490C breadboard.
Status Register: All 16-bits can be user defined. VXIbus Specifications
define bit 2 as self-test (0 = failed/executing self-test, 1 = passed), bit 3 as
extended self-test (if 0 and Status Register bit 2 is 1 the Extended Self-test is
active), bit 14 as module selected by MODID (0 = module selected, 1 = not
selected), and bit 15 as A24/A32 active (1 = A24/A32 Registers Accessible).
Reading the ID Register The following example reads the ID Register (register 0) at logical address 48.
The program prints a decimal number representing the sum of the decimal
values of the "set" bits.
OUTPUT 70900; "VXI:READ? 48, 0"
ENTER 70900; IDREG
PRINT IDREG
Reading the Device
Type Register
The following example reads the Device Type Register (register 2) at logical
address 48. The program returns a decimal value representing the sum of the
decimal values of the "set" bits.
OUTPUT 70900; "VXI:READ? 48, 2"
ENTER 70900; DEVREG
PRINT DEVREG
Writing to the
Control Register
The example in this section shows how to use the VXI:WRITE command to
write data to the Control Register. Fourteen of the 16 bits can be user
defined; bits 1 and 2 provide SYSFAILIN and RESET, respectively.
The following example writes data (FFFF
h
) to the Control Register (register 4)
at logical address 48.
OUTPUT 70900; "VXI:WRITE 48, 4, #HFFFF"
Chapter 3 Using the Agilent E1490C 61