![Agilent Technologies E1330B Скачать руководство пользователя страница 37](http://html.mh-extra.com/html/agilent-technologies/e1330b/e1330b_users-manual-and-scpi-programming-manual_2867439037.webp)
Using the Agilent E1330B Digital I/O Module
35
Chapter 3
Inputting Data Bytes and Bits
Data input is performed using commands in the SCPI
MEASure:DIGital:DATA
n subsystem. The returned value of an input will
depend upon the POLarity programmed for the port.
Both Input and Output operations will attempt to complete the handshake
mode set for the port and may "hang" if required handshake operations are
not completed. To unhang a hung transfer, issue a IEEE 488 selected device
clear. In BASIC this is
CLEAR 70918
.
Input
Input operations can involve single bits, 8-bit bytes, or multiple bytes. Single
bit operations always return a value of
1
or
0
. Byte or multiple byte inputs
always return values in decimal format.
Example
10
ASSIGN @Dio TO 70918
!Establish I/O path to module.
20
INTEGER Bits, Bytes, Ready
30
OUTPUT @Dio;"*RST;*OPC?"
!Reset the module to establish
defaults.
40
ENTER @Dio;Ready
!Wait for completion.
50
OUTPUT @Dio;"MEAS:DIG:DATA0:BIT7?"
!Input a bit on port 0.
60
ENTER @Dio;Bits
70
OUTPUT @Dio;"MEAS:DIG:DATA1?"
!Input a byte on port 1.
80
ENTER @Dio;Bytes
90
DISP "Port 0, Bit 7 is "&Bits
!Show the results.
100
DISP "Port 1 byte is "&Bytes
110
END
This example first sets the module to the default state (positive polarity and
no handshake). The state of data line 7 (Bit 7) of port 0 is read. A byte is
input from port 1. The displayed state of the bit input will be either 0 or 1,
depending upon the electrical state of port 0 data line 7. The displayed value
of the byte input will range from 0 (all port 1 data lines low) to 255 (all port
1 data lines high).
Note
Following a
*RST
command, the port data lines will be configured as
inputs, with the ports terminating resistors pulling them high. Bits will be
read as a 1 and a byte as 255.
Содержание E1330B
Страница 2: ......
Страница 10: ...8 Notes ...
Страница 11: ...9 Notes ...
Страница 12: ...10 Notes ...
Страница 25: ...Configuring the Agilent E1330B Digital I O Module 23 Chapter 2 Figure 2 6 J1 and J2 Connector Pinouts ...
Страница 32: ...30 Configuring the Agilent E1330B Digital I O Chapter 2 Notes ...
Страница 42: ...40 Using the Agilent E1330B Digital I O Module Chapter 3 Notes ...
Страница 58: ...56 Understanding the Agilent E1330B Digital I O Module Chapter 4 Notes ...
Страница 104: ...102 Agilent E1330B Digital I O Module Command Reference Chapter 5 Notes ...
Страница 146: ...144 Error Messages Appendix C Notes ...