I have an ignition script that I want to be called by another program (likely a powershell script running as a windows service). There are a couple ways i'd naively think to do this, namely 'attaching the script to a tag update event, then having the other script set that tag' but that seems pretty ugly. Is there any way to directly call ignition scripts from a CLI?
You could use the web dev module to expose a function via a rest api and call it from that?
You could use node red to toggle a tag and trigger an onchange event
Thanks, this is great!
Is there any way to have that function available gateway-wide? or should I just create a new project and attach it to that
Webdev resources are always scoped within some project.
Functions themselves can be made global by putting them in the project assigned as the gateway scripting project
No. The gateway scripting project setting is only referenced for scripts that run outside of projects, like tag events.
To make a library function reachable everywhere, place it in an inheritable project that all other projects, including the GSP, inherit from.
Oops, my bad terminology