Calling Project Library Script in a scheduled gateway event

I would like to use a gateway scheduled event to look for changes in a db. The scheduled event will run code every minute. When I see a change I would like to use scripts that I have in the Project Library scripts section. I would like to call those scripts from the gateway event script because I have already written all the scripts that work with the DB and the PLC. I cannot figure out how to call them or if it is even possible.

Also, is this the best way to look for a change in a DB?

I am using Ignition 8.3

Thanks

Not only is it possible, but putting your logic entirely in the project library is highly recommended. The event script becomes a one-liner:

someLibraryPackage.someLibraryScript.someFunction()

(With argument passing for event types that have per-event metadata.)

When you get to the first dot, the editor's auto-complete should try to help you.

1 Like