Class Posit
Version 1.0
Modified 08-MAR-2026 11:05:32.00
Code rt_plc_drive.c
 Positioner.

 The positioning is carried out, without any hysteresis,
 by the output signals Order1 and Order2.
 One of two operating modes, MANUAL / AUTO, is selected
 by means of the output signal ManMode in the following
 way:
 Manual
 The MANUAL mode is thought to be handled from the object's display.

 * A set point value is set in SetPos.
 * The positioning is started by setting PosOn to TRUE.
 * The positioning is finished of different reasons:

 - the process value has been within the dead-zone intervals,
    i.e. the target range, during a time specified by TimerTime.

 - PosOn becomes FALSE.

 - (the input signal) Reset becomes TRUE.

Auto
 The positioning starts on a leading edge on the input signal AutoPos.
 It can be finished of different reasons:
 - TimerTime > 0. The process value has been within the dead zone
   intervals, i.e. the target range, during a time specified by TimerTime.
   A new positioning process is triggered by a leading edge on AutoPos,
   i.e. not because PosVal is outside the target range.

 - TimerTime = 0. The positioning is never finished but continues to
   follow SetPos until Reset becomes TRUE.

 - (the input signal) Reset becomes TRUE.

Example



Position Controlled Carriage.

 By means of a push button the positioning starts, and the carriage runs
 to a set point value set by a potentiometer. The positioning is to be
 interrupted after 5 seconds in the 'target' range.
 Position Control

 The direction of the carriage is directed by Order1 or Order2 and the
 speed by an analog reference. The speed ought to be slow near the set
 point value and this is done by a lower value of the reference.


RtBody attributes pwr_sClass_posit
Float32 PosVal PV Specifies process value of the position.
Float32 SetPos SV Specifies set point of the position disregarding mode.
A connected input signal is read only in AUTO mode. It
means that it is possible to write in the attribute at
MANUAL mode without any interference from an outer
signal.
Boolean AutoPos pos Specifies a start positioning request in operational
mode AUTO. FALSE has no meaning. The transition FALSE
-> TRUE means start positioning request and, if Reset
is FALSE, PosOn becomes TRUE and the positioning
starts.
Boolean Reset res Specifies a stop positioning request disregarding the
mode. FALSE has no meaning; TRUE means a stop
positioning request and prevents any further
positioning as long as it is set.
Boolean ManMode man Specifies required operational mode, MANUAL or AUTO.
Used as an ordinary parameter, e.g. it may be written
into from display programs. The advantage of placing
this attribute as an output is that it will be easier
to use it in the graphic configuration.

FALSE -- required operational mode is AUTO
TRUE -- - " - MANUAL
Boolean PosOn pon Specifies if positioning continues or not. FALSE means
no positioning at the moment and TRUE means that
positioning is running. In MANUAL mode the positioning
is started, if Reset is FALSE, by setting PosOn to
TRUE, and it can be stopped by setting PosOn to FALSE.
Boolean Order1 o1 This operational order specifies a backward order, i.e.
towards less PosVal. FALSE means no backward order, and
TRUE means a backward order as long as PosOn is TRUE
and PosVal > SetPos + DeadZone1.
Boolean Order2 o2 This operational order specifies a forward order, i.e.
towards greater PosVal. FALSE means no forward order
and TRUE means a forward order as long as PosOn is TRUE
and PosVal < SetPos - DeadZone2.
Boolean InPlace inp Specifies if PosVal is in the 'target' range or not.
FALSE means no and TRUE means that the answer is yes.
Float32 PosError ERR Specifies the position error (= PosVal - SetPos). It is
calculated continuously.
Float32 DeadZone1 DeadZone1 The values, which have to be >= 0, specify the lower and
the upper end in the 'target' range.
Float32 DeadZone2 DeadZone2 The values, which have to be >= 0, specify the lower and
the upper end in the 'target' range.
Boolean TimerFlag  
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 time, in seconds, during which the PosVal
has to be in the 'target' range to interrupt the
positioning. See above.
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 can be
restricted. 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  
Int32 ManAcc ManAcc
Float32 ShowMin ShowMin
Float32 ShowMax ShowMax
Int32 SetAcc SetAcc
Float32 SetMin SetMin
Float32 SetMax SetMax

DevBody attributes 
PlcNode PlcNode  


GraphPlcNode
object_type 183
parameters[0] 4
parameters[1] 0
parameters[2] 6
parameters[3] 0
subwindows 0
graphmethod 0 (standard, individual attributes)
graphindex 0
default_mask[0] 15
default_mask[1] 30
segname_annotation 1
compmethod 4
compindex 0
executeordermethod 2
objname Posit
graphname Posit
debugpar


Template Object
TimerTime 10.0


Attributes detail


PosVal Input
Class Input
Type Float32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName PV
Body RtBody
 Specifies process value of the position.

SetPos Input
Class Input
Type Float32
Flags REDUTRANSFER
GraphName SV
Body RtBody
 Specifies set point of the position disregarding mode.
 A connected input signal is read only in AUTO mode. It
 means that it is possible to write in the attribute at
 MANUAL mode without any interference from an outer
 signal.

AutoPos Input
Class Input
Type Boolean
Flags STATE | NOEDIT | NOINVERT | REDUTRANSFER
GraphName pos
Body RtBody
 Specifies a start positioning request in operational
 mode AUTO. FALSE has no meaning. The transition FALSE
 -> TRUE means start positioning request and, if Reset
 is FALSE, PosOn becomes TRUE and the positioning
 starts.

Reset Input
Class Input
Type Boolean
Flags NOINVERT | REDUTRANSFER
GraphName res
Body RtBody
 Specifies a stop positioning request disregarding the
 mode. FALSE has no meaning; TRUE means a stop
 positioning request and prevents any further
 positioning as long as it is set.

ManMode Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName man
Body RtBody
 Specifies required operational mode, MANUAL or AUTO.
 Used as an ordinary parameter, e.g. it may be written
 into from display programs. The advantage of placing
 this attribute as an output is that it will be easier
 to use it in the graphic configuration.

   FALSE -- required operational mode is AUTO
   TRUE  --    -  "  -              MANUAL

PosOn Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName pon
Body RtBody
 Specifies if positioning continues or not. FALSE means
 no positioning at the moment and TRUE means that
 positioning is running. In MANUAL mode the positioning
 is started, if Reset is FALSE, by setting PosOn to
 TRUE, and it can be stopped by setting PosOn to FALSE.

Order1 Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName o1
Body RtBody
 This operational order specifies a backward order, i.e.
 towards less PosVal. FALSE means no backward order, and
 TRUE means a backward order as long as PosOn is TRUE
 and PosVal > SetPos + DeadZone1.

Order2 Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName o2
Body RtBody
 This operational order specifies a forward order, i.e.
 towards greater PosVal. FALSE means no forward order
 and TRUE means a forward order as long as PosOn is TRUE
 and PosVal < SetPos - DeadZone2.

InPlace Output
Class Output
Type Boolean
Flags STATE | NOEDIT | REDUTRANSFER
GraphName inp
Body RtBody
 Specifies if PosVal is in the 'target' range or not.
 FALSE means no and TRUE means that the answer is yes.

PosError Output
Class Output
Type Float32
Flags STATE | NOEDIT | REDUTRANSFER
GraphName ERR
Body RtBody
 Specifies the position error (= PosVal - SetPos). It is
 calculated continuously.

DeadZone1 Intern
Class Intern
Type Float32
Flags
GraphName DeadZone1
Body RtBody
 The values, which have to be >= 0, specify the lower and
 the upper end in the 'target' range.

DeadZone2 Intern
Class Intern
Type Float32
Flags
GraphName DeadZone2
Body RtBody
 The values, which have to be >= 0, specify the lower and
 the upper end in the 'target' range.

TimerFlag Intern
Class Intern
Type Boolean
Flags STATE | INVISIBLE | REDUTRANSFER
Body RtBody

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 time, in seconds, during which the PosVal
 has to be in the 'target' range to interrupt the
 positioning. See above.

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 can be
 restricted. 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

ManAcc Intern
Class Intern
Type Int32
Flags
GraphName ManAcc
Body RtBody

ShowMin Intern
Class Intern
Type Float32
Flags
GraphName ShowMin
Body RtBody

ShowMax Intern
Class Intern
Type Float32
Flags
GraphName ShowMax
Body RtBody

SetAcc Intern
Class Intern
Type Int32
Flags
GraphName SetAcc
Body RtBody

SetMin Intern
Class Intern
Type Float32
Flags
GraphName SetMin
Body RtBody

SetMax Intern
Class Intern
Type Float32
Flags
GraphName SetMax
Body RtBody

PlcNode Buffer
Class Buffer
Type PlcNode
Flags INVISIBLE
Body DevBody