Introduction
In many industrial installations, Siemens Remote I/O modules like ET 200SP are used alongside S7-1200 PLCs to extend digital or analog input/output capabilities closer to the field. These Remote I/Os communicate directly with the main PLC, which is typically the only device added to SCADA, in this case Ignition, via OPC UA.
But what if you want to monitor whether a Remote I/O is powered or connected and it’s not directly accessible via OPC?
In this post, I’ll show how you can use a simple gateway ping script in Ignition to monitor the connectivity status of your Siemens Remote I/O device and update a memory tag that reflects whether the I/O is reachable on the network.
Network Setup Overview
In my setup:
- A Siemens S7-1200 PLC is connected to the Ignition SCADA server through a managed switch.
- A Siemens Remote I/O (ET 200SP) communicates only with the S7-1200, not directly with SCADA.
- The Remote I/O cannot be added as a device in Ignition’s OPC device list.
- Therefore, ping is used to check whether the Remote I/O is online (i.e., powered and network-connected).
Since Remote I/Os are not directly visible to Ignition:
- You can’t use OPC browsing or diagnostics.
- But most Siemens Remote I/Os respond to ICMP ping, which lets you check if they’re powered and connected.
- A successful ping = I/O is likely online.
- No reply = I/O is offline or disconnected.
Ignition Gateway Script (Every 15 Seconds)
This gateway timer script runs every 15 seconds to ping the Remote I/O’s IP and update a Boolean memory tag (ET-200SP) in Ignition:
subprocess python module the program to run system commands as if they were typed in the terminal or Command Prompt.
Trigger Frequency: Set this script in Gateway Event Scripts > Timer Scripts and run it every 15 seconds.
import subprocess
ip_address = "192.168.12.41"
tag_path = "[default]ET-200SP"
try:
# Run the ping command and capture output
process = subprocess.Popen(["ping", "-n", "1", ip_address], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, error = process.communicate()
# Convert output to a string
output_str = output.decode("utf-8")
# Check if teh reply is valid
if "Reply from" in output_str and "Destination host unreachable" not in output_str:
status = True # ET-200SP is online
else:
status = False # ET-200SP is offline
except Exception as e:
system.util.getLogger("PingCheck").error("Ping Error for {}: {}".format(ip_address, str(e)))
status = False # Assume ET-200SP is offline if an error occurs
# Write the status of ET-200SP to the tag
system.tag.writeBlocking([tag_path], [status])
Conclusion
This method is a lightweight workaround for monitoring non-OPC devices in your SCADA network. While ping doesn't confirm full device health, it’s sufficient for basic connectivity checks and enhances system visibility.