I'm using Ignition Edge and need some guidance on the best approach for a specific scenario.
The Scenario:
We have 3 proprietary field devices that our main PLC can't directly communicate with
Ignition Edge currently polls these devices for HMI display (Edge), but now 1 year later we have a new project requirement where we need to poll additional data from these 3 devices, perform calculations in Ignition Edge scripting using that data, then write two calculated values back to the PLC
These calculated values will then be used for: 1 PID control loop + safety shutdowns/alarms (if above setpoint) within the PLC
Questions:
What's the recommended method for continuous write-back? (Ignition Edge)
For PID control what update rate makes sense? Thinking 1-2 seconds.
Any concerns with write conflicts when the PLC is actively reading these tags?
Best practices for handling communication failures or indicating when calculated values are valid/stale?
The decision was also made that we dont wan't to spend any extra money on new PLC Modules for Modbus comms so we are limited to doing this through Edge scripting.
I want to implement this correctly from the start rather than troubleshoot issues later. I'd be incredibly grateful for any insights or recommendations you're willing to share. Your knowledge and time are truly appreciated!
Thanks so much in advance to anyone who takes the time to help!!
In this application there's no risk to personnel, its just for some batch processing if we go over our shutdown alarm we want to shutdown the operation. I should not have appended safety to shutdowns there but regardless i agree with you.... i do not want to be doing this through SCADA either but i was told to work with it.
If you want to make Ignition behave a bit like a PLC, the most robust approach (IMNSHO) is to use a timer event script that runs like a PLC task. Use a single system.tag.readBlocking() to pull in a snapshot of all of the tag values that may be needed, run the logic to compute the values of all of the tags that would be written, and then assemble a single system.tag.writeBlocking() to efficiently update any of those that are not already at the desired value.
Thanks pturmel for sharing your input. Very appreciated!!
I will go this route and like i said i'm not happy at all about having to do this via Edge Scripting (will give one last push against it) but it is what it is.
Also, RTAutomation (https://www.rtautomation.com) has some nice gateways, and it will probably be less than the time it'll take you to program this in Ignition.
Do we know if there will be any work to expand this functionality/capability in the future? I think modern hardware could handle more than the 3/5 limits that currently exist.
There is an option you can use in ignition.conf to increase the size of the thread pool, for very large applications where even disciplined single digit millisecond execution times may not be enough. But that is not a help for system.* calls that can block.
system.tag.writeBlocking() won't time out on comms hiccups for 60 seconds. Do very much of that in tag events and just a few hiccups will crush all tag events. Don't do it. Use system.tag.writeAsync() if you must use this pattern.
Same with DB operations and web API client operations. Use system.db.runSFPrepUpdate() for DB insert/updates if you must.