
3-33
3
CONFigure:INPut (@ 2,3)
'sets bytes 2 and 3 as inputs
CONFigure:INPut:POL 1
'sets high true input data
FORMat:TALK HEX
'selects BCD/HEX characters
3.8.6
Reading the Digital Input String
Now that the talk string has been defined and digital interface has been
configured, it is time to input data. To read the data with a command use
the SENSe:DATA:VALue? or PI? query. e.g.
CALL OUTPUT(dev, "SENSe:DATA:VALue?")
CALL ENTER(dev, Rdg$)
3.8.7
Monitoring the Digital Input Signals
The DAQ board or module can be set to monitor the digital inputs and
generate an Service Request when selected input signals changes state. The
state changes are collected in the Questionable Event Register and
summarized in the Status Byte Register.
When the Service Request is generated, the 4807/4867 asserts the SRQ line
or the 2307/2367 generates a Service Request Message (SRM). The user
should query the Status Byte and then the Questionable Event Register to
determine the cause of the Service Request. The Questionable Condition
Register can then be read to get the current digital input signal levels.
The following example generates an 48074867 SRQ or 23072367 SRM
whenever Digital Input 1 (bit 0) goes high, Digital Input 2 (bit 1) goes low
or Digital Input 3 (bit 2) toggles. Refer to Figure 3-2 for the register bit
assignments. (Note that the Digital Inputs are numbered 1-8 while the
register bits are numbered 0-7)
Setup:
STAT:QUES:ENAB:PTR 5
'bits 0 and 2 high going
STAT:QUES:ENAB:NTR 6
'bits 1 and 2 low going
STAT:QUES:ENAB 7
'bits 0, 1 and 2 are enabled
*SRE 40
'bits 3 and 5 are enabled
After the SRQ occurs:
Serial Poll the 4807/4867
If bit 3 of the Status Byte is on then
Read the Questionable Event Register
Содержание 4807
Страница 5: ...ii This page left intentionally blank...
Страница 22: ...1 17 1 Figure 1 3 2367 CE Certificate...
Страница 69: ...2 40 2 This page left intentionally blank...
Страница 129: ...5 10 5 This page left intentionally blank...
Страница 159: ...A 30 A4 This page intentionally left blank...