Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Extruder not synchronized with of robot mouvement
#1
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


Attached Files Thumbnail(s)
   
#2
I think you will need to create a separate thread on the robot (multi threading), otherwise, things will happen in sequence, not simultaneously.

Jeremy
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel


#3
(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.

Jeremy

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.I have to synchronize both of them with the movement 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


Attached Files
.py   Universal_3dprint_ok.py (Size: 34.79 KB / Downloads: 8)
#4
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?
https://robodk.com/doc/en/Robot-Machining.html#Print3D
Jeremy
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel


#5
(07-06-2021, 11:11 AM)Jeremy Wrote: 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?
https://robodk.com/doc/en/Robot-Machining.html#Print3D
Jeremy

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 ?
#6
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
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel


  




Users browsing this thread:
1 Guest(s)