Panasonic FP Series Programming Manual page 418

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

F300_BSIN
The function calculates the sine of BCD code angular data (input s) and stores the result (output d)
Description
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 can yield a result in the range of -1.0000 to 1.0000. 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 F300_BSIN (see page 1323)
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. In addition, an analytical program is
created that interprets the result. The same POU header is used for both programming languages.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
BCD type Sine operation
preceding sign (0 when input is +, 1 when input is -)
whole number before the decimal point (0 or 1)
numbers after the decimal point with 4 significant figures as a BCD value (16#0000 to
16#9999).
Function
16-bit 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
for an instant
for an instant
Register
EV
DT
LD
FL
EV
DT
LD
FL
If
 the input value for s is not a BCD value
or is not between 0° and 360°.
 the result is 0.
 the result causes an overflow.
Arithmetic instructions
Constant
dec. or hex.
-
417

Advertisement

Table of Contents
loading

Table of Contents