User`s manual
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:DATAn[: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.