
27
In order to use one of the other formats, convert the binary value to its hexadecimal, octal, or decimal equivalent and send the
command as follows:
OUTP:DIG:WORD #H107,(@111)
' Set pattern; hexadecimal format.
OUTP:DIG:WORD #Q407,(@111)
' Set pattern; octal format.
OUTP:DIG:WORD 263,(@111)
' Set pattern; decimal format.
:WORD? command — For non-decimal formats, one of the following headers will accompany the returned value to identify
which format is selected:
#B = Header for binary values
#H = Header for hexadecimal values
#Q = Header for octal values
The :FORMat command is used to select the format for returned values.
:DWORd <NDN or NRf>, <clist>
Set digital output double-word pattern
:DWORd? <clist>
Query output double-word pattern
Use to set (or query) a 16-bit digital output word pattern. Channels 11, 12, 13, and 14 are combined to form one 32-bit pattern.
NOTE
Only channel 11 is valid with the :DWORd command. Using any other channel number with the
command generates error -221 (settings conflict).
When you write an output pattern to channel 11, the bits for channels 11, 12, 13, and 14 will set. As shown in
,
channel 11 is used for bits B0 through B7, channel 12 is used for bits B8 through B15, channel 13 is used for bits B16 through
B23, and channel 14 is used for bits B24 through B31.
NOTE
When setting a double-word bit pattern, all I/O channels (11, 12, 13, and 14) must be configured
as output ports. Otherwise, error -221 (settings conflict) will occur when the :DWOR command is
sent.
The value to set the 32-bit output pattern can be sent in the decimal, binary, hexadecimal, or octal format.
Example: Write 32-bit output bit pattern “00000001 00000000 00000001 00000111” to channel 11 (Bits B24, B8, B2, B1,
and B0 set high):
OUTP:DIG:STAT 1,(111:114)
' Set I/O channels 11, 12, 13, and 14 as output ports.
OUTP:DIG:DWOR #B1000000000000000100000111,(@111)
'
Set pattern; binary format.
Notice that leading zeroes for the binary double-word need not be included in the command.
In order to use one of the other formats, convert the binary value to its hexadecimal, octal, or decimal equivalent and send the
command as follows:
OUTP:DIG:DWOR #H1000107,(@111)
' Set pattern; hexadecimal format.
OUTP:DIG:DWOR #Q100000407,(@111)
' Set pattern; octal format.
OUTP:DIG:DWOR 16777479,(@111)
' Set pattern; decimal format.
:DWORd? command — For non-decimal formats, one of the following headers will accompany the returned value to identify
which format is selected:
#B = Header for binary values
#H = Header for hexadecimal values
#Q = Header for octal values
The :FORMat command is used to select format for the returned values.
Содержание 7707
Страница 55: ...52 Specifications 7707 Multiplexer Digital I O Module...
Страница 58: ......