Arg_Pres Statement - GE PACSystems RX7i Cpu Programmer's Reference Manual

Hide thumbs Also See for PACSystems RX7i:
Table of Contents

Advertisement

8.2.9

ARG_PRES Statement

The ARG_PRES function determines whether an input parameter value was present when the
function block instance of the parameter was invoked. This may be necessary if the parameter is
optional (pass by value).
This function must be called from a function block instance or a parameterized block.
Format
ARG_PRES (IN :=In1, Q:>Out1, ENO:>Out2);
Where:
In1
Must be an input parameter of the function block that contains the ARG_PRES
instruction. Cannot be an array element or structure element. An alias to a
parameter should resolve only to the parameter name.
Can be a BOOL, DINT, DWORD, INT, REAL, UINT, WORD variable, variable array
head name or variable array head name element [000]. Input or output parameter
value of a function block instance or a parameterized block
Out2
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 the
formal convention, the state of Out2 is set to 1 (call was successful) or 0 (call failed).
Example
The 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 an
instance of CheckTemp was invoked. If TempVal had a value, the BOOL output Temp_Pres is set to 1.
ARG_PRES (TempVal, Temp_Pres);
GFK-2950C
Chapter 8. Structured Text (ST) Programming
February 2018
381

Advertisement

Table of Contents
loading

This manual is also suitable for:

Pacsystems rx3iPacsystems rsti-ep

Table of Contents