CALL_PROGRAM_SYNC block

Short summary

Name

CALL_PROGRAM_SYNC

→POU type

→function

Category

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

→Namespace

logicals.standard.util.schedule

Graphical interface

images/download/thumbnails/414782981/CALL_PROGRAM_SYNC-version-1-modificationdate-1535107679409-api-v2.png

Available since

  • version 2.0.7 (for library Standard) and version 3.22.0 of the →runtime system – initial variant

  • version 2.0.8 (for library Standard) – enhancement: check if the called program is the current program

Functionality

This blocks calls a program →instance synchronously from the current →program. The details:

The block calls the instance with the specified handle.
It is not possible to forward →input variables or →output variables to a call of this block. Only the output ENO of the called program can be used after the call of this block, in particular by using the return value CallENO (see the following table).

Inputs, return value


Identifier

→Data type

Description

Inputs:

HANDLE

PROGRAM_HANDLE

handle of a program; returned by the block GET_PROGRAM_HANDLE

Return value:

(= CallENO)

BOOL

state of the output ENO for the called program, if the output ENO of this block = TRUE (see the following section)

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.

  • In case of an invalid handle or when the current program itself is called, the output ENO of the block is set to value FALSE (or an equivalent) and the return value CallENO is set to FALSE.

  • Otherwise the output ENO of the block is set to value TRUE (or an equivalent) and the return value CallENO is set to the state of the output ENO for the called program.

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.