I'm trying to call an OPC Method with the system.opcua.callMethod. My network configuration is as follows:
PC1 with Ignition Designer and OPC UA Expert Client
PC2 with Ignition Gateway
PC3 with the OPC UA Server
I can call the OPC UA Method on PC3 from OPC UA Expert Client on PC1, whereas the Ignition Python function where I've programmed the callMethod cannot. The Python function is called by a ValueChanged event on an Ignition Gateway Tag, so that callMethod runs on the Gateway as required by the function scope spec:
Reading through the wrapper.log I don't find any exception logged. Moreover the first log entry before the callMethod is there, whereas the second one where I try to log the callMethod result is not.
If I run the same function on a PC which is running all the system components (Ignition, OPC Server, Desginer, OPC UA Client), it works perfectly.
Any suggestion? I don't think it's a matter of firewalls, becuase OPC UA Expert Client manages to do the call.
Hi Kevin, thanks for your reply. It hangs indefinitely, i.e. I never see the >>>>>> CALL END log entry.
One more note: If I try to write a value from the tag browser directly into a tag in the OPC UA Address space, that's no problem: the tag new value is written correctly and I see the new value in the OPC UA Expert Client.
I've given a try also to next code, which I took from Ignition help:
result = system.opcua.callMethod(
"Ignition OPC UA Server",
but behavior is just the same: the code never arrives at the >>>>> CALL END log entry. I'm sure I'm doing something wrong, but I don't know where.
I will speak with the customer to see if I may capture Ethernet traffic with Wireshark and I will be back to you.
callMethod will throw an Exception if the call times out (or in some other error scenarios), which it should after ~60sec or whatever the request timeout on the connection is configured for. You won't see your final logging statement when this happens.
I @Kevin.Herron , just set the logger to DEBUG but got no further information. I've installed MS Network Monitor and saw that when OPC UA Expert calls the method, the monitor shows meaningful records (attached) OPCUaExpertTraffic.cap (7.1 KB)
Whereas nothing interesting appears when the call should come from Ignition, as if the call does not get out of Ignition. Maybe I'm wrong in the OPC UA Server connection configuration - e.g. I had to uncheck the Certificate Validation Enabled property to get the connection UP and running.
If you have further ideas, I thank you.
On the left you see the name of the OPC Connection as shown in the gateweay configuration and on the right my function call. The OPC Connection shows up as Connected, provided that I uncheck the Certificate Validation option.
... just what I'd like to see. As I told you, I put a test PC together, where Ignition and the OPC UA Server were on the same PC: my code worked like a charm and I got the answer you pointed to and the answer from my getZ020WS OPC UA Method too. On the contrary the customer's distributed configuration does not work