User`s manual
Getting Started 15
Chapter 1
Specifying a Bit Each of the four ports on the module has eight bi-directional data lines,
corresponding to eight programmable data bits. Some SCPI commands
allow you manipulate or read these bits individually. For example:
MEASure:DIGital:DATAn:BITm?
This command reads the state of a bit, specified by m, on port n. The result
will be either 0 or 1, indicating the current logical state of the bit. Replace m
with the desired bit number, and n with the desired port number, making
each number the last characters of the
DATA and BIT keywords without
spaces. For example, to read bit 7 on port 0, use the following command:
MEASure:DIGital:DATA0:BIT7?
For single ports, the value of m can range from 0 to 7. Some multiple port
operations and commands may allow bit numbers to range from 0 to 31.
Specifying Multiple Port
Operations
The Digital I/O module allows you to set or read multiple ports or bits with
a single command. For example:
MEASure:DIGital:DATAn[:type]?
This command uses an optional keyword, [:type], to specify how many ports
are combined in a single returned value. The lower case keyword
[:type] is
replaced with one of a fixed set of keywords. For example, to read all 4 ports
(all 32-bits) as a single returned value, use the command:
MEASure:DIGital:DATA0:LWORd?
Keywords are provided to allow port combinations of 16- or 32-bits. Using
multiple ports is described in more detail in Chapter 4 of this manual.