News:

  • May 13, 2026, 08:15:21 AM

Login with username, password and session length

Author Topic: MQTTPUB Gets Stuck  (Read 16653 times)

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: MQTTPUB Gets Stuck
« Reply #15 on: May 11, 2026, 10:45:43 PM »
I've been commissioning a different system using the same MQTTPUB logic, and this one has a much longer scan time (~14ms) and have had to bump up the timeout with a DEVWRITE to get it be able to publish data on time. It takes over 50 seconds. That's not a huge problem per-say, but it keeps returning a lower word in the error code of 22, but the data is going through. What does 22 mean? How can I further diagnose these issues?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3814
    • Host Engineering
Re: MQTTPUB Gets Stuck
« Reply #16 on: May 12, 2026, 08:52:08 AM »
Have you enabled Message Dump debug?  That tells the MQTTPUB to broadcast log entries so that DmLogger windows application can monitor it.  Remember to turn it off once you are done using it.

Debug->Do-more Logger brings up a dialog box that lets you enable this in the PLC.  You probably want to raise the logging filter to Level 2 to provide the most detail.  See if that helps you figure out what is going on.

When done, remember to return to this dialog and return to Level 1 and disable message dump in the PLC.

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: MQTTPUB Gets Stuck
« Reply #17 on: May 12, 2026, 08:58:38 AM »
I've never been able to get DmLogger to work via a VPN connection.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3814
    • Host Engineering
Re: MQTTPUB Gets Stuck
« Reply #18 on: May 12, 2026, 09:02:58 AM »
I've never been able to get DmLogger to work via a VPN connection.

I believe it.  You may need to ask your IT or VPN people how to enable broadcasts on a specific UDP port (29298 or 0x7272).  Or get someone to set up a PC at the remote location and run DmLogger (you could enable it remotely, but then have them monitor it locally and send you the log text via email).

Bolt

  • Hero Member
  • *****
  • Posts: 598
Re: MQTTPUB Gets Stuck
« Reply #19 on: May 12, 2026, 09:09:12 AM »
I've never been able to get DmLogger to work via a VPN connection.

I believe it.  You may need to ask your IT or VPN people how to enable broadcasts on a specific UDP port (29298 or 0x7272).

That would be me...

So what does code 22 mean?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3814
    • Host Engineering
Re: MQTTPUB Gets Stuck
« Reply #20 on: May 12, 2026, 09:23:45 AM »
So what does code 22 mean?

I do not know.  The Help topic does not list it out.  Let me try to find out...

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6156
  • Yes Pinky, Do-more will control the world!
Re: MQTTPUB Gets Stuck
« Reply #21 on: May 12, 2026, 11:56:09 AM »
In most cases that is a SYSERR_XXX value and 22 is SYSERR_CONNECTION_FAILED.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO