Force value of OPC tag without OPC item path?

Can we force value of OPC SqlTag or use “Simulation tag address” for test purpose ?

I have lots of OPC tag with Modbus TCP devices, OPC item path is not filled because PLC adress definition are work in progress,
I would like to check template and HMI.

:scratch:

why not try something like this?

plcsimulator.org/

Yes I’ve ever test this software. very good.
It’s a good solution for Modbus, but need to fill opc item path with temporary address…

Possibility to switch tag from OPC <=> Memory would be perfect…
I’ll post a feature request…

Another solution is to create a simple simulation driver module with some Tag of each Type (boolean, int, string, …) and adress temporary these tag…

Some sort of PLC simulator would be needed to do what you want to do. I understand your need for something that would convert an OPC tag to a memory tag and then back. The problem with that would be storing the OPC Item Path somewhere. And if the PLC program is “a work in progress” then these OPC Item Paths could be changing anyways.

i am replying 8 years later but solution would be using reference tags in your template and using script to switch between opc and memory tags ie. script will write the source tag path in the reference tags.

The OP's request to be able to convert tags to memory tags and later back to OPC tags works today. And preserves the OPC-specific properties in the meantime. No reference tags or scripts required.

For Modbus and Logix v21+ drivers, there are third party server modules that use compatible OPC item paths. This means the driver instance can be deleted and created with the other type, same device name, and the OPC tags just work. In a pinch, these drivers can be stood up on another Ignition gateway (in trial, even) and given the IP addresses of the original PLCs so the normal drivers can be tested.

{ /shameless plug }

1 Like

And preserves the OPC-specific properties in the meantime. No reference tags or scripts required.

i like simplifying things- i remember manually changing properties of the opc tag to memory and back to opc tag type - tag path was retained as you mentioned.

If there were 100’s tags can i change tag type in the script to memory ? it would save plenty of script code which would not need writing to the source path of reference tags just tag type - right?

You would write to the value source property, not the tag type, but yes.

1 Like

@pturmel i am curious if you know if its possible to create a script which would recursively list all the tags in specific folder in a loop (folders/subfolders etc) and wrote to the source property doing effectively the swap between OPC or memory simulation tags?
If this is possible i need to make a small party as it would mean the end of donkey work while writing the script which puts the value to the source tag path in the reference tags...

Consider learning jq, which could rapidly restructure a tag export JSON to do what you're trying to do:

2 Likes

@PGriffith thanks Paul that is brilliant idea!

1 Like