Runing 2 Z axis and 2 spindle independent in the same time
-
I still did not get feedback Is it possible to use 2 separate Duet controllers working together as an example duet wifi with duet3 mini
-
@martin7404
They can talk through external triggers managed by gcode. but there is always a small delay between setting a trigger output and the other controller reading it. Although in your case you can reduce it a lot, since the second controller doesn't have much to do. So using a very short while-loop in daemon.g would read the trigger input faster than the default 10sec.The meaning of the triggers (one input and one output on each controller) are:
Trigger 1 tells controller 2, that it can start drilling. (position is reached, clamps are tight a.s.o)
Trigger 2 is set from controller 2 and tells, it is ready with it's job. So Controller 1 knows, it can move to the next position.But I still think, you should stick with Duet 2 using external drivers:
Wouldn't it be possible to use a different axis name (eg. U, V or W) for the second spindle?
I'm sure in a macro you can :
switch between spindle definitions
change spindle setting (speed, direction)
switch back to other spindle -
@o_lampe I see
But the problem is I want both spindles to work in the same time, and they have different drilling/taping cycle etc -
@martin7404 you'll need to wait for RRF 3.5 and the separate gcode streams that are planned
-
@jay_s_uk Yes great ,but the question if it is possible to make it now with 2 separate duets and if yes how
-
@martin7404 no, it's not possible
-
@jay_s_uk Thank you
-
@o_lampe Can you give example for this while loop
This is what I do not get
Otherwise, I would have to do it with some wait time with G4 -
@martin7404 said in Runing 2 Z axis and 2 spindle independent in the same time:
@o_lampe I see
But the problem is I want both spindles to work in the same time, and they have different drilling/taping cycle etcThey will continue to work. In the end you only set their control inputs to a certain PWM or logic level. You only need a short moment of their attention to change the settings. Then you can switch over to addres the other spindle.
I was also looking for a good example, how to setup a while loop in daemon.g. I must admit, I only echoed what others have posted here, but never used it. Maybe @owenD can chime in here?
-
@o_lampe But
IF I have 2 independent Z axis Z and W
I need let us say
Both spindles on with diferent speeds
Z axis to Z1 F6000, then to Z -5 F200 , Then switch speed of this spindle to 100 RPM, then Z -12 F99 , Spindle reverse rotation Z 1 F101 , Z 10 F6000 , spindle stop
Other is
W axis to W 1 F6000, then W -6 F120, Then W -13 F6000, switch spindle speed to 300 RPM, W - 18 F100 , W 10 F6000 , spindle stop -
This post is deleted! -
@o_lampe @martin7404
If you were to run two controllers I think the best way would be to set up triggers.
So for example have a button which is connected to both boards in parallel and assigned to trigger one.
Trigger one starts the drilling file in both boards.
Each board would have to control other I/O's that would be set high/low when- the extrusion was in position
- the drilling started
- the drilling was complete
- the extrusion was moving
- the job was starting and complete
You'd then just have to while loops that looked for the status of these I/O's and carry out each procedure at the correct sequence.
We use a similar process when having two robots work synchronously.
It's a bit more work than I have time for to provide working code.
-
@joergs5 Thank you
My explanation is not very clear.
In your example the machine will drill the first set , then the next
I want them to work simultaneously -
@owend Thank you
That is exactly what I need.
But I am not able to find an explanation how trigers work
What I know
You set it in the config and you write triger#.g macro for this input, that is clear.
But how to set it in the part program to wait for this input?
As an example, the second controller is running the secondary Z and spindle and is doing only drilling/tap operation
The part program is running it has to wait for "GO - workholding clamps on" and when finished to activate output to tell the first controller it is ready and retracted from the part.
The first controller after finishing it's drilling operation have to check for the confirmation of the second
How do you program that ?
I have experience with CNC lathe with double spindles with Siemens 840D, and there you write a separate program for each channel and you have special code to wait while the other chanel reaches line # -
@martin7404
Essentially you would segment the program on each board.
So when trigger1 runs it starts both files.
Then you do something like
Board 1 sets the "moving" I/O high and does the moves to move the extrusion to the first hole.
In your code on board3 you would have something likewhile sensors.gpIn[6].value =1 G4 P100
Then it will do nothing till board 1 signals that the extrusion is in position
When board one has the extrusion in position, both boards set their "drilling" I/O high
At the end of drilling each would have to another while loop to ensure both were finished before repeating the process -
@martin7404 I think you would need to take a similar approach to the one we are implementing for multiple GCode streams in RRF 3.5. The approach is to run two sets of GCode instructions simultaneously on two tools with independent axis systems, but to synchronise the two instruction sets at particular points, by having the one which finishes the instructions up to the sync point first wait for the other one to catch up.
-
@dc42 IT is great news , Would it work with duet 2