What's the dollarWaitTimeMilliseconds for?

64 views
Skip to first unread message

MichielT

unread,
Jun 26, 2026, 11:45:09 AMJun 26
to OpenPnP
New to openpnp having purchased an afarco 3.2 (nice machine btw). Had issues with serial ports not working in openpnp but working fine in Linux mint and other java programs. Used a java project of mine to workaround it so that really narrowed it down to openpnp.

Decided it would be a fun experiment/fork to try to replace  the comms in general and attempt my own version of async. So far so good.

But one thing I'm not sure about (probably will discover more along the way), what is that dollarwaittime for? I've implemented it as a general 'just wait a bit', but I rather know the  reason.

tonyl...@gmail.com

unread,
Jun 28, 2026, 12:01:52 PMJun 28
to OpenPnP
AFAIK, that's only used for TinyG controllers. The TinyG uses $ commands to setup its configuration. The TinyG needs some time to process each $ command and write the result into non-volatile memory before it can accept a new command. OpenPnP uses the dollarWaitTimeMilliseconds to ensure it does not send $ commands too fast.

MichielT

unread,
Jun 28, 2026, 12:05:14 PMJun 28
to OpenPnP
Thanks. So it also doesn't send a reply and that's why the default 50ms wait is done.

tonyl...@gmail.com

unread,
Jun 28, 2026, 2:08:11 PMJun 28
to OpenPnP
>  So it also doesn't send a reply....

Actually, it does send a response back, but it does so before it finishes writing the changes to the non-volatile memory. If a new command arrives during that time, it messes up the internal TinyG state (I don't remember exactly how though).

MichielT

unread,
Jun 28, 2026, 2:15:29 PMJun 28
to OpenPnP
Ah, ok, that's different. But checked my source code, and it waits after a reply is received not after a command is send. Guess I implemented it correctly.

Clemens Koller

unread,
Jun 28, 2026, 2:23:51 PMJun 28
to ope...@googlegroups.com
Hi!

I can confirm that when you poke TinyG with too many $commands in a row, it tends to get
into undefined states as it cannot write to non volatile memory as fast as it accepts
$commands. Some internal buffer was overflowing.

I was using TinyG in former times for Liteplacer. I migrated my hardware to Duet3D 6HC
which ist just a way more reliable hardware and firmware.

Clemens
> --
> You received this message because you are subscribed to the Google Groups "OpenPnP" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to openpnp+u...@googlegroups.com <mailto:openpnp+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/openpnp/b0c1700b-12ff-4d51-b1ee-65163e1f4164n%40googlegroups.com <https://groups.google.com/d/msgid/openpnp/b0c1700b-12ff-4d51-b1ee-65163e1f4164n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages