Plc to pc(server)

Good Day,
We have an HMI KTP700 BASIC PANEL AND S71200 PLC AND ALSO A PC SERVER WHICH IGNITION is installed. They are both connected on the same network. We also have an SQL SERVER for the data entry from the HMI panel.

Can the Ignition writes the tag right before the connection was lost(PC Server)? Or Is the PLC can monitor its connection to the PC Server(Ignition)?

There are ways to capture the last tag value before connection was lost in Ignition. And you can also program a handshake between PLC and Ignition so PLC can respond to a connection loss, if desired.

What are you trying to accomplish?

1 Like


I am trying to create an indicator from the PLC to the HMI, so that the user can know that the Ignition/Database isn’t connected therefore transaction will not be recorded until the connection has returned.
How can the handshake work?

I tried the handshake from set tag in case of failure, but i think it only works for some sql query? Still it would not write tag right before connection is lost. Or maybe i misconfigured something?

Are you trying to indicate:
1 - that DB isn’t connected or
2 - that PLC isn’t connected?

1 Like

The PC where Ignition and DB is installed,
Is it possible? That the Ignition will write a tag to the PLC indicating LIKE ‘Ignition Server Lost it’s connection, inform the HMI’ haha

The conundrum is how to send a message through a broken connection. You can’t. So you can’t wait for the connection to be broken. You have to send messages regularly and have the PLC notice (short timeout) that they are absent.

This is called a heartbeat. A common technique would be to have a one-second timer script in Ignition write the current second to a PLC register. If that register doesn’t change in a couple seconds, the PLC can let the HMI know that the SCADA is offline.



Yes, I have tried to create a timer script from the gateway events that set the tag(trigger) to ‘1’ every 2s and create a ladder logic program to the PLC, set and reset the tag and latches to the other tag (plc_status). I created also a TON Timer and ANDED together the NO contact of plc_connected NC contact trigger to monitor if the ignition does not set the trigger tag to ‘1’ for a period of 5s, now indicating that the PC lost its connection

You should not be writing to a tag from two directions. Send a changing number from Ignition. Don’t change it or reset it on the PLC side. That way leads to race conditions and flaky behavior.

I recommend heartbeat logic in the PLC that looks something like this:

Ignition writes to IgnitionHeartbeat once a second. Other logic in the PLC that cares whether Ignition is connected would simply use the bit IgnitionOK.DN.