Play command reads an entire file at once

18 views
Skip to first unread message

Pawel M

unread,
Oct 13, 2020, 4:38:24 AM10/13/20
to Smoothieware Support
Hi there,

I have a problem with the play command that seems to read entire gcode at once. Basically, when I run my gcode using either 'play' command or Pronterface, I always get a message 'Not currently playing' after sending 'progress' command. It seems like the entire gcode is loaded at once because when I use 'play [...] -v', smoothie returns my entire gcode also all at once. 

Do you know how to make sure the file is actually read one line at a time?

Thanks,
Pawel 

Arthur Wolf

unread,
Oct 13, 2020, 4:57:12 AM10/13/20
to Smoothieware Support
Two things to try:
1. Format the SD card, and/or try another SD card
2. Check your file has normal (\r\n) line endings, and not some odd/unusual/other line endings/newline setup, with a hexadecimal editor I would guess

--
You received this message because you are subscribed to the Google Groups "Smoothieware Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-sup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/smoothieware-support/7e1570ca-1731-4d02-81cd-dd3145eeaa01n%40googlegroups.com.


--
勇気とユーモア

wolfmanjm

unread,
Oct 13, 2020, 6:07:17 AM10/13/20
to Smoothieware Support
how many lines on the file? it will consume 32 gcodes at a time.

Pawel M

unread,
Oct 14, 2020, 1:55:58 AM10/14/20
to Smoothieware Support
Thanks for your response.

I do have '\r\n'  line ending in my gcode but I will try formatting my SD card. 

Regarding the last comment, does that mean that whatever I do the smoothie will take 32 gcodes at a time? Is there any way to change it?
My gcode is only 30 lines because I found that with any larger gcode, UART becomes very very slow... This is why I was wondering if I could process one gcode at a time as ultimately what I need is a smooth communication via UART while gocde is playing. 

Thanks,
Pawel



Arthur Wolf

unread,
Oct 14, 2020, 5:35:53 AM10/14/20
to Smoothieware Support
The UART becoming very slow isn't normal, it's likely you aren't correctly following the protocol. You need to send new Gcode *strictly* only after an "ok" is sent for the one you just sent.
After that, if Gcode transfer slows down, it's simply because the machine is executing the Gcode you already sent, and doesn't have infinite space to store new ones, so it must wait for some to be executed before they can let you send more.

--
You received this message because you are subscribed to the Google Groups "Smoothieware Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smoothieware-sup...@googlegroups.com.


--
勇気とユーモア

wolfmanjm

unread,
Oct 14, 2020, 9:58:23 AM10/14/20
to Smoothieware Support
Sending over UART is NOT recommended, it works much better and smoother over USB. However either way 30 lines of gcode will be consumed immediately, that is the way it works, it HAS to do that becuase it needs to plan the moves and it has a 32 gcode planning buffer without that it would never accelerate up to speed.

If you want to wait until the file is finished before returning the final ok, simply put a M400 at the end of your file. This should also work for the play command from sd card, progress wil not show finished until the M400 is executed.
Reply all
Reply to author
Forward
0 new messages