Installation manual
Publication 1747-RM001G-EN-P - November 2008
5-8 Data Handling Instructions
Clearing S:14 before executing the FRD instruction is shown.
When the input condition is set (1), a BCD value (transferred from a 4-digit
thumb wheel switch for example) is moved from word N7:2 into the math
register. Status word S:14 is then cleared to make certain that unwanted data is
not present when the FRD instruction is executed.
Radian to Degrees (DEG)
Use this instruction to convert radians (source) to degrees and store the result
in the destination. The following formula applies:
Source * 180/Π
where Π = 3.141592
Use this instruction with SLC 5/03 (OS302), SLC 5/04 (OS401), and
SLC 5/05 processors.
Example: Convert 3 radians to degrees. Using ratio where 180° = Π in radians,
we have:
Entering Parameters
• Source is the integer and/or floating point values.
• Destination is the address of the word where the data is to be stored.
CLR
CLEAR
Dest S:14
0
FRD
FROM BCD
Source S:13
00001234
Dest N7:0
1234
MOV
MOVE
Source N7:2
4660
Dest S:13
4660
] [
I:1
0
0001 0010 0011 0100
0000 0100 1101 0010
S:13 and S:14 are
displayed in BCD
format.
DEG
Radians to Degrees
Source N7:60
0<
Dest N7:61
0<
DEG
Output Instruction
Fixed SLC
5/01
SLC
5/02
SLC
5/03
SLC
5/04
SLC
5/05
•••
180
Π
---------
x
3
---
180
Π
---------= x 3
180
Π
---------
⎝⎠
⎛⎞
= x 171.89 degrees=