Return OPC server IP address

For devices using the Modbus TCP, Siemens or Allen Bradley drivers, I can return the IP address using system.device.getDeviceHostname(deviceName)

I also have several PLCs with OPC-UA servers that are communicating with ignition. I can get the names of these devices using system.opc.getServers. Is there a way to return the IP address of these devices?

Thanks

It would depend on the OPC, but certainly from Kepware you can get hostname information for each device connection configured. Normally found under each devices _System._DeviceId tag

Thanks for the reply. I have a few different OPC servers including S7-1200 PLCs, Rittal IoT devices and others. In the OPC browser, the Siemens PLCs do display a data point called "EndpointUrl" which is the address of the OPC-UA endpoint. The problem is that the path to this data point is specific to a session. I suspect the session ID (and path) will change if the device is power cycled.

This data point is not provided by the Rittal device.

With a bit of work, the Siemens PLCs can output the IP address of their Profinet interface but this will obviously not work for OPC-UA connections to other devices.

The best solution would be to get the IP from the Ignition OPC client. I could manually enter the IPs in a SQL table or as a plain dataset but I then have two sources of the truth and more maintenance work to do.

Any other ideas? Cheers

Hi, did you get any ideas? I am kinda in the same boat and have been looking for answers.

Requirement: Get to know the IPAddresss of the OPC UA servers the Ignition is connected to.

@Jatin_Kumar_Singh Sorry for the slow reply. No, I did not get anywhere with this. I resorted to setting up a memory tag in the folder for each OPC-UA device. This tag contains a string with the IP address… This is not a good solution. I would welcome suggestions for anything better.

1 Like