SET_EP_TICKS block

Short summary

Name

SET_EP_TICKS

→POU type

→function

Category

IEC-block, UtilEnh functions

→Namespace

logicals.standard.util.schedule

Graphical interface

images/download/thumbnails/414783001/SET_EP_TICKS-version-1-modificationdate-1535107749337-api-v2.png

Available since

  • version 2.0.5 (for library Standard) and version 3.20.0 of the →runtime system – initial variant: in the global namespace

  • version 2.0.7 (for library Standard) – enhancement: declaration within a separate namespace

Functionality

This block sets the current, platform-dependent system ticks of the entry point for the current execution cycle of the current program. The system ticks are overwritten in the next execution cycle.

Inputs


Identifier

→Data type

Description

Inputs:

TICKS

ULINT

current system ticks

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:

Example for usage within ST-editor

In order to correctly use the block, you have to access the namespace of the block (e.g. by a USING namespace directive) – see "Namespaces in ST: usage" for details. The calculated values are evaluated by using the Assert block .

FUNCTION_BLOCK ExampleSetEpTicks
Using logicals.standard.util.schedule;
SET_EP_TICKS(TICKS := GET_TICKS_FROM_TIME(T#1s));
ASSERT(GET_EP_TICKS() = GET_TICKS_FROM_TIME(T#1s));
END_FUNCTION_BLOCK

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.

Restriction for test framework

Do not use this block within a POU under test (see "Testing single POUs by using the test framework") because this block is not supported when a test is executed. Reason: The block is used by the test framework. The system ticks must not be adjusted by other blocks.