Chapter 8. Structured Text (ST) Programming
372
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
GFK-2950C
Formal Calls vs. Informal Calls
PACSystems supports formal and informal calls in ST.
Formal Calls
Informal Calls
Input parameter assignments use the ‘:=’
notation while output assignments use the ‘=>’
notation.
Input and output parameters are listed in parentheses.
Optional parameters can be omitted.
Parameters cannot be omitted.
Parameters can be in any order.
Parameters must be in the correct order as follows:
Inputs
Instance location (if required)
Length parameter (if required)
Outputs, starting with the last output
parameter.
The ENO parameter is specified in a formal
function or block call.
All built-in functions and user-defined blocks
have an optional ENO output parameter
indicating the success of the function or block.
Either ENO or Y0 can be used as this output
parameter name.
The ENO parameter is not specified in an informal
function or block call.
Format of Formal Function Call
FunctionName(IN1 := inparam1, IN2 := inparam2, OUT1 => outparam1, ENO => enoparam);
Format of Informal Function Call
FunctionName(inparam1, inparam2, outparam1);
Example
This code fragment shows the TAN function call.
TAN( AnyReal, Result );
Summary of Contents for PACSystems RSTi-EP
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451 ...