Panasonic FP Series Programming Manual page 419

Hide thumbs Also See for FP Series:
Table of Contents

Advertisement

Arithmetic instructions
In this example, the input variable input_value is declared. However, you can write a constant (e.g.
16#45 for 45°) directly at the input contact of the function.
Body
In the body, the value 90° is assigned to the variable input_value. When the variable start is set to
TRUE, the function F300_BSIN is carried out. It stores the result in the variable output_value. If
the input_value is between 181° and 359°, output_value has a minus sign. The function
WORD_TO_BOOL sets the variable input_181_to_359 to TRUE. With an input_value of 90° or
270°, the output_value is 1, which represents the value before the decimal point. If this is the
case, then WORD_TO_BOOL sets the value of the variable input_90_or_270 to TRUE.
LD
ST
input_value:=16#90;
IF
start
THEN
F300_BSIN( input_value,
END_IF;
input_181_to_359:=WORD_TO_BOOL(output_value[0]);
input_90_or_270:=WORD_TO_BOOL(output_value[1]);
418
output_value
);

Advertisement

Table of Contents
loading

Table of Contents