![Agilent Technologies E1330B Скачать руководство пользователя страница 39](http://html.mh-extra.com/html/agilent-technologies/e1330b/e1330b_users-manual-and-scpi-programming-manual_2867439039.webp)
Using the Agilent E1330B Digital I/O Module
37
Chapter 3
Multiple Port Operations
The Digital I/O module supports multiple port operations using a single
SCPI command. Multiple port operations are shown in the SCPI command
syntax as the optional keyword
[:type]
. For example, this SCPI command
syntax initiates a handshake and returns a value:
MEAS:DIG:DATA
n
[:type]?
The optional keyword
[:type]
is replaced by one of the following keywords:
Example
10
ASSIGN @Dio TO 70918
!Establish I/O path to module.
20
DIM Pat_1$[8], Pat_2$[8], Hand$[4]
30
Pat_1$="AAAAAAAA"
!Alternating 1 and 0.
40
Pat_2$ = "55555555"
!Alternating 0 and 1.
50
Hand$ = "LEAD"
60
OUTPUT @Dio;"*RST;*OPC?"
!Reset the module to establish
defaults.
70
ENTER @Dio;Ready
!Wait for completion.
80
OUTPUT@Dio;"DIG:DATA0:LWORD:HAND "&Hand$&";*OPC?"
!Set LEADing handshake for 32
bit operations.
90
ENTER @Dio;Ready
!Wait for completion.
100
OUTPUT@Dio;"DIG:DATA0:LWORD:HAND:DEL .015;*OPC?"
!Set handshake delay time.
110
ENTER @Dio;Ready
!Wait for completion.
120
OUTPUT@Dio;"DIG:DATA0:LWORD #H"&Pat_1$&";*OPC?"
!Set 32 bits, use handshake,
alternating 1 and 0.
130
ENTER @Dio;Ready
!Wait for completion.
140
OUTPUT@Dio;"DIG:DATA0:LWORD #H"&Pat_2$&";*OPC?"
!Set 32 bits, use handshake,
alternating 0 and 1.
150
ENTER @Dio;Ready
!Wait for completion.
160
END
This example combines all four ports for handshaking and output
operations. The handshake mode is set to LEADing. The output data is given
in hexadecimal as specified by the
#H
characters. When using multiple port
handshaking, use the highest numbered port CTL line to ensure a correct
handshake.
:BYTE
This keyword, or no keyword (default), is used for 8-bit port
operations.
:WORD
This keyword is used to combine 2 adjacent ports for 16-bit port
operations.
:LWORd
This keyword is used to combine all 4 ports for 32-bit operations.
Содержание 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 ...