Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: tmsmith on June 08, 2007, 04:12:17 PM

Title: Spindle direction control
Post by: tmsmith on June 08, 2007, 04:12:17 PM
I am trying to set up my *second* digispeedXL spindle control card.
My first ran OK except M3/M4 did not change the spindle direction which was clockwise.
I thought I had a faulty card so obtained a second card.
This time it rotates CCW with the same setup BUT again direcction cannot be changed with M3/M4

On checking using the Digispeed Manual  setup routine I find that M3/M4 is not effecting the direction LED.
l
I am using Mach3 v2.064 and a Xylotex card.
I cannot spot a wiring or config fault.
Can anyone point me in the right direction to correct this fault.

Malcolm Smith
Title: Re: Spindle direction control
Post by: Hood on June 08, 2007, 05:34:47 PM
Do you have the M3 and M4 macros?

Hood
Title: Re: Spindle direction control
Post by: tmsmith on June 08, 2007, 06:07:05 PM
Hi Hood,
Now you've lost me.
Aren't they just part of Mach3?


Malcolm Smith
Title: Re: Spindle direction control
Post by: Hood on June 09, 2007, 04:29:02 AM
I think you still need the M3 and M4 macros in the C:\Mach3\macros\Mach3Mill  folder.

Hood
Title: Re: Spindle direction control
Post by: vmax549 on June 09, 2007, 09:59:07 AM
Malcom , double check your step & direction pin settings in mach. (;-) TP
Title: Re: Spindle direction control
Post by: tmsmith on June 09, 2007, 11:36:32 AM
Hood where are the M3/M4  macros. This is them first I have heard about having to add them.
I have checked the voltage on the (pin 17) Dir signal on the Xylotex board when entering M3/M4 on the MDI screen.
The voltage stayed the same at 4.40volts so it sounds as though the problem occurs upstream of the Digispeed board.

For vmax, I have checked the pins and they seem to be as I understand the manual.

Malcolm  Smith
Title: Re: Spindle direction control
Post by: tmsmith on June 09, 2007, 11:47:57 AM
Further to my previous post I see in Mach3/macros there are 2 files M3.mls and m4.mls.
Is that where they should be?.
Title: Re: Spindle direction control
Post by: Hood on June 09, 2007, 06:04:59 PM
You should have the M3 and M4 macros in  C:\Mach3\macros\Mach3Mill  Check to see they are there, BTW I am presuming its the standard profile you are using and also it is a mill.

Hood
Title: Re: Spindle direction control
Post by: tmsmith on June 09, 2007, 06:12:06 PM
Yes Hood,
That is where they are.

Malcolm
Title: Re: Spindle direction control
Post by: Hood on June 09, 2007, 06:16:16 PM
Just to confirm, you are using the standard Mach3 Mill Profile? Also what do the macros say in them? Do you have the spindle set up correctly in Ports and Pins, Spindle setup page?

Hood
Title: Re: Spindle direction control
Post by: tmsmith on June 09, 2007, 06:38:49 PM
Yes I am using the standard milll profile.
M3 macro says dospinCW while M4 says dospinCCW.
I am beginning to suspect some thing is wrong in ports & pins though so far I have not spotted it.

tmsmith
Title: Re: Spindle direction control
Post by: Hood on June 09, 2007, 06:41:54 PM
can you post your xml here so I can take a look.  I dont know a lot about the standard spindle setup as I have not used it but I may find something amiss.
Hood
Title: Re: Spindle direction control
Post by: tmsmith on June 09, 2007, 06:48:51 PM
In P&P-spindle setup I have M3 output 1
                                       M4 output 1
spindle relays enabled.

To check other settings means a trip to the shop which I cannot manage until tomorrow.
Malcolm
Title: Re: Spindle direction control
Post by: Hood on June 09, 2007, 07:05:52 PM
As I said I have never used that methd to control a spindle, I use a PLC and ModBUS, I would presume however that you should have different outputs for M3 and M4. Do you have the outputs set up for this?

Hood
Title: Re: Spindle direction control
Post by: tmsmith on June 10, 2007, 10:30:30 AM
Hi Hood, I am back again.

In setting up the outputs I am following the DigispeedXL User Guide, page 20, Spindle set-up tab.

This says 'M3&M4 commands are used to control the same output signal. For this example Output No1 is used.

I am trying to send my Xml file but experiencing difficulty - will keep trying

Malcolm
Title: Re: Spindle direction control
Post by: tmsmith on June 10, 2007, 10:52:42 AM
Hopefully Mach3.mill.xml
Title: Re: Spindle direction control
Post by: vmax549 on June 10, 2007, 11:14:34 AM
OK, lets back up a step, What type of speed controller are you using this on, Sherline type(DC motor) or VFD?
You are using the XL version correct?
Title: Re: Spindle direction control
Post by: tmsmith on June 10, 2007, 12:39:07 PM
Hi Vmax,
The mill is fitted with a 130V DC motor and this is controlled by a Lenze534 speed controller.
It requires a 0-10volt signal for speed control and the direction is controlled by switching current direction using a power relay driven by the direction relay of the digispeed XL board.

Malcolm Smith
Title: Re: Spindle direction control
Post by: Hood on June 10, 2007, 02:38:21 PM
OK I see how this is working now. Get a voltmeter or scope and put it to pin 17 on your parallel port, go to MDI and type in M3 and see if you get 5V then M4 and see if it drops to 0V. If it doesnt then it looks like you may have a port or cable problem, If it does then it will have to be investigated further.
Hood
Title: Re: Spindle direction control
Post by: tmsmith on June 10, 2007, 03:56:39 PM
I have checked the voltage on pin17 but not at the port but at the xylotex card.
Using m3/m4 I could not detect any voltage change.
I will repeat this at the parallel port on the computer if I can get at the pins.
In checking Mach3 configs I noticed one 'strange' thing.
In the digispeed guide it is written, output 1 is chosento drive the enable line, it has been configured to act on pin 16 of the port.
In the illustration it shows pin14 used. My pin is set to pin14 but if I set it to pin16 it reverts to pin14.
Pin 14 is unused but the digispeed board is enabled ok!!!!
I am not sure what to make of that.

Will go and see if I can check the voltages at the parallel port

Malcolm
Title: Re: Spindle direction control
Post by: tmsmith on June 10, 2007, 04:22:04 PM
Hi Hood,
Well this is what I found.
put the DVM between pins 17 and 20.
Booted Mach3 and on MDI screen entered M3,M4,M5.
The voltage read 4.24v and did not change for any of the codes.
So the setup in Mach3 is wrong or the port/computer is faulty.

Are there any other test I can try to see if it a Mach3 config problem?

Malcolm
Title: Re: Spindle direction control
Post by: tmsmith on June 11, 2007, 11:18:05 AM
Further confirmation that the fault is upstream of the DigispeedXL.
I put a 5v/0v onto the direction input and the direction relay switched - well at least its LED did.

tmsmith
Title: Re: Spindle direction control
Post by: Hood on June 11, 2007, 01:34:11 PM
Looks like its either the cable or the port that is the problem then :(

Hood
Title: Re: Spindle direction control
Post by: Chip on June 11, 2007, 02:28:11 PM
Hi, Tmsmith

If your not getting a change of state on your Pin's, Change the LowActive State from X to Check or Check to X as needed for your Dir pin anyway.

Hope this Helps, Chip
Title: Re: Spindle direction control
Post by: tmsmith on June 11, 2007, 07:18:33 PM
Thanks for that suggestion Chip, I will try that tomorrow.
The problem is not the cable Hood since I did the test on the pins of the parallel port.
Do I take it that you couldn't spot anything wrong on the xml file making it more likely that it is a computer port problem?


tmsmith
Title: Re: Spindle direction control
Post by: Hood on June 11, 2007, 07:25:04 PM
Put a meter on pin16 of my port when I had your XML loaded and it worked like it should, ie it went from High to low when I changed direction by MDIing M3 and M4. I have just done it again to make sure my memory was correct and again it works perfectly, looks like your port is stuffed :(


Hood
Title: Re: Spindle direction control
Post by: tmsmith on June 12, 2007, 04:57:16 PM
I have tried chips suggestion and the spindle goes either CW or CCW but there iis no difference whether I use  M3 or M4 , shame.
Thanks for your reply Hood.
I will try that once again on my system. Since my pin is always high the cable must be OK; well thats how I see it.
I will have a look in the box but dont expect to be much wiser.
I guess it means a computer upgrade when I have the need to rotate the spindle both ways for a job.

tmsmith
Title: Re: Spindle direction control
Post by: Hood on June 12, 2007, 04:59:10 PM
Just go get yourself a PCI parallel port, they dont cost much here in the UK at least.
Hood
Title: Re: Spindle direction control
Post by: tmsmith on June 12, 2007, 05:12:20 PM
Yesterday when the 'writing was on the wall, I asked about them in the local computer shop (I am in the UK too).
I was told that nowadays the ports were on the mother board and he hadn't seen one for about 4 years.!!!
I was very sceptical.

tmsmith

Title: Re: Spindle direction control
Post by: Hood on June 12, 2007, 05:17:54 PM
I usually get mine from eBay, look here http://search.ebay.co.uk/ws/search/SaleSearch?sofocus=bs&satitle=pci+parallel+port&sacat=-1%26catref%3DC5&fbd=1&_trksid=m37&from=R6&nojspr=y&pfid=0&fswc=1&few=&saprclo=&saprchi=&fss=0&saslop=1&sasl=&fls=4%26floc%3D1&sargn=-1%26saslc%3D0&salic=3&saatc=3&sadis=200&fpos=DD11+1BB&fsct=&sacur=0&sacqyop=ge&sacqy=&sabfmts=0&saobfmts=exsif&ga10244=10425&saslt=2&ftrt=1&ftrv=1&sabdlo=&sabdhi=&saaff=afdefault&afcj=&afmp=&fsop=1%26fsoo%3D1&fcl=3&frpp=200
Title: Re: Spindle direction control
Post by: tmsmith on June 12, 2007, 05:30:01 PM
Thanks Hood, I will see what type I need.

tmsmith
Title: Re: Spindle direction control
Post by: vmax549 on June 13, 2007, 08:30:59 AM
TMSMITH, Have you tried contacting Peter? He is the one making the board. Something doesn't seems right about your setup. Do you have the direction relays hooked to the digispeed or to the breakout board? Does the speed control part work ok?  Lets give it one more shot,I hate it when a plan does not come together correctly. I will DL the manual and give it a look. Do you have the pinout exactly as it is in the book? Please post your pin assignments for the DIGSPD in mach(output motor setup,  pins and ports). I have a similar setup with the Lenze530 on a slantbed lathe out in the shop.

(;-) TP
Title: Re: Spindle direction control
Post by: tmsmith on June 13, 2007, 06:34:33 PM
Hi Vmax.
Yes I have talked to Peter who in fact sent me  a replacement DigispeedXL board.
He asked for photo's of the setup prior to sending the new board so he had not spotted anything obvious.
I was also getting info from Graham Waterworth who runs a similar setup.
Myself, I have very little experience so can easily be wrong/make mistakes.

The direction relay is part of the XL board and is used to switch a larger power relay which is mounted separately.
The speed control appears to work OK using the 'S' gcode.
I am using the pinout as it is in the user guide except I am using port 1 instead of 2(not fitted)

Motor outputs     ticked step pin 1  dir pin 17 both active low

Input signals        index ticked  port1  pin 15  active low

Output Signals     enable1 ticked   port1  pin 14 active low
Output#1            enabled port 1 pin 16   active low

Spindle tab         Disable spindle relays is unticked
Clockwise(M3)    set Output#1
CCW (M4)         set output#1
Motor Control    Ticked, Use spindle motor output
                       PWM control ticked
I have read these settings from my records but I will confirm them tomorrow when I can get out to the shop, since I have played around with the setup to see if I could find the fault.

Thanks for your interest vmax

tmsmith
Title: Re: Spindle direction control
Post by: vmax549 on June 14, 2007, 12:55:09 AM
I don't see how you could have direction control if both M3/M4 are going to the same pin. ???  I need to look at the manual. Your setup should not energize the relay in CW, but needs to energize the relay for CCW.

(;-) TP
Title: Re: Spindle direction control
Post by: Hood on June 14, 2007, 02:17:42 AM
I thought that as well but I had a quick sqint at the manual and I think the output is just to enable the board. It is using a Dir pin (17) to change the direction, just like the axis uses a Dir pin.
Hood
Title: Re: Spindle direction control
Post by: tmsmith on June 14, 2007, 09:23:40 AM
One odd looking setting is the output signal 'Enable1 which enables pin14 active low. Strange because pin 14 does *not*  appear to be used further down through the system.
Pin 1 is wired up, and I am guessing it gets its signal from one of the config settings in Mach3. The 'Motor output' spindle enable step pin 1 must be most likely.


tmsmith
Title: Re: Spindle direction control
Post by: vmax549 on June 14, 2007, 11:02:40 AM
Now I see,As I read the Manual, M3M4 is just used to enable the unit. But if that is so what is the OTHER enable signal doing? UNless it is the other end of the enable circuit????

The direction is controlled by the DIR pin.

Do all of the LEDs work correctly? If so Maybe a problem with your FLIP/FLOP relay(CW,CCW)

Does it run in the same direction each time you run it?  CW always? CCW always? or does it change sometimes(sticky relay)?

Let me see if I have the problem correctly. When you Command a M3/M4 the spindle starts up. THe S command will change the speed. M5 will stop the Spindle. But using M3-4 does not change the direction?

Is that correct?

(;-) TP
Title: Re: Spindle direction control
Post by: tmsmith on June 14, 2007, 01:32:26 PM
Vmax549,
Starting with your last point, yes you have the problem correctly.
The spindle always runs in the same direction, which is CW so I can use the mill.
The dir LED on the DS board does not change when M3/M4 is altered.
Going further back in the system pin17 of the computer parallel port does not change either so the DS board is doing what it is asked to do.

So the problem appears to be in the Mach3 config, or is a fault in the actual computer.
What would help would be some way of testing pin17 outside of Mach3.
This would eliminate Mach3 (or condem the config).

tmsmith
Title: Re: Spindle direction control
Post by: Hood on June 14, 2007, 01:36:04 PM
Just ignore, was talking bull so have edited it, Alu fumes must be going to my head today.
Hood
Title: Re: Spindle direction control
Post by: Chip on June 14, 2007, 02:01:27 PM
Hi, Tmsmith

Change the state for Pin 17 to "X or Check" first, Apply Gnd. or +5 volts to pin 17 to see if it functions.

Thanks, Chip
Title: Re: Spindle direction control
Post by: tmsmith on June 14, 2007, 03:25:12 PM
Chip,
I have applied 5v and 0v to the digispeed board and the relay then functions as expected, so the board appears OK.
checking or X on pin 17 in config only alters the direction( if I remember correctly) but does not give CW and CCW

tmsmith
Title: Re: Spindle direction control
Post by: Hood on June 14, 2007, 03:42:41 PM
OK, just realised you are saying that if you alter the state of pin 17 the motor direction will change but that MDIing M3 or M4 doesnt make a difference. So sounds indeed like you do have something wrong in Mach. Might be worth renaming the Mach3 folder and then downloading and installing Mach again to see if it makes a difference. The reason I say to rename is so that Mach will install  completely fresh and then you can set it up again and see if things work this time. Bit of a pain but will be worth it if you get sorted.

Hood
Title: Re: Spindle direction control
Post by: tmsmith on June 14, 2007, 03:44:42 PM
Thanks Hood,
I will try that.

tmsmith
Title: Re: Spindle direction control
Post by: vmax549 on June 14, 2007, 03:53:49 PM
Check all the  pin assignments, you may have two things using the same pin. If you suspect a bad pin in the port move the dir output to another OUTPUT pin, just make sure you tell mach which one you are using.

To check the port shut down the computer, unplug the cable hook a voltmeter to the pin/0v  and boot up the computer, the computer should pulse the port/pins on startup. I have use this from time to time. Also you may try printing to the port with a meter hooked up.

(;-) TP
Title: Re: Spindle direction control
Post by: tmsmith on June 14, 2007, 05:14:24 PM
Hood & vmax,
I have followed Hoods sugestion and installed the latest version, Mach3v2.075 after changing the name of the old Mach3 folder.
Moved my mill.xml file into the new Mach3 folder and removed the one already in the folder.
Having rebooted the xml file was not recognised and I had to reconfigure ports&pins manually.

On the MDI screen entered S500 and M3 and the spindle revolved CCW; M5 and it stopped; M4 and it revolved CW!!!! - Hurray.
It should be easy to change the direction of revolution.

Thanks very much for your and persistance, and I am pleased there was no fault with Peters cards - must now post the spare back to Oz.

One question while I am here.
In the spindle section of the main screen there are DRO's for RPM, S-ov and 'programmed speed'.
Hood could you explain what the first two mean, my RPM is about 4 times the programmed speed and very erratic. And S-ov ????


tmsmith
Title: Re: Spindle direction control
Post by: Hood on June 14, 2007, 05:34:28 PM
Glad you are sorted.

Changing the direction should be as easy as changing the active low  state in motor outputs for pin 17.

Dont have a clue on the spindle speed question, never even looked at it as my mills spindle is just manual controlled and the lathe is worked through a PLC and is operated by clutches.
 Will have a look in a bit and see if I can make any sense of it.
Hood
Title: Re: Spindle direction control
Post by: Hood on June 14, 2007, 05:40:08 PM
OK just loaded the standard Mach screen and I think the S-ov will be spindle speed override, move the slider and see if it is.
For your eratic speed is there any tuning on Peters board? If not have a look in the motor tuning and see if you can adjust the sindle in there.
Hood
Title: Re: Spindle direction control
Post by: tmsmith on June 14, 2007, 06:58:06 PM
It is not the spindle speed that is erratic but the DRO displayed figure.
Under Spindle config. there is on option to use rpm averaging which I use but the indicated RPM still jumps about.??

tmsmith
Title: Re: Spindle direction control
Post by: Hood on June 14, 2007, 07:00:52 PM
Try increasing the Index debounce, that should help. What type of sensor are you using?
Hood
Title: Re: Spindle direction control
Post by: vmax549 on June 14, 2007, 09:56:14 PM
RPM is the actual rpm as seen by the sensor,

 Sov is Spindle speed override, You can adjust this UP/DOWN on the fly while machining.

Programmed speed is the actual S value you requested in the Gcode.

Now while you have spindle speed control and the spindle index signal you can also program a delay in mach to allow the spindle to come up to full speed before mach will start to move. You can also sync the spindle to the axis (G95) to run in feed per rev mode (great for threading, SRT is as close as it gets to rigid tapping and works great for me. to watch it work you would swear it is rigid tapping. CLose very close I can usally maintain inside of 2 thread tolerance at 100-200 rpm tapping

Good Job on the trouble shooting, I love it when the plan finally come together !!!!!!!!!!!!!!

(;-) TP
Title: Re: Spindle direction control
Post by: tmsmith on June 15, 2007, 05:30:03 PM
I am using the CNC4PC insex pulse board sensing a disk on the spindle with 4 slots, one larger than the other 3.
So the high figure displayed may be 4 times the speed.

Thanks for the rundown on  the spindle display vmax. I shall put that in my manual for when I get to threading, it sounds very useful.

thanks
tmsmith
Title: Re: Spindle direction control
Post by: vmax549 on June 16, 2007, 09:02:16 PM
You may need to do an auto calibrate on the spindle to let it correct the display. Also did it go to the index pin or Timing pin. With multislot you should use the timing pin setting. (;-) TP
Title: Re: Spindle direction control
Post by: tmsmith on June 17, 2007, 05:27:00 PM
Vmax,
Tried Timing as opposed to Index. It gave a steady reading of 4520rpm. However when I changed the speed the rpm stayed the same!!.
Tried auto-calibrating the spindle. It started at a fairly high speed and gradually reduced it to zero. I am sure when I did this some time ago it took the speed up from a low value to a high one.
In fact spindle speed control seem to be poor; I think its time to look inside the box.
When on Index setting I tried increasing the debounce to 5000 but it made no noticeable difference.

tmsmith
Title: Re: Spindle direction control
Post by: vmax549 on June 17, 2007, 10:20:50 PM
I think I would try taping over the 3 small slots and try the single large slot. set the pinout to the index signal and reset the debouce back to zero. that way it only gets the one signal for testing. See how that works. (;-) TP
Title: Re: Spindle direction control
Post by: vmax549 on June 17, 2007, 10:26:59 PM
I think for testing purposes I would tape over the 3 small slots, set the pinout to index, reset the debounce to zero. Doulbe check the spindle motor setup and make sure the pid functions are turned off for now. See how that works. I don't use the digispeed I run the Campbell board and a commercial photoptical switch. THe speed controls down to about 3-4 rpm tolerance. Let us know how it works (;-) TP
Title: Re: Spindle direction control
Post by: tmsmith on June 22, 2007, 02:36:44 PM
HI vmax,
sorry for delays in replying but bad computer crash put computer in dock.
To carry on from where we were.

Taped over 3 small slots set pinout to INDEX - active low.
not sure about PID; there are values in there but nothing selected.
Min PWM set at 10%

On MDI screen entered S1500, M3   indicated RPM 1100  good control.
                                 S1800                      RPM 1390    "        "
                                 S2000                      RPM 5000    "        "

As you see sudden increase in revs for small increase in S.
A question; could the spindle calibration be the cause.
I do not understand the calibration. It increases the requested speed in increments of 20 and draws a graph.
After  it finishes there are some buttons to press, not sure about the order but then what happens to the data.
My graph is more like a Z than a 45deg slope and this may be the cause of the above strange behavior.
I am sure it was not like that in an earlier period.
I will await your comments before recalibrating

tmsmith
Title: Re: Spindle direction control
Post by: vmax549 on June 22, 2007, 07:20:49 PM
OK so now we have good RPM control go ahead and recalibrate the spindle.
(;-) tp
Title: Re: Spindle direction control
Post by: tmsmith on June 23, 2007, 03:36:04 PM
I have tried the default button; control  remained as previous post.
Recalibrated spindle,  still no difference.

I don't class my control as good control though the RPM indicated varies very little for any particular value of S.
Setting of S upto about 2000 gives steady increase of revs but still low figures.
S2900 to S2990 steps the revs up to 5000RPM from around 2000RPM. S2960 gives around 3000RPM.
Not condusive to correct setting of Revs when cutting metal

Just a thought, is a reboot required to make Mach take notice of a new set of calibration data.

tmsmith  ???
Title: Re: Spindle direction control
Post by: vmax549 on June 23, 2007, 05:03:45 PM
HUM, Starting to sound like a speed calibration problem in MACH.

Does the graph remain like a z?

I did mine before the calibraton option..

Retry the calibration sequence and write down each rpm step in the test as you go.

Then go to mach and set each speed S********* and see if the values are correct, write those down also as a reference.

Art may need to see them if it is a Mach problem.

A reboot may be required ( it could not hurt:-) )

(;-) TP
Title: Re: Spindle direction control
Post by: tmsmith on June 24, 2007, 12:36:33 PM
Will do.

tmsmith
Title: Re: Spindle direction control
Post by: tmsmith on June 24, 2007, 01:56:40 PM
Does the graph stay like a Z. Well I have just done everything again and hre is what happened.

First went to MDI screen and entered various S values see below.
S1000   0RPM
S1500   417RPM
2000     815
2200     966
2400     1133
2600     1292
2800     1441
3000     4994
S0        0      I should have left things like that, but read on.

Selected spindle calibration
Calibration screen blank, as usual.  P0.25 I1.0 D0.3
Pulses/rev 1,  Control 50 RPM 0, No1 pulley Control ratio  0.0441

select autocalibrate  control 100RPM control ratio1.000

A 45deg yellow line drawn across calib screen. Blue line drawn swooping down and curving to gradually meet 30deg yellow line.
control shows 3000 rpm jumping 1000 to 5000 but spindle on high speed.
Window says successful test-save results  YES
Spindle switched off and Mach rebooted.

Again selected auto-calibate.
Control   RPM
200        0
210       0
240       0
270      0
300      0
330      0
360      0
420      0
450      100
480      102
570      400
lost track, figues increasing too quickly to record.
Saved result after which dro showed control 3000 5010RPM
Clicked 'update PID'  nothing happened.
Going back to main screen Status bar said 'Too fast for pulley - using Max'
Rebooted Mach.
On MDI entered M3,S10 and got immediately top revs
rebooted Mach
On MDI screen M3 S100 1330RPM
s150    5027RPM
S50     5027RPM
S0       5027RPM
M5      0RPM

Thoughts on all this?!
tmsmith
Title: Re: Spindle direction control
Post by: vmax549 on June 24, 2007, 07:11:50 PM
OK, we first need to back up  little. I take it you have multi pulleys. Set the pulley combination that gives a 1:1 ratio. Next what is the top rpm for your motor 3600?.

With the pulleys set to 1:1(same size pulley on both sides) and a top rpm of 3600, you should see 3600RPM at the spindle when s3600 is set. I believe the ratio you see in the pulley setting is for gear box drives like a BP it should be set to 1 for this test. set the low rpm for 100 and the top rpm for 3600.

Now try the recalibrate again.  If all goes well then try the S100 and s3600 it should be close. If it is close then you will need to setup your different pulley settings for mach to follow.

I believe the graph should be faily linear in form. If not we may have to drag Art into this conversation

(;-) TP

Title: Re: Spindle direction control
Post by: tmsmith on June 25, 2007, 12:29:00 PM
HI Vmax, thanks for your continued interest and help. I would love to get this sorted.

Right - I have only a single pair of pulleys so no flexibility there.
Motor speed is 3000revs on the case but that is at 80volts. It is actually being run at 130volts so really I have no idea what its top speed is.
The pulley step down the speed in a 2:1 ratio.
So now I am uncertain. should I set all 4 ratios to the same value.
I also wonder why the pulses per rev which is 1 in the box on the calibration screen cannot be altered when it says a zero should be entered for 1 pulse /rev.
I have still got three of the 4 slots taped over so 1 pulse /rev.

tmsmith
Title: Re: Spindle direction control
Post by: tmsmith on June 25, 2007, 05:00:11 PM
Just had another play around and in the spindle calibrate screen 'control' box appeared   -1.#IND.
I am sure I have seen this before as well.

I wonder if some of my files are corrupt and this is causing my problems.
\anyone know which file controls spindle calibration?

tmsmith
Title: Re: Spindle direction control
Post by: vmax549 on June 25, 2007, 10:29:43 PM
OK the Mrpm@80v=3000, @.026v/rev , then 130v=5000rpm. I am not sure I would run the motor at that speed for long.????? You can always adjust the span voltage on the digispeed to limit the top rpm on the motor

If you have a 2:1 stepdown ratio (largest pulley on the spindle)then at the rated rpm of 3000 then you have a spindle rpm of 1500rpm

you set the pulley speed at 100 low 1500 top at a base of 5.75% that should give you a low speed of 100rpm min and limit you to 1500 top rpm. s100-s1500

Since you only have one pulley ratio  you only need to set 1 pulley setup

First you probably need to download a fresh copy of mach and do an install to clear up any possible problem there. Make sure you save a copy of the xml file as a backup. also if you are using a screenset other than 1024 then back it up also. then reinstall mach. I will find my manual on the speed controller and double check the digispeed manual and the mach manual and we will start from scratch.

YOu can only use 1 pulse per rev with the index option. for multi pulse you have to use the timing option. Lets stick with 1 pulse for now until we get that working ok. YOu really only need the multi pulses if you are going to run the spindle under pid control it gives it more signals per rev to work with. Can be a real pain to set up if you are not familar with pid tuning.
(;-) TP
Title: Re: Spindle direction control
Post by: tmsmith on June 26, 2007, 05:58:08 PM
I spent more time on the problem today but no improvement.
Reinstalled Mach3 v2.076 but that was no cure.

My actual speed reduction is 3000rpm motor to 2000rpm spindle.
At one stage today if I increased the S value the spindle revs went down and then at higher S values they started to climb again!!!.
I tried every combination of settings but no joy.
The actual calibration sequence/result appears to be the problem but other factors are probably effecting that.
For example entering the min(start) revs in the calibration window. Sometimes when the window is opened it shows the last Svalue I had used on the MDI screen.
Other times it showed zero and would not let me alter it. other times it showed -1.#IND.
Sometimes it stepped up the Revs setting at 20Revs per step, other times 50revs per step.
The graphs drawn were variable and at the start the graph was always blank apart from the axis names.
On pressing calibrate a line would be drawn usually coming from some high off scale value on the left and oscillate towards the target line which was sometimes 45deg and other times lower.
Sometimes a stright horizontal line was drawn  at 5000rpm and the figure in the start revs DRO was 5000.

All very frustrating.
Could my high setting of 5000revs be the cause of the revs suddenly taking off above 3000rpm; I will check that tomorrow.

Cheers
tmsmith
Title: Re: Spindle direction control
Post by: vmax549 on June 26, 2007, 07:56:36 PM
Lets try something different. Remove MACH by using the control panel and remove the program entirely(WINDOWS remove program)

. Now do a fresh install and DO NOT RUN SPINDLE CALIBRATION.(;-) Next make sure all the setup has been done according to the Digispeed manual as far a setting up the digispeed in MACH.

 Next setup the spindlepulleys page. Then try the S100 s2000 and see what happens. Remember DO NOT RUN THE SPINDLE CALIBRATION(;-)

(;-) TP
Title: Re: Spindle direction control
Post by: tmsmith on June 27, 2007, 02:43:14 PM
Vmax,
Some success at last ;)

Removed Mach3 via control panel.
Downloaded latest version - 2.0.080 and installed it.
It had retained my .xml file so checked settings OK.
Set pulley #1  100 and 2000, left ratio?? at 1.
No spindle calibration carried out.
Config pins set for index and one untaped slot on spindle disk.

I'll give you the results of using MDI unput.

   S      RPM (indicated)
  300    0
  400    187
  500    503
  600   807
 700    1112
  800   1421
  900   1723
  1000   2026
  1100   2336
  1200   2635
  1300   2935
  1400   3241
  1500   3542
  1600   3837
  1700   4150
  1800   4454
  1900   4730
  2000   5000 +/_10
  400     188

Apart from a dip at s400 these readings lie on a straight line.
Obviously the spindle calibration should bring the slope of the graph to 45 deg.

Thoughts on this success??

Malcolm
Title: Re: Spindle direction control
Post by: vmax549 on June 27, 2007, 05:25:57 PM
Getting there, Look at the spindle setup in mach and see if the PWMbase is set for 50 and min pwm=0

I am assuming here that you are running with PWM control not step/direction??????

For some reason the output from the digispeed is not linear. At 500 rpm it is correct and progrssively gets further from control point as commanded speed is increased. The error doubles as the speed doubles??

 How about emailing Peter and send him your notes on this test and see what he says.

Is the forward / reverse control still working?
Title: Re: Spindle direction control
Post by: tmsmith on June 27, 2007, 06:02:00 PM
Vmax,
Yes I am using PWM and M3 M4 still working as they should.

PWMbase is 50 but I have the minPWM set at 10% - I will try that at 0% tomorrow.

Good idea including Peter I will do that.

thanks,
 Malcolm
Title: Re: Spindle direction control
Post by: vmax549 on June 28, 2007, 09:32:02 AM
I believe you are going to have to adjust the output span of the digispeed to get the total span voltage inline with what the controller wants to see to be acuate. But just thinking out loud. YOu are going to have to limit your top rpm through the digispeed to prevent motor failure. (;-)TP
Title: Re: Spindle direction control
Post by: tmsmith on June 28, 2007, 05:38:20 PM
minPWM setting of 0 makes no difference to the spindle revs/control.
I will check out the digispeed manual re your suggestion.

tmsmith
Title: Re: Spindle direction control
Post by: vmax549 on June 28, 2007, 08:55:58 PM
Did you try setting the pulleys to 0 - 5000 ?
Title: Re: Spindle direction control
Post by: tmsmith on June 29, 2007, 04:18:53 PM
Yes I altered the pulley setting to 0 - 5000.
I have also tried the 'Timing' pins in stead of the 'Index' pin.
For this I uncovered the slots (4) on the sensor disk.
I obtained another straight line graph with I think better control..

Timing  gave   revs=1.35(S)- 650 compared with:-
Index            revs=3.0(S)-1000

On the general config window are 2 options that may be related to spindle control (on the right hand side).
Do you know the function of these?

tmsmith
Title: Re: Spindle direction control
Post by: vmax549 on June 29, 2007, 10:19:35 PM
I beleive the problem starts with the fact that you are over driving the voltage on the motor a good bit. THis throws the control span out of wack. So I think you need to reset the digispeed to output 0-5v instead of 0-10v. THis will get you closers to a normal rpm for the motor. you may have to readjust the span a little to get top rpm. this should put your rpm span  closer to normal and should allow Mach to regulate the RPM closer.

(;-) TP
Title: Re: Spindle direction control
Post by: tmsmith on June 30, 2007, 04:18:52 PM
I dont really want to slow the motor down and I am told it is quite happy running at 4200. This is apparently the normal condition for the Minimill, 130 volts and 4200revs max.
Of course the control system is completely different from normal apart from the Lenze534 speed controller which I managed to obtain second hand..
There are some adjustmants on the Lenze which I think I should check out as well, they may be for just this purpose.

I should be able to check the spindle speed using a tacho later in the week so will see the true speed.

tmsmith