104
Chapter 4 Features and Functions
Digital I/O Operation
4
Digital Input Operation
•
From the front-panel, you can read data from the built-in digital I/O
bits/port (numbered 090 through 094) or any one of the 8-bit ports on
a digital I/O module or multifunction module.
•
From the remote interface, you can read data from the individual bit
channels and 8-, 16-, or 32-bit ports on a digital I/O module or
multifunction module, as well as from the built-in digital I/O bits/port
(numbered 090 through 094).
•
Instrument reset will set all digital I/O ports in the instrument as
input ports. Pressing Card Reset or issuing a SYST:CPON command
will set all ports on the specified module as input ports (ports on other
modules are not affected).
•
Front-Panel Operation: Select an 8-bit digital I/O port, press Read to
read the data from the port. The data can be displayed as either
decimal or binary (see page 34).
•
Remote Interface Operation: Use the following command to read an
individual bit (bit 6) on a module in slot 4. A “0” (bit cleared) or a “1”
(bit set) will be returned.
SENSe:DIGital:DATA:BIT? 406 ! Read the bit channel 406.
The following commands read values on 8-, 16-, and 32-bit ports:
SENSe:DIGital:DATA:BYTE:VALue? 400
! Read the 8-bit Port 400.
SENSe:DIGital:DATA:WORD:VALue? 400
! Read the 16-bit Port 400.
SENSe:DIGital:DATA:LWORD:VALue? 400
! Read the 32-bit Port 400.
The range of possible returned values is shown:
WORD values greater then 32767 and LWORD values greater then
for (2
31
-1) are returned as negative numbers. These values are in 2’s
complement form.
Parameter Decimal Range Hex range
BYTE 0 to 255 00
h
to FF
h
WORD -32768 to 32767 -8000
h
to 7FFF
h
LWORD
-2
31
to (2
31
-1)
-80000000
h
to 7FFFFFFF
h