Hello, I have a IEC61850 device and i try to operate comands.
First i did a try in script console the fuction system.iec61850.getControlParams("rele")
and i have this error
then i do another try with system.opc.browse(opcServer=server, device="PPC")
nad have the same problem.
Is only available in gateway sessions according to the manual: system.iec61850.getControlParams | Ignition User Manual
So you will have to do a gateway message to the gateway and execute your code there.
For system.opc.browse, you will need to post all your code and then the error message it generates.
Doesn't have the server variable defined.
The documentation doesn't show the example running in the designer script console. It is a gateway-scoped function. Run it from gateway scope. (Gateway message handler is an option, or a project library function called from a message handler.)
If you have my Integration Toolkit, you can also annotate a project library function with my @system.util.runInGateway
decorator, after which you can call that from the designer.
oh ok, I thought all the scrips ran in gateway, and yes, you are right, thank you very much
You might have been mislead by a post somewhere talking about all Perspective scripts running on the gateway. Which is still true - if you create a button in a Perspective view and click that button (even in the designer), the actual execution will happen on the gateway.
But the script console is, as Phil mentioned, running entirely locally.