Promotic

Sequencer - tab of the PmaSequencer object

Description:
The tab serves for basic parameters settings of the PmaSequencer object.
Configurators:
Maximum number of itemsThe maximum number of items that can wait in the PmaSequencer object at a time.
This configurator sets the initial value of the MaxSize property.
The -1 value represents unlimited number of items. The limitation is suitable to prevent designer's errors when the number of waiting items could increase over all limits.
Type of item startMeaning of timeout. The timeout is entered in the Add method.
0 = items start independently, each according to its timeout - It means that the timeout is the time between adding the item (by the Add method) and its starting (by the onStep event).
1 = items start chronologically, timeout is delay between them - It means that timeout is the time between releasing the previous item and starting the following item.
If there is no waiting item in the object when calling the Add method and the last item has been started before a longer period than the timeout, then the new item will be started immediately.
Used threadSpecifies the thread where the script of the onStep event is started. The "new working thread" option means that this PmaSequencer object creates new thread of the given priority after the application is launched. See also: How to start selected scripts in another thread.
Main = main thread of the application where other scripts are running by default
Normal = new working thread of the normal priority
BelowNormal = new working thread of the low priority
AboveNormal = new working thread of the high priority.
The stopping timeout before termination of the working thread [s]This is valid only for new working thread! The time limit (timeout), that defines the waiting period of the application for termination of the currently executed item, after which the forced termination of the working thread is execeuted (keep in mind that the forced termination may be dangerous). If there is no item currently being executed, or the item is terminated properly within the time limit, then the working thread is also terminated properly (if there are items waiting in the queue, then these are ignored). When the application is stopping, the working thread can be properly (safely) stopped only if no item is currently being executed. If there are items currently being executed, then it is necessary to wait until these are finished. In order to prevent waiting for too long (if some item is being executed for unexpectedly long time), there is a time limit that defines the time period the system would wait before the working thread is terminated by force.
Caution! Under normal circumstances, the designer should prevent the situations when the requests (of the working thread) are terminated by force. This is most easily secured by setting the timeout long enough to execute the longest possible request. The most time consuming requests can be shortened by creating a user defined global variable that holds the information about the application being stopped. Then test this variable while executing the request and if the application stopping is detected force the request termination even if the request is not fully completed. This is very handy for long iteration calculations or for processing individual items of a large data file.
Macro expression can be used for input (it is evaluated after the application is launched).
Note:
Caution! If another thread is used, then an access to other objects in the script proceeds in other than in the main thread and it is necessary to take into account possible problems with the synchronization on reading and writing into Pma objects. This option is suitable first of all for time consuming calculations on the background.

History:
Pm9.00.21: In the "The stopping timeout before termination of the working thread [s]" configurator, the macro expression can be used for entering the value.
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.