Can't get lathe to Feed

More
04 May 2021 07:34 #207798 by Clive S
Replied by Clive S on topic Can't get lathe to Feed

Hey Andy,
I'm teaching you to suck eggs here!.
I've just looked at the HAL carousel componet (Which I never knew existed)
and its been written by a guy called Andy Pugh. Thats a coincidence, because thats your name as well !


If this helps:- Boxford 125 PPort no sensors on the turret With help from Andy and Aciera







forum.linuxcnc.org/49-basic-configuratio...home?start=70#192352

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

More
04 May 2021 07:43 #207800 by andypugh
Replied by andypugh on topic Can't get lathe to Feed
Yes, looking through a previous thread it seems that the carousel component isn't particularly useful for the Boxford TCL. However there is an existing component for the job.

forum.linuxcnc.org/38-general-linuxcnc-q...etup?start=10#178963

I suggest reading from that point, and then stop when someone starts talking about sensors in his toolchanger, as that's a thread shift to a different changer.

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

More
29 Jun 2021 06:07 #213216 by rider-83
Replied by rider-83 on topic Can't get lathe to Feed
I've been away from the project for a short while wilst I dealt with something else.
I have the encoder set up on the lathe and have performed a simple test for signals using the LPT port tester, and it is working correctly.
However, before I continue I need to set up the spindle speed control and will need some guidance understanding PWM. I will start a new thread on this topic before returning to this one in order to continue.

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

More
06 Jul 2021 17:32 #213875 by rider-83
Replied by rider-83 on topic Can't get lathe to Feed
I've added the below section to my .HAL file but get the message:

encoder.0.update-counters base-thread NOT FOUND

I'm getting a little snow blind here, can anyone point out my error?



#############################################################
# SPINDLE ENCODER SYNCHRONISATION #
#############################################################
#Add Encoder detail
loadrt encoder
addf encoder.0.update-counters base-thread
addf encoder.0.capture-position servo-thread

# set the HAL encoder to 100 pulses per revolution.
setp encoder.3.position-scale 100

#set the HAL encoder count mode
setp encoder.0.counter-mode 1

# connect the HAL encoder outputs to LinuxCNC.
net spindle-position encoder.0.position-interpolated => spindle.0.revs
net spindle-velocity encoder.0.velocity => spindle.0.speed-in
net spindle-index-enable encoder.0.index-enable <=> spindle.0.index-enable

#Connect HAL Encoder to Parallel Port
net pulse-index-combined parport.1.pin-10-in encoder.0.phase-A encoder.0.phase-Z

#############################################################
#SPINDLE AT SPEED DETAIL

# load a near component and attach it to a thread
loadrt near
addf near.0 servo-thread

# connect one input to the commanded spindle speed
net spindle-cmd => near.0.in1

# connect one input to the encoder-measured spindle speed
net spindle-velocity => near.0.in2

# connect the output to the spindle-at-speed input
net spindle-at-speed spindle.0.at-speed <= near.0.out

# set the spindle speed inputs to agree if within 1%
setp near.0.scale 1.01
#############################################################

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

More
06 Jul 2021 17:41 #213876 by andypugh
Replied by andypugh on topic Can't get lathe to Feed
It appears that there is only one "encoder" module which updates all its channels at the same time.

So change encoder.0.update-counters to encoder.update-counters (and the same for capture-position)

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

More
06 Jul 2021 17:48 #213877 by rider-83
Replied by rider-83 on topic Can't get lathe to Feed
Thanks Andy, I'll give it a try but it will be later or tomorrow now. I was actually looking at the '0' and wondering if that was the issue but I didn't want to mess with it until I was sure.

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

More
07 Jul 2021 16:44 - 07 Jul 2021 16:59 #213977 by rider-83
Replied by rider-83 on topic Can't get lathe to Feed
OK, so I've done the change, but now I get:

parameter or pin encoder.3.position-scale not found
Last edit: 07 Jul 2021 16:59 by rider-83.

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

More
07 Jul 2021 17:08 #213978 by robertspark
Replied by robertspark on topic Can't get lathe to Feed
you need to define the position scale and add it to your ini file
linuxcnc.org/docs/2.8/html/man/man9/encoder.9.html

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

More
07 Jul 2021 17:12 #213979 by rider-83
Replied by rider-83 on topic Can't get lathe to Feed
Sorry, I don't understand :(

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

More
07 Jul 2021 17:48 #213980 by andypugh
Replied by andypugh on topic Can't get lathe to Feed

OK, so I've done the change, but now I get:

parameter or pin encoder.3.position-scale not found
 

You only have one encoder, encoder.0. That is because you had "loadrt encoder" which defaults to a single channel. 
So you will not have any HAL pins including encoder.3

How many encoders do you need? 
 

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

Time to create page: 0.110 seconds
Powered by Kunena Forum