Solution
Certain types of shared variables do not support the
value changes only option, and will instead behave the same as if
all changes were selected. This behaviour applies to shared variables with the following data types:
- Boolean
- String
- Array
- Waveform
- Timestamp
- Int64 and UInt64
- Variant
- Custom Control
All other data types should behave as expected when using the
value changes only option.
If your application requires logic that should execute only when a shared variable value changes and uses these data types, you will also need logic to confirm that the value changed. In the simplest case of a single shared variable, this might be accomplished using a
Shift Register or
Feedback Node to store the previous value. This could then be compared to the current value each time the event triggers.
Note: If you are using the same event case for multiple variables, you will need to include logic to store the value for each one rather than a single value.