I had a hard time framing this question, but here’s what I’m trying to do.
I have a station controlled by a 4PPC30 PLC that should be able to plug into a variety of other stations around the area, and they all can send and receive OPCUA tags
from this PlC. If the ethernet connection between the two stations broke, any tags the other device latched on would remain latched without any immediate way
of turning it off. Does Automation Studio 4.12 have a way of detecting if OPCUA or ethernet connection has broken?
The other device can easily detect if connection broke, because its looking for the 4PPC30 IP address.
From the B&R side, I’m not configuring any specific IP address to connect to. Whatever plugs into the ethernet port should be able to talk to it, as long as its the
same subnet. I think that’s why this has been so awkward to figure out.
I’m not sure if I fully understood your usecase.
Is your PPC70 OPC UA server or client?
If you’re the server, I’m not aware of any function block to get a status, if UA clients are connected or not.
If you’re a client, using the AsOpcUac library, function block UA_ConnectionGetStatus maybe could deliver the information you’re searching for.
As you also mentioned a ethernet connection detection in general: I don’t know any function to check if a connection exists (as long as you don’t know whom to ping).
Is the PPC70 really unplugged from ethernet, if not in active communication? If yes → I’ve never used it in that way, but maybe you could use the AsEth library, function block EthStat, and observe the bytesrecv number in the statistics structure: if no ethernet connection exists at all, this value should not change over the time / between 2 calls with some wait time in between.
But please mention: as soon as the device is connected to a network, the number of received bytes will change, independent of if the device itself communicates actively (because of broadcasts, multicasts on a network that are normally received by every device).
The idea with EthStat worked! As you said, the error will turn off if any ethernet device plugs in, but that’s fine for my application, I just need to know if something’s plugged into the ethernet port or not, at the end of the day.