GET_PROGRAM_HANDLE block

Short summary

Name

GET_PROGRAM_HANDLE

→POU type

→function

Category

IEC-block, UtilEnh functions, block with internal error diagnostic

→Namespace

logicals.standard.util.schedule

Graphical interface

images/download/thumbnails/414782991/GET_PROGRAM_HANDLE-version-1-modificationdate-1535107714158-api-v2.png

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

→Data type

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.

See:

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.