Lathe Spindle Control Help Needed in PNCCONF

More
17 Oct 2014 03:53 #52149 by Mr. Technical
Just tried it. Still getting an error message:


Debug file information:
Can not find -sec MOT -var MOT -num 1
Can not find -sec IO -var IO -num 1
Can not find -sec LINUXCNC -var NML_FILE -num 1
Can not find -sec EMC -var NML_FILE -num 1
insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/linuxcnc/scale.ko': -1 Unknown symbol in module
PUMAplay.hal:15: exit value: 1
PUMAplay.hal:15: insmod failed, returned -1
See the output of 'dmesg' for more information.
28151
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

Mr. Technical

Please Log in or Create an account to join the conversation.

More
17 Oct 2014 06:46 #52150 by andypugh

insmod: error inserting '/usr/realtime-2.6.32-122-rtai/modules/linuxcnc/scale.ko': -1 Unknown symbol in module
PUMAplay.hal:15: exit value: 1


Sorry, lose the space on line 15.
The following user(s) said Thank You: Mr. Technical

Please Log in or Create an account to join the conversation.

More
17 Oct 2014 07:18 #52152 by Mr. Technical
Thanks, I'll try that tomorrow when I'm back in front of the lathe. I really appreciate all of the help.

Mr. Technical

Please Log in or Create an account to join the conversation.

More
18 Oct 2014 02:24 #52163 by Mr. Technical
Thanks Andy, that did it! :woohoo: After a couple of tweaks to the math of the scales, it's working great. I manually put it in the gear that I want, then when I set a spindle speed, it hits that number just like it should.

Only problem is that the spindle arrive signal doesn't seem to be working any more. I'd like to be able to use that in the future. Is there a simple way to fix that?

Mr. Technical

Please Log in or Create an account to join the conversation.

More
18 Oct 2014 02:40 #52164 by andypugh

Only problem is that the spindle arrive signal doesn't seem to be working any more. I'd like to be able to use that in the future. Is there a simple way to fix that?


Do you mean spindle-at-speed?

That looked a bit over-complicated before. I think all you need to use is a "near" component to compare motion.spindle-speed-cmd-rps with the encoder velocity. (no need for scaling, just use rps throughout)

Please Log in or Create an account to join the conversation.

More
18 Oct 2014 03:41 #52165 by Mr. Technical
andypugh wrote:

Do you mean spindle-at-speed?


Yes, sorry about that. The way that it was originally written is directly from the PNCCONF program. I would like to make the file you provided match what PNCCONF creates as closely as possible. I actually plan to move the loadrt mux8 and addf mux8.0 servo-thread lines to the custom post gui file when I get the chance.

The reason is that I still have some pins to set up, and PNCCONF makes it a lot easier to do that than hand editing the HAL (for me anyway). As you know, every time I run through PNCCONF it kills any edits made to the HAL in the meantime.

I know that I'll probably always have to make some hand edits to retain the scaling that you wrote, and that's worth it, but first I have more pins to map.

The weird thing about the spindle-at-speed pin is that those sections look the same from my HAL file to yours. The only thing that changed that looks like it would have a direct bearing is the "net spindle-vel-cmd => hm2_5i25.0.7i77.0.1.analogout5" line (from my HAL) vs. the "net scaled-spindle-cmd scale.gear.out => hm2_5i25.0.7i77.0.1.analogout5" line (from your HAL).

I'll try to track down the way to use the same conventions that PNCCONF used to save me from excessive future editing. Thanks again!

Mr. Technical

Please Log in or Create an account to join the conversation.

More
18 Oct 2014 11:10 - 18 Oct 2014 12:54 #52166 by cmorley

Only problem is that the spindle arrive signal doesn't seem to be working any more. I'd like to be able to use that in the future. Is there a simple way to fix that?


Do you mean spindle-at-speed?

That looked a bit over-complicated before. I think all you need to use is a "near" component to compare motion.spindle-speed-cmd-rps with the encoder velocity. (no need for scaling, just use rps throughout)


That's how pncconf sets it up. the scaling and filtering is for the RPM display.

I wonder - is your encoder on the 'motor' side of the gearing or the 'spindle' side of the gearing?
if it's on the motor side then you must scale the encoder for each gear change too.
that would also mean the index wouldn't work properly .. so unlikely you set it up this way...

Chris M
Last edit: 18 Oct 2014 12:54 by cmorley. Reason: re-thought

Please Log in or Create an account to join the conversation.

More
19 Oct 2014 10:01 #52182 by Mr. Technical
Hi Chris,

The encoder is on the spindle side of things which is why I was surprised that the spindle-at-speed notification was affected by the edits to the drive signal scaling. The way I thought it worked was that it would compare the signal from the encoder to the S value I entered and see if it was within the tolerance. Apparently, it's not that simple.

Mr. Technical
P.S. Please excuse the general terms, since I'm not in front of the lathe at the moment, and can't recall the signal
and pin names.

Please Log in or Create an account to join the conversation.

More
19 Oct 2014 10:17 #52183 by cmorley
Thats pretty close.

It compares the spindle command in RPS to spindle velocity feedback (encoder) RPS.

I am surprised it doesn't work. Please post your latest config files when you get a chance.

Chris M

Please Log in or Create an account to join the conversation.

More
29 Oct 2014 14:52 #52520 by cmorley

Ooops! I just realised that this is all my fault....

Looking at the source-code, scalemax, minlim and maxlim are _parameters_.

This is why they don't show up in the pin list, and why you can't make them part of a net.


Andy is there a good reason those pins are params? could we change them?
this is going to come up again each time there is multiple geared spindles.
In fact someone else just asked me the same sort of question but it was from the 5i20.

Chris M

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.748 seconds
Powered by Kunena Forum