Panasonic FP Series Programming Manual page 422

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

F302_BTAN
The function calculates the tangent of BCD code angular data (input s) and stores the result
Description
(output d) as a BCD value in an array with three elements.
BCD values for input s lie in the area from 0° to 360° (16#0 to 16#360) in 1° steps. With this output
d yields a result in the range of -57.2900 to 57.2900. The result is returned as follows:
ARRAY[0]
ARRAY[1]
ARRAY[2]
This instruction also exists as a P instruction (for FP2/2SH, FP3/5, FP10/10SH PLC types), which
is only executed at the rising edge of the EN trigger. Select [Insert P instruction] from the
"Instructions" pane if you require a P instruction. To facilitate reuse, the instruction then appears
under "Recently used" in the pop-up menu. Press <Ctrl>+<Shift>+<v> within the programming
area to open the list of recently used elements.
Availability of F302_BTAN (see page 1324)
PLC types
Data types
Variable
Data type
WORD
s
ARRAY [0..2] of
d
WORD
Operands
For
WX
s
-
d
Error flags
No.
IEC address
%MX0.900.7
R9007
%MX0.900.8
R9008
%MX0.900.11
R900B
%MX0.900.9
R9009
In this example, the same POU header is used for all programming languages. For an example
Example
using IL (instruction list), please refer to the online help.
BCD type Tangent operation
preceding sign (0 when input is +, 1 when input is -)
whole number before the decimal point as BCD value (16#0 to
16#57)
numbers after the decimal point with 4 significant figures as BCD
value (16#0000 to 16#9999)
Function
area where angle data is stored
result stored in 3 words
Relay
T/C
WY
WR
WL
SV
WY
WR
WL
SV
Set
permanently
for an instant
to TRUE
for an instant
Register
EV
DT
LD
FL
EV
DT
LD
FL
If
 the input value for s is not a BCD value
 s = 90° (16#90) or 270° (16#270)
 the result is 0.
 the result causes an overflow.
Arithmetic instructions
Constant
dec. or hex.
-
421

Advertisement

Table of Contents
loading

Table of Contents