Heartbeat & Handshake

I have two feature requests. I am using the SQL Bridge Module to collect data from an AB CompactLogix L35E. If these features can be implemented in the current version of the Bridge please let me know.

  1. Heartbeat. In my application I don’t collect the data until the end of the process. It would be nice if there were a heartbeat that changes the state of a tag in the PLC at a predetermined interval anytime the Ignition Gateway service is running. That way I wouldn’t allow the machine to start unless the data collection system is up and running. For example, the OPC Data Logger by LH Controls has a feature like this.

  2. Handshake. I know I can already write a predefined value (e.g. “1”) when data has been successfully written, but it would be nice to echo back a key value such as the serial number string of the part for which the data is being collected.

Thank you in advance,

Doug Ireland
Edgewater Automation

I implemented these on my own. For both features I created a transaction group whose update mode is DB to OPC and no table name. I then created a run-always expression item for the heartbeat with the expression “{[.]Heartbeat}=0” with a target OPC tag “Heartbeat” (the same OPC tag that is evaluated in the expression). This toggles the state of that tag at the update rate of the transaction group.

For the handshake I created a run-always expression that has a SQL Query “SELECT group_table_ndx FROM group_table ORDER BY group_table_ndx DESC LIMIT 1;” with a target OPC tag to hold the record number of the last record written. This could be any database field.


Doug Ireland
Edgewater Automation

1 Like


We also handle our own Heartbeat & Handshaking on one of our systems and it has a similar nett result but achieves this via a different process to what you have described. In our case the two systems are interlocked as in The PLC process is not allowed to restart until some Operator intervention (selection) is made at the PC HMI end. As our system is basically a glorified downtime data logger we didn’t want the Process to be “unable to start” if the PC HMI end was inactive for any reason.

We use two “Int” Tags for the heartbeat (one in and one out) the PLC just copies the “in” tag to the “out” tag on change. No change for a 3 sec period= no heartbeat. At the PC end we use if(({[.]Out}&255)>99,0,({[.]Out}&255)+1) to write to the “in” tag - this is done in the same transaction group* as the Handshake/Logging of the PLC value we want to track.
*we use stored procedure groups and do most of our data manipulation at the SQL server as the same procedure is called from many Groups in our system.(our SQLServer is hosted on a separate Machine to the Ignition Gateway)

This is pretty much the same as the heartbeat but it is not manipulated before it is returned IE out -> in tags. The response is only sent after the PC end has successfully processed the “changed” data.

The point, I guess I am trying to make is that by requesting a specific Heartbeat or Handshake handling “feature” within Ignition, there will always be some who want it to function differently. The IA Guys have a great system here & I wouldn’t like to see it become bloated with “features” that are hard to quantify.
I’d be curious to see what methods others are using when they need to include a Handshake and/or Heartbeat