Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: flenser on February 27, 2010, 10:15:02 AM

Title: lathe threading problem - ghost trigger
Post by: flenser on February 27, 2010, 10:15:02 AM
Sorry if this has been covered before. I spent a while looking for related issues without success. You can probably skip over all but the last two paragraphs. I don't think the problem has anything to do with my wiring.

I started with the CNC4PC index pulse card, and setup the index with a slotted disc pretty much as described. I mapped it to an input port, enabled the spindle output (not sure why this is required), and entered an m3 command. The spindle RPM reads correctly.

The code produced by the threading wizard, however, appears to start each pass without waiting for a pulse. I thought I might have a noise problem, checked the signal with a scope, but it looks fine. I then switched to using a hall effect sensor I had laying around, and while the RPMs still read correctly, the gcode from the thread wizard still starts seemingly without waiting for a pulse.

OK, I mapped the index input to the estop input to make sure it stayed off, disabled the spindle output, turned off the spindle: true RPM reads zero. I run the code output by the wizard in diag mode, and the index led remains off the entire time. I see the wait for trigger led come on, then go off and a thread pass is started. Where is it getting the trigger?

I started with the latest version, but removed it and installed version 033 based on recommendations in numerous threads.

Thanks - Jeff

Title: Re: lathe threading problem - ghost trigger
Post by: Hood on February 27, 2010, 10:40:59 AM
Can you attach your xml please.
Hood
Title: Re: lathe threading problem - ghost trigger
Post by: M250cnc on February 27, 2010, 10:58:45 AM
Try ading a delay to the spindle

Config, ports Pins, Spindle Setup

You may need to adjust the delay to suit, try 3 seconds to begin with.

Phil
Title: Re: lathe threading problem - ghost trigger
Post by: flenser on February 27, 2010, 11:43:32 AM
I attached my xml file. It should be very close to the default machturn file.

Setting spin up and down delay didn't have an effect.

Thanks - Jeff
Title: Re: lathe threading problem - ghost trigger
Post by: RICH on February 27, 2010, 12:03:03 PM
G32 ( threading ) is just like a G1 ( linear move ) except the g32 requires Mach to recieve a timing index pules to activate the move.
RICH
How many sensors does your Hall effect sensor have? Mine has two and you only want one of them sensing the magnet.

I take a quick look at your xml.....
Title: Re: lathe threading problem - ghost trigger
Post by: RICH on February 27, 2010, 12:10:27 PM
you have Disable Spindle Relays checked in ports and pins > spindle setup for the relay control.
uncheck it
see the comment above figure 7.1.2 in the threading on the lathe write up.

RICH

Title: Re: lathe threading problem - ghost trigger
Post by: flenser on February 27, 2010, 12:17:50 PM
I had them enabled originally. Spindle RPM won't read unless they are enabled. I disabled them to try to eliminate all possible sources of the trigger the threading code is getting.

If I understand correctly, it should hang forever on g76 without a trigger.

It doesn't hang with or without the spindle relays enabled. It makes cutting passes as if it's getting a trigger, but it isn't getting one. Not from me, anyway.

Jeff
Title: Re: lathe threading problem - ghost trigger
Post by: flenser on February 27, 2010, 12:21:08 PM
I have one sensor in my hall effect sensor. It has 3 wires: power, ground and sink. I get one pulse per pass with a magnet.
Title: Re: lathe threading problem - ghost trigger
Post by: RICH on February 27, 2010, 12:49:55 PM
Well somewhere you must be getting an index pulse that Mach recognizes.

Turn off you controller and just  dummy run the code and you will see ( or should see ) that you get an error message
and the threading program won't run without an index pulse. So that would tell you that your software is working right.




Title: Re: lathe threading problem - ghost trigger
Post by: flenser on February 27, 2010, 01:41:32 PM
It took me a little while to figure out I can't disable the estop input. I just assumed it worked when I clicked apply and closed the dialog. Mach3 must re-enable it somewhere along the way :)

With the controller off, I switched the estop input to active low so I could make a dummy run. It still appears to be getting a trigger. The wait for trigger led comes on then goes off half a second or so later, and the output shows it is making a threading pass. The index input is still mapped to the same input as estop (also active low). The index led never comes on.

Title: Re: lathe threading problem - ghost trigger
Post by: flenser on February 27, 2010, 01:52:18 PM
Er, if I disable the index, the thread routine does hang as expected. If I map it to an input, any input, it functions as if it's getting a signal. It makes no sense to me that I can map the index and estop signals to the same input, and get an index signal without also getting an estop signal.
Title: Re: lathe threading problem - ghost trigger
Post by: RICH on February 27, 2010, 02:14:18 PM
Try the attached xml to do a dry run. Disconnect any connections from the controller, bob,  from the computer.
Then run a threading code. I use ver 033 and with the attached xml and a G76 code output from the threading wizard
the program will not run any further than the G76  becasue it is waiting for an index pulse.

I have changed the index Estop to emulated and left the pin out alone. Even if the E stop is not emulated the program stops
at the g76 code line.

RICH

Title: Re: lathe threading problem - ghost trigger
Post by: flenser on February 27, 2010, 02:33:32 PM
It doesn't stop at the g76 line. I just disconnected the PP and loaded your XML...

Do I have a bad installation or something? When I went to 033, I uninstalled and deleted everything Mach3 related on the drive, then install 033. I reconfigured all the inputs manually rather than using an existing file. However, I did copy the wizards from the original installation.

I can give you a remote desktop connection if you're willing. With the PP disconnected, nothing can move and get broken :)

Title: Re: lathe threading problem - ghost trigger
Post by: RICH on February 27, 2010, 02:38:16 PM
do you use skype?
RICH
Title: Re: lathe threading problem - ghost trigger
Post by: flenser on February 27, 2010, 02:41:04 PM
No, sorry. I've set it up for others, but never got around to getting a mic for myself...

I don't have a problem calling, though. It's free for me anywhere but Asia...
Title: Re: lathe threading problem - ghost trigger
Post by: RICH on February 27, 2010, 02:51:01 PM
Quote
Do I have a bad installation

Well that's what i was kind of thinking. If you don't anything connected that would send any signals to Mach, then it should stop at that
g76 line, yes there will be simulated preliminary moves, but it should not go any further than the call for threading.
You had other versions installed before 033. So the pc could be using a wrong driver, or if you have multiple installations, it could be taking the first exe it finds....etc.   I always do a computer search for any  MACH.exe or sys and delete all of them the search finds and
then do a reinstall. But that's just what i do.   SO could be, but i didn't want to tell you to go through a new installation and clean out the PC  for no reason.

I will send you a PM and we can have a quick call and discuss.
RICH
Title: Re: lathe threading problem - ghost trigger
Post by: flenser on February 27, 2010, 03:51:30 PM
That fixed it. The last time I uninstalled everything I must not have deleted that rogue mach.sys driver. I deleted that, uninstalled Mach and deleted the folder, then restarted just for good measure. The new installation stops on the g76 line like it's supposed to. I haven't had time to reconnect the hardware, though. I've used up my play time for today, so I'll work on it tomorrow.

Thanks for all the help. And thanks for the lazyturn tip. Another new toy... it's like Christmas :)

Jeff
Title: Re: lathe threading problem - ghost trigger
Post by: RICH on February 27, 2010, 03:56:02 PM
I guess the the correct toe was cut off....... ;D
Glad it worked! ;)
RICH
Title: Re: lathe threading problem - ghost trigger
Post by: flenser on February 28, 2010, 08:11:54 PM
Hmm, I may need to cut off a second toe.... Now it always stops on the g76 line after getting an index pulse. I tried switching to g32 mode, but it does exactly the same thing.

I returned to using the CNC4PC index pulse card, mostly because it produces a nicer wave on the scope. I cut a large, 10 degree, slot just in case there was some sort of read issue that somehow affected the sync pickup and not the RPM DRO. True RPM is very accurate and matches what I see on the scope perfectly. I've tried running as slow as 170RPM and as high as 780RPM with the same result.

There are some old PCS piled in a heap at work. I'm considering grabbing one on the way out tomorrow and trying that to see if there might be something wrong with the PC I'm using now. I know that doesn't make a lot of sense, but I'm out of ideas.

I also figure I can have the gearbox and lead screw back on the thing in about 30 minutes. I have one part to make for the mill I'm CNCing, and that project has stalled waiting for me to figure out this one "small" threading problem :)

Jeff

Title: Re: lathe threading problem - ghost trigger
Post by: RICH on February 28, 2010, 08:46:24 PM
Jeff,
Attach you current XML
RICH
Title: Re: lathe threading problem - ghost trigger
Post by: flenser on February 28, 2010, 09:04:29 PM
Uh, never mind... It was user error. I dropped the license file one folder off when I reinstalled everything. I remember reading in the threading docs that it was required, but didn't think to check it. I was actually playing with the new XML viewer when I spotted "demo version" and guessed immediately what was wrong.

Jeff