Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: terryset on October 19, 2013, 03:43:05 PM

Title: mach 3 spindle rpm display
Post by: terryset on October 19, 2013, 03:43:05 PM
Hello all - I have Demo R3.043.066, Sherline mill setup, Sherline/Wettroth DRO and six-sector sensor, Homann DC-04 speed control (pulse width modulation) and spindle rpm sensor interface, CNC4PC breakout boards, Win7.

Power to the hardware DRO spindle sensor is from the Homann boards.

Spindle rpm sensor wiggles the input in mach with manual motion. After trying index and "multi" inputs, many ways, I cannot get any rpm display in Mach.  Varied the debounce, active high/low, pullup/pulldown resistors, everything I could think of. I tried masking the multi sector spindle disk to one sector.

I don't see how Mach knows if the index is single or multi per revolution.

I'm a newbie, probably it is me.

TerryS
Title: Re: mach 3 spindle rpm display
Post by: Hood on October 19, 2013, 05:48:26 PM
You can only use Index in Mach now as Timing is no longer used.
For Index it is 1 slot per rev although having more will jus show as multiple revs per true rev. One thing however is it may be that the slots are too narrow and close for Mach to see if there are multiple slots.
What is your Index Debounce set to?
Are you telling Mach the spindle is on by calling M3/M4 or pressing the spindle button?
If you want to attach your xml I will have a look through it to see if I see a problem.

Hood
Title: Re: mach 3 spindle rpm display
Post by: terryset on October 19, 2013, 06:50:02 PM
thanks, yes on M3, index debounce has been set at 100, 75, 50, 25...

xml attached; newbie so it might be something you wouldn't normally expect.

TerryS
Title: Re: mach 3 spindle rpm display
Post by: Hood on October 19, 2013, 06:57:28 PM
Are you sure that is the correct xml? There is no index set up in that one at all. Also no spindle set up either.
Hood
Title: Re: mach 3 spindle rpm display
Post by: terryset on October 19, 2013, 10:29:10 PM
Hmm - I start mach with the desktop icon named tasmill.  So I assume this is the correct xml file, at ...Program_Files\Mach.
I have enabled a port/pin for index.  I have gone through the spindle setup page.  The original xml was sherline_mill_inch, I believe. Sherline_mill_inch does look different, tasmill seems to be formatted poorly, not sure why.

Maybe I need to start over with sherline_mill_inch, try adding spindle outputs and inputs again? Lots of reconfiguration/repetition/tries may have hosed the xml file?

Terrys
Title: Re: mach 3 spindle rpm display
Post by: Hood on October 20, 2013, 05:38:26 AM
Unless you told Mach to install to Programme Files then the location will be just C:\Mach3

Hood
Title: Re: mach 3 spindle rpm display
Post by: terryset on October 20, 2013, 09:42:49 AM

ok, program files is not in the path; also, the icon .exe doesn't point at an xml file of the same base name(I thought it did) therefore my current xml file is this one:

Hard for me to read, many fields are effectively misnamed by the code? Hopefully one does not have to resort to editing the xml files.....but, maybe that's the way, start with sherline_mill_inch, configure with the gui, then edit xml to achieve PWM spindle speed control and spindle index rpm display? Or else what to do(only) in the gui to get PWM and rpm display?

TerryS
Title: Re: mach 3 spindle rpm display
Post by: Hood on October 20, 2013, 12:04:05 PM
Yo dont edit the xml at all, you do it all within Mach, and when you close Mach it writes the settings to the xml.
Hood
Title: Re: mach 3 spindle rpm display
Post by: terryset on October 20, 2013, 12:30:29 PM
thanks, I'm not sure, but it appears that only setting the index input pin is required for proper rpm display; however, that is not working on my install/config. If I want the multi-sector sensor for the hardware Wettroth DRO, looks like I would need two sensors and two sensor disk patterns, also.

TerryS
Title: Re: mach 3 spindle rpm display
Post by: Hood on October 20, 2013, 01:35:23 PM
Sorry I am not following what you are meaning.
Mach requires a single pulse per rev. Also if using the parallel port rather than an external controller, the pulse has to be long enough for the driver to see, if your disc is small diameter and has more than one slot you may have problems.
Hood
Title: Re: mach 3 spindle rpm display
Post by: terryset on October 20, 2013, 03:00:04 PM
ok, thanks, I have multi sector, fairly small wheel(Sherline) using parallel port. I also have masked the wheel so that it has only one sector. It seems that it should work at low rpm, no?  What do you think about raising the pulse engine rate from 25,000? I have a desktop 3GHz Pentium with 2Ghz of ram.

The rpm signal is only about .1 kilohertz or so; should be a piece of cake for Windows and Mach, I would think.

Since I do see the index line flipping on the diagnostic screen when moving the spindle by hand, it would seem that something in wrong in Mach or my Mach config...Any idea what the debounce should be?  My debounce parameter asks for a number, which the gui shows to be multiplied times 40 microseconds.  I am thinking 2-4ms debounce times should be about right. There is signal cleanup hardware in the Homann speed control, I think. 

Mach does know the spindle is on; Mach is controlling the Homann PWM spindle controller very well.

You may be on the right track, the rpm does work up to about 10 rpm. Mach is only doing the PWM spindle speed at this point, axes are not moving, no G code program running.
Title: Re: mach 3 spindle rpm display
Post by: Hood on October 20, 2013, 03:04:34 PM
Index debounce should be low, its been a long time since I used the parallel port but any time I had more than zero then I got poor readings. Some people find that somewhere up to 10 is what they need but it will , I suppose, all be dependant on what hardware you are using.
Hood
Title: Re: mach 3 spindle rpm display
Post by: Fastest1 on October 20, 2013, 03:38:15 PM
I would think with a possible rpm of 24000 and a single pulse per revolution, the debounce would have to be very low as Hood is saying.
Title: Re: mach 3 spindle rpm display
Post by: terryset on October 21, 2013, 11:47:21 AM
24000?  air spindle? Sherline spindle is 2800 or 1400 rpm max.... It looks like my best bet is to try older versions of Mach....
Title: mach 3 spindle rpm display
Post by: Fastest1 on October 21, 2013, 12:32:05 PM
I believe Sherline also has a 10,000 rpm option. There is more TIR on that spindle IIRC.
Title: Re: mach 3 spindle rpm display
Post by: Hood on October 21, 2013, 01:13:10 PM
Older versions of Mach are unlikely to help as even if you use the Timing input then I seem to recall one had to be larger than the others and that was treated as the Index.
Hood
Title: Re: mach 3 spindle rpm display
Post by: terryset on October 21, 2013, 02:15:13 PM
thanks, I could maybe use tape to make one larger; any idea where to get older (than 2013 on the ftp site) versions of Mach?
Title: mach 3 spindle rpm display
Post by: Fastest1 on October 21, 2013, 08:43:26 PM
The Mach site has an area with previous versions IIRC. I have been using a strip of electrical tape for a lot longer than I anticipated. It works.
Title: Re: mach 3 spindle rpm display
Post by: Hood on October 22, 2013, 03:15:47 AM
The versions on the ftp go way back to the beginning, the dates at the side are not version dates but rather must be when the ftp was set up or re-organised.
Still think you are farting against thunder when trying to use an older version to get this to work, my thoughts are to set up something you know will work rather than trying to make this work. Just my opinion of course ;)

Hood
Title: Re: mach 3 spindle rpm display
Post by: terryset on October 22, 2013, 07:16:10 AM
thanks to all; I tried an old version and backlash was broken there. It seemed to me that rpm was likely to work, and fairly important.  But I do have the hardware DRO unit; I guess I'll go with that. 
Title: Re: mach 3 spindle rpm display
Post by: B3030 on February 08, 2014, 11:06:32 AM
Terryset,

Did you ever get this worked out?
I also have the Digispeed DC-04 on a Sherline with the DRO and am having trouble getting RPM to display in Mach 3.

Homann support verified that only one pulse per rev is required for the Index input, and that the Index pulses are passed through the DC-04 even if the switch is set to manually control the spindle with the pot.  I covered all but one black segment on the standard Sherline disc with white tape.  Now I wonder if it should be all (non-reflective, flat) black with only one narrow (reflective) white segment. 

Your thoughts?

B3030