REST data interface
I was able to pull the value from this path. The variable is inside a program
"path": "Arp.Plc.Eclr/M.controller.state",
When i try to access a global variable I get a null.
"path": "Arp.Plc.Eclr/PNL1_CR1",
What is the format to access global variables (PLC)? Does the global variable need to have the OPC or HMI enabled?
Comments
Hello Gian,
the path is correct and global variables are automatically available in the eHMI. What worked for me is to create an eHMI page where the variable is used. After that I can read the value via the REST interface.
Stefan, are you saying that in order to access a global variable through REST, it needs to be referenced on an eHMI page?
In REST:
"path": "Arp.Plc.Eclr/globalVariable" where globalVariable is located at the Variable (PLC) called axc-f-2152-1/PLC.globalVariable.
Hello,
the minimum requirement to use the REST interface is that you must have at least one (empty) eHMI page in the project. The REST interface is tightly connected to the eHMI.
In my test project that I created, I also had to use the specific variable on that page to make it available via REST. Maybe this step is not necessary in your project.