Z axis oscillating motion for routing marble and granite
14 Jul 2017 19:23 - 14 Jul 2017 19:26 #95801
by danilom
Z axis oscillating motion for routing marble and granite was created by danilom
Marble router Ravelli used NUM controller, and it had M50 to start the Z axis oscillation and M51 to stop it. It had parameters for amplitude and frequency of this oscillation.
the motion can be seen in this video
I would like to implement the same feature in Linuxcnc retrofit of that particular machine, the oscillating motion helps clear the marble and wears the endmill more equally.
If any CAM software had this feature to turn on while profiling it would make things easier, but non of the stone marble granite CAD/CAM packages list this as a feature and I downloaded couple of demos to check.
So the question is where to start, would it be achievable trough simple macro or maybe activating realtime component input with macro which would then handle Z axis motion up and down, something like THC comp
Thanks !
the motion can be seen in this video
I would like to implement the same feature in Linuxcnc retrofit of that particular machine, the oscillating motion helps clear the marble and wears the endmill more equally.
If any CAM software had this feature to turn on while profiling it would make things easier, but non of the stone marble granite CAD/CAM packages list this as a feature and I downloaded couple of demos to check.
So the question is where to start, would it be achievable trough simple macro or maybe activating realtime component input with macro which would then handle Z axis motion up and down, something like THC comp
Thanks !
Last edit: 14 Jul 2017 19:26 by danilom.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
14 Jul 2017 20:12 - 14 Jul 2017 20:16 #95804
by Todd Zuercher
Replied by Todd Zuercher on topic Z axis oscillating motion for routing marble and granite
I believe that the function is achievable without too much effort. But... M50 and M51 are already used, so you would have to choose other M-codes to control it.
Your choices are to use a custom M-code (M100-M199) or use remapping with an unallocated M-code. (Using Remapping would allow you to use more parameter inputs.)
linuxcnc.org/docs/html/remap/remap.html#remap:remappable-codes
I think I would just use M150,M151, to control a couple of halcomponents
linuxcnc.org/docs/html/gcode/m-code.html#mcode:m100-m199
Use the P and Q values to set the amplitude and frequency of the oscillations.
Then use a siggen component to create the oscillation (it can do several different wave patterns.)
linuxcnc.org/docs/html/man/man9/siggen.9.html
and an offset component to add that to the Z position command.
linuxcnc.org/docs/html/man/man9/offset.9.html
Your choices are to use a custom M-code (M100-M199) or use remapping with an unallocated M-code. (Using Remapping would allow you to use more parameter inputs.)
linuxcnc.org/docs/html/remap/remap.html#remap:remappable-codes
I think I would just use M150,M151, to control a couple of halcomponents
linuxcnc.org/docs/html/gcode/m-code.html#mcode:m100-m199
Use the P and Q values to set the amplitude and frequency of the oscillations.
Then use a siggen component to create the oscillation (it can do several different wave patterns.)
linuxcnc.org/docs/html/man/man9/siggen.9.html
and an offset component to add that to the Z position command.
linuxcnc.org/docs/html/man/man9/offset.9.html
Last edit: 14 Jul 2017 20:16 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
14 Jul 2017 23:59 #95807
by rodw
Replied by rodw on topic Z axis oscillating motion for routing marble and granite
This might be a bit out of left field but this could be a candidate for the experimental external offsets branch and a custom component that accepted the siggen (or generated its own) to apply a varying offset on the Z axis to create the oscillation. You could use an M64/M65 to enable and disable the oscillation. See github.com/LinuxCNC/linuxcnc/tree/dgarr/external_offsets
So under this model, you'd simply set the tool height and enable the oscillation feature. You could control the amplitude and Z speed from the console or from Gcode. There are some good code examples for components that allow setting various parameters in the Plasma and laser section on this forum.
So under this model, you'd simply set the tool height and enable the oscillation feature. You could control the amplitude and Z speed from the console or from Gcode. There are some good code examples for components that allow setting various parameters in the Plasma and laser section on this forum.
Please Log in or Create an account to join the conversation.
16 Jul 2017 08:03 #95835
by danilom
Replied by danilom on topic Z axis oscillating motion for routing marble and granite
Thanks for the suggestions and ideas , will get back soon as I have some results.
Please Log in or Create an account to join the conversation.
16 Jul 2017 14:17 #95847
by danilom
Replied by danilom on topic Z axis oscillating motion for routing marble and granite
Looked at External Offsets branch and it does exactly what is needed but I have no time to experiment right now, if there is a simpler solution.
This works but I have two problems, offset is adding the sine value but I need difference from the last offset and other is, because I have to unlink the axis.2.motor-pos signals I have to link them back again somehow.
I successfully started and stopped the motion with user M150 and M151 controlling some integer value which I multiplied with offset (1/0) but getting other strange results along and the siggen has to be started when the M150 is issued so it starts from 0.
I am just starting with advanced Linuxcnc configurations, first were the tool changers on couple of machines but thanks to the carousel comp I got those going with minor adjustments.
More to come...
loadrt offset count=1
loadrt siggen num_chan=1
addf offset.0.update-output servo-thread
addf siggen.0.update servo-thread
setp siggen.0.amplitude 5
setp siggen.0.frequency 0.01
unlinkp axis.2.motor-pos-cmd
unlinkp axis.2.motor-pos-fb
net offset_sine siggen.0.sine offset.0.offset
net offset_from_axis axis.2.motor-pos-cmd offset.0.in
net offset_to_axis offset.0.out axis.2.motor-pos-fb
This works but I have two problems, offset is adding the sine value but I need difference from the last offset and other is, because I have to unlink the axis.2.motor-pos signals I have to link them back again somehow.
I successfully started and stopped the motion with user M150 and M151 controlling some integer value which I multiplied with offset (1/0) but getting other strange results along and the siggen has to be started when the M150 is issued so it starts from 0.
I am just starting with advanced Linuxcnc configurations, first were the tool changers on couple of machines but thanks to the carousel comp I got those going with minor adjustments.
More to come...
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
16 Jul 2017 20:35 #95861
by Todd Zuercher
Replied by Todd Zuercher on topic Z axis oscillating motion for routing marble and granite
You can use a couple of mux components to switch between two different signals
linuxcnc.org/docs/html/man/man9/mux2.9.html
linuxcnc.org/docs/html/man/man9/mux2.9.html
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
Less
More
- Posts: 5007
- Thank you received: 1441
16 Jul 2017 20:49 - 16 Jul 2017 20:51 #95862
by Todd Zuercher
Replied by Todd Zuercher on topic Z axis oscillating motion for routing marble and granite
If you are having trouble with a step in the commanded output caused by where in the wave pattern the signal from the sigen is connected or disconnected from the position command. perhaps you may need to run it through a limit2 component as well.
linuxcnc.org/docs/html/man/man9/limit2.9.html
So the hal arrangement might look something like this.
linuxcnc.org/docs/html/man/man9/limit2.9.html
So the hal arrangement might look something like this.
joint-pos-cmd \
joint-pos-cmd \ > mux -> limit2 -> stepgen
sigen -> offset /
Last edit: 16 Jul 2017 20:51 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
16 Jul 2017 21:00 #95863
by rodw
Replied by rodw on topic Z axis oscillating motion for routing marble and granite
You could consider writing your own hal component. This would let you save the current position in a static variable so it can be referenced on the next pass through the servo loop.There are some included in the external offset branch but look at some of the simpler examples to understand how this works.
compiles and installs a component
halcompile --install mycomponent.comp
Please Log in or Create an account to join the conversation.
13 Aug 2017 06:43 #97405
by Yannis
Replied by Yannis on topic Z axis oscillating motion for routing marble and granite
hi
the oscillation of the tool is something common in alphacam stone
check in the you tube for example videos
the oscillation of the tool is something common in alphacam stone
check in the you tube for example videos
Please Log in or Create an account to join the conversation.
13 Aug 2017 08:33 #97407
by danilom
Replied by danilom on topic Z axis oscillating motion for routing marble and granite
Yes I found it out eventually in Alphacam, so I gave up on doing it trough Linuxcnc .
Thanks Yannis
Thanks Yannis
Please Log in or Create an account to join the conversation.
Time to create page: 0.087 seconds