Chapter 8. Structured Text (ST) ProgrammingGFK-2950C February 2018 3818.2.9 ARG_PRES StatementThe ARG_PRES function determines whether an input parameter value was present when thefunction block instance of the parameter was invoked. This may be necessary if the parameter isoptional (pass by value).This function must be called from a function block instance or a parameterized block.FormatARG_PRES (IN :=In1, Q:>Out1, ENO:>Out2);Where:In1 Must be an input parameter of the function block that contains the ARG_PRESinstruction. Cannot be an array element or structure element. An alias to aparameter should resolve only to the parameter name.Can be a BOOL, DINT, DWORD, INT, REAL, UINT, WORD variable, variable arrayhead name or variable array head name element [000]. Input or output parametervalue of a function block instance or a parameterized blockOut2 A BOOL variable. True if the parameter is present, otherwise false.Note: ENO is an optional BOOL output parameter. If ENO is used in a statement that uses theformal convention, the state of Out2 is set to 1 (call was successful) or 0 (call failed).ExampleThe parameter TempVal is an input to the function block CheckTemp. In the following code fragment,ARG_PRES is used to determine whether a value existed for the parameter TempVal when aninstance of CheckTemp was invoked. If TempVal had a value, the BOOL output Temp_Pres is set to 1.ARG_PRES (TempVal, Temp_Pres);