-

GET_SYMBOL

Type Function block
Description The function block searches for the symbolic name of a variable.

For local variables the symbolic name is the instance name <programinstancename>.<variablename>, separating the parts of the instance path by a dot. For resource-global variables the symbolic name is the <variablename>.

With a rising edge at the REQ input, the symbolic name of the variable connected to the Variable input is searched. The Busy output is set to TRUE while the search is running. If the function block has finished execution and the variable has been successfully found, the Done output is set to TRUE and the symbolic name is indicated at the SymbolicName output. The Error output indicates whether an error occurred while executing the function block. The ErrorID indicates whether the symbolic name was found or not or in case of an error the reason for the error.
Notes
  • When a request for a symbolic name of a variable was triggered with a rising edge at the REQ input (set to TRUE) and REQ remains TRUE after the function block has been triggered, the values of the output parameters are kept after the function block has finished execution.
  • When a request was triggered with a rising edge at the REQ input and REQ switches back to FALSE after the function block has been triggered, the values of the output parameters are kept for one cycle after the function block has finished execution.
  • A new request is ignored, if the new request is triggered (with a rising edge at the REQ input) while an old request is currently being processed. The Error output is set to TRUE and the ErrorID output indicates the reason for the error as long as the function block is executing the old request (i.e., until the old request has been completed).
  • Function blocks have to be instantiated. The instance name of the function block has to be declared in the 'Variables' table of the POU where the FB is going to be used. The instance name must be unique within the POU.
Parameters Inputs

REQ

Variable

Outputs

Done

Busy

Error

SymbolicName

ErrorID