hasChanged
This function is used by Ignition's Expression language.
Description​
note
This function is only available in Transaction Group Expression Items and Expression Tags.
This function returns true if the given value has changed since the last time the Expression Item was run. Setting the optional boolean argument includeQuality
to true means a quality change will make this function return true.
Syntax​
hasChanged(value, [includeQuality], [pollRate])
Parameters​
Type | Parameter | Description |
---|---|---|
Object | value | The value to check for changes. |
Boolean | includeQuality | A flag that indicates if a quality change will also trigger this function. [optional] |
Integer | pollRate | The poll rate in milliseconds. Only applicable on Expression Tags when the Execution Mode is set to Event Driven. [optional] |
Returns​
Boolean - Returns true if the value has changed since the last evaluation, or false otherwise.
Examples​
Code Snippet
//Would return true if the referenced Tag has changed in value or quality since the last group execution.
hasChanged({[default]Station 1/Status},True)