Simulation Software with Ignition

We can simulate any device values we want in the PLC and that reflects on the screen and changes the process accordingly (EX: pretending inlet flow is set at 100SCFM so the process runs like it was 100SCFM). This works great on live sites but I want to simulate all of this happening on a test bench so we can train operators on how to run the system. Basically I want the same vision screens as on our live sites but running a fake mostly accurate chemical process. I've looked at Simulink and Emulate 3d but I need to be able to "write" from control in ignition screens that are connected to the PLC, Example: Operator clicks on "OPEN VALVE" in ignition, which sends to the PLC a simulated value of "OPEN" which sends to a simulator (not sure what software), then have the simulating software do calculations based on other tags in the PLC etc, then write back to the PLC's simulated values(example: "tank 10 level = 10 AND flow into tank = 10GPM") so that I can use that tag in the PLC to simulate other stuff etc etc... essentially modeling the process but with the control being done live in ignition. I'm very new to simulators but very experienced in Ignition and I am looking for some suggestions/advice before taking on this large task that some of you may have done already using Ignition/other and AB PLCs.

Any time I've had to do this - mostly pre-Ignition - I've built the simulation into the PLC. Enabling Simulation Mode via the HMI switches the PLC program so that, for example, opening a valve starts to increment a simulated weigh scales and the PLC looks at that rather than the real scales. The HMI / SCADA looks at the same place.

One of the big advantages of this is that you have the option of using it for program debugging too and have the choice of using the real local hard-wired controls as part of a simulation exercise and have valves open and close, etc. In a large weighing and mixing operation, for example, we were able to run the process without powders but have all the mixers and valves (except the powder dispense valves) operate as normal. When we hit a bug we could reset the process with no waste and no cleanup or purge.

3 Likes

You mention AB PLCs, if you are using ControlLogix or CompactLogix consider using Emulate or Echo and use simulation routines (I embed simulation in my AOIs).

2 Likes

I like this a lot actually, except I'm wanting to do lots more math and complicated calculations that aren't possible in the PLC maybe I should write to a notepad document to communicated back and fowarth from matlab and the PLC? I wish there was a way to "call" matlab functions or some other computaitonal software that could read PLC tags and spit back a value that the PLC could use.

EDIT: I've thought about doing stuff like a making a diff equation AOI in the PLC etc etc but it'd be easier to just call a 3rd party software to do the work.
I want to completely simluate the process no real live values, just live simluated ones.

I would use the Host Device type in my EtherNet/IP add-on module, and use timer events to call jython simulation logic. You can make the tag structure identical to the real Rockwell PLC.

1 Like

I second this. We're using Echo to emulate 12 AB PLCs for a project right now. It has been very helpful for testing things.

1 Like

If you want the screens be actually the same screens with the same URLs you can create your the tags you reference to work like programing interfaces. I.E. the tags referenced in logic and screens does nothing but point to the "real" or simulated tags.

or you can create both sets of tags without the interface and do the abstraction in the screens by passing some kind of root tag path. where the URL takes a parameter and one screen will point to the real tags and another points to the simulated tags.

1 Like

I'm now thinking of using PyLogix and Echo to help with the simulation not sure if anyone has done this already before.

pycomm3 is a great alternative to PyLogix and if I recall, easier to use also.

1 Like

I haven't done it, but I've heard of several doing simulation with something Py and either virtual or a PLC.

only issue is that pycomm hasn't been updated since august of 2023 so the support and lack of stuff like a discord server and regular updates like pylogix has would make it be more difficult.

While it may be older, it supports UDTs which PyLogix doesn't support well.

Pylogix has been great, and grabbing data from UDTs hasn't been much of a hassle honestly I recommend giving it a try as the Discord support is great too and it reads super fast! I'm now looking at doing machine learning to estimate processes given lots of process data. For example, I have tag history on valve positions and flow meters going into tanks and was going to feed that to some algorithm. Does anyone have experience using a machine learning algorithm to estimate processes.