Arithmetic instructions
462
Part III FP Instructions
Example
In this example, the same POU header is used for all programming languages. For an example
using IL (instruction list), please refer to the online help.
POU header
All input and output variables used for programming this function have been declared in the POU
header.
Body
When the variable start is set to TRUE, the function is carried out. It then searches the data_field
for a minimum value and its position. The result here is: min_value = 6.91 and position = 2.
LD
ST
IF start THEN
F351_FMIN( s1_Start:= data_field[0],
s2_End:= data_field[4],
Min=> min_value ,
Pos=> position );
END_IF;