Having a derived tag which converts and reads/writes a value to an OPC tag. This is all good, but having that the derived tag is using the value of other tags when calculating the derived value causes some issues, as the derived tag only writes to the source when written to. Just to clarify, the problem occurs when the tags used in the derivation changes, the source tag isn’t updated.
As derived tags has a scan class one would think that the value is evaluated each “scan”, but it seems like it isn’t.
Is there any way to trigger a write? Tried doing a tag write in the dependent tags value changed events which just writes the current value back to the derived tag, but this doesn’t seem to work as the value doesn’t change.
Looks like you hit a dead end here, but I have a similar issue. I am using metric-imperial conversion in a project and derived tag does not update its value when the constant and factor values change. To clarify, I am using one derived tag to show either Celsius or Fahrenheit and using same constant and factor tags, values of which change when user switches the MSystem tag between 0 and 1, i.e. metric and imperial respectively. The tag values that are used in derivation calculations change, but the tag value does not change until itself is manipulated by user or source tag changes.
Have you found any leads that may help to recalculate the derived tag value?
Can’t really remember what I did other than dropping using the derived tag. I’ve encountered other issues with the derived tags since this problem and have now just stopped using it as it seems to cause more headaches than I can handle.