EasyManuals Logo
Home>Omron>Controller>CJ - INSTRUCTIONS

Omron CJ - INSTRUCTIONS User Manual

Omron CJ - INSTRUCTIONS
1308 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #715 background imageLoading...
Page #715 background image
677
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Data Control Instructions
3
SCL2
Flags
Function
SCL2(486) is used to convert the signed binary data contained in the source word S into signed BCD
data (the BCD data contains the absolute value and the Carry Flag shows the sign) and place the result
in the result word R according to the linear function defined by the slope (∆X, ∆Y) and an offset. The
address of the first word containing ∆X, ∆Y, and the offset 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).
The following equations are used for the conversion.
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 result in R will be the absolute BCD conversion value and the sign will be indicated by the Carry
Flag. The result can thus be between –9999 and 9999.
• If the result is less than –9999, –9999 will be output as the result. If the result is greater than 9999,
9999 will be output.
Name Label Operation
Error Flag ER • ON if the contents of C+1 (∆X) is 0000.
• ON if the contents of C+2 (∆Y) is not BCD.
• OFF in all other cases.
Equals Flag = • ON if the result is 0.
• OFF in all other cases.
Carry Flag CY • ON if the result is negative.
• OFF if the result is zero or positive.
∆Y
R =
BCD conversion of ∆X
Note: The slope of the line is ∆Y/∆X.
× ((BCD conversion of S) – (BCD conversion of offset)
∆Y
∆X
∆Y
∆X
∆Y
∆X
∆Y
∆X
P1
P1+1
P1+2
R (signed BCD)
S (signed binary)
Offset
R (signed BCD)
S (signed binary)
Offset
R (signed BCD)
S (signed binary)
Offset of 0000
Offset = 0000 hex
Offset
(Signed binary)
(Signed binary)
(Signed BCD)
Positive Offset
Negative Offset

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CJ - INSTRUCTIONS and is the answer not in the manual?

Omron CJ - INSTRUCTIONS Specifications

General IconGeneral
BrandOmron
ModelCJ - INSTRUCTIONS
CategoryController
LanguageEnglish

Related product manuals