Directives Available in gSender?

At one time or other, gSender balked or choked or errored on the CNCjs directive %wait.

I don’t find any complaints from users of macros with %wait in their macros, but since %wait looks like the text of a variable how would one know if it was just being ignored?

I’ve looked at the console and found that with gSender output I get G4 P0.5 instead of where I think %wait should be. I use G4 P0.5 instead of %wait.

So, the question is for @chrismakesstuff or @KGN , is %wait in a macro actually doing anything at all?

Yes.
It’s G4 P0.5

I think it was carried over to cncjs from bcnc.

@NeilFerreri Thanks, Neil, but at one time we were thinking that %wait was not just waiting for a specified time.

We thought it was waiting for the buffer to empty, before moving on to the next line.

Is that what G4 is doing?

1 Like

That was the point of the G4. It’s a dwell command. Basically tells the machine to just hang out for a half second. In that specific case, to allow for buffer to catch up or for any EEPROM writes to complete.
Weird stuff used to happen if we weren’t adding those dwells. Development has come a long way since the early cncjs days though.

1 Like

I think a lot of the “weird stuff” is just an artifact of the 8 bit board. We’re noticing as we test the new (32 bit) board how fast it handles things like probe touches/pin status/EEPROM changes compared to the OG longboard and have been tweaking areas where we had to wait and can (optionally) no longer wait - like our probe routines.

Anyways, Neil has covered the original question well enough - it looks like a variable but is replaced with a dwell when run in macros/program events.

1 Like