Runing 2 Z axis and 2 spindle independent in the same time
-
@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