GET_PROGRAM_HANDLE block
Short summary
Name |
GET_PROGRAM_HANDLE |
→POU type |
|
Category |
IEC-block, UtilEnh functions, block with internal error diagnostic |
logicals.standard.util.schedule |
|
Graphical interface |
|
Available since |
version 2.0.7 (for library Standard) and version 3.22.0 of the →runtime system |
Functionality
This blocks gets a handle for a program →instance. The details:
The block retrieves a handle of the program instance with the specified name. Observe that a program instance is specified within an PLC-object.
logi.cals recommends that this program instance is used with a →task with a cycle time of 0 ms.
Inputs, return value
|
Identifier |
Description |
|
Inputs: |
PROGRAM_NAME |
STRING |
name of the program instance |
Return value: |
– (= Handle) |
PROGRAM_HANDLE |
either the handle of the program instance or – if the program instance is not found – the named value InvalidProgramHandle The handle is process by the block CALL_PROGRAM_SYNC. |
Input EN and output ENO are available when →calling
the block. See "Execution control: EN, ENO" for information on input EN and output ENO.
Internal error diagnostic for block
The block checks the value connected to the inpu t before it is executed.
If the program instance is not found, the output ENO of the block is set to value FALSE (or an equivalent) and the return value Handle is set to the named value InvalidProgramHandle.
Otherwise the output ENO of the block is set to value TRUE (or an equivalent) and the return value Handle is set to the handle of the program instance.
Example for usage within ST-editor
At present, there is no example.
When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.