28
:FORMat <name>, [<NRf>]
Select data format for reading output patterns
:FORMat?
Query data format
Select (or query) the data format for reading digital output patterns. The :BYTE?, :WORD? and :DWORd? commands are
used to read digital output patterns.
The response message for :BYTE?, :WORD? and :DWORd? will be a value that corresponds to the set output pattern. The
binary format (BINary) allows you to directly identify which bits are set. For example, for a returned binary value of
#B100101, bits B5 (MSB), B2, and B0 (LSB)
are set. When using one of the other data formats, you will have to convert the
returned value to its binary equivalent to determine which bits are set.
The optional <NRf> parameter is used to specify the length of the byte/word/dword returned by the :BYTE?, :WORD? and
:DWORd commands. Parameter value “0” will return the complete byte/word/dword but not include any leading zeroes.
Parameter values 1 to 32 sets the length (number of digits) of the byte/word/dword. If the length is too small for the value, then
the least significant digits of the byte/word/dword will be truncated.
When the :FORMat? command is sent, the response message will indicate the selected data format and the length for the
returned pattern (i.e., BIN, 0).
NOTE
The OUTP:DIG:FORM command is coupled to the SENS:DIG[:DATA]:FORM command. That is,
they both perform the same function. Either one of these commands can be used to set the format
for returned digital I/O bit patterns.
Digital inputs
Digital TTL inputs can be read by the Model 27xx. With one I/O channel set as an input port, eight input lines (bits) are
available. With two channels set as input ports, 16 input lines (bits) are available. With three channels set as input ports,
24 input lines (bits) are available. And finally, with all four channels set as input ports, 32 input lines (bits) are available.
TTL inputs are read as follows:
• TTL high (>2V to 5V) is read as logic ‘1.’
• TTL low (<0.8V) is read as logic ‘0.’
NOTE
A digital I/O channel must first be configured as an input port before its input lines can be read.
See
“Reading digital inputs,” page 30
, for details.
Input bit patterns
Operations to read input bit patterns are divided into two categories; basic operation and advanced operation:
Basic operation
— Basic operation handles each input channel as a single 8-bit input pattern. An 8-bit pattern is known as a
byte. Input bytes can be read from either the front panel or read using remote programming.
NOTE
For most applications, it is only necessary to read one 8-bit input pattern (byte). When working
with bytes, you do not need to concern yourself with advanced operation.
Advanced operation
— Advanced operation provides additional flexibility by allowing two digital input ports to be treated as
a single 16-bit input pattern (word), or all four input ports to be treated as a 32-bit input pattern (double-word). Words and a
double-word can only be read using remote programming.
Содержание 7707
Страница 55: ...52 Specifications 7707 Multiplexer Digital I O Module...
Страница 58: ......