Gateway Tag Value Change helper script

Maybe my search skills are lacking, but I can’t seem to find how I can create a common function that my UDT tag value changed scripts can access. Basically in some of my UDT tag value changed scripts I want to call MySpecialHelperFunction(). I tried a project library, but obviously this didn’t work because the project library isn’t accessible by the gateway tag value changed events. So how would I create my MySpecialHelperFunction() at the gateway level?

See “Gateway Scripting Project” setting:

1 Like

Also, I would look into naming conventions for Java*. PascalCase is reserved for classes. Variables, libraries, and functions should use camelCase to avoid confusion by other programmers.

*Java and not Python due to Ignition being Java-based. Although a lot of the PEP8 conventions can still be applied, it's really just the replacement of snake_case for camelCase which should be made, as well as using tabs for white space instead of 4 space characters as defined in the standard, as these are not user friendly in the code editors in the designer – although I'd argue they’re not user friendly regardless.

However, regardless of all that, it’s more important to be consistent across the project

1 Like

I usually use camelCase for functions. I wasn’t giving the actual name of the function so I didn’t pay it much mind.

1 Like