Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST]🦄GCODE Streamer Host definition for 3.X #243

Open
luc-github opened this issue Jul 14, 2018 · 10 comments
Open

[FEATURE REQUEST]🦄GCODE Streamer Host definition for 3.X #243

luc-github opened this issue Jul 14, 2018 · 10 comments

Comments

@luc-github
Copy link
Owner

luc-github commented Jul 14, 2018

Time to define what host feature will be:
Basic description
1 - Read Gcode from SD
2- Send GCODE to printer FW via Serial
3 - Wait for ack
4 - if ack go to 1 / if error go to 2

Now need to clarify each part :

  • Point 1 is no issue so far: just store file name / currentline
  • Point 2 need more elaborate:
    1 - add Line numbering in command
    N1 G28
    Reset the line numbering is M110 N0 on Repetier / Marlin / Smoothiware
    2 - add command checksum for safety (all command char are XOR+*+checksum calculated)
    N20 M105*20
  • Point4 : ack always use ok +line number
    ok 20
    if error on line number or checksum you get
    resend 20

Not sure if special command need to be handled (like @Pause) right now as it is not a host that have direct UI, but will be when Oled Screen is enabled as well as rotary encoder is supported.

One command is key: Emergency stop, to stop sending commands ans stop printer FW

@luc-github
Copy link
Owner Author

luc-github commented Sep 26, 2018

some update for command / answer according Firmware:
1 - smoothieware
which is quiet (nowait when idle), use N{New Line Position} M110 to reset, and resend error is rs N, M29 does not need checksum, send ok without line number

2 - Marlin Kimbra
which is not quiet (send wait when idle), use M110 N{New Line Position} to reset, resend error is Resend: , M29 need checksum, ok does not use line number

3 - Marlin
which is quiet (no wait when idle), use M110 N{New Line Position} to reset, resend error is Resend: , M29 need checksum, ok does not use line number

4 - Repetier
which is not quiet (send wait when idle), use M110 N{New Line Position} to reset, resend error is Resend: , M29 does not need checksum, ok use line number

@luc-github luc-github changed the title Host definition for 2.1 Host definition for 3.X Dec 9, 2018
@luc-github
Copy link
Owner Author

Basic GCODE host functions are now available
they will be used for the autotstart feature, the [ESP700] command and Serial Upload
the host features will be improved later if necessary

@luc-github luc-github changed the title Host definition for 3.X GCODE Host definition for 3.X Oct 13, 2019
@luc-github
Copy link
Owner Author

luc-github commented Oct 13, 2019

Next steps to work on for proper gcode host support

  • should not be blocking e.g. screen update. external commands for pause/stop/etc..., may be by using separated task
  • should be able to wait for delayed answer/ next command: G4 or M116 or M190 or M109, may be by disabling time out for these command
  • handle printer error if not heating or defective sensor
  • allow auto script for pause/stop/etc...
  • display file stream process
  • TBD

@luc-github
Copy link
Owner Author

a basic GCODE host stream is now in https://github.com/luc-github/ESP3DLib/tree/2-0
it is basic ping/pong command/ack with ok
it is no more blocking and it is used by [ESP700], can be used with line script/FS file and SD file

Current limitation:

  • no edge case are handled yet - need to define them
  • no checksum / line numbering (code is ready but not used)
  • no resend / busy is handled - need to add conditions to do it

But framework / code base is now ready

macro

@probonopd
Copy link

"can be used with ... SD file"

How?

@luc-github
Copy link
Owner Author

luc-github commented Apr 18, 2023

by typing the command manually for the moment
[ESP700]/SD/myfile.gco

@luc-github
Copy link
Owner Author

The latest definition used currently on ESP3D-TFT is here:
StreamingService.md

@luc-github
Copy link
Owner Author

The ping pong streaming service is available in ESP3D-TFT as POC and will be ported to ESP3D once validate

@luc-github luc-github changed the title GCODE Streamer Host definition for 3.X [FEATURE REQUEST]🦄GCODE Streamer Host definition for 3.X Mar 6, 2024
@kleffa
Copy link

kleffa commented Jun 1, 2024

Is to difficult read gcodes from esp3d SD as a macros?

@luc-github
Copy link
Owner Author

luc-github commented Jun 1, 2024

what do you mean ?
read gcode is not hard - send gcode is not hard but that is not streaming
Streaming is to control the flow of commands, control the response and react accordingly, if error , if timeout, also errors and responses are different for each FW : Marlin / Repetier / Smoothieware / grbl / etc...
In addition need to handle user command like PAUSE, filament sensor reporting no more filament, etc
it is not difficult but is a lot of possible users cases that need to be handled.
also need to handle user send manual commands as well as polling commands from external device like tft or even computer while streaming is ongoing

Macros are suposed to be few gcodes and so currently they are all send blindly at once without checking the response , and because they are only macros, if they failed it is not a big issue - but once gcode host will be implemented they will be handled as any other gcodes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

3 participants