Updates To Arithmetic Status Bits; Degrees To Radians (Rad); Entering Parameters - Allen-Bradley SLC 500 Series Reference Manual

Hide thumbs Also See for SLC 500 Series:
Table of Contents

Degrees to Radians (RAD)

RAD
RAD
Degrees to Radians
Source
N7:61
0<
Dest
N7:60
0<
Fixed SLC
SLC
SLC
5/01
5/02
5/03
Output Instruction

Updates to Arithmetic Status Bits

The arithmetic status bits are found in Word 0, bits 0 to 3 in the status file.
After an instruction is executed, the arithmetic status bits in the status file are
updated.
Table 5.4 Processor Function
With this Bit
S:0/0
Carry (C)
S:0/1
Overflow (V)
S:0/2
Zero (Z)
S:0/3
Sign (S)
Use this instruction to convert degrees (source) to radians 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 135 degrees to radians.
SLC
SLC
5/04
5/05
Π
-------- -
180

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.
The Processor
always resets.
sets if overflow generated or an unsupported input is
detected; otherwise resets
sets if the result is zero; otherwise resets
sets if the result is negative; otherwise resets
Π
x
x
-------- -
-------- -
=
=
135
180
Data Handling Instructions
Π
-------- -
135
x
2.356 Radians
=
180
Publication 1747-RM001G-EN-P - November 2008
5-9
Table of Contents
loading

Table of Contents