Welcome! Log In Create A New Profile


Simulating printer head trajectory

Posted by jash7205 
Simulating printer head trajectory
August 12, 2019 06:09PM
Hi All,

I have a lulzbot Taz 6, which runs on merlin firmware. I'm working on a project where I want to track what happens during a 3D print, and compare that to gcode. Specifically, I put rotary encoders on each of the stepper motors for my printer, allowing me to record the print head's trajectory, and I want to compare that to the instructions that were sent to the 3D printer. This means I have to write a program to parse gcode and figure out where the print head should be at any given time. That is, I want to compare what actually happens during a print to what was intended by the gcode.

I notice that even when I run the printer very slowly, without any acceleration or jerk control, I'm not able to get the parsed gcode trajectory to perfectly line up with the encoder recordings. My assumption is that when there are a couple of lines of gcode like this:

G1 X30.000 Y30.000 F500
G1 X150.000 Y30.000 F500

the print head will go from (30, 30) to (150, 30) at a speed of 500 mm/minute. This would take 14.4 seconds, but in reality, it seems to take slightly longer. Does anyone know why it takes longer and how I can accommodate for that with my simulator? The printer isn't applying acceleration or jerk control, so I thought the times should exactly match up.

Re: Simulating printer head trajectory
August 12, 2019 06:35PM
You cannot accelerate from 0 to any value instantaneously in the real world. The parts have mass and drag...
Re: Simulating printer head trajectory
August 12, 2019 06:38PM
Of course! But the printer isn't applying any acceleration control, so I would expect it to start sending the second instruction 14.4 seconds after the first. That is, I'd expect the printer to miss its mark slightly but still have perfect timing.
Sorry, only registered users may post in this forum.

Click here to login