Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Romanr9999 on October 04, 2012, 06:54:29 PM

Title: Can't get G31 to work
Post by: Romanr9999 on October 04, 2012, 06:54:29 PM
I've been trying to test a tool zeroing script and got stuck with G31 command.

For debugging purposes I went to MDI screen and tried the command there and it works funny.
I enter for example G31X10F50 and each time I execute this same command (I tried a hundred times) either X does not move at all or it moves some random length like 0.0125mm, 0.0062, etc.

If I try G0 commands it works perfectly. Same thing on Y axis.

I also suspected that there could be a problem with the probe (I made it myself) receiving 'noise' and giving false signals, so I created a brain that presses the RESET button when the probe signal goes active and this never happens (no reset at all).

Any clues?? What am I missing??????

Title: Re: Can't get G31 to work
Post by: ger21 on October 04, 2012, 07:00:41 PM
Add a line to the end of your script like

Message "Probe Complete"

If you see the message, it's noise. Not sure if noise is enough to trigger the Brain.
Title: Re: Can't get G31 to work
Post by: Romanr9999 on October 04, 2012, 07:13:24 PM
Will try.
What if it is noise?
Probe uses shielded wire with shield connected to 0v. Shouldn't this prevent noise?
Title: Re: Can't get G31 to work
Post by: ger21 on October 04, 2012, 08:10:08 PM
Most add a small capacitor across the input.
Title: Re: Can't get G31 to work
Post by: Romanr9999 on October 04, 2012, 09:34:50 PM
Thanks for the tips.
I added a capacitor across the input and also added separate grounding for both the steppers and all the DC signal side.

I still get the noise :(
Title: Re: Can't get G31 to work
Post by: BR549 on October 05, 2012, 11:23:52 AM
Are you sure it is noise ??  Do you see it activate the Mach3 diagnostic led for the probe input?  Have you tried tripping the probe by hand?

Disconnect the probe from Mach3 and try it. Give it room to move on the machine. If it works then add a short wire and push switch as a test and try it again only trip it by hand.

If that works CHECK your wiring and CONTACTS inside the probe. Could be a bad contact or solder joint.

Just a thought, (;-) TP
Title: Re: Can't get G31 to work
Post by: ger21 on October 05, 2012, 11:33:18 AM
Quote
Do you see it activate the Mach3 diagnostic led for the probe input?

Terry, quite a few users of my Screenset have had probing issues due to noise, and in all cases they can't see the LED activate, because it happens too fast.

I do think he should investigate further to make sure it is noise, though.
Title: Re: Can't get G31 to work
Post by: Romanr9999 on October 05, 2012, 12:03:58 PM
It's definitely noise.
the probe seems to work ok according to the screen LED. The pulse is too fast to be seen on screen.
I disconnected the probe from the board and steppers move the table all the way I say in the command, this never happens if the probe is connected.
Title: Re: Can't get G31 to work
Post by: BR549 on October 05, 2012, 12:42:02 PM
OK then  Can you create a simple leads and switch arrangement to work as the probe. Then test to see if the problem reoccurs?

With your shielded wire are you grounding it on both ends or just one ?

(;-) TP
Title: Re: Can't get G31 to work
Post by: Romanr9999 on October 05, 2012, 01:25:22 PM
Thanks everyone for your help. Specially Gerry.
Got it working finally!!!!!!

I added a few small capacitors (.1uF), one just across the input on the board and another on the chassis probe connector.

It's really nice to see it working now.

Thanks again, your help is great!!!!!!!!!!
Title: Re: Can't get G31 to work
Post by: Romanr9999 on October 05, 2012, 01:26:19 PM
Now to work on my next issue on this machine.
A new topic is surely coming :)