- LinuxCNC
- General LinuxCNC Questions
- How to implement two independent motion sequence moving at the same time?
How to implement two independent motion sequence moving at the same time?
- Chase13
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
11 Apr 2022 13:00 #239919
by Chase13
How to implement two independent motion sequence moving at the same time? was created by Chase13
Hi
GCODE is interpreted one by one, next motion command won't be interpreted until last one moved to target position.
I got a situation that two independent motion sequence need to move at the same time.
For example, While X axis is moving to 100, U axis is moving to 200, and after X axis is in target position, Y axis need to move to 100, same in V axis, need move to 200 after U axis is in target position.
Such as following GCODE, o1001 and o1002 need to move at the same time.
o1001
N1 G01 X100 F1000
N2 G01 Y100 F1000
o1002
N1 G01 U200 F1000
N2 G01 V200 F1000
Is there anyway to implement it in linuxcnc?
Thanks
GCODE is interpreted one by one, next motion command won't be interpreted until last one moved to target position.
I got a situation that two independent motion sequence need to move at the same time.
For example, While X axis is moving to 100, U axis is moving to 200, and after X axis is in target position, Y axis need to move to 100, same in V axis, need move to 200 after U axis is in target position.
Such as following GCODE, o1001 and o1002 need to move at the same time.
o1001
N1 G01 X100 F1000
N2 G01 Y100 F1000
o1002
N1 G01 U200 F1000
N2 G01 V200 F1000
Is there anyway to implement it in linuxcnc?
Thanks
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19479
- Thank you received: 6532
11 Apr 2022 17:11 #239936
by tommylight
Replied by tommylight on topic How to implement two independent motion sequence moving at the same time?
N1 G01 X100 U200 F1000
N2 G01 Y100 V200 F1000
Will do that.
N2 G01 Y100 V200 F1000
Will do that.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
11 Apr 2022 22:45 #239989
by andypugh
Replied by andypugh on topic How to implement two independent motion sequence moving at the same time?
In the example it seems that the U and V moves would take twice as long, so the G-code might need to be:
G01 X100 U100 F1000
G01 U200 F1000
G01 Y100 V100 F1000
G01 V200 F1000
(or you can move the Y move to the second line if you want XY to not wait for UV)
G01 X100 U100 F1000
G01 U200 F1000
G01 Y100 V100 F1000
G01 V200 F1000
(or you can move the Y move to the second line if you want XY to not wait for UV)
Please Log in or Create an account to join the conversation.
- Chase13
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
12 Apr 2022 01:17 #240003
by Chase13
Replied by Chase13 on topic How to implement two independent motion sequence moving at the same time?
Actually the movement distance isn't going to be twice for all the time, the speed won't be the same.
There may be some user-defined MCODE in the movement sequence, and the sequence won't be the same too, just like:
o1001
G01 X100 F2000
G01 Y100 F2500
M100
G01 Y0 F2500
G01 X0 F200
o1002
G01 U150 F1000
G01 V130 F1500
M110
G01 U0 F1000
M111
G01 V0 F1500
There may be some user-defined MCODE in the movement sequence, and the sequence won't be the same too, just like:
o1001
G01 X100 F2000
G01 Y100 F2500
M100
G01 Y0 F2500
G01 X0 F200
o1002
G01 U150 F1000
G01 V130 F1500
M110
G01 U0 F1000
M111
G01 V0 F1500
Please Log in or Create an account to join the conversation.
- Chase13
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
12 Apr 2022 01:57 #240004
by Chase13
There may be some user-defined MCODE in the movement sequence, and the sequence won't be the same too, just like:
o1001
G01 X100 F2000
G01 Y100 F2500
M100
G01 Y0 F2500
G01 X0 F200
o1002
G01 U150 F1000
G01 V130 F1500
M110
G01 U0 F1000
M111
G01 V0 F1500
Replied by Chase13 on topic How to implement two independent motion sequence moving at the same time?
Actually the movement distance isn't going to be twice for all the time, the speed won't be the same.N1 G01 X100 U200 F1000
N2 G01 Y100 V200 F1000
Will do that.
There may be some user-defined MCODE in the movement sequence, and the sequence won't be the same too, just like:
o1001
G01 X100 F2000
G01 Y100 F2500
M100
G01 Y0 F2500
G01 X0 F200
o1002
G01 U150 F1000
G01 V130 F1500
M110
G01 U0 F1000
M111
G01 V0 F1500
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
Less
More
- Posts: 7778
- Thank you received: 2074
12 Apr 2022 04:10 #240007
by cmorley
Replied by cmorley on topic How to implement two independent motion sequence moving at the same time?
If you mean something like a twin turret lathe that moves the turrets independently but coordinated - then I would say no.
But could you explain more about the machine or a pic?
But could you explain more about the machine or a pic?
Please Log in or Create an account to join the conversation.
- Chase13
- Offline
- New Member
Less
More
- Posts: 4
- Thank you received: 0
12 Apr 2022 04:25 #240008
by Chase13
I am developing injection molding machine manipulator with two arms, X/Y and U/V can grab products at the same time to enhance efficiency.
Replied by Chase13 on topic How to implement two independent motion sequence moving at the same time?
If you mean something like a twin turret lathe that moves the turrets independently but coordinated - then I would say no.
But could you explain more about the machine or a pic?
I am developing injection molding machine manipulator with two arms, X/Y and U/V can grab products at the same time to enhance efficiency.
Attachments:
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23170
- Thank you received: 4860
12 Apr 2022 12:10 #240040
by andypugh
Replied by andypugh on topic How to implement two independent motion sequence moving at the same time?
There are a number of ways to do this, none of them 100% satisfactory:
* Two or more LinuxCNC instances running on different PCs and communicating via serial, gpio, network etc.
* Control one or zero sets of joints using G-code and control the others as "extrajoints" using simple_tp or some similar HAL component, with waypoints calculated by something other than the G-code interpreter.
* For a fixed, repeatable, sequence, carefully written G-code as discussed earlier.
It would definitely be nice to be able to have two LinuxCNC instances on the same machine share a HAL area.
* Two or more LinuxCNC instances running on different PCs and communicating via serial, gpio, network etc.
* Control one or zero sets of joints using G-code and control the others as "extrajoints" using simple_tp or some similar HAL component, with waypoints calculated by something other than the G-code interpreter.
* For a fixed, repeatable, sequence, carefully written G-code as discussed earlier.
It would definitely be nice to be able to have two LinuxCNC instances on the same machine share a HAL area.
Please Log in or Create an account to join the conversation.
- MJZRPR
- Offline
- New Member
Less
More
- Posts: 1
- Thank you received: 0
24 Apr 2022 16:21 - 24 Apr 2022 16:24 #241077
by MJZRPR
Replied by MJZRPR on topic How to implement two independent motion sequence moving at the same time?
hi
swiss type machin is good example for this topic.
swiss type machine with two spindle
swiss type machin is two (or more) cnc station. each work separately. Except in cases where the part wants to be moved, the two station are separate. Only when cutting the part, the two spindles should have same speed rpm.
On older machine , the G-codes of the two stations were merged, and the path of all the axis was created in a file every 10 milliseconds and transmitted to the machine. In this case, the G-codes are not displayed at runtime.
merging axis to one file.
on newest machine. the controller separate to two controller.
newest controller with two station
swiss type machin is good example for this topic.
swiss type machine with two spindle
swiss type machin is two (or more) cnc station. each work separately. Except in cases where the part wants to be moved, the two station are separate. Only when cutting the part, the two spindles should have same speed rpm.
On older machine , the G-codes of the two stations were merged, and the path of all the axis was created in a file every 10 milliseconds and transmitted to the machine. In this case, the G-codes are not displayed at runtime.
merging axis to one file.
on newest machine. the controller separate to two controller.
newest controller with two station
Attachments:
Last edit: 24 Apr 2022 16:24 by MJZRPR.
Please Log in or Create an account to join the conversation.
- scotth
- Away
- Elite Member
Less
More
- Posts: 220
- Thank you received: 52
25 Apr 2022 01:29 - 25 Apr 2022 01:33 #241131
by scotth
Replied by scotth on topic How to implement two independent motion sequence moving at the same time?
We used "U" and "W" that way you can run normal G code.
The big problem is tool offsets.
The big problem is tool offsets.
Last edit: 25 Apr 2022 01:33 by scotth.
Please Log in or Create an account to join the conversation.
- LinuxCNC
- General LinuxCNC Questions
- How to implement two independent motion sequence moving at the same time?
Time to create page: 0.203 seconds