Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Release - method of the PmaSequencer object

Description:
It prematuraly releases waiting items.
Syntax:
Long Release(Long CheckType, Long SetType, [Variant CheckVal], [Variant SetVal])
Calling:
oSequencer.Release(1, 0, "ID1")
Parameters:
CheckType(Long) Specifies what waiting items have to be released
0 - release all items (in this case the CheckVal parameter has no meaning)
1,2,3 - release items that meet: Val1 (2,3) = CheckVal. It is functional only if the items are independent (see the "Type of item start" configurator).
10 - release only the first item from the queue (in this case the CheckVal parameter has no meaning)
11,12,13 - release only the first item from the queue that meets: Val1 (2,3) = CheckVal. It is functional only if the items are independent (see the "Type of item start" configurator).
SetType(Long) Specifies how the values (Val1, Val2, Val3) of the item have to be changed by this release
0 - don't change the values (in this case the SetVal parameter has no meaning)
1,2,3 - assign the SetVal value into the values Val1 (2,3) of the released item
CheckVal[optional] (Variant) compared value, see the CheckType parameter
SetVal[optional] (Variant) set value, see the SetType parameter
Return values:
Returns the number of released items
Note:

Items are added into the queue by the Add method and they are located there according to the release time (the first item in the queue is that has to be released first). The item is released from the queue only when its time expires or after calling the Release method. Each released item call the onStep event. The Release method can release even more items and then the onStep event is triggered multiply (once for each release item).

The script in the onStep event is not called immediately (and thus it doesn't cause the interruption of the active script where the Release method is called) but it is called as late as the active script ends.

See also:
Example1:
It releases all items from the queue
JavaScriptVBScriptSelect and copy to clipboard

var oSequencer = pMe.Pm("/Sequencer");
oSequencer.Release(0);
Example2:
It releases all items from the queue that have the value Val1="ID1"
JavaScriptVBScriptSelect and copy to clipboard

var oSequencer = pMe.Pm("/Sequencer");
oSequencer.Release(1, 0, "ID1");
PROMOTIC 9.0.12 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