Extruder not synchronized with of robot mouvement- Printable Version +- RoboDK Forum (//www.sinclairbody.com/forum) +-- Forum: RoboDK (EN) (//www.sinclairbody.com/forum/Forum-RoboDK-EN) +--- Forum: General questions about RoboDK (//www.sinclairbody.com/forum/Forum-General-questions-about-RoboDK) +--- Thread: Extruder not synchronized with of robot mouvement (/Thread-Extruder-not-synchronized-with-of-robot-mouvement) |
Extruder not synchronized with of robot mouvement-blanc_p-07-01-2021 Hello, I want to drive a stepper motor by sending steps through the I/O outputs. I can do it but my problem is that my extruder is not synchronized with the movement of my robot... My extruder works at first, then my movement is done... Do you have an idea to synchronize them? An exemple of my code in attachments. Thanks Paul RE: Extruder not synchronized with of robot mouvement-Jeremy-07-02-2021 I think you will need to create a separate thread on the robot (multi threading), otherwise, things will happen in sequence, not simultaneously. Jeremy RE: Extruder not synchronized with of robot mouvement-blanc_p-07-06-2021 (07-02-2021, 06:24 PM)Jeremy Wrote:I think you will need to create a separate thread on the robot (multi threading), otherwise, things will happen in sequence, not simultaneously. Thanks Jeremy for the answer. I am still a beginner in python and I understand that threading is complicated... Tell me if I'm wrong: 1. i create my program that manages the movements of the 3D printing 2.I create my sub program that manages the extruder 3.我必须同步他们的举动ment id ? I went to see the example of the synchronization of several robots but I have trouble understanding how to adapt it to my robot and extruder ... I put you my post processor in attachment so that you understand my extruder is driven in the function "new_move". Thanks in advance for your help RE: Extruder not synchronized with of robot mouvement-Jeremy-07-06-2021 OK, no, we misunderstood each other. The threading should be on the robot controller side. You need to have the robot moving and the extruder extruding in parallel. Did you read this section of the documentation? //www.sinclairbody.com/doc/en/Robot-Machining.html#Print3D Jeremy RE: Extruder not synchronized with of robot mouvement-blanc_p-07-06-2021 (07-06-2021, 11:11 AM)Jeremy Wrote:OK, no, we misunderstood each other. Yes I have read it. I use this code to print. I explore the possibility to drive a stepper motor by sending steps from the digital outputs. That's why I'm asking you. With your system it's works well... So the threading is done in the post processor? Or I have to add a sub program in program events? How wan we setup extruder like external axis ? RE: Extruder not synchronized with of robot mouvement-Jeremy-07-06-2021 You need to add a subprogram in the program events with the extruder value (generally a filament length or speed) and create a subprogram on the controller capturing the value and executing it without blocking the main process. At the end of the day, this should be added to the post-processor if you want to automate everything, but to get started just write down the code and copy/paste it into the code generated by RoboDK. "How wan we setup extruder like external axis ?" What do you mean by that? Jeremy |