Lathe - screw cutting - 5I25 setup difficulty

More
12 Jun 2016 14:25 #75858 by JonFreeman
I am working towards converting a manual lathe to CNC.
I have the Mesa 5i25 board, and using 'mesaflash', I have now correctly configured it with the prob_rfx2 firmware.
Using the 'Pncconf Wizard', I have successfully configured two stepgens which drive the X and Z axis motors (via their individual motor drives of course!) - these work in Pncconf and also work when running Linuxcnc with the output files created using Pncconf. So far so good, but I need a spindle encoder so that I can cut screw threads. I have a proper spindle encoder fitted to the lathe (not yet wired), but I come unstuck trying to configure Pncconf to include a spindle encoder. Thus far all my attempts at including a 'Spindle Encoder' result in a Pncconf output which prevents Linuxcnc from running. Instead a 'LinuxCNC Errors' window opens, containing far too much information for my tired mind to wrestle with, but perhaps the 'important' line is the one following 'Debug file information:', which reads:-
./LatheJun2016.hal:200: parameter or pin 'scale.spindle.gain' not found

Any thoughts will be much appreciated. All I want for now is to control the two axis motors synced up to measured spindle speed. For now the spindle motor is controlled manually.

Hardware is minimal, no 'BOB's, have so far wired 5i25 step and dir outputs to the two motor drives and these all work

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

More
12 Jun 2016 16:44 #75862 by andypugh

perhaps the 'important' line is the one following 'Debug file information:', which reads:-
./LatheJun2016.hal:200: parameter or pin 'scale.spindle.gain' not found


You are right, that is the important line.

Can you post your HAL file and we should be able to see what is going wrong.
I think the likely problem is that there isn't a line anywhere saying "loadrt scale names=scale.spindle" in any of the HAL files.

The scale is going to be used to give an RPM output (as, internally, LinuxCNC uses revs-per-second).
The following user(s) said Thank You: JonFreeman

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

More
12 Jun 2016 17:20 #75865 by JonFreeman
Thanks Andy,
hal file attached
Attachments:

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

More
12 Jun 2016 17:30 - 12 Jun 2016 17:34 #75866 by PCW
looks like the scale component for the spindle feedback velocity is missing
I would change
loadrt scale names=scale.gear
to:
loadrt scale names=scale.gear,scale.spindle
and add:
addf scale.spindle servo-thread
Last edit: 12 Jun 2016 17:34 by PCW.
The following user(s) said Thank You: JonFreeman

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

More
13 Jun 2016 07:56 #75898 by JonFreeman
Editing the hal file, changing
loadrt scale names=scale.gear
to:
loadrt scale names=scale.gear,scale.spindle
causes the debug message to change to
./LatheJun2016.hal:210: parameter or pin 'lowpass.spindle.gain' not found

so presumably this has solved the problem of the missing 'scale.spindle' only to reveal a missing 'lowpass.spindle'

Lines 209 and 210 of the hal file read
setp scale.spindle.gain 60
setp lowpass.spindle.gain 1.000000

Next, I guessed I might try adding
loadrt lowpass names=lowpass.spindle
and
addf lowpass.spindle servo-thread
This apparently caused no ill effect but changed the error message again to
./LatheJun2016.hal:215: Pin 'abs.spindle.in' does not exist.

Mmmmmm.......

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

More
13 Jun 2016 09:15 #75900 by andypugh

Next, I guessed I might try adding
loadrt lowpass names=lowpass.spindle
and
addf lowpass.spindle servo-thread

Good guess.

This apparently caused no ill effect but changed the error message again to
./LatheJun2016.hal:215: Pin 'abs.spindle.in' does not exist.
Mmmmmm.......


I don't know why pncconf has added the HAL but not the functions. I have a feeling that perhaps you can sort out all these problems, only to find a new problem when the system finally gets to a second set of loadrt instructions.

But, as you might have already trued.
loadrt abs names=abs.spindle
...
addf abs.spindle  servo-thread
Should get you further. In fact I think that's the end of the missing functions.
The following user(s) said Thank You: JonFreeman

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

More
13 Jun 2016 10:26 #75907 by JonFreeman
Yes, thanks,
I now have a hal file that allows Linuxcnc to start and run again, and I have once again the two axis motors on the bench spinning to and fro running a test G code prog.

Quite what happens when I physically connect the spindle encoder will only be known once I've migrated all this stuff off the electronics bench and into the workshop - a few days perhaps, I'll let you know what happens, and thanks again.

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

Time to create page: 0.183 seconds
Powered by Kunena Forum