Alias tag w/ scaling
complete
s
sfitze
I frequently do metric/english unit conversions by using two SQLTags pointing to the same OPC tag with one scaling the for units. The displays then switch between the two tags based on a Client tag. There is no way of doing this using memory tags that scale the same value without resorting to scripting.
I propose an "alias" type SQLTag that points to another SQLTag but has scaling and other metadata. It would be nice for OPC tags too since if two tags point to the same OPC path you need to change both of them if you need to change the OPC path. With "alias" tags you would only have to change the OPC path for the "base" tag. Even better if you have more than two scalings (e.g. Celsius/Kelvin/Fahrenheit or g/kg/lb)
Log In
P
Paul Griffith
complete
This was implemented as 'Derived Tags' midstream in 7.9: https://docs.inductiveautomation.com/display/DOC80/Types+of+Tags#TypesofTags-DerivedTags
s
sfitze
The difference with a an expression tag is that an expression tag can't (as far as I can tell) write to a memory tag, only an OPC tag.
In my mind I see the memory tag system as a virtual OPC server that just references registers in a virtual data table on the gateway instead of registers in the data table of a PLC. When your create a Memory tag it is just the same as a SQLTag only pointing to the virtual OPC server instead of a real OPC server.
So it I should then be able to create multiple SQLTags with their own scaling/alarming/etc metadata that point to the same register in the virtual OPC server just like I can now do with a register in a real OPC server.
I can do this now with the writeable tags in the simulator OPC server. I just want to be able to do it with the memory tags on the gateway.
c
clegg
I've had this idea before, but the thing is, it's almost essentially the same as an Expression tag that does nothing but reference a different tag, and so it's never seemed unique enough to actually do. Furthermore, with UDTs, you could now create this structure as a data type (opc base tag and multiple other tags that reference it and have different scaling/calculations), perhaps even with the opc address as a parameter.
Down the road, I think we'd ideally like to support "calculations" on a tag, that would be hosted by the tag (and then, multiple scaling settings would be part of this), but I can't say exactly when. It would take a lot of work in the subscription system to support.