Bcd om, n bin om, n, Bcd variable = im, n bin variable = im, n, Bcd o m , n bin o m, n – Rockwell Automation 1398-PDM-xxx IQ Master Version 3.2.4 for IA-2000 and IQ-5000 Positioning Drive Modules, IQ-55 User Manual
Page 205: Bcd variable = i m, n bin variable = i m, n

Language Reference • Reference
183
Publication 1398-PM601A-EN-P — October 2000
WORDS
BCD Om, n
BIN Om, n
Output, Binary Coded Decimal
Output, Binary
Outputs
Purpose
Set a group of outputs, in either binary (BIN) or binary coded decimal (BCD) format,
to the value of a variable.
Syntax
BCD Om, n = value
BIN Om, n = value
m
The output specified by m is set to the least significant bit of
variable.
n
n is the number of outputs included in the group.
value
The value can be a constant, a nonvolatile variable Gn, a vola-
tile variable Vn or a system variable.
Remarks
If the value is greater than n bits, the least significant n bits are output.
See Also
Example
BCD 03, 4 = V1
;Set outputs 3, 4, 5, and 6
BCD 03, 2 = 2
;Set output 3 OFF and output 4 ON
BIN 04, 3 = G7
;Set outputs 4, 5, and 6
BCD variable = Im, n
BIN variable = Im, n
Input, Binary Coded Decimal
Input, Binary
Inputs
Purpose
Read a group of inputs in either binary (BIN) or binary coded decimal (BCD) for-
mat into a variable.
Syntax
BCD variable = Im, n
BIN variable = Im, n
m
The input specified by m is the least significant bit of
the group.
n
n is the number of inputs included in the group.
variable
The variable may be a nonvolatile variable Gn, a vol-
atile variable Vn or a system variable.
Remarks
If the BCD instruction is used and the value is out of range, a BCD input out of
range error will be generated.
See Also
Im
Example
BCD V3 = I9, 4
;Read BCD value of inputs 9, 10, 11, and
12
;into V3
BIN V11 = I13, 2
;Read binary value of inputs 13 and 14
;into V11