How to Create Two Independently Rotating Axes
17 Jan 2018 17:23 #104635
by waxelson
How to Create Two Independently Rotating Axes was created by waxelson
I am involved in creating a large glass lens polishing machine using LinuxCNC. I need to have two rotary axes spinning continuously at different rotational speeds. The first is the large glass optic being polished and the second is the polishing pad. These two spinning surfaces will then be moved precisely using coordinated motions in the X-Z plane to create a polishing profile.
I have the polishing pad defined as the Spindle and can control it fine with S-, M3, and M4 commands.
My problem is with the larger optics rotating stage. How can I command a simple rotational move at a fixed speed that does not stop and does not vary when X and Z are moved?
If I could define two separate Spindle motors, that could work but it does not appear to be possible.
I have used a linear move command to force rotational motion of the optic (G1 U40.0 F10) but this command prevents independent motion of the X ans Z axis while it is in effect.
Please, what is the correct way to keep two independent rotating axes spinning, while they are also being moved in coordinated linear moves?
I have the polishing pad defined as the Spindle and can control it fine with S-, M3, and M4 commands.
My problem is with the larger optics rotating stage. How can I command a simple rotational move at a fixed speed that does not stop and does not vary when X and Z are moved?
If I could define two separate Spindle motors, that could work but it does not appear to be possible.
I have used a linear move command to force rotational motion of the optic (G1 U40.0 F10) but this command prevents independent motion of the X ans Z axis while it is in effect.
Please, what is the correct way to keep two independent rotating axes spinning, while they are also being moved in coordinated linear moves?
Please Log in or Create an account to join the conversation.
17 Jan 2018 17:53 - 17 Jan 2018 18:02 #104636
by Grotius
Replied by Grotius on topic How to Create Two Independently Rotating Axes
@Waxelson,
The problem of the most cnc software is that it has only one spindle speed possibility to write in G-code. Sometimes the
spindle speed "S" can be a value of machine power or something like that. A usual output signal for this item can be 0-10V in simple way. Maybe in the source code we can write someting to add a second spindle, but that will be a masterclass project i think.
So when you have a big optical lens with 2 separate polish unit's you wil have a problem with a standard software output.
What you can consider is following.
Linux is standard up to 9 axis. You can use 2 axis for motor output value. You can fix this rotational polisch motor speed in several ways.
To work independent on the polishing erea 's you have to use 2 separate pc's. You can even use a pressure meter coupled to the cnc that incicates the power of pressnes on the polisch disk. Adaptive to the glas erea with a optical device. See ifm electronics.
One g-code file in not capable to do 2 independent working flow's. If you have one pc with 2 separate cnc program's running, it is possible with 1 pc.
When it is a expensive product i will bring 2 pc's together. They will bring you happyness.
With lens polishing you want to be fully undependent on the first en second polish disk i think.
I remember the hubble. It's not for the Nasa?
The problem of the most cnc software is that it has only one spindle speed possibility to write in G-code. Sometimes the
spindle speed "S" can be a value of machine power or something like that. A usual output signal for this item can be 0-10V in simple way. Maybe in the source code we can write someting to add a second spindle, but that will be a masterclass project i think.
So when you have a big optical lens with 2 separate polish unit's you wil have a problem with a standard software output.
What you can consider is following.
Linux is standard up to 9 axis. You can use 2 axis for motor output value. You can fix this rotational polisch motor speed in several ways.
To work independent on the polishing erea 's you have to use 2 separate pc's. You can even use a pressure meter coupled to the cnc that incicates the power of pressnes on the polisch disk. Adaptive to the glas erea with a optical device. See ifm electronics.
One g-code file in not capable to do 2 independent working flow's. If you have one pc with 2 separate cnc program's running, it is possible with 1 pc.
When it is a expensive product i will bring 2 pc's together. They will bring you happyness.
With lens polishing you want to be fully undependent on the first en second polish disk i think.
I remember the hubble. It's not for the Nasa?
Last edit: 17 Jan 2018 18:02 by Grotius.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
17 Jan 2018 18:03 #104637
by Todd Zuercher
Replied by Todd Zuercher on topic How to Create Two Independently Rotating Axes
I think I would just control it using an M68 analog output from the g-code. (hal pin motion.analog-out-NN)
linuxcnc.org/docs/2.7/html/gcode/m-code.html#mcode:m68
Actually it might be beneficial to use the spindle command for the lens and the M68 for the pad. This way you could possibly use spindle synchronized motion for your X and Z movement synchronized to the lens rotation.
linuxcnc.org/docs/2.7/html/gcode/m-code.html#mcode:m68
Actually it might be beneficial to use the spindle command for the lens and the M68 for the pad. This way you could possibly use spindle synchronized motion for your X and Z movement synchronized to the lens rotation.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
17 Jan 2018 18:12 #104638
by Todd Zuercher
Replied by Todd Zuercher on topic How to Create Two Independently Rotating Axes
Actually there is an experimental branch for multiple spindles. (Don't know if it will do what you need or want.)
github.com/LinuxCNC/linuxcnc/tree/andypugh/multispindle-master
You can compile it your self,. or right now it is available per-compiled from buildbot scratch.
buildbot.linuxcnc.org/
github.com/LinuxCNC/linuxcnc/tree/andypugh/multispindle-master
You can compile it your self,. or right now it is available per-compiled from buildbot scratch.
buildbot.linuxcnc.org/
Please Log in or Create an account to join the conversation.
17 Jan 2018 18:19 - 17 Jan 2018 18:31 #104640
by Grotius
Replied by Grotius on topic How to Create Two Independently Rotating Axes
@Todd,
For M68 we have E and Q
M68 - set an analog output immediately.
E- - output number ranging from 0 to 3.
Q- - is the value to set (set to 0 to turn off).
So if customer wants a synchone motor speed on the lens in relation to position of the polisching disk, just like a modern lathe, what would you say?
Better for me that i have no statement. Neutral is always the best. Cheers.
For M68 we have E and Q
M68 - set an analog output immediately.
E- - output number ranging from 0 to 3.
Q- - is the value to set (set to 0 to turn off).
So if customer wants a synchone motor speed on the lens in relation to position of the polisching disk, just like a modern lathe, what would you say?
Better for me that i have no statement. Neutral is always the best. Cheers.
Last edit: 17 Jan 2018 18:31 by Grotius.
Please Log in or Create an account to join the conversation.
17 Jan 2018 18:54 #104642
by waxelson
Replied by waxelson on topic How to Create Two Independently Rotating Axes
Thank you Todd,
Your multi-tiered response is very helpful.
I will experiment now with getting the M68 command operational in my system, for then I can finish a simple task needed for today.
It makes sense to switch the configuration of the Spindle axis to the optic rotary table and then use the M68 capability on the polishing head. I can do that tomorrow.
Down the road, when I have time to experiment, I will take a stab at using Andy's experimental multiple-spindle approach. It will likely be just what I need.
Thanks a lot!
Wayne
Your multi-tiered response is very helpful.
I will experiment now with getting the M68 command operational in my system, for then I can finish a simple task needed for today.
It makes sense to switch the configuration of the Spindle axis to the optic rotary table and then use the M68 capability on the polishing head. I can do that tomorrow.
Down the road, when I have time to experiment, I will take a stab at using Andy's experimental multiple-spindle approach. It will likely be just what I need.
Thanks a lot!
Wayne
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
17 Jan 2018 20:52 #104643
by Todd Zuercher
Replied by Todd Zuercher on topic How to Create Two Independently Rotating Axes
Here are a couple other ideas. Only use the M68 to set the speed of the polishing disk, but let the M3,M4,M5 commands turn on/off both the lens rotation and the polishing disk, If you don't like that I'd suggest using a custom M1xx code for starting/stopping the polishing disk.
And finally a completely different approach, and one that I've used on multi spindle gang routers. Use custom M codes to connect/disconnect the different spindle motors to the Linuxcnc spindle commands within hal. Such that if you could set the speed of and start one motor with M3Sxxxx, then issue the custom M-code, then M3Syyy to start the other motor. I've only used this approach for turning on/off different groups of motors and I'm not sure how or if it would work running them at different rates independently.
And finally a completely different approach, and one that I've used on multi spindle gang routers. Use custom M codes to connect/disconnect the different spindle motors to the Linuxcnc spindle commands within hal. Such that if you could set the speed of and start one motor with M3Sxxxx, then issue the custom M-code, then M3Syyy to start the other motor. I've only used this approach for turning on/off different groups of motors and I'm not sure how or if it would work running them at different rates independently.
Please Log in or Create an account to join the conversation.
18 Jan 2018 02:15 #104652
by waxelson
Replied by waxelson on topic How to Create Two Independently Rotating Axes
Todd,
Thanks again for your suggestions.
I have myself in a bind: I am both very new to LinuxCNC and I am trying to do something (multiple rotating axes...) that is not commonly done.
I am still working at getting the M68 command implemented for the rotating lens. I am getting lost in the details of how to change the HAL file and get wiring connections to my servo drive controller.
Is there any on-line documentation that explains the details of implementing the solutions you recommend?
For instance:
How do I write a custom M1xx command?
Could I write a custom M1xx command that would treat both of my rotary axes as spindles? Say Spindle1 and Spindle2?
If I use the M68 command, how do I "point" it at my chosen axis, in my case it is currently 'U'.
Again with the M68 command, how do I set the speed values that are triggered by the E0, E1, E2, E3 parameters?
Also, I was looking through the documentation on the GIT hub repository for a multiple-spindle version of LinuxCNC but could not find an overall, general description. Is there one available?
Thanks,
Wayne
Thanks again for your suggestions.
I have myself in a bind: I am both very new to LinuxCNC and I am trying to do something (multiple rotating axes...) that is not commonly done.
I am still working at getting the M68 command implemented for the rotating lens. I am getting lost in the details of how to change the HAL file and get wiring connections to my servo drive controller.
Is there any on-line documentation that explains the details of implementing the solutions you recommend?
For instance:
How do I write a custom M1xx command?
Could I write a custom M1xx command that would treat both of my rotary axes as spindles? Say Spindle1 and Spindle2?
If I use the M68 command, how do I "point" it at my chosen axis, in my case it is currently 'U'.
Again with the M68 command, how do I set the speed values that are triggered by the E0, E1, E2, E3 parameters?
Also, I was looking through the documentation on the GIT hub repository for a multiple-spindle version of LinuxCNC but could not find an overall, general description. Is there one available?
Thanks,
Wayne
Please Log in or Create an account to join the conversation.
18 Jan 2018 02:45 #104653
by waxelson
Replied by waxelson on topic How to Create Two Independently Rotating Axes
Todd,
I found some documentation on creating M1xx commands, at least enough to make a first attempt. I also studied the M68 (and related commands...) and now have a better idea how they work.
The E- parameter seems to be used to specify which of 4 different LinuxCNC outputs I will connect to my drive controller. Once wired, I will always call M68 with the same E- value. Whereas the Q- value seems to be the actual speed that is requested. A zero will stop the rotation and I guess I will just experiment to find what the upper limit should be on the value.
Once again,
Thanks,
Wayne
I found some documentation on creating M1xx commands, at least enough to make a first attempt. I also studied the M68 (and related commands...) and now have a better idea how they work.
The E- parameter seems to be used to specify which of 4 different LinuxCNC outputs I will connect to my drive controller. Once wired, I will always call M68 with the same E- value. Whereas the Q- value seems to be the actual speed that is requested. A zero will stop the rotation and I guess I will just experiment to find what the upper limit should be on the value.
Once again,
Thanks,
Wayne
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
18 Jan 2018 14:50 #104667
by Todd Zuercher
Replied by Todd Zuercher on topic How to Create Two Independently Rotating Axes
Depending on the type of command input you need for your drive, you can also use the M68 to send your speed setting to other hal components, such as scale, stepgen, pwmgen, pid, limit3 or any combination of them in order to get the type of signal you need.
Please Log in or Create an account to join the conversation.
Time to create page: 0.096 seconds