lathe g76 feed jerky

More
10 Apr 2012 02:38 #19081 by genec
lathe g76 feed jerky was created by genec
I have a spindle index pulse and a 60 tooth gear with A pulse only. G33 reports spindle stopped with the chuck turning. G76 will not start without the spindle turning but the feed is varying wildly. Do I need to add a B encoder input? or any other ideas
thanks
Genec

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

More
10 Apr 2012 07:18 #19083 by cncbasher
Replied by cncbasher on topic Re:lathe g76 feed jerky
have you set this channel encoder to type 1 ?
also you dont specifiy your hardware , interface etc it all helps to know
what vfd etc is used ?

if this spindle is pwm controlled have you a pwm to analog interface
this could also be the situation that the pwm signal is reversed to what is needed or the fwd/reverse is wrong

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

More
11 Apr 2012 00:24 #19113 by genec
Replied by genec on topic Re:lathe g76 feed jerky
I dont have a vfd as my lathe is original with fixed spindle feeds. I fitted a 60 tooth to the spindle plus 1 tooth for an index. I use zero speed hall effect gear sensors and get 5 volt square waves plus the index pulse. I was hoping the z feed would sync with the spindle. I use regular parallel interface. Everything else works great and I have used it for taper turning and regular x z feeds. Any ideas

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

More
11 Apr 2012 03:19 #19117 by cmorley
Replied by cmorley on topic Re:lathe g76 feed jerky
post your HAL file. Did you set the encoder to counter mode?

what is your base period?
What speed is your spindle running at?

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

More
11 Apr 2012 05:04 #19120 by jmelson
Replied by jmelson on topic Re:lathe g76 feed jerky
genec wrote:

I dont have a vfd as my lathe is original with fixed spindle feeds. I fitted a 60 tooth to the spindle plus 1 tooth for an index. I use zero speed hall effect gear sensors and get 5 volt square waves plus the index pulse. I was hoping the z feed would sync with the spindle. I use regular parallel interface. Everything else works great and I have used it for taper turning and regular x z feeds. Any ideas

I'd strongly suggest setting up Halscope and viewing the spindle velocity signal
to see if there are large variations in the detected speed. Your results
pretty much indicate that is what is going on.

Jon

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

More
13 Apr 2012 23:25 #19183 by genec
Replied by genec on topic Re:lathe g76 feed jerky
I am using 63 rpm on spindle and periods of 50 microseconds and 1 millisecond.
I have 2 cnc4pc c10 parallel port cards, the 2nd is used for a home-made mpg which works great.

below is the Hal file:-

# Generated by stepconf at Wed Oct 12 20:54:43 2011
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt probe_parport
loadrt hal_parport cfg="0x378 out 0xa000 in "

setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0
loadrt encoder num_chan=2

addf parport.0.read base-thread
addf parport.1.read base-thread
addf stepgen.make-pulses base-thread
addf encoder.update-counters base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread
addf parport.1.write base-thread

addf stepgen.capture-position servo-thread
addf encoder.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
net spindle-cmd <= motion.spindle-speed-out

setp encoder.0.position-scale 60.000000
setp encoder.0.counter-mode 1
net spindle-position encoder.0.position => motion.spindle-revs
net spindle-velocity encoder.0.velocity => motion.spindle-speed-in
net spindle-index-enable encoder.0.index-enable <=> motion.spindle-index-enable
net spindle-phase-a encoder.0.phase-A
#net spindle-phase-b encoder.0.phase-B
net spindle-index encoder.0.phase-Z

net estop-out => parport.0.pin-01-out
net xdir => parport.0.pin-02-out
net xstep => parport.0.pin-03-out
setp parport.0.pin-03-out-reset 1
net zdir => parport.0.pin-06-out
net zstep => parport.0.pin-07-out
setp parport.0.pin-07-out-reset 1


net max-home-x <= parport.0.pin-10-in-not
net max-home-z <= parport.0.pin-11-in-not
net spindle-phase-a <= parport.0.pin-12-in-not
net spindle-index <= parport.0.pin-13-in-not
net estop-ext <= parport.0.pin-15-in


setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 20000
setp stepgen.0.dirsetup 35000
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable axis.0.amp-enable-out => stepgen.0.enable
net max-home-x => axis.0.home-sw-in
net max-home-x => axis.0.pos-lim-sw-in

setp stepgen.1.position-scale [AXIS_2]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 20000
setp stepgen.1.dirsetup 35000
setp stepgen.1.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd => stepgen.1.position-cmd
net zpos-fb stepgen.1.position-fb => axis.2.motor-pos-fb
net zstep <= stepgen.1.step
net zdir <= stepgen.1.dir
net zenable axis.2.amp-enable-out => stepgen.1.enable
net max-home-z => axis.2.home-sw-in
net max-home-z => axis.2.pos-lim-sw-in

net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in

loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

Thanks for your help
Gene

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

More
13 Apr 2012 23:33 #19184 by genec
Replied by genec on topic Re:lathe g76 feed jerky
Thank you for this advice as being able to see the signals will point to the problem.
At this time I am not sure how to see the signals with the lathe running.Would you give the procedure to do this or point me to the source of this information.
Thank you
Gene

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

More
14 Apr 2012 00:04 #19185 by genec
Replied by genec on topic Re:lathe g76 feed jerky
Attached is my ini file
(I am still learning how to use a forum:( )

File Attachment:

File Name: lathe-35c8...94c3.ini
File Size:2 KB
Attachments:

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

More
14 Apr 2012 01:59 #19186 by jmelson
Replied by jmelson on topic Re:lathe g76 feed jerky
genec wrote:

Thank you for this advice as being able to see the signals will point to the problem.
At this time I am not sure how to see the signals with the lathe running.Would you give the procedure to do this or point me to the source of this information.
Thank you
Gene

OK, you start Halscope from the Machine menu of Axis. First time, it will ask which thread to
put the sampler on, select the servo thread and 4000 samples. Then, at the bottom of
the screen, you can select the signal, encoder.0.velocity which is the spindle velocity
out of the software encoder HAL component. You will have to fiddle with the vertical and horizontal
scales to get a meaningful display. This velocity should be scaled into revolutions per
second, I think. So, at 60 RPM, you should see a value of about 1.0 with some up/down
jitter. The jitter or sample-sample variation is what you are concerned about.

Jon

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

More
17 Apr 2012 01:49 #19259 by genec
Replied by genec on topic Re:lathe g76 feed jerky
Thank you Jon
I was able to run halscope and view spindle velocity but was surprised to see the correct dc velocity (rpm) with superimposed large random pulses. These were removed when I switched off the Stepper power supply.
I now know the source of the problem and will now work on it.
My thanks to everybody for your help
Gene

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

Time to create page: 0.184 seconds
Powered by Kunena Forum