I have four PLCs receiving heartbeats from the Ignition Gateway. They are four Gateway scripts running every second that:
Count from 1 to 60 and reset to zero.
Copy that value to an OPC tag.
I have tried a single script, four scripts, changed threading and delay…
The problem is if I unplug the network cable on one PLC, the HBs stop updating for all PLCs until they reconnect. Same thing when I plug back in. I can still ping the devices while the heartbeats stop updating.
I’ve had the same problem for several months now. I updated from 7.9.10 to 7.9.16 to see if that helps, and it didn’t. I have to reboot Ignition to get it working again, helps for abut 2 weeks. Memory and CPU usage is low. Doesn’t matter if it is a tag change, tag event or gateway timer script…they all stop running.
Eeek! No. Don’t write from two directions. PLC should count and roll over. The low word of a PLC clock is fine. Ignition should count and roll over in its own timer event, writing to the appropriate OPC tag. Or write the low bits of Ignition’s millisecond time to the OPC tag. It isn’t important what the value is, just that it changes regularly.
Neither the OP nor @jdrichards70 shared their actual scripts, so there’s no telling what the real problem is. Non-blocking writes should be used to prevent one broken device connection from killing the heartbeats to other device connections.
That’s why I tagged you I knew you would have me sat-corrected
My Field IO is generally Moxa IoLogik. I use an E1212 with a hardwired heartbeat Output back to an Input on the same module, with the Output set to pulse at 1000mS.
SCADA monitors/trends/alarms this and combined with my periodic ping mentioned above, I have a good idea of RIO/FIO outages. I know when SCADA is down because my mobile (cell) phone rings shortly after
I think it’s more than just my heartbeat issue. Once in a while, the operators will report the barcode scans are taking 30-60 seconds to show up on the HMI or a machine will pause for a bit waiting for something from Ignition. Everything on the network pings < 1ms while this happens.
Hopefully @jdrichards70 can confirm that the scripting in question is configured as a Gateway script; agreed that you’d not want this in the client scope. Perhaps confirm your settings for the timer script?
@Kevin.Collins - I tried fixed delay and fixed rate, same results. I am running with dedicated thread right now.
What would the proper or industry standard be for setting up the heartbeat? I usually just use the ‘is connected’ bit with the driver and this is the only machine I have had issues with…Siemens, arg!!! While my heartbeat dies, all the other real time data is coming through, so it’s not like the machine dropped offline or the driver locked up and I can manually change the tag value in a designer.
Hello, I had the same problem today.
I have 2 OPC server and when I disconnect one, I see the timer script slow down and not writing the heartbeat to the second one.
(They live in two completely separate timer script)
I receive an error ( I can’t share it at the moment ) in the system log saying that there was an error on the timer script code, even if there is no error.
The whole timer script is just a write on the tag.
I tested system.tag.write and system.tag.writeBlocking with the same outcome.
Coul I ask you which settings are the best for a simple and reliable heartbeat?
I don’t understand why this is happening even if I select dedicated thread.
I remember fixed delay and fixed rate was bugged, is it still the case?
There was a bug in the OPC tag execution system that caused breakage on a single connection to hold up all tags on the same pace across all other OPC connections. I don’t recall what version it was fixed, but your case sounds suspiciously similar. What Ignition version are you using?
I will post the gateway and errors details on Monday as soon I will have a remote connection with the server.
The version is the 8.x.x.
One thing I’d like to understand is how scripts are managed.
For example, let’s assume we have this scenario:
2 plc tags with one script each, when the value change (udt tags with event change script):
A writeblock writing 2 booleans to PLC, resetting the request bit and setting an ack
an opc.read to retrieve the state of few tags
store some values on a database
writeblock to write an integer plus a bool to the plc with the result of the action performed
2 timer script, setting a boolean on the plc as heartbeat.
Now my question is, if for example we are in the situation when the timer script and the tag change event fire at the same time, will they be executed on their own thread or they will share the thread and so be executed one after another (with obvious writeblock time delay) ?
The same question bother me for consequential events being fired at the same time on multiple tag change scripts.
There is a difference between how ignition treat gateway tag change scripts vs udt tag change? Are they executed on the same thread?
In case a writeblock goes in timeout due to connection probelm, block all the other script of changing tags?
Would be nice if you can point me out some documentation about it,