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

Check print/stop parts order #226

Closed
peteruithoven opened this issue Mar 12, 2014 · 9 comments
Closed

Check print/stop parts order #226

peteruithoven opened this issue Mar 12, 2014 · 9 comments

Comments

@peteruithoven
Copy link
Member

When someone presses the stop button while still sending print parts it can happen that the stop request arrives at the box before another print part, even though on the client side the order was 1. sending print part and 2. stop. So it seems like requests to the api take longer than others. The fact that print parts requests are bigger might be a reason.
When this happens the printer will perform the stop code and continue with just that last the print part.

To prevent this issue we currently bluntly hide the stop button while sending print parts, see: #35

More backstory:
Doodle3D/doodle3d-firmware#16

@peteruithoven peteruithoven added this to the 0.10.3 milestone Mar 12, 2014
@peteruithoven
Copy link
Member Author

A ToDo list for this issue:

Socket communication

  • checks (using start or end value)
  • collect one gcode chunk before sending it to printer driver

GCode buffer

  • Refactor checks into more maintainable code

Makerbot

  • Use same GCode buffer
  • Convert into GPX later (before sending it to printer)
    Converting GCode to GPX later should also increase the speed in which the WiFi-Box can receive GCode.

@woutgg
Copy link
Contributor

woutgg commented May 28, 2014

As visible in the checklist, this ticket has been implemented. A new issue regarding stopping the makerbot popped up however. As soon as that is fixed, this ticket can be closed.

@woutgg
Copy link
Contributor

woutgg commented Jun 5, 2014

The print3d server now allows for checking gcode chunk order. Client-side code however does not send it as it seems less important now, with other improvements (mainly gcode transactions).

@peteruithoven
Copy link
Member Author

Using a stop print command p3d -k currently crashes print3d. Using a stop print command with gcode does work p3d -K 'M137'.

@woutgg
Copy link
Contributor

woutgg commented Jun 10, 2014

The crash has been fixed in Doodle3D/print3d@6530cca.

@peteruithoven
Copy link
Member Author

I can reproduce the stop issue using the command line interface

p3d -f /Users/Peter/Projects/Peter\ Uithoven/Doodle3D/dev/makerbot/cube/cube.gcode
p3d -K $'M73 P100\nG92 A0 B0\nM18 A B\nG1 Z155 F900\nG162 X Y F2000\nM18 X Y Z\nM72 P1\nM137'

It stops executing the cube.gcode, but it doesn't execute any of the specified end code and it sticks in the stopping state.

@woutgg
Copy link
Contributor

woutgg commented Jun 23, 2014

Selectively removing commands which control build state etc. lead to the following end code which works (for r2x):

M73 P100
G92 A0 B0 ;reset extruder position to prevent retraction
M18 A B(Turn off A and B Steppers)
G1 Z155 F900
G162 X Y F2000
M18 X Y Z(Turn off steppers after a build)
{if heatedBed}M140 S{preheatBedTemp} T0
M104 S{preheatTemp} T0
M73 P100 (end  build progress )
;M72 P1  ( Play Ta-Da song )
;M137 (build end notification)

So at first it seems that M72 P1 and M137 are the culprit. However, testing this again lead to a failure anyway.

Strangely enough, letting a print finish with 'regular' end code now works fine (at least a few times...) whereas it seemed to have the same issue before.

Perhaps the solution could be to just use Sailfish as printer firmware?
One thing all this does seem to prove is that the issue lies with the printer/gcode and not with the modifications to the makerbot driver. So can we close this issue?

A final word: commenting out all four mb control commands worked fine at least 5 times. Acceptable as a temporary solution?

@peteruithoven
Copy link
Member Author

peteruithoven commented Apr 18, 2016

@woutgg It's been quite a while, but do you remember why you mention "four mb commands"? Since you ony commented out two comments in the end gcode you added. Did you include the M73 commands?

@woutgg
Copy link
Contributor

woutgg commented Apr 19, 2016

I do not remember, but as I understand the issue has now been resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants