In the application i created a view for dispay the connection status of the connected equipment. On my computer this view work correctly and the label ‘CENNECTED’ is displayed for connected equipment.
But the panel PC Pro-face SP5000 that is used for this project, the label ‘CENNECTED’ is not displayed for connected equipment. Despite the equipment is correctly connected and display as connected on OPC-UA Server> Devices.
Have you confirmed that you can ping the devices from outside of Ignition using cmd/terminal? Network switch blocking pings? Devices set to not respond to pings?
Yes. I can ping the device throw cmd/terminal correctly. Also, the devices is displayed connected on OPC-UA Server> Devices and the tags change when PLC IO change.
I tried to connected the device directly to the panel PC without success.
The some application work in other stations. And in the SP5000 Pro-Face panel PC does not work.
That mean that the script is well created and called in the Ignition application.
May be there is some setting that must be checked wich I do not know!!!
Yes, this likely relates to network settings/configuration on the SP5000 in some way. I’m not sure what could be stopping this if you can ping the same address from command prompt on the SP5000.
That is strange. Is the gateway running on the SP5000, or elsewhere? If the SP5000 is just a client (not also the gateway), it isn’t relevant as this script in a tag would be running on the gateway.
I could not get the version of the ping function you have to work (one note, your command variable should be a python list[]). This version is what I use in my projects:
def ping(ip):
import subprocess
import platform
# Ping command depends on OS
platform_cmd = '-n' if platform.system() == 'Windows' else '-c'
command = ['ping', platform_cmd, '1', ip]
resp = subprocess.Popen(command, stdout=subprocess.PIPE).stdout.read()
return False if 'unreachable' in resp.lower() else True
In the future if you could copy your code into your message (enclosed with ```), instead of a screenshot, it will make it a lot easier for us to help you.
To expand on @nminchin’s response. Can you give more detail into any errors or tests you ran when you tried using the native Java approach? I only offered the modified python version because you weren’t able to get the Java function working.
I used the native Java approach and the some problem.
I reinstalled the windows 10 IOT 2016 that was installed on the SP5000 and also i have the some issue.
So i made a clone of my PC windows and i installed it on the SP5000. The problem is solved and the ping script work !!!