Class Waith
Version 1.0
Modified 08-MAR-2026 11:05:32.00
Code rt_plc_macro_logic.h
 On-state or set delay with hold function.

 The time, TimerTime, starts on a leading edge on the
 input and is measured by a counter.
 The countdown is disabled as long as the h(o)ld-signal
 is set. If the in-signal becomes FALSE the counter is
 cleared independent of the hld-signal.

 When the time TimerTime expires and if the input still
 remains TRUE the output is set. It is cleared as soon
 as the input becomes FALSE.

Example
 In this example TimerTime is 5 seconds which gives
 TimerCount the value 250.

 As seen in this illustration the function is exactly as
 in a Wait object, with the exception of a set hld-signal
freezing the down counting.

See also



RtBody attributes pwr_sClass_waith
Boolean in in The input signal which is to be delayed.
Boolean hld hld Specifies whether to enable or disable the hold
function. FALSE enables the countdown, but TRUE
disables the hold function.
Boolean Status sts Delayed signal.
Boolean StatusOld StatusOld StatusOld
Int32 CountOld CountOld Value of the counter at disabled down counting, i.e.
when hld becomes TRUE.
Boolean TimerFlag   Indicates an active timer.
Pointer to Boolean TimerNext   Points to the next element in the timer queue.
UInt32 TimerCount   Number of remaining ticks.
Pointer to Boolean TimerDO   Points to a Do or Dv object or, if these are not used,
to TimerDoDum. After a time of TimerTime the signal
specified by TimerDo is cleared.
Float32 TimerTime   Specifies the set delay, in seconds. TimerTime has to
be >= execution time of the PLC program containing the
object.

The effective time can, according to the current
CPU-load, be longer (e.g. one PLC program cycle in
slowly running PLC programs ) and shorter ( as
described for fast running PLC programs) than the time
specified by TimerTime.
Boolean TimerDODum   Dummy. If TimerDoDum does not point to a Do or Dv
object it points to this attribute.
Objid TimerObjDId   Identity of this object is set at load file creation.
Used by the run time system.
Int32 TimerAcc   The operator's authorities to change TimerTime. Not
implemented.

0 -- Changes not allowed.
!= 0 -- Changes allowed.
Float32 TimerMin   Specifies a valid interval at changes made by the
operator on TimerTime.

TimerMin <= TimerTime <= TimerMax
Float32 TimerMax  

DevBody attributes 
PlcNode PlcNode  


GraphPlcNode
object_type 103
parameters[0] 2
parameters[1] 0
parameters[2] 1
parameters[3] 0
subwindows 0
graphmethod 0 (standard, individual attributes)
graphindex 0
default_mask[0] 3
default_mask[1] 1
segname_annotation 1
compmethod 5
compindex 0
tracemethod 3
traceindex 1
executeordermethod 2
objname Waith
graphname Waith
debugpar Status


Attributes detail


in Input
Class Input
Type Boolean
Flags STATE | RTVIRTUAL | NOEDIT | NOREMOVE
GraphName in
Body RtBody
 The input signal which is to be delayed.

hld Input
Class Input
Type Boolean
Flags STATE | RTVIRTUAL | NOEDIT
GraphName hld
Body RtBody
 Specifies whether to enable or disable the hold
 function. FALSE enables the countdown, but TRUE
 disables the hold function.

Status Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName sts
Body RtBody
 Delayed signal.

StatusOld Intern
Class Intern
Type Boolean
Flags STATE | NOEDIT | INVISIBLE | REDUTRANSFER
GraphName StatusOld
Body RtBody
 StatusOld

CountOld Intern
Class Intern
Type Int32
Flags STATE | NOEDIT | INVISIBLE | REDUTRANSFER
GraphName CountOld
Body RtBody
 Value of the counter at disabled down counting, i.e.
 when hld becomes TRUE.

TimerFlag Intern
Class Intern
Type Boolean
Flags STATE | INVISIBLE | REDUTRANSFER
Body RtBody
 Indicates an active timer.

TimerNext Intern
Class Intern
Type Pointer to Boolean
Flags POINTER | STATE | INVISIBLE | PRIVATE
Body RtBody
 Points to the next element in the timer queue.

TimerCount Intern
Class Intern
Type UInt32
Flags STATE | INVISIBLE | REDUTRANSFER
Body RtBody
 Number of remaining ticks.

TimerDO Intern
Class Intern
Type Pointer to Boolean
Flags POINTER | STATE | INVISIBLE | PRIVATE
Body RtBody
 Points to a Do or Dv object or, if these are not used,
 to TimerDoDum. After a time of TimerTime the signal
 specified by TimerDo is cleared.

TimerTime Intern
Class Intern
Type Float32
Flags REDUTRANSFER
Body RtBody
 Specifies the set delay, in seconds. TimerTime has to
 be >= execution time of the PLC program containing the
 object.

 The effective time can, according to the current
 CPU-load, be longer (e.g. one PLC program cycle in
 slowly running PLC programs ) and shorter ( as
 described for fast running PLC programs) than the time
 specified by TimerTime.

TimerDODum Intern
Class Intern
Type Boolean
Flags STATE | INVISIBLE
Body RtBody
 Dummy. If TimerDoDum does not point to a Do or Dv
 object it points to this attribute.

TimerObjDId Intern
Class Intern
Type Objid
Flags INVISIBLE
Body RtBody
 Identity of this object is set at load file creation.
 Used by the run time system.

TimerAcc Intern
Class Intern
Type Int32
Flags
Body RtBody
 The operator's authorities to change TimerTime. Not
 implemented.

  0   -- Changes not allowed.
  != 0 -- Changes allowed.

TimerMin Intern
Class Intern
Type Float32
Flags
Body RtBody
 Specifies a valid interval at changes made by the
 operator on TimerTime.

 TimerMin <= TimerTime <= TimerMax

TimerMax Intern
Class Intern
Type Float32
Flags
Body RtBody

PlcNode Buffer
Class Buffer
Type PlcNode
Flags INVISIBLE
Body DevBody