- Posts: 17524
- Thank you received: 0
Spindle speed variation ssv for chatter control
loadrt siggen
addf siggen.0.update servo thread
setp siggen.0.frequency 1 # 1 Hz
setp siggen.0.amplitude 50 # +-50 RPM
net spindle-speed => siggen.0.offset
net mod_spindle_speed <= siggen.0.sine
net mod_spindle_speed => your-spindle-hardware-speed-pin
Please Log in to join the conversation.
linuxcnc.org/docs/devel/html/man/man9/siggen.9.html
and review what each pin does will clarify what is happening.
Please Log in to join the conversation.
- robertspark
- Offline
- Platinum Member
-
- Posts: 913
- Thank you received: 0
PCW wrote: A _very_ minimal example:
loadrt siggen
addf siggen.0.update servo thread
setp siggen.0.frequency 1 # 1 Hz
setp siggen.0.amplitude 50 # +-50 RPM
net spindle-speed => siggen.0.offset
net mod_spindle_speed <= siggen.0.sine
net mod_spindle_speed => your-spindle-hardware-speed-pin
thanks
this shows just what I needed as I sort of get linuxcnc but with the above example it shows how to load the component, add it to the thread, set the parameters, and then apply those to an existing net / wire and output it.
thanks, invaluable (it's one thing reading the manual but another to see a simple example of just the one element instead of all the other bits / components which can obfuscate what you are trying to understand or break it down to )
Please Log in to join the conversation.
For example a file called M100 to turn it on.
Save that code to a file called "m100" in your nc_files folder (probably. I am not at a LinuxCNC machine at the moment. Check the docs above as regards the search path). Then make the file executable. (right-click on it in the GUI and select properties)
Then
You might also want an M101 to turn it off
Please Log in to join the conversation.
- robertspark
- Offline
- Platinum Member
-
- Posts: 913
- Thank you received: 0
Please Log in to join the conversation.
robertspark wrote: thanks Andy, again invaluable for a simple thing and to see how it's implimented
It would have been better if it was correct.
siggen does not have an "enable" but it does have a "reset" which locks the output to (offset + 0) which is what we want.
I have edited my example.
Please Log in to join the conversation.
Digital output linuxcnc.org/docs/html/gcode/m-code.html#mcode:m62-m65
Analog output linuxcnc.org/docs/html/gcode/m-code.html#mcode:m67
It just goes to show there are many ways to skin a cat in Linuxcnc.
Wait till we show you how to write your own components if you are that way inclined!
Please Log in to join the conversation.
rodw wrote: It just goes to show there are many ways to skin a cat in Linuxcnc.
Including, it seems, remapping the "S" command.
linuxcnc.org/docs/html/remap/remap.html#...ng_codes_s_m0_m1_m60
So with a bit of work behind the scenes you could use "M3 S1000 P2 Q20" (or, possibly, any other letters as the control words, but probably not the obvious "F" and "A" as those have specific meanings.)
Please Log in to join the conversation.
andypugh wrote: So with a bit of work behind the scenes you could use "M3 S1000 P2 Q20"
Steady up Andy, you'll have poor old Robert's head spinning!
But it is an interesting concept to explore... If you tried them all, you would learn a lot about Linuxcnc.
Please Log in to join the conversation.
- robertspark
- Offline
- Platinum Member
-
- Posts: 913
- Thank you received: 0
rodw wrote:
andypugh wrote: So with a bit of work behind the scenes you could use "M3 S1000 P2 Q20"
Steady up Andy, you'll have poor old Robert's head spinning!
But it is an interesting concept to explore... If you tried them all, you would learn a lot about Linuxcnc.
Thanks Gents
Not too many options please, head is already spinning and I am just starting out. Give it 6-12m and maybe I'll get to advance to the next class.
(too many options in Linux (not just the cnc bit) that becomes overwhelming to new users, yes I know it's flexibility and options.... sometimes just learning the basics is useful [I only learnt to use TAB in terminal to auto fill in the file names a month ago + '&' to start an instance using the same terminal window....... {I just can't remember how you start multiple instances from 1 terminal {something like '&6' but it didn't like that when I tried it}) All new stuff and good stuff to learn.
(I'd like to get into components but its baby steps + need, LCNC has so many options / components already, I can't think of something I need that doesn't already exist {yet})
Please Log in to join the conversation.
