Troubleshooting
Why MMP scratchpad values are missing from a Sparkplug payload
Short answer
A Sparkplug payload omits MMP scratchpad values for two reasons: the scratchpad area was never made public in I/O Services, or the values have not changed since the last publish or rebirth. Make the area public, confirm the start index and length cover the index you change, then change a value or request a full rebirth.
On this page
- Why does my Sparkplug payload publish I/O channels but not MMP scratchpad values?
- How do I make the MMP scratchpad area public in I/O Services?
- What do start index and length select in the scratchpad?
- Why does a scratchpad value publish once and then never again?
- How do I get a static scratchpad value into the payload again?
- How do I test that a scratchpad metric actually publishes?
- What should I check when scratchpad metrics still do not appear?
- Questions asked
A groov edge gateway can publish every I/O channel value over Sparkplug while MMP scratchpad registers stay missing from the payload. Two causes cover nearly all cases: the scratchpad area was never made public in I/O Services, or the values are static and publish on change only. The start index and length you enter in the MQTT Sparkplug configuration choose which scratchpad entries join the payload, but they do not expose the area — that is the public access setting in I/O Services. Make the area public, confirm the index you change falls inside the configured block, then change a value or request a full rebirth to see the metric arrive.
Why does my Sparkplug payload publish I/O channels but not MMP scratchpad values? #
Two causes cover nearly every case: the MMP scratchpad area has not been made public in I/O Services, so the Sparkplug publisher never sees it, or the values are static and publish on change only, so they were sent once and not since.
Range selection and exposure are two different settings. In the MQTT Sparkplug configuration, the start index and length choose which scratchpad registers join the payload; in I/O Services, the public access setting decides whether the publisher can read the area at all. Channel values reach the broker because their channels are already exposed for publishing — the groov EPIC documentation treats I/O channels, PID loops and areas of the Scratch Pad as things you expose for reporting, all managed through I/O Services. That is why the fault looks selective: channels flow, scratchpad registers never appear, and re-entering the range does nothing, because the range was never the missing piece.
How do I make the MMP scratchpad area public in I/O Services? #
Open groov Manage, go to the I/O section and open I/O Services, then enable public access for the scratchpad area you want in the payload; until that setting is on, no range selection in the MQTT Sparkplug configuration will publish a scratchpad metric.
The MMP tools sit under Home > I/O > I/O Services in groov Manage, and the public access setting for a scratchpad area is kept there. Enable it for the area the payload needs and apply the change. Before touching MQTT, open the MMP Calculator from the same I/O Services list and read the index you plan to publish, so you know the exact value the payload should carry; for a string area, the calculator's Area selection is Scratch Pad - String.
Public access is what lets the publisher read the area, so make public only the scratchpad areas the payload actually uses and leave the rest closed.
What do start index and length select in the scratchpad? #
The pair selects a contiguous block: start index 0 with length 4 selects indices 0 through 3, and the last index always works out to start index plus length minus one, so start index 2 with length 4 would select indices 2 through 5.
Take a real commissioning configuration: the 32-bit integer scratchpad set to start index 0 with length 4. The block runs from the start index through start index plus length minus 1, so 0 + 4 − 1 = 3 and the payload carries indices 0, 1, 2 and 3 of that scratchpad, while index 4 stays out. The float scratchpad is configured as a separate entry: if float registers belong in the payload, enter the same block again for the float type, because a range entered on one scratchpad says nothing about the other. A register at index 3 that changes will publish; a register at index 4 never will, however often it changes — that is the arithmetic, not the broker.
Why does a scratchpad value publish once and then never again? #
Scratchpad metrics publish on change only: a value that stays static is sent once and then appears again only when the value changes or the client performs a full rebirth, so an absent follow-up message is not by itself evidence that the range configuration failed.
A Sparkplug publisher reports by exception: it transmits a metric when the value changes and stays silent while it does not. A commissioning register you set once and leave — a setpoint, a unit ID, a note field — produces exactly one message and then nothing, and that silence is easy to misread as a configuration fault. The test is to change the value: if the metric arrives on the change, the public access and range settings are already right and nothing is broken.
How do I get a static scratchpad value into the payload again? #
Trigger a full rebirth: the client then republishes every configured metric from its birth sequence, static scratchpad registers included, without waiting for a change; most publishers expose a rebirth control beside the client settings, and a primary host can request one with the standard rebirth command.
A rebirth republishes the whole birth set, so every configured metric arrives once more and any subscriber that joined late receives a complete picture. A primary host application can request it with the rebirth command defined in the Sparkplug B specification, and many publisher interfaces offer a rebirth control of their own. A rebirth is a catch-up and diagnostic tool, not a polling mechanism; the page on when to use the Sparkplug rebirth tag on an edge node walks through when it is the right move.
How do I test that a scratchpad metric actually publishes? #
Change one value inside the selected range and watch the next message: for example, write 8625 to the 32-bit integer scratchpad at index 0, then confirm the metric for that index in the payload carries 8625; if it arrives, the public access and range settings are both right.
Read the register first with the MMP Calculator in I/O Services so you know what the payload should carry, then force the change: write the new value from whatever tool you maintain scratchpad values with, or from a controller — the walk-through on writing CODESYS Booleans to a scratchpad area over MMP and Modbus shows that side end to end. The next message after the write should contain the metric with the new value. If I/O channels keep flowing while that metric never appears, check the index you wrote against the configured block before touching anything else.
What should I check when scratchpad metrics still do not appear? #
Work the list in order: public access first, range second, change third, rebirth last, because each step rules out one of the causes, and a metric that survives all of them points to the subscriber side, not the publisher.
- Public access: the scratchpad area is enabled as public in I/O Services, not merely covered by a range selection.
- Range: the index you changed lies between the configured start index and start index plus length minus one, inclusive; anything outside the block never publishes.
- Change: the value differs from the last published value; an unchanged register sends nothing new.
- Rebirth: a full rebirth was requested and the message that followed it inspected for the metric.
- Downstream: if a rebirth delivers the metric but later changes do not, the changed index sits outside the block or the value is not actually changing.
Each failed check names its own fix: enable the public access setting, shift or extend the block until it covers the index you work with, or accept that a static value is behaving normally and refresh it by rebirth. A metric that passes all five checks clears the gateway, and the question moves to the broker subscription and the SCADA side.
Questions asked
What sends the first copy of every scratchpad metric when the gateway connects?
The birth sequence. When a Sparkplug client connects or reconnects, it publishes every configured metric once with its current value before falling back to transmit on change. That is why a payload that looked complete right after a restart can go quiet afterwards; the quiet period is normal behavior, not lost data.
Do I/O channel values follow the same publish-on-change rule as scratchpad registers?
Yes. Every Sparkplug metric, channel or scratchpad, is transmitted when its value changes and once more in the birth sequence at connect. Steady channel values look fine while you debug because they were delivered at connect; the same test applies to them, so change the value or request a rebirth to see one again.
What should I do when the payload carries a scratchpad metric but the value downstream stays stale?
Treat it as a subscriber problem, not a publisher problem: the change message for that metric was either missed during a disconnect or filtered on the receiving side. Request one rebirth to force a fresh copy; if the fresh value holds until the next change, the link between gateway and broker is healthy.