I am developing an HMI for a Rockwell system and I have no access to a PLC or simulated PLC. I'd like to develop and test all the HMI functionality (conveyor lines, alarm faulting, animations, metrics). I have developed Ignition solutions in Vision for at least 6 years and usually I am the PLC programmer with access to a PLC or simulator. Most tags will be based on UDT's and the OPC addressing is created via parameters in the UDT.
Is there a tricky way to quickly "flip" all the UDT addressing from what is required for the PLC to a memory tag (or modbus addressing) and back again ? If the tags are memory tags I can at least manually change values. If they are modbus values I can write some python code to create a modbus device with some simple simulation.
Are there other techniques that can be used to alter the tags references quickly ?
Note: I have frequently edited the XML and JSON tag exports and can see how this could be part of a scheme to do what I need to do but not sure about a simple, reliable and clean way to do it.
Here is an example:
OPC reference in UDT to Logix Driver:
Do you have the project file for the PLC? If so, you might find this helpful:
(Read the whole topic for context.)
It might be helpful anyways if you are willing to create some datatypes and tags that follow the expected naming conventions of the finished project.
When you are done, you delete the EtherNet/IP Host Device and create the Logix device with the same name. Then your OPC tags will seamlessly switch to talking to the real thing.
I use @pturmel's Ethernet IP module for simulating from a L5X file. Obviously, tags don't react as they would if they were changing in the PLC, but your visualizations will react to the tags appropriately as you manually change them in the tag browser - I think this is what you're after.
I typically have 2 devices in my OPC devices page that I use for swapping between production and development. Just swap the names when it comes time for production and you're good to go.
As for your convert data source question, yes, this is easy. Just use tag.configure to change the data source property from opc to memory. All config for the OPC connection remains so you can just convert them back. Make sure to check if the tags have opc config first before converting the tags back from memory, otherwise you might end up converting am actual memory tag to opc
I've been successful doing this a couple times by exporting the UDTs to .json and doing find/replace in VS Code.
You can change just one tag manually and see very clearly inside the .json what you need to find & replace by comparing the two different types of value sources.
It would be far better to script it so you can make sure you're replacing it in the right tags
It was every tag in my case. I can definitely see my solution being an issue if you have multiple sources though.
Why not just use a binding on the Value Source prop in the UDT definition to a single gateway tag. Change the one tag, they all update.
I was doing what @jimschaefer was doing with memory/OPC tags to test stuff before I came across the Ethernet IP module.
This worked really well ! Thanks for the tip.
The process I used is as follows: (to simplify things for others)
Install the EtherNet/IP Class1 Host Device driver
Create a new device connection with this driver Config>Opcua>Devices "Create New Device"
2.Export your Logix PLC project as an type ".L5X"
On the page "Config>Opcua>Devices" click on "more" button and select "configuration".
Import the ".L5X" file you created by selecting "choose file" then "import XML"
You can go to the designer and browse to your device in the tag editor to import all the tags that were in the PLC program.
The really nice thing is that when the tags are imported the values can be manipulated and you don't have errors (unless the trial expires... then reset). The tags act like memory tags but they have a path configuration exactly the same as needed for an active PLC.
This was good for testing button clicks, status values, while offline from a PLC.
When I got to the field you can use the standard LOGIX driver from ignition. Just rename the connections so the Logix driver has the name you used in development with for the EtherNet/IP Class1 Host Device driver.
Or you can purchase the "EtherNet/IP Class1 Host Device driver" because it works so well when not connected. All drivers should have this functionality !
Ewww! Skip this part.
Just import the tags you need from the PLC. Or you will bog your PLC down when you flip to the real driver.
You are correct... I just imported the tags I needed. Good Catch !