Promotic

Data extension ExtWriteAction - configuration window

Description:
Data extension configuration ExtWriteAction - Data extension for testing and modification of written value
Configurators:
Data extension identifierSystem text (without spaces and diacritics - i.e. national dependent characters). 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 invoked in the main thread then the event is triggered synchronously and the writing is also finished synchronously.
If the writing is called from another thread (web, communication, the PmaSequencer object) then the event is triggered asynchronously, i.e. this event does not triggered 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 the PmVar.Quality property). If the quality is nbot good then the replacement value QualitySubstValue is written into the variable.
This configurator sets the initial value of the QualityTestEnabled property.
Use replacement valueReplacement value if the quality is not good.
This configurator sets the initial value of the QualitySubstValue property.
Macro expression can be used for input ($.text ..) (it is evaluated after the application is launched).
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 the application is launched).
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 the application is launched).
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 the application is launched).
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 the application is launched).
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 the application is launched).
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 the application is launched).
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, communications 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:
- triggering the onItemBeforeWrite 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
- triggering the onItemAfterWrite event
 
If triggering 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 contains 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 property in the onItemBeforeWrite event is defined for read and write and therefore it is possible in the event to enforce another value than the one that is really written.
If triggering the onItemAfterWrite event is enabled, then the event is triggered for this variable always after writing or after 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 in this case is it suitable to enable calling 'after 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.27 SCADA system documentation MICROSYS, spol. s r.o.

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