Ok this is weird one because we're not really in the habit of coming to the forum for opinions on features, but...
The other week when I was at the OPC IOP event I was thinking about how the offline development story really sucks and racking my brain about how to add some kind of offline/simulation mode to drivers, which has always been a dead end for a number of reasons, and this time was no different.
But then it occurred to me that maybe I could do it up at the tag layer in Ignition. So on the flight home I hacked together a new Offline property for OPC tags. The following is the description of the behavior I wrote for the PR:
Implements a new "Offline" tag property for OPC tags.
Offline tags act like simple ephemeral memory tags. They can be read from and written to, but the values are not persisted.
Offline tags always have QualityCode.Uncertain_SimulatedValue
.
When a gateway starts up with tags in offline mode they get an initial value for the datatype. When an OPC tag with a current value is switched to offline mode the current value is carried over. The current offline value is not carried over to the OPC tag when offline mode is disabled.
The idea is you can either set existing OPC tags into offline mode when you know you won't have access to the PLC, or even just create new ones and immediately put them in offline mode until you do have the PLC.
Does this sound like it would actually be useful though?
Yes, but they would need a good quality code.
Why? That would be so reckless and unsafe. Too easy to let simulated data get historized as good or let an HMI screen let a user believe things are fine.
You could disable overlays during development if you’re brave and really need to see it without the tainted quality.
I probably should have said "a good quality code by default and the ability to write QualifiedValues with other qualities".
This feature is obviously only suited to development, and as such, its tags should historize normally in the development system. Otherwise you cannot get the simulated data you need to test your charting components.
This feature would definitely be used with a simulation timer script that pretends to be the process.
Yeah... while possible, that's actually not where I'm hoping to lead people's mind.
I think a "simulation" feature for tags might look a little different and be a little more capable. Maybe even a little bit more of an overall Ignition feature.
I almost didn't use QualityCode.Uncertain_SimulatedValue
so that I could avoid the word "simulated" all together and not invoke that thought, but I've just mapped the OPC UA StatusCode.Uncertain_SimulatedValue
into this new QualityCode
and so thought it was appropriate.
Good feedback.
FWIW, a large part of my inspiration for this, some from support requests, can basically be summarized as the user asking: "How can I create my OPC tags without them all being Bad_ConfigError? I don't have access to the PLC."
It's not usually a more complicated ask than that.
The best solution to this would be a driver that simply accepts any OPC Item Path as valid and makes a node for it.
Delete and recreate the device with the proper driver once you have the PLC.
Yeah, that's one way. This approach in the tags is nice because it works when your PLC is an OPC UA Connection, or your OPC tags are from any other OPC server as well.
Well, create a dummy OPC connection type that does the same as the dummy device driver. Pretend to have any node that it is pointed at. Then you just delete that connection and create the real one.