The () brackets call the function. Without them you're evaluating the function itself as it if was a data type, without actually running the code in it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a function calling a function, in ST and both outputs are BOOLEAN
I am trying a short hand
IF FUNCTION2
THEN
FLAG := TRUE;
END_IF
After Compilation I receive an error saying Type 'FUNCTION2' cannot be converted to Type Boolean.
Any suggestions on how I can use this short hand?
The () brackets call the function. Without them you're evaluating the function itself as it if was a data type, without actually running the code in it.