I am involved in a project where I need to determine if it is possible to get feedback by capturing the output of a CMD/.bat executed on the Gateway.
The idea is to disable a PCS through a script, and we need to know if the PCS has been enabled or disabled through a True or False value that can be displayed on the console.
How could we achieve this by associating that feedback to a boolean tag? I think this would be the perfect solution for our needs. Any suggestions or similar experience?
You'll have to open the file in the Ignition gateway script, parse it and, if you want it in a tag then use system.tag.writeBlocking to write to that tag.
Use Java's ProcessBuilder class to construct your external process call--it can expose the standard I/O streams for your use. Do not use system.util.execute for anything other than fire-and-forget operations.