Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Object ExtWriteAction

Description:
An extension of the Var data item of the PmData object for invoking an event (action) when writing a value.
 
Format of saving the data extension as string:

The contents of complete data extension (all configurators) can be saved as a single string. See Format of saving the data extension as string .

Id={WriteAction;nBeforeWrite;nAfterWrite}

 
If calling the onItemBeforeWrite event is enabled, the event fires for this variable always closely before writing or before the change of the variable value. Unconsidered enabling for all variables can cause unnecessary utilization of the processor. For example when the object includes 1000 variables and each one has calling enabled then by writing new values into all variables of the object can cause calling the onItemBeforeWrite event 1000 times (each time with another pEvent.Item parameter value). It is also better (if it is required to react to writing or the change of the variable) to enable the onItemAfterWrite event instead of onItemBeforeWrite. Enabling onItemBeforeWrite is useful only if, for example, you need to test the written value and in a necessity to change it (to filter it). The pEvent.NewVal parameter is in the onItemBeforeWrite event defined for reading and writing and thus it is possible in the event to enforce another value than the one that is really written.

If calling the onItemAfterWrite event is enabled, the event fires for this variable always after writing or the change of the variable value. For enabling this event similar remarks are valid for the onItemBeforeWrite event. Enabling the onItemAfterWrite is useful for variables that change their value not too ofter and then is it suitable to enable calling 'after the change'.

Caution: The onItemBeforeWrite/onItemAfterWrite not fires if it isn't written into the variable directly, i.e. if the variable is bind to another value.

Configuration windows:
ExtWriteAction Data extension configuration
PROMOTIC 8.3.19 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