$IF ALWAYS

After the condition was fulfilled once, the instruction block is executed cyclically in every cycle as long as the realtime cycle is active.

From the time when the condition is fulfilled the first time, the instruction part is executed in every run-through. The condition is no longer checked in the following run-throughs; it is assumed to be TRUE as long as the realtime cycle is active.

Programing Example

prg_example

$IF ALWAYS

; Define realtime cycle

#RT CYCLE [SCOPE = PROG]

  ; Query ACS position of X axis

  $IF ALWAYS V.RTA.ACS.ACT_POS.X > 200

    ; As soon as X transitions the 200mm limit, the

    ; M function is output in every CNC cycle.

    ; Even if the X position becomes smaller,

    ; M100 continues to be output.

    M100

  $ENDIF

#RT CYCLE END