[suggestion]Can we get the custom properties in Scripting Functions?

Hi,

In the project design of ignition, we used session properties to switch devices.
We create the [session.custom.machineID] on custom properties , so that it can mapping to different TAGs , and then different device information can be displayed in different sessions of the same project.

I have an emergency stop popup.
It needs to check the machineID of the current session before popping up, but I'm failing now because I can't get my custom properties setting.
Can we make a request to get this feature in the new version?

Ignition already has similar function: system.perspective.getSessionInfo

system.perspective.getSessionInfo

Where are you trying to get the custom property?

Tag Editor
Tag Value Events, Value Changed

No, not in tag events. Those are gateway scope. Session properties are part of session objects, not session info objects.

You seem to be making a common design error here, which seems to come from standalone HMI design patterns, where there's no distinction between HMI UI and tags. In Ignition, tags are global to all UIs, and should not be used purely for UI-specific values. In Ignition, use Perspective session custom properties (or Vision client tags) by themselves, instead.

Where you want a global tag to be tracked in a Perspective session, create a custom property to hold it and bind the property to the tag. That property can then have onChange actions that perform any UI-specific functionality. And that action, being in the session, will naturally have access to the rest of the session.

6 Likes

I would like to thank you for your attention to this article.

The design is intended to prompt an alert window on any screen of the session when an emergency stop is activated, alerting the equipment users.
Since the same equipment might share one project across multiple machines, we have designed it to switch between machine IDs 001, 002, and 003, which significantly reduces our maintenance costs.

Because the emergency stop is an OPC UA tag, we successfully triggered the tag to fetch the corresponding session for the alert popup.
However, this method cannot be applied when multiple devices share the same project. We are unable to fetch the custom machine ID, which causes the session for machine 001 to display alerts intended for 002.
Therefore, we abandoned the method of using the tag to trigger pop-up windows. Instead, we have linked this tag to a label in the footer and hidden it, as it is useful and convenient to configure.