Agilent Technologies E1465A Automobile Parts User Manual


 
42 Using the Matrix Modules Chapter 3
Querying Matrix Modules
All query commands end with a "?". These commands are used to determine
a specific state of the matrix module. Data are sent to the output buffer
where it can be retrieved into a computer. CLOSe? <channel_list> and
OPEN? <channel_list> return the current state of the specified channel.
These commands return "1" if the operation is true and return "0" if the
operation is false. A maximum of 128 channels can be queried at one time.
Therefore, to query more than 128 channels, you must enter the query data
in two separate commands. See Chapter 4 for more information on query
commands.
Example: Querying
Channel Closure
(BASIC)
This BASIC example program closes a range of channels on an E1467A
8x32 matrix module and queries the results.
10 DIM Chan1$[128], Chan2$[128]
! Dimensions two string variables
to 128 characters each
20 OUTPUT 70915;"CLOS (@10000:10731)"
! Closes rows 00 through 07 and
columns 00 through 31
30 OUTPUT 70915; "CLOS? (@10000:10331)"
! Queries rows 00 through 03
and columns 00 through 31
40 ENTER 70915; Chan1$
! Enters the results of the first
128 channel closures
50 OUTPUT 70914; "CLOS? (@10400:10731)"
! Queries rows 04 through 07
and columns 00 through 31
60 ENTER 70915; Chan2$
! Enters the results of the second
128 channel closures
70 PRINT "Channels closed";Chan1$, Chan2$
! Prints all channels closed
(should print 1s)
80 END
Using the Scan Complete Bit
The Scan Complete Bit (bit 8) in the OPERation Status Register (in the
command module) can be used to determine when a scanning cycle
completes. (No other bits in this register apply to the switchbox.) Bit 8
has a decimal value of 256 and can be read directly using STAT:OPER?.
See STATus:OPERation[:EVENt]? in Chapter 4.
When enabled by STAT:OPER:ENAB 256, the Scan Complete Bit is
reported as Bit 7 of the Status Byte Register. You can use the GPIB Serial
Poll or the IEEE 488.2 Common command *STB? to read the Status
Register.