Arithmetic instructions
420
Part III FP 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.
POU header
In the POU header, all input and output variables are declared that are used for programming this
function.
Body
In the body, the value 16#45° is assigned to the variable input_value. When the variable start is
set to TRUE, the function is carried out. The result at output d isoutput_value[0] = 0,
output_value[1] = 0, output_value[2] = 7071.
LD
ST
input_value:=16#45;
IF start THEN
F301_BCOS( input_value, output_value );
END_IF;