3

I am using MQTT Paho, and I have 2 questions about it:

  1. How many words can I send as a payload message? For example, can I send all lines below as one payload?

    O1000
    T1 M6
    (Linear / Feed - Absolute)
    G0 G90 G40 G21 G17 G94 G80
    G54 X-75 Y-75 S500 M3  (Position 6)
    G43 Z100 H1
    Z5
    G1 Z-20 F100
    X-40                   (Position 1)
    Y40 M8                 (Position 2)
    X40                    (Position 3)
    Y-40                   (Position 4)
    X-75                   (Position 5)
    Y-75                   (Position 6)
    G0 Z100
    M30
    
  2. If any of these lines don't work, can I make it send message to the broker? These lines are G-Code of CNC machine. Usually, when any line isn't executed, the whole program will stop at that line. Is it the same with MQTT?

Aurora0001
  • 18,520
  • 13
  • 55
  • 169
Balsam Qassem
  • 693
  • 4
  • 11

1 Answers1

5

First question:

The payload of the message is limited to 268,435,456 bytes (256Mb) (see the Stack Overflow question What is the maximum message length for a MQTT broker?)

Your second question doesn't make sense, but basically assuming the whole g-code is in one message it will all be delivered or not. It's up to you how you to implement the taking a received message and passing it to the machine.

hardillb
  • 12,813
  • 1
  • 21
  • 34