Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: jasminder on February 23, 2011, 01:18:49 AM

Title: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: jasminder on February 23, 2011, 01:18:49 AM
hi,
i am jasminder singh from india. i just built a cnc lathe running mach3 with a pci parallel port. here is build log on cncnzone:
http://www.cnczone.com/forums/mini_lathe/107017-10x7_home_made_cnc_finish.html
 
i am getting a strange problem.The spindle dro is not working in mach3 turn. the index led blinks in the diagnosis screen when moved with hand slowly it means that mach is receiving the index pulse. but why no rpms are show (just 1 is displayed)
The spindle speed is chaning when jogging the z and x of my lathe. Spindle slow downs when axis moves towards the chuck ( same is with both x and z axis). Please suggest. I have tried reinstalling mach3 (2.0somthing version) and changing the debounce and index delay too.

many thanks,
jasminder singh
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on February 23, 2011, 03:08:35 AM
That would seem to be a very old version you are using, have you tried upgrading to the latest?
Can you attach your xml in case you have a config issue.
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: jasminder on February 24, 2011, 09:44:23 AM
thanks hood for your help.
here are the two xml files one from the older version 2.0 and the new one 3.0. \
the problem still exists.  the spindle index is being sensed but no rpms in the dro.
the changing speed while jogging is gone now. i don't know how.

Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on February 24, 2011, 10:03:09 AM
You do not have the Index Input enabled, you have the port and pin set but not enabled.
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on February 24, 2011, 10:11:18 AM
Oh also meant to say if you are planning on threading or using feed per rev (G95)  you will need to enable "Use Spindle Feedback in Sync mode" Its on Ports and Pins, Turn Options.

Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: jasminder on February 24, 2011, 01:58:39 PM
dear hood,
i saved the xml file when i was trying different settings for mach3 but when i was trying to get my dro work, the index was enabled. ( the index led in diag. screen does not blink if the index is not enabled in the settings) shortly, it wasnt the problem but just a mistake by me.
any other cause or possibility for mach not to show rpms?
i installed the newest version but still the problem is same. before yesterday, the dro was working correctly. i replaced one of my stepper driver and the problem begins.
i am failed to find out where is the problem. The index sensor is giving active low pulse from 4.2V to 0.80V. Mach3 is sensing it but where the problem begins?
i will trying feeding the index pulse directly to my parallel port and see if the bob or something else is coming in the way.

any suggestions are welcomed,
jasminder singh
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on February 24, 2011, 02:10:57 PM
Go to General Config and set Index Debounce to zero and see if that helps.

What are you using for an index pulse?

How are you starting the spindle?
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on February 24, 2011, 06:50:35 PM
I am managing to replicate your problem here but I have not been able to work out why. You had the Turn Diagnostics plugin enabled and it shouldnt be, but that didnt help. You also had Timing enabled which is no longer used in Turn, but again that didnt help. Might just be best to start with a fresh xml and see if that cures it.
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on February 24, 2011, 07:15:09 PM
Ok just found your problem, you have Spindle pulley 1 set up with a 0 ratio :)
Other things to do
Disable the Turn Diagnostics plugin and restart Mach
Enable feedback in sync mode )ports and Pins Spindle Setup page)
Disable Timing input
Possibly set the Index Denounce to sero.
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: jasminder on February 25, 2011, 10:32:18 AM
many thanks hood. you are awsome.
i have doubt now when people call me intelligent.
it is working now. But i don't know why the m30 rewind program command is not working. may be there is something new in latest version. i will google it.
can you help me setting up the pulley ratio?
the motor is having a 5 inch pulley and the spindle is having 4 inch. max rpm of motor 1370.
what wud be the ratio and max rpm at spindle?
i don't have techometer but my cal says spindle will have max of 1500 rpms. but not sure.

thanks again,
jasminder singh
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on February 25, 2011, 10:45:14 AM
Do you see the M30 in the code window? If not then you will need to make sure you have ended the block in your code by pressing the Enter key after the M30, either that or put a % on the line after the M30.

 Motor pulley is 1.25 times  larger than spindle pulley so spindle should go 1.25 times faster than the motor, so I make that 1712.5rpm.

Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: jasminder on February 25, 2011, 11:33:30 AM
ooops , no enter after m30
i got it. thanks.
i just felt that i am missing steps. any good diy servo controller built out there you may know? i want to start with atmega16 and an hbridge circuit that i have on my hands. i have a quad encoder with 400 ppr. sorry but no uhu based controller. any atmega16 code may help to get a good start.
thanks again,
jasminder singh
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on February 25, 2011, 01:42:41 PM
Afraid I dont know of any DIY servo drives :(
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: jasminder on February 26, 2011, 01:34:03 PM
cool,
one more thing if you can tell about.
its about writing a macro in mach.
i want to write a macro in mach3 that will get input from a encoder attached to the stepper motor. No matter which direction, this macro will see if a pulse was given to a stepper driver (or a parallel port pin assume 2) but there was no output from the encoder and will then reset mach3 and display a message saying that motor is missing steps.

I want to know that-
1. is this possible?
2. can mach3 take ttl level inputs at the intervals of 5 us?
3. can mach3 run both the program and the macro all the time along with it to monitor the input.

i am pretty sure that you will have good knowlegde about it.
buying a servo isn't a good option this time for me. may be i can save my workpiece from being scraped this way.
thanks,

jasminder singh
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on February 26, 2011, 08:19:02 PM
You can do it if you use one of the encoder inputs. How effective it will be I am not sure, there is a board that does exactly what you are wanting, here is a link http://rogersmachine.net/encoderinterface.html
I think it uses a plugin rather than macropump now but it originally had a macropump.
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Geoff Ford on April 06, 2011, 11:21:19 AM
Following on to the previous answers I have tried all the actions suggested and still cannot get the speed read out to indicate.
If I rotate the spindle by hand with the diagnostic screen on I get a green light each time the magnet passes the hall effect chip
When I first got it  going all worked ok and I even cut my first screw. However without any speed indication I am stuck
The installation is on a Myford ML7 lathe and all other things seem 100%
Wiring and routing of it are unchanged
I get 5 v out of the hall device as it passes the spindle magnet. I do not know how to post an .xml file either.

I 'm  a bit desperate for help and hope someone can do
Geoff Ford Cape Town
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: jasminder on April 06, 2011, 01:33:50 PM
Following on to the previous answers I have tried all the actions suggested and still cannot get the speed read out to indicate.
If I rotate the spindle by hand with the diagnostic screen on I get a green light each time the magnet passes the hall effect chip
When I first got it  going all worked ok and I even cut my first screw. However without any speed indication I am stuck
The installation is on a Myford ML7 lathe and all other things seem 100%
Wiring and routing of it are unchanged
I get 5 v out of the hall device as it passes the spindle magnet. I do not know how to post an .xml file either.

I 'm  a bit desperate for help and hope someone can do
Geoff Ford Cape Town
dear geoff,
there will be a mch3turn.xml file in your system folders where mach is installed (it is where the macros are saved on you c drive)
have you set up pulley ratio?
it should not be set to 0
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Geoff Ford on April 07, 2011, 02:14:47 AM
Thanks a lot
Yes the pulley ratio is set to 1.
Is this the file that is needed to look at my set up mach3 turn.xb74
If it is how do I send it to the thread.
I tried to cut and paste but no joy. I can e mail as an attachment but to get it on here is beating me
Geff Ford Cape Town
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on April 07, 2011, 03:25:54 AM
That is one of the backups that Mach makes, you are looking in the backup folder but the one you really want (current one)  is in the main Mach3  folder, not the backup folder.
You can attach by using the additional options button on the reply page, yo will need to rename the xml first though as the forum only accepts a file name once, so copy to your desktop, rename to GeoffFord.xml and attach.
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Geoff Ford on April 07, 2011, 10:49:25 AM
iHope this is ok Thanks for your patience
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on April 07, 2011, 11:10:47 AM
If that is the correct xml then you do not have the Index (in Ports and Pins, Inputs) enabled and set up, also you have an Index Debounce (on General config page) of 100, that will likely need reduced to zero or near.
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Geoff Ford on April 08, 2011, 05:24:03 AM
Thanks Hood,
I am not sure if the file was the correct one as I cannot find out where the file produced in CONFIG -  Save is located.
I have saved several times but nothing appears in the mach set up folder area .I
checked that index was enabled and it was. Also set debounce to zero but speed still not registering.
In diagnostics the index led is flashing at rates which differs with speed alterations.At 40 rpm it is a strong pulse at about second intervals.
I did the auto check in inputs and it correctly found index enabled and port
I am going to reload mach 3 rdo the set up and see if that does anything
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Geoff Ford on April 08, 2011, 06:32:46 AM
Dear Hood
reloaded and reset up did nothing to solve my problem.
Could the signal shape or width or something be my trouble.
Getting to the limit of my expertise, not too high in any case
Geoff Ford cape Town
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on April 08, 2011, 06:58:33 AM
Ok the xml you want is for the profile you are using. If you use the standard Mach3Turn profile it will be found in C:\Mach3 folder and be called Mach3Turn.xml, If you use a custom profile it will have the name of thecustom profile.
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Geoff Ford on April 09, 2011, 06:53:02 AM
Ok I have reloaded and set up and this is the setup xml I
hope
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on April 09, 2011, 08:26:20 AM
Still no Index set up in that xml, see screenshot.
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Geoff Ford on April 09, 2011, 11:42:23 AM
This should be the latest xml. I checked that the index was enabled in the set up pins &ports
Does the save settings in config produce another xml each time you press it ?
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Geoff Ford on April 09, 2011, 12:03:35 PM
should be here an xml
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on April 09, 2011, 12:14:04 PM
Ok, Ports and Pins, Spindle Setup, take the tick out of the disable spindle relays box. I see you are using Outputs 1 and 2 so if that is not meant for the spindle put 3 and 4 in the M3 and M4 box on the spindle setup page.

Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Geoff Ford on April 13, 2011, 11:12:02 AM
Hi Hood
I have done all the suggested without any joy and have rebuilt the hall effect sensor with a new chipand still do not register any speed indication.
I have had a scope on the output to the opto isolator and then after it and before the pc parallel port. Both show the pulse is apparently ok. A meter on the output shows +5v when the thing triggers
I have set the config up exactly as recommended by Tony Jeffree in his article which I used to build up the system to convert my ML7 to CNC and everything is working well save for the speed read out
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on April 13, 2011, 11:15:53 AM
You still have the relays disabled.
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Geoff Ford on April 13, 2011, 12:11:01 PM
I am not using any relays other than the estop contacts on the external relay energised by the motor starter.
I will enable the relays as you suggest
Thnaks Geoff
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on April 13, 2011, 03:23:11 PM
Yes I know but as I said earlier you need to have the relays enabled even if they are set to outputs you are not using and also you need to tell Mach the spindle has started by either commanding a M3, M4 or pressing the Spindle button. If you dont have either of these then you will not see the spindle speed displayed. This is just when using the parallel port though, if using an external device such as the SmoothStepper then these steps are not needed.
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Geoff Ford on April 14, 2011, 08:08:22 AM
Hi Hood Hope you are not losing hope with me
Done as you say and attach the latest .XML file . Can you see anything wrong ?
when I go to turn should the spindle revs appear without further key strokes ?
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on April 14, 2011, 08:31:58 AM
You still have the tick in disable spindle relays as in the last pic posted, you need to enable them.
Load this xml, switch on spindle (button in Mach) and see if it works.
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Geoff Ford on April 14, 2011, 09:36:53 AM
Dear Hood
 You are so good to have stuck with me and I cannot thank you enough. The pressing of the mach spindle button did the trick.
I had wrongly assumed that this only applied when the spindle was under a speed control or via the program and since I only have the on/off lathe motor switch I never pressed it.
thanks now I can get on with some screwcutting
Cheers Geoff Ford Cape Town
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on April 14, 2011, 10:31:32 AM
Glad you got it :)
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: crozjota on May 08, 2012, 10:00:08 AM
Hi All,
Sorry if I am "highjacking" this thread but can a NPN proximity switch work as a spindle RPM counter? and if so are there any available suitable for 5V supply from the BOB? or, do I have to use an optointerrupter? and if so how do I connect the cathode/anode wiring? I am converting an Orac, mine had reflective strips on the disc rather than the segmented one. I have looked at OPB917B  on the RS website, I'm not a "spark" so excuse me for the lack of ability I undoubtedly show! ;D
Regards,
Wayne
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on May 08, 2012, 11:11:58 AM
I have used both the OPB 916B and 917B and they work well, all you need apart from them is a 220ohm resistor to limit the current to the switches LED (and of course  a slotted disc).
To wire you connect the Green and Black wires together then connect them to your 0V (Gnd) on your breakout the Red wire connects to 5v on your BOB but with a resistor in series so that you limit the current to the LED. The White wire connects direct to the 5V and lastly the blue connects to a spare input on your BOB.

Some people use prox switches but I have never so cant suggest which one would be suitable.
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: crozjota on May 09, 2012, 04:43:56 AM
Thanks for the info Hood, one on order from RS as I type!
Regards,
Wayne

Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: crozjota on May 11, 2012, 07:22:12 PM
Hood,
OPB917B arrived, bracket fabricated, installed and everything up and running perfectly! Thank you very much for your help and advice!
Regards,
Wayne
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Hood on May 12, 2012, 01:48:57 AM
No probs :) It was advice I got from John Prentice about 7 years ago that put me onto the OPB 917B so glad I could pass it on :)
Hood
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: MojsterMiha on September 19, 2020, 07:27:34 AM
Hi

I have read this topic few times but I cant solve problem with spindle speed DRO on my lathe.
Index LED works on the diagnostic screen. Spindle relays are enabled, spindle feedback in Sync. modes enabled,
tried different settings of Index debounce (0- 300), M3 command to run spindle....NOTHING :-[

Spindle true speed starts at S-command value and goes slowly to 0 and stay there...

I would really need index - true spindle speed for threading...

Could someone help with some new suggestion?

Thanks

Andrej
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Graham Waterworth on September 19, 2020, 06:47:20 PM
What do you have for the index pulse?
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: MojsterMiha on September 23, 2020, 02:35:39 PM
Inductive PNP switch

Connection between PC and hardware is through NVUM V2
I have found few posts about this board and unfortunately the information are not good - it seems this board is a sh*t.

In the next days I will try with standard LPT breakout board.
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: Graham Waterworth on September 23, 2020, 07:11:00 PM
The NVUM is not a good option.  You will have much better results with a standard LPT board.
Title: Re: mach3 turn spindle dro not working, spindle speed changing while jogging
Post by: MojsterMiha on September 26, 2020, 02:35:25 PM
Unfortunately LPT is not an option... my laptop doesnt have this port  :(

Is there any option to get index working on NVUM-V2?

Did anybody succeed to get threading with NVUM-V2?

Thanks