Hello Guest it is April 16, 2024, 10:38:59 AM

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

0 Members and 1 Guest are viewing this topic.

Offline TonyP

*
  •  132 132
    • View Profile
Re: Need a little spindle encoder timing help
« Reply #20 on: December 18, 2007, 01:26:17 PM »
Here's a strange thing. I've been sitting here playing with my machine & trying different things in the spindle setup. I eventually got into a mode where I couldn't get the speed up to normal. I tried all the various tricks we've been discussing but no change. I eventually copied yesterday's latest xml file from the xmlbackups directory (MacTurn.xb99 in my case), renamed  the current one in the root, and replaced it with the copy (suitably renamed). Ran up Mach again & all ok. No visible changes in the settings.

It's a useful thing to remember that when you save a setup, the old one goes into the backup directory.
I'm a bit concerned that things that I can't see are being stored. I suspect the spindle calibration data.

Tony
Re: Need a little spindle encoder timing help
« Reply #21 on: December 18, 2007, 02:09:22 PM »
I moved the encoder as reccomended earlier from pin 15 to 13, no change , decided to try it on pin 12 and its working perfectly now, reading dead on with my handheld optical tach so thats now working properly . Now just to figure out this spindle speed issue

Offline TonyP

*
  •  132 132
    • View Profile
Re: Need a little spindle encoder timing help
« Reply #22 on: December 18, 2007, 02:28:28 PM »
Oh that's good. It may be worth putting a switch or something on the  inputs that didn't work to check if they work ok as straight on/off controls. Is the PC port a built-in one or a PCI card?
Re: Need a little spindle encoder timing help
« Reply #23 on: December 18, 2007, 03:09:50 PM »
the port is built in the motherboard, when I put the encoder on pin 12 I  moved my optical home for x axis to 13 and it seems to work fine, tried it on 15 , works there also. Now just the spindle speed issue. I dont mind entering huge speed values like s7000 to turn at 300 rpms as long as the threading feature will work properly. I assume the z axis advances a a set distance per revolution based on the actual spindle reading and P.** setting in G76 and I can generate my threading files and then edit the S*** to what ever value I need to get my spindle turning at 150-200 rpms

I also notice that settings change randomly when I exit mach, reboot and restart the software , I choose the setting for mach to zero x and z axis automaticly when I home the machine but this feature is turned off everytime I restart the software. Also  If I set the pulse width to 5 in motor setup, save settings when I re-open the motor config window the pulse width has changed to 4, click OK, open it again and its reset to 3 , drops one everytime the motor settings window is opened then closed

Offline TonyP

*
  •  132 132
    • View Profile
Re: Need a little spindle encoder timing help
« Reply #24 on: December 18, 2007, 03:18:28 PM »
What version are you using? I happen to have V2.52 on the lathe PC and V2.61 on this one. It all sounds a bit strange if the setup is changing. I've not seen that before.

Have you tried closing the loop now the index is working? My spindle runs a bit slow for most of its range but comes up to speed ok with closed loop.

Offline TonyP

*
  •  132 132
    • View Profile
Re: Need a little spindle encoder timing help
« Reply #25 on: December 18, 2007, 03:47:58 PM »
There is something odd going on in the Motor tuning screen. On V2.61 if I put in a step pulse of 4 & save the axes, come out of that screen then go back in, the value changes to 3. It does the same for a value of 2 ( changes to 1), but not for 6 or any other number I've tried. V2.52 doesn't do this. Another thing that is strange is that you are not offered the choice of saving if you just alter the dir width. It seems to save anyway, but it's odd.
 It's possible to put in values up to 25us for step & 15us for dir if you need to. My steppers won't operate with anything less than 6.
Re: Need a little spindle encoder timing help
« Reply #26 on: December 18, 2007, 04:50:29 PM »
I will try that in just a minute, I did not know it was possible to go that high, the documentation says 1-5 so I had not tried a higher value, that might solve my problem. I am using v2.61

I do have both spindle feed back and closed loop checked . Does g76 base the z axis feed rate on the actual spindle speed or the value entered in the wizard when generating the g-code?  Reason I ask is I generated a file at S100 , deleted the spindle speed line in the gcode and ran the spindle up to 200 rpm then ran the code , it cut a nice set of threads at aprox 19tpi, I ran the same file at 400 rpms and it cut decent threads at 9.5 tpi
Re: Need a little spindle encoder timing help
« Reply #27 on: December 18, 2007, 06:13:01 PM »
the spindle speed creaping up slowly seems to only happen when I have the closed loop spindle control box checked, since S2000 yeilds about 180 actual rpms it makes sense that it just gradualy increasing the speed trying to get the actual speed to match the specified speed.

When I make a change in the pulse width box in motor configuration I can enter a figure as high as 25 but it doesnt seem to help get my actual speed closer to the specified speed, realistic speed callouts ov 100-300 rpms only yeild an output voltage of a few milivolts at the analog out put on the cnc4pc board. Also the value entered in the pulse width box drops by one each time the motor config window is opened and closed.
on the plus side I am getting really good at navigating all the setup windows in mach:)

Offline ART

*
  • *
  •  1,702 1,702
  • Tough as soggy paper.
    • View Profile
Re: Need a little spindle encoder timing help
« Reply #28 on: December 18, 2007, 11:13:39 PM »
Hi Guys:

 I havent followed this thread fully, (Im having a very busy day here..) but Brett was kind enough to steer me here.

 The PID loop in Spindle isnt a good thing to use if it shows creeping, its very hard to tune on some systems, so its a cse of it works, or doesnt usually. In normal system,s, you simply command a S100000 and see what you get, then set the pulley max for that pulley to what you actually get. In most systems, your spindle will be accurate pretty much across the board..

Art

Offline docltf

*
  •  354 354
    • View Profile
Re: Need a little spindle encoder timing help
« Reply #29 on: December 19, 2007, 12:42:26 AM »
what are you using as a spindle motor.
are you using it with a gear reduction.