system.device.getDeviceHostname?

If you browse to your device with the OPC Browser you will see that it contains a Diagnostics folder. Within the Diagnostics folder is a tag that contains the hostname. You can drag this tag into the Tag Browser and then read the value in your script with the system.tag.read() function.

1 Like