
42 Using the Form C Switch
Chapter 2
Querying the Form C Switch
All query commands end with a "?". These commands are used to determine
a specific state of the module. The data is sent to the output buffer where
you can retrieve it into your computer. See Chapter 3 for more information
on these commands.
Use CLOSe? <channel_list> or OPEN? <channel_list> to query the channel
state (open/closed). CLOS? returns a "1" for channel(s) closed and a "0" for
channel(s) open. OPEN? returns a "0" for channel(s) closed and a "1" for
channel(s) open. (Commands are software queries and do not account for
relay hardware failures.)
Example: Querying
Channel Closures
(BASIC)
This example closes a range of channels and queries for the results.
10 DIM Channels$[32]
!Dimensions a string variable to
32 characters
20 OUTPUT 70915;"CLOS (@100:131)"
!Closes channels 00 through 31
30 OUTPUT 70915;"CLOS? (@100:131)"
!Queries to see if the channels
are closed
40 ENTER 70915; Channels$
!Enters the results from the switch
card into the variable Channels$
50 PRINT "Channels Closed:";Channels$
! Prints the channels closed
(should print 1s)
60 END
Using the Scan Complete Bit
You can use the Scan Complete bit (bit 8) in the Operation Status Register
(in the command module) of a switchbox to determine when a scanning
cycle completes (no other bits in the register apply to the switchbox).
Bit 8 has a decimal value of 256 and you can read it directly with the
STAT:OPER? command. Refer to the STATus:OPERation[:EVENt]?
command in Chapter 3 for an example.
When enabled by the STAT:OPER:ENAB 256 command, the Scan
Complete bit will be reported as bit 7 of the Status Register. Use the GPIB
Serial Poll or the IEEE 488.2 Common Command *STB? to read the Status
Register.
When bit 7 of the Status Register is enabled by the *SRE 128 Common
Command to assert a GPIB Service Request, you can interrupt the
computer when the Scan Complete bit is set, after a scanning cycle
completes. This allows the computer to do other operations while the
scanning cycle is in progress.
Summary of Contents for E1463A
Page 2: ......
Page 6: ...6 Notes ...
Page 10: ...10 Notes ...
Page 78: ...78 Form C Switch Specifications Appendix A Notes ...
Page 98: ...98 Index Notes ...