User`s manual

52 Understanding the Agilent E1330B Digital I/O Module
Chapter 4
operations. For a single port, the data lines number and bit numbers are:
In this manual the physical data lines are indicated as Dn-1. The n should be
replaced with the port number for the input operation. For example, bit 3 of
port 2 affects the state of data line D2-3.
Byte Output The SCPI command syntax to send an 8-bit byte to a data port is:
[SOURce:]DIGital:DATAn[:BYTE][:VALue] [<base>]<value>
This command instructs the Digital I/O module to set the port n data lines to
<value> using the output handshake. The optional parameter <base> defines
the numbering system to use to implement
<value> on the data lines. There
are four values allowed for
<base>:
The TTL levels set on the data lines depends upon the programmed port
polarity. In the default state (POSitive polarity) a TTL high level will be set
for any bit set to 1. For example, the following four BASIC program lines
all perform the same function and set the same data lines on port 3:
120 OUTPUT @Dio;"DIG:DATA3 170"
120 OUTPUT @Dio;"DIG:DATA3 #HAA"
120 OUTPUT @Dio;"DIG:DATA3 #Q252"
120 OUTPUT @Dio;"DIG:DATA3 #B10101010"
If port 3 is in the default POSitive polarity mode, the TTL levels set on the
data lines by any of the program lines above will be:
Port numbers range from 0 to 3 for single port operations. The section
“Multiple Port Operations” beginning on page 53 describes port numbering
and byte order for multiple port operations. For single port operations, the
most significant bit is bit 7. The table below shows the bit numbers and data
lines.
Dn-7 Dn-6 Dn-5 Dn-4 Dn-3 Dn-2 Dn-1 Dn-0
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
no parameter decimal format
#H hexadecimal format
#Q octal format
#B binary format
TTL level High Low High Low High Low High Low
Data line D3-7 D3-6 D3-5 D3-4 D3-3 D3-2 D3-1 D3-0
D
n-7 Dn-6 Dn-5 Dn-4 Dn-3 Dn-2 Dn-1 Dn-0
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
MSB LSB