onStep - event of object PmSequencer

The event fires when the item is released.
pMe(Object) Reference to the PROMOTIC object where the event rises.
pEvent(Object) A referrence to object describing detailed information about the specific event.
pEvent.ReleaseType - (Integer) Cause of the item release:
0 - the item didn't wait, i.e. the timeout=0 in the Add method
1 - the item was waiting and the timeout has expired
2 - the item was waiting and the Release method has been called
pEvent.ReleaseCancel - (Boolean) Always preset to false. If set to true, then the item continues to wait (only if the event occurred due to the Release method, i.e. if pEvent.ReleaseType=2).
pEvent.Val1 - (Variant) 1st value of the item.
pEvent.Val2 - (Variant) 2nd value of the item.
pEvent.Val3 - (Variant) 3rd value of the item.
The event fires either in the main thread or in the work thread. The usage of both threads is configured in the Used thread configurator by the Params parameter of the Add method.

The PmSequencer object is special because its main onStep event can be fired in both main or working thread ("thread:work;" or "thread:main;"). Therefore the methods were doubled internally and then compiled in both main and working thread. If the method is called from the working thread, then it is executed in this thread. In other cases it is executed in the main theread (as other object methods are).

This allows easy creation of auxiliary functions making the onStep event itself much better arranged. Even if the onStep is called alternatively in main and working thread the method is then called in the corresponding thread.

PROMOTIC 8.3.29 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice