Runing 2 Z axis and 2 spindle independent in the same time
-
Hi all I built a specialized machine for drilling long 6m Alu extrusions.
The part is 90 deg angle profile and It has 300mm pattern on both walls.
I managed to drill it and move the profile fully automated, but for the other wall pattern, I have to run the profile a second time.
I am using duet wifi with breakout board and external 3 Nm closed loop steppers
I have in hand a drill press head with quil and motor. I will mount this on table so I can drill on the 90 deg wall
I want to do both drilling operations in the same time.
This means multi chanel CNC. So I will have to use the separate controller to run the spindle and second Z-axis.
I am thinking duet3 mini with 1 XD or HCL boards .SO THE qestion is this going to work
Main controler duet wifi and second mini with external board
Main proggram moves the part, then sends output high to mini3 and starts drilling, when finished sets the output to low and wait for mini to give trigger that is finished, in the same time mini gets trigger and starts drilling when finished checks that wifi is finished and sends output high to wifi.
How do you think is this going to work?
Any advice how to implement this.
In theory, it should work.
Side bonus I will be able to play with HCL board and Nema 23 closed-loop stepper -
@martin7404
I guess you can simply add another external driver to the breakout board and use drive mapping to make both spindles do the same.M584 X... Y... Z{*Z1driver*}:{*Z2driver*}
-
@o_lampe Unfortunately it is not possible.
The hole on the shorter side is combo tool drill with a countersink for M6.
And the hole on the longer side is M6 thread.
I am using combo tools that is why I put VFD on the spindle drive in order to switch spindle RPM with M code.
So I really need 2 channel control -
@martin7404 we're looking at supporting dual independent Z in RRF 3.5 on at least the Duet 3 6HC and 6XD. We may support it on Duet 3 Mini too. It won't be available on Duet 2 because of memory limitations.
-
@dc42 That is great news, but I will need to make different Z moves and spindle revs in the same time. So I really will need 2 controllers with trigers. So-called multi-channel CNC Like the multispindle/multi axis CNC lathes are working
-
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