![Allen-Bradley MicroLogix 1400 Скачать руководство пользователя страница 224](http://html1.mh-extra.com/html/allen-bradley/micrologix-1400/micrologix-1400_instruction-manual_2900205224.webp)
Publication 1766-RM001A-EN-P - October 2008
222
Math Instructions
Use the ATN instruction to take the arc tangent of a number (source) and
store the result (in radians) in the destination. The resulting value in the
destination is always greater than or equal to -
π
/2 and less than or equal
to
π
/2, where
π
= 3.141592.
Enter the following parameters when programming this instruction:
•
Source is the address to compute the arc tangent.
•
Destination is the address to store the arc tangent of the Source.
Address Levels for the operands involved in the ATN can be ALL word,
ALL double word, ALL float, or a combination. These operands shall
undergo a conversion to float. The calculation of the source (in float) is
then performed, and the result is then cast to the data type of Destination.
Instruction Operation
When the rung is true, this instruction shall compute arc tangent of the
Source and place the result in Destination. Valid input range is from
-
∝
…+
∝
and produced output range is from -
π
/2…
π
/2.
If the Destination is floating point, the result shall always be rounded
using the round to even rule.
ATN Instruction Valid Addressing Modes and File Types
For definitions of the terms used in this table see Using the Instruction Descriptions on page 92.
Parameter
Data Files
Function Files
(1)
CS - Comm
s
IOS - I/O
DLS - Da
ta
L
o
g
(2
)
Address Mode
(3)
Address Level
O
I
S
B
T,
C
, R
N
F
ST
L
MG, PD
RI/RIX
PLS
RTC
HSC
PTOX, PW
MX
STI
EII
BH
I
MMI
LCD
Dir
e
c
t
In
dire
ct
Immedia
te
Int
16
Immedia
te In
t32
Immedia
te Flo
a
t
Bit
Wo
rd
Do
ub
le
W
o
rd
E
lement
Float
Source
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
Destination •
•
•
•
•
•
•
•
•
•
•
•
•
(1) PTOX and PWMX files are only for use with MicroLogix 1400 BXB or BXBA unit.
(2) The Data Log Status file can only be used for the following math instructions: ADD, SUB, MUL, DIV, NEG, and SCP.
(3) See Important note about indirect addressing.
IMPORTANT
You cannot use indirect addressing with: S, MG, PD, RTC, HSC, PTOX,
PWMX, STI, EII, BHI, MMI, CS, IOS, and DLS files.
efesotomasyon.com - Allen Bradley,Rockwell,plc,servo,drive