PauseCtrl

Syntax

<Path>.PauseCtrl:method

The attribute PauseCtrl designates a Method object. Plant Simulation calls it, whenever you change the Paused state of the object, when you either select an entry in the drop-down list Paused/Planned/Unplanned or you assign another value to the attribute Pause. When you get the paused state within the Method, it shows the state after the change.

Parameter

The optional parameter Duration of data type real sets the length of the pause. If the length of the pause is unknown, Plant Simulation passes -1. The same happens when the control is called at the end of the pause.

Within the control you can access the paused object with the anonymous identifier ?.

Data Type of the Value You Can Assign

You can assign a value of data type method.

Example

print "Current pause ", current.pause
MyStation.pause := current.pause
var shift := root.ShiftCalendar.GetCurrShift
print "Current shift: ", shift
   
if not current.unplanned 
       
if current.pause
   current.currIcon := "pause"
else
   current.currIcon := "working"
end
Transporter.PauseCtrl := &myPauseCtrl

Related Topic

Pause control

Pause control of the Transporter