Creating Global Variable from Installation Node

Hey.
I am making a URCap that controls a gripper and needs to create a new Global variable with a user-input name and a value associated with it so that it can be used in PolyScope later. While working with it, I realized the CreateVariable function of the VariableFactory is available only for the Program Node.

I tried calling a function in the Program Node when a button is pressed in the Installation Node but the variable does not seem to be created.

Do you have a workaround for this issue? Any help would be deeply appreciated.

1 Like

“Who” needs to know the value of that variable?

Is that any of your program nodes?
If so, I recommend that the program nodes themselves get the variable directly from the Installation Node.
I.e. as suggested here:

If it is the user, you could consider making a “ScriptFunction” to allow the user to read this.

The variable needs to be accessible in both the Installation Node(for viewing the readings) and Program Node(for detection and processing).

The current problem I am facing is the creation of new variables. When a button is pressed in the Installation Node, it controls the gripper and needs to create a NEW Global Variable of the name that is input by the user in the Installation Node. After creation of the variable, that variable needs to be updated in the ComboBox in the InstallationNode for the user to check the stored value.

The current code I created calls the function to create the Variable(which is written in the ProgramNodeContribution) when the button isPressed (from the InstallationNodeView).

Hello!

We are interested in a similar solution, for Features, and since Feature creation is a Subinterface of the Global Variable interface, it seems like it can only be done in the Program Node right now?

We want to create a point in the Installation Node which the Operator can see in the Features tab before he starts the program or makes modifications to a program. But right now the only possibility is to create it in the Program Node, which means that the Operator would have to first start a program with the URCaps.

For safety and making it easier for the Operator, it would be great to be able to create a Global Variable in the Installation Node