Hello Guest it is March 28, 2024, 05:56:03 AM

Author Topic: Need a little spindle encoder timing help  (Read 16285 times)

0 Members and 1 Guest are viewing this topic.

Need a little spindle encoder timing help
« on: December 17, 2007, 07:56:48 AM »
I received the nice spindle encoder board from cnc4pc and have it wired to pin 15 on the cll cnc4pc breakout board.  I have a single slot .2" wide in a disk 3.7" in diameter.

I am getting steady but inccorect spindle spead readings, no matter what the actual spindle speed I get a reading from 200-280 rpms  , often the reading goes up when the actual spindle speed drops .  If I change the spindle speed from 300 to 800 rpms while the spindle is running by typing the new value in the rpm readout is very eratic djumping from the normal mid 200 rpm reading to as high as 1400 rms and then settleing back down to the mid 200's again.

Hopefuly this is just a wiring or configuration issue , the disk is as small as I can make it due to the diam of my spindle, right at 3" . It doesnt seem to matter if I set the input to high or low .

I did cut a test thread of 20tpi and it came out almost perfectly at 13 tpi

Any thoughts greatly appreciated

Offline TonyP

*
  •  132 132
    • View Profile
Re: Need a little spindle encoder timing help
« Reply #1 on: December 17, 2007, 11:16:39 AM »
Have you got Index pulse debounce (general config) set to something sensible? Say 4 ( 4x40us)


Tony
Re: Need a little spindle encoder timing help
« Reply #2 on: December 17, 2007, 01:09:55 PM »
It seems to set at 100, I assume the default, I changed it 4 and it now varies wildly from 300-1500, set it at 8 and it seems to have leveled out  fairly close to actual rpms. Now if I could just figure out excactly how to set up mach for my VFD

Offline TonyP

*
  •  132 132
    • View Profile
Re: Need a little spindle encoder timing help
« Reply #3 on: December 17, 2007, 01:22:47 PM »
From what you said earlier you have control of the speed from Mach I think. Have you set 'use feed back etc' . in spindle config? Sounds as though you've got control, but haven't closed the loop.

Tony
Re: Need a little spindle encoder timing help
« Reply #4 on: December 17, 2007, 02:39:30 PM »
I have some minor control over speed, an m3 s200 command gives about 600 rpms at the output shaft of the motor, a change to m3 s2000 bumps the motor shaft speed up to aprox 630 rpms . No great increase or decrease in actual rpm even with a huge change in s value.

The settings under the spindle tab are currently have use spindle feedback checked, closed loop spindle checked, spindle speed averaging unchecked
Use pwm is checked , pwm base 100, min PWM 10%
On the motor setup , spindle  the pulse width is set at 1

When I type in m3 s200 (or any speed value) I get a message stating "PWM Bumped to Minimum"

On the spindle encoder issue , I changed the index pulse debounce to 8 and it seemed to level out. I choose the save config option on the pull down, shut mach down , rebooted the computer and the rpm readout now varries wildly from 50 rpm to 10k+ , it seems to change randomly while the spindle is off as long as the beam is broken, when its aligned with the slot in my disk and at rest for a minute or so it settles at zero.

I apreciate all the help, I am so close its driving me nuts

Offline TonyP

*
  •  132 132
    • View Profile
Re: Need a little spindle encoder timing help
« Reply #5 on: December 17, 2007, 03:28:01 PM »
Hmm,

I think there are two different problems.
 One: you don't seem to have a reasonable control of the motor speed.
Two: The index seems to give the wrong results.
I think it would be wise to separate the problems by not using the feedback etc. until you have  positive control of the spindle.
I assume the PWM signal is fed direct to the drive & not converted to a variable DC? On my system I use the step signal and convert it into a variable DC, which is what my drive needs.
Do you know what range of input your drive needs? ( either DC or PWM)

Tony
Re: Need a little spindle encoder timing help
« Reply #6 on: December 17, 2007, 04:27:45 PM »
my vfd is looking for 0-10vdc , I am using the c11 breakout board from cnc4pc
Re: Need a little spindle encoder timing help
« Reply #7 on: December 17, 2007, 04:47:55 PM »
I set the spindle motor back to step and I can now vary the speed over a pretty broad range  although the speed values I plug in have to be much greater than the actual speed of the output shaft of the motor. input speed of s3000 results in aprox 800 rpms actual . I have tried varying the steps and step pulse width on the spindle motor config page, what variables do I need to adjust to get my output shaft of the motor to match the value I call out . I seem to be able to get the highest speeds with the steps set to 40k and pulse width4 but still no where near the speeds called out

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: Need a little spindle encoder timing help
« Reply #8 on: December 17, 2007, 06:37:12 PM »
Have you set up your Pulley ratio in Mach?

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: Need a little spindle encoder timing help
« Reply #9 on: December 17, 2007, 08:05:55 PM »
yes to some extent but initialy I am just trying to get my speed call outs (m3s****) to match the shaft speed of the motor  out put shaft . I cant get the shaft speed anywhere close to whats called out