![Agilent Technologies E1330B Скачать руководство пользователя страница 38](http://html.mh-extra.com/html/agilent-technologies/e1330b/e1330b_users-manual-and-scpi-programming-manual_2867439038.webp)
36
Using the Agilent E1330B Digital I/O Module
Chapter 3
Outputting Data Bytes and Bits
Data output is performed using the commands in SCPI
[SOURce:]DIGital:DATA
n subsystem. The TTL levels of an output 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 488selected device
clear. In BASIC this is
CLEAR 70918
.
Output
Output operations can involve single bits, 8-bit bytes, or multiple bytes.
Single bit output operations always expect a value of 0 or 1. Byte or multiple
byte output operations can accept numbers in decimal, hexadecimal, octal,
or binary formats. The choice of output format is indicated by a special
character (#) in the value to be output. If the # character is not used, the
output value is assumed to be in decimal format.
Example
10
ASSIGN @Dio TO 70918
!Establish I/O path to module.
20
INTEGER Bits, Bytes, Ready
30
Bits= 1
40
Bytes = 255
50
OUTPUT @Dio;"*RST;*OPC?"
!Reset the module to establish
defaults.
60
ENTER @Dio;Ready
!Wait for completion.
70
OUTPUT@Dio;"DIG:DATA0:BIT5 "&VAL$(Bits)&";*OPC?"
!Set port 0 bit 5 true.
80
ENTER @Dio;Ready
!Wait for completion.
90
OUTPUT@Dio;"DIG:DATA1 "&VAL$(Bytes)&";*OPC?"
!Output a byte on port 1.
100
ENTER @Dio;Ready
!Wait for completion.
110
END
This example sets bit 5 on port 0 to a logical true value (with the default
polarity established, the data line is set to TTL high). The example then sets
all the data lines on port 1 to TTL high. Port 0, bit 5 and port 1 data lines will
remain in the TTL high condition until another output command or input
command at the same port is received.
Содержание 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 ...