Omron CJ - REFERENCE MANUAL 02-2010 Reference Manual page 715

Table of Contents

Advertisement

Operand Specifications
Word addresses
Area
CIO
WR
HR
S
P1
OK
OK
OK
R
Flags
Name
Error Flag
Equals Flag
Negative Flag
Function
SCL3(487) is used to convert the signed BCD data (the BCD data contains the absolute value and the
Carry Flag shows the sign) contained in the source word S into signed binary data and place the result
in the result word R according to the linear function defined by the slope ( X, Y) and an offset. The
maximum and minimum conversion values are also specified. The address of the first word containing
X, Y, the offset, the maximum conversion, and the minimum conversion is specified for the first
parameter word P1.
The sign of the result is indicated by the status of the Carry Flag (ON: negative, OFF: positive). Use
STC(040) and CLC(041) to turn the Carry Flag ON and OFF.
The following equations are used for the conversion.
Y
R = Binary conversion of X
Note: The slope of the line is Y/ X.
• The offset and slope can be a positive value, 0, or a negative value. Using a negative slope enables
reverse scaling.
• The result will be rounded to the nearest integer.
• The source value in S is treated as an absolute BCD value and the sign is indicated by the Carry
Flag. The source value can thus be between –9999 and 9999.
• If the result is less than the minimum conversion value, the minimum conversion value will be output
as the result. If the result is greater than the maximum conversion value, the maximum conversion
value will be output.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
AR
T
C
DM
EM
OK
OK
OK
OK
OK
Label
ER
• ON if the contents of S is not BCD.
• ON if the contents of C+1 ( X) is not between 0001 and 9999 BCD.
• OFF in all other cases.
=
• ON if the result is 0.
• OFF in all other cases.
N
• ON when the MSB of the R (the result) is 1.
• OFF in all other cases.
((Binary conversion of S)+(Offset))
Indirect DM/EM
addresses
Con-
stants
@DM
*DM
DR
@EM
*EM
OK
OK
OK
---
---
OK
Operation
3. Instructions
Registers
Flags
Pulse
bits
Indirect
IR
TK
CF
using IR
---
OK
---
---
TR
bits
---
---
3
679

Advertisement

Table of Contents
loading

Table of Contents