Hi All,
I'm having a random issue (this is the 3rd time I've seen it over about a 6 month period) where MQTTSUB will hang, and not provide any indication that it's stopped working.
In this case, the hang was was caused by rebooting the MQTT broker. After it came back online, the PLC had triggered my own validity check routine (looking for a change in MQTT data every x minutes).
I opened Do-More and there were no errors showing for the PLC, all I/O parameters were normal. In the MQTTSUB instruction, both the On Success and On Error bits were off. Changing the PLC from Run to Program to Run again didn't solve it, and using the "Re-Initialize PLC I/O" didn't solve it. The extended error DWORD always stayed at 0. After a power cycle, it immediately began working as normal.
I guess I can (should?) monitor for the case where the "On Success" bit turns off (rather than the "On Error" bit turning on), but even if I did...what instruction could I use to reset the MQTTSUB routine?
Any help would be great. Thank you!
- Brian