Bcd To Signed Binary Scaling - Scl3 - Omron CQM1H - PROGRAM Programming Manual

Programmable controllers; inner boards
Table of Contents

Advertisement

Conversion Instructions
Flags
Example
05000
DM 0000
FFFD
DM 0001
0003
DM 0002
0002
5-20-12 BCD TO SIGNED BINARY SCALING – SCL3(––)
SCL3(−−)
S
P1
R
Limitations
308
The result can be calculated by first converting all signed hexadecimal values
to BCD and then using the following formula.
ER:
Indirectly addressed EM/DM word is non-existent.
(Content of *EM/*DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
P1 and P1+2 are not in the same data area, or other setting error.
CY:
ON when the result, R, is negative.
EQ:
ON when the result, R, is 0000.
When 05000 is turned ON in the following example, the signed binary source
data in 001 (#FFE2) is converted to BCD according to the parameters in
DM 0000 to DM 0002. The result (#0018) is then written to LR 00 and CY is
turned ON because the result is negative.
@SCL2(−−)
001
DM 0000
LR 00
FFFD
FFE2
−0018
0002
R=  × (FFE2−FFFD)
0003
2
× (−1B) = −18
=
3
Ladder Symbols
@SCL3(−−)
S
P1
R
S and P1+1 must be BCD.
P1 through P1+4 must be in the same data area.
∆ Y
× (S – P1)
R =
∆ X
Address Instruction
00000
LD
00001
@SCL2(−−)
2
IR 001
3
LR 00
IR, SR, AR, DM, EM, HR, LR
P1: First parameter word
IR, SR, AR, DM, EM, HR, LR
IR, SR, AR, DM, EM, HR, LR
Section 5-20
Operands
05000
001
DM
0000
LR
00
FFE2
0018
CY=1
CY flag is turned ON because
the conversion result is negative.
Operand Data Areas
S: Source word
R: Result word

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sysmac cqm1h seriesSysmac cqm1h-cpu series

Table of Contents