Table of Contents

Advertisement

APR

Instruction
ARITHMETIC PROCESS
Symbol
Applicable Program Areas
Function block
Area
definitions
Usage
OK
Operands
Operand
C
Control word
S
Source data
R
Result word
Sine Function
Operand
Value
C
0000 hex
0000 to 0900 (BCD)
S
0000 to 0900 (BCD)
R
9999 (BCD)
Cosine Function
Operand
Value
C
0001 hex
0000 to 0900 (BCD)
S
0000 to 0900 (BCD)
R
9999 (BCD)
Note The actual result for SIN(90 ) and COS(0 ) is 1, but 9999 (0.9999) will be output to R.
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Mnemonic
Variations
APR
@APR
Block program areas
Step program areas
OK
OK
Description
Data range
---
0 to 90
0.0000 to 0.9999
1.0000
Data range
---
0 to 90
0.0000 to 0.9999
1.0000
Function
code
Calculates the sine, cosine, or a linear extrapola-
069
tion of the source data.
APR
APR(069)
C: Control word
C
S: Source word
S
R: Result word
R
Subroutines
Interrupt tasks
OK
Data type
UINT
WORD
WORD
• Sine Function (C=0000)
When C is 0000, APR(069) calculates the SIN(S) and writes
the result to R. The range for S is 0000 to 0900 BCD (0.0 to
90.0 ) and the range for R is 0000 to 9999 BCD (0.0000 to
0.9999). The remainder of the result beyond the fourth deci-
mal place is eliminated.
• Cosine Function (C=0001)
When C is 0001, APR(069) calculates the COS(S) and writes
the result to R. The range for S is 0000 to 0900 BCD (0.0 to
90.0 ) and the range for R is 0000 to 9999 BCD (0.0000 to
0.9999). The remainder of the result beyond the fourth deci-
mal place is eliminated.
3. Instructions
Function
SFC action or
transition programs
OK
OK
Size
Variable
1
1
453
3

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents