I have been having Some issues where a Program will ran flawlessly for hours on end, Then suddenly it starts skipping or failing to activate a digital IO out signal resulting in crashes. I have tried adding If statements looking for Digital out 1 to be false, and waiting for it to be false before proceeding with the next line, but it just skips over this no matter what. I am using the Digital IO out Pulse to activate a relay for 3 seconds, after this the IO shuts off and the relay resets for the next pulse.
Intermittently the program will also skip a URcaps Machine motion code lines resulting in the vention 7th axis not moving.
Try setting a WAIT node for like half a second before the D/O signal gets read.
If you have a thread running in the background, you need to add a sync() to the bottom to use up the thread. You can also add this to the loop this is occurring in. A .2 second wait after any I/O is a good idea if you have the time