Step and Dir Spindle, Spindle At Speed and RPM
30 Dec 2015 04:48 #67494
by bensbenz
Step and Dir Spindle, Spindle At Speed and RPM was created by bensbenz
Sorry if this is a double post, but I dont see my original post for some reason.
I converted my lathe to run LinuxCNC yesterday so I am a complete newb. So far I have managed to cobble together bits and pieces of code from the forums, IRC and the manual and I have managed to get just about everything working on my machine. One of the major items I cant seem to get working is Spindle At Speed. After I added the code for my step and direction spindle, my spindle encoder and the default RPM display, my spindle at speed indicator always reads true. I have no doubt screwed it up somehow, or perhaps maybe the logic is wrong given that my spindle is setup as an axis, I just dont understand enough about the entire system to know how to fix it. I am able to thread, and I do get an accurate RPM reading and my S word commands are all within a few RPM so I think I have done most of it correctly. If anyone could take a look at my files and help me that would be awesome.
Thanks!
I converted my lathe to run LinuxCNC yesterday so I am a complete newb. So far I have managed to cobble together bits and pieces of code from the forums, IRC and the manual and I have managed to get just about everything working on my machine. One of the major items I cant seem to get working is Spindle At Speed. After I added the code for my step and direction spindle, my spindle encoder and the default RPM display, my spindle at speed indicator always reads true. I have no doubt screwed it up somehow, or perhaps maybe the logic is wrong given that my spindle is setup as an axis, I just dont understand enough about the entire system to know how to fix it. I am able to thread, and I do get an accurate RPM reading and my S word commands are all within a few RPM so I think I have done most of it correctly. If anyone could take a look at my files and help me that would be awesome.
Thanks!
Please Log in or Create an account to join the conversation.
31 Dec 2015 17:06 #67606
by andypugh
Replied by andypugh on topic Step and Dir Spindle, Spindle At Speed and RPM
You haveBut those signals are not connected anywhere else.
I suggest you tryInstead as those signals are connected to other bits of the HAL.
Note that signal names have no special meanings, and if you use a net command with a signal name that does not exist then you get a new signal with that name.
net spindle-cmd => near.0.in1
net spindle-velocity => near.0.in2
I suggest you try
net spindle-cmd-rps => near.0.in1
net spindle-velocity-rps => near.0.in2
Note that signal names have no special meanings, and if you use a net command with a signal name that does not exist then you get a new signal with that name.
Please Log in or Create an account to join the conversation.
01 Jan 2016 18:15 #67657
by bensbenz
Well that didn’t work, when I look at those in the hal meter they are some odd number like 10.1 or something and it caused my spindle to sort of jump around when on. So that sort of forced me to dig deeper and learn a bit more.
Using the the hal meter I found two signals, net spindle-cmd-rpm which showed my current S word command and also net spindle-fb-filtered-abs-rpm which showed a (filtered?) output of my current spindle RPM. Since those two values should be within a specified percentage that seems to have worked. My indicator is red as the spindle ramps up and as it settles at the commanded S word RPM the indicator goes green. So unless you can think of some reason this isnt a good solution I think that solves it.
Thanks for the input!
Replied by bensbenz on topic Step and Dir Spindle, Spindle At Speed and RPM
You have
But those signals are not connected anywhere else.net spindle-cmd => near.0.in1 net spindle-velocity => near.0.in2
I suggest you tryInstead as those signals are connected to other bits of the HAL.net spindle-cmd-rps => near.0.in1 net spindle-velocity-rps => near.0.in2
Note that signal names have no special meanings, and if you use a net command with a signal name that does not exist then you get a new signal with that name.
Well that didn’t work, when I look at those in the hal meter they are some odd number like 10.1 or something and it caused my spindle to sort of jump around when on. So that sort of forced me to dig deeper and learn a bit more.
Using the the hal meter I found two signals, net spindle-cmd-rpm which showed my current S word command and also net spindle-fb-filtered-abs-rpm which showed a (filtered?) output of my current spindle RPM. Since those two values should be within a specified percentage that seems to have worked. My indicator is red as the spindle ramps up and as it settles at the commanded S word RPM the indicator goes green. So unless you can think of some reason this isnt a good solution I think that solves it.
Thanks for the input!
Please Log in or Create an account to join the conversation.
Time to create page: 0.079 seconds