Hi,
I have a quick question regarding tags, and scaling.
We have a system where we have a SPEED tag and a SPEED_SET tag coming from a PLC.
The SPEED tag, which is read-only and comes in as 2000-5000, which I can scale to 40-100% fine.
The issue comes with the SPEED_SET tag. It is expecting 2000-5000. We have a slider that is in the range 40-100(%).
So my question is, how could I map 40-100 -> 2000-5000 -> Write to SPEED_SET (OPC Tag)?
My current solution is to have the SPEED_SET bind to the slider (40-100), then create a derived tag, which scales the SPEED_SET to 2000-5000, then use an OnValueChanged script to write this to the OPC tag.
Is this the best solution, or am I not seeing something?
Note: I can't bind the derived tag to the slider, as this means the scale goes from 2000-5000, and I cannot do the scaling in the slider itself, as this seems to disable the 'bi-directional' property.
It seems that the derived tag is the only way to have scaling on read and write independently, but this is not enough.