Publication 1766-RM001A-EN-P - October 2008
Math Instructions
225
RAD - Degrees to
Radians
Instruction Type: output
DEG Instruction Operation
Inputs
Conditions
Output
Source Type
Destination
Type
S:2/14
S:0/3-0
S, Z, V, C
S:5/0
Destination
W,DW, F
F
X
Source >= 0
0,0,0,0
L
Deg(Source)
(1)
DNRM
F
X
X
0,1,0,0
L
0
W,DW, F
F
X
Source < 0
1,0,0,0
L
Deg(Source)
W,DW, F
W
X
-0.5 <= Deg(Source) < 32767.5
0,0,0,0
L
Rnd(Deg(Source))
W,DW, F
W
X
-0.5 < Deg(Source) < 0.5
0,1,0,0
L
0
W,DW, F
W
X
-32768.5 < Deg(Source) <= -0.5
1,0,0,0
L
Rnd(Deg(Source))
W,DW, F
DW
X
0.5 <= Deg(Source) < 2147483647.5
0,0,0,0
L
Rnd(Deg(Source))
W,DW, F
DW
X
-0.5 < Deg(Source) < 0.5
0,1,0,0
L
0
W,DW, F
DW
X
-2147483648.5 < Deg(Source) <= -0.5
1,0,0,0
L
Rnd(Deg(Source))
(2)
W,DW, F
W
X
Deg(Source) >= 32767.5
0,0,1,0
1
32767
(2)
W,DW, F
W
X
Deg(Source) <= 32767.5
1,0,1,0
1
-32768
(2)
W,DW, F
DW
X
Deg(Source) >= 2147483647.5
0,0,1,0
1
2147483647
(2)
W,DW, F
DW
X
Deg(Source) <= -2147483648.5
1,0,1,0
1
-2147483648
(3)
X
F
X
Source is NAN or INF
0,0,1,0
1
0x7FFFFFFF
(4)
X
W
X
Source is NAN or INF
0,0,1,0
1
32767
(4)
X
DW
X
Source is NAN or INF
0,0,1,0
1
2147483647
(1) All denormalized inputs shall be treated as plus zero. Any underflow result shall produce plus zero.
(2) If the Destination is word or double-word and an overflow occurs(except source is NAN or INF):
If the result is positive, Destination is 32767 for Word and 2147483647 for Double Word. If the result is negative, Destination is -32768 for Word and -2147483648 for
Double Word.
(3) If the Destination is floating point, all overflows (Source is NAN or infinity) shall produce NAN (0x7FFFFFFF).
(4) If Destination is an integer and the Source is NAN or infinity, a saturated result (32767 for Word and 2147483647 for Double Word) shall be stored.
AB
S
Degrees to Radians
S
ource
N7
:
0
0<
Dest
N7
:
1
0<
RAD
Execution Time for the RAD Instruction
Controller
Data Size
When Rung Is:
True
False
MicroLogix 1400
word
23.0610 µs
0.4070 µs
long word
26.211 µs
0.3790 µs
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive