Promotic
WikipediaLinkedInYoutubeTwitterFacebook

Data extension configuration: ExtWriteAction

Description:
Data extension configuration ExtWriteAction - Extension for testing and modification of written value
Configuration items:
Data extension identifierSystem text (without spaces and diacritics). It is used for unambiguous identification of data extension in data item (e.g. in the Extension method).

The default value is "wact".

Event "onItemBeforeWrite"Option when the onItemBeforeWrite event is triggered.

It is recommended to use this event only for special cases. When this event is enabled, the values are written in a more complex way. If the writing is called in the main thread then the event is called synchronously and the writing is also finished synchronously. If the writing is called from another thread (web, sequncer, communication) then the event is called asynchronously, i.e. this event does not execute the variable write command instantly, but later, after the active script is finished. The delayed asynchronous writing causes the variable to contain the original value even after the writing is reportedly complete, so if such value is then read (script, trends) it still contains the original value.

NEVER call for this item
call before EVERY CHANGE of this item value
call before EVERY WRITE to this item
Event "onItemAfterWrite"Option when the onItemAfterWrite event is triggered.
NEVER call for this item
call after EVERY CHANGE of this item value
call after EVERY WRITE to this item
Test of value qualityIf the QualityTestEnabled is enabled then while writing the value into the variable, it is tested for quality (see PmVar.Quality). If the quality is bad then the replacement quality QualitySubstValue is written into the variable.

This configurator sets the initial value of the QualityTestEnabled property.

Use replacement valueReplacement value if the quality is bad.

This configurator sets the initial value of the QualitySubstValue property.

Macro expression can be used for input ($.text ..) (it is evaluated after starting the application).

Test minimal valueIf the MinTestEnabled is enabled then while the value is being written into the variable, it is tested for maximum allowed value MinValue. If the value is higher then the replacement value MaxSubstValue is written into the variable and/or the replacement quality MinSubstQuality.

This configurator sets the initial value of the MinTestEnabled property.

MinimumMinimum allowed value of the variable.

This configurator sets the initial value of the MinValue property.

Macro expression can be used for input ($.text ..) (it is evaluated after starting the application).

Use replacement valueWrite replacement value.

This configurator sets the initial value of the MinSubstValueEnabled property and MinSubstValue.

Macro expression can be used for input ($.text ..) (it is evaluated after starting the application).

Use replacement qualityWrite replacement quality.

This configurator sets the initial value of the MinSubstQualityEnabled property and MinSubstQuality.

Macro expression can be used for input ($.text ..) (it is evaluated after starting the application).

Test maximum valueIf the MaxTestEnabled is enabled then while the value is being written into the variable, it is tested for maximum allowed value MaxValue. If the value is higher then the replacement value MaxSubstValue is written into the variable and/or the replacement quality MaxSubstQuality.

This configurator sets the initial value of the MaxTestEnabled property.

MaximumMaximum allowed value of the variable.

This configurator sets the initial value of the MaxValue property.

Macro expression can be used for input ($.text ..) (it is evaluated after starting the application).

Use replacement valueWrite replacement value.

This configurator sets the initial value of the MaxSubstValueEnabled property and MaxSubstValue.

Macro expression can be used for input ($.text ..) (it is evaluated after starting the application).

Use replacement qualityWrite replacement quality.

This configurator sets the initial value of the MaxSubstQualityEnabled property and MaxSubstQuality.

Macro expression can be used for input ($.text ..) (it is evaluated after starting the application).

Note:
This configuration window can be opened from the "Data extensions" configurator in the variable of the PmaData object.
 
Caution: This extension is used for extended configuration of the PmVar object functionality related to writing a new value. This does not cause connection of the PmVar object with other system components (e.g. alarms, events, trends, comunications etc.). Therefore there can be only one such extension in the PmVar object (the extended functionality is either present or not present).
 
The order of processing the written value:
- calling the The onItemBeforeWrite event event
- rounding and transforming the written value to desired data type
- testing the written value for quality
- testing the written value for minimum
- testing the written value for maximum
- calling the The onItemAfterWrite event event
 
If calling the onItemBeforeWrite event is enabled, then the event is triggered 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 if 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 onItemBeforeWrite property in the onItemBeforeWrite event is defined for read and write 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, then the event is triggered for this variable always after writing or the change of the variable. 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 event and the onItemAfterWrite event is not triggered if it isn't written into the variable directly, i.e. if the variable is bind to another value.


History:
Pm9.00.13: Added testing of the written value for quality, minimum and maximum
Pm8.03.00: Created
PROMOTIC 9.0.13 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