G31 Skip is ignored

Help for hardware problems

Moderator: Country_Bubba

Arduino
Posts: 2
Joined: Fri Aug 21, 2015 5:03 pm

G31 Skip is ignored

Postby Arduino » Fri Aug 21, 2015 5:35 pm

I have a strange problem with Mach3 and the AutoLeveler use of G31 skip. The problem is that G31 when executed as g-code from a file, such as AutoLeveler output, is not skipping. Digitise LED works on the diagnostic screen and VB code native to "Auto Level" button on "Program Screen" functions fine. VB script probably works, because it checks directly LED 825, which is the probe LED i.e. Digitize LED on diagnostic screen. G31 when executed, continues stepper travel and does not skip. I suspect the internal register set by the digitise probe LED lighting, is different to the register being read by the G31 command, but that is just a logical guess. The only strange thing about my system, is that I am using MODBUS to send the probe signal to Mach3 via serial. I have written a simple Brain to read the MODBUS probe input and it in turn sets the "Digitise" LED and Digitize output in its lobe terminator. There appears to be a disconnect between the digitiser LED and the register that G31 samples, to know if digitize is active. I have set input port Probe ticked, but because I have MODBUS input, I cannot set the input to a pin for the probe to anything. I am now assuming that this is the 'disconnect' that I have and that G31 is checking this input and not the Digitise LED output. I have also assumed that an input port of zero is treated as a MODBUS input, but I just picked that up from the internet and I do not know how to resolve this lot. I have no parallel port usage and I am using a SmoothStepper for motion control. I also use MODBUS and a Brain to control my Spindle and its inverter.

Any thoughts on my problem please? Thanks.

Arduino
Posts: 2
Joined: Fri Aug 21, 2015 5:03 pm

Re: G31 Skip is ignored ** SLOVED **

Postby Arduino » Sat Aug 22, 2015 8:30 am

Well, as usual for me, I pretty much guessed what was the issue, although without looking at Mach3 code, I will never know for sure. My premise is that the digitise LED on the Mach3 diagnostics screen, is purely that, an LED in software, which lights when a Probe input is detected by Mach3. This is the important bit in my assumption: Mach3 has several ways of getting input from a real probe and internally sending the signal to the LED illumination software in Mach3. The obvious way is through the regular parallel port. There are also other inputs available, like the use of a SmoothStepper or a MODBUS serial or TCP/IP connection. From what I have ascertained, only input to Mach3 through the regular parallel interface, will forward any probe digitise signal to MACH3s G31 skip register. All other methods purely just forward the probe signal to the digitise LED on the diagnostics screen. As native, Mach3 has a "Auto Tool Zero" button on the "Program Run" screen, which correctly works with a probe connected to any Mach3 input source (MODBUS in particular to me). However, it only works because it reads the status of the Digitize LED on the Diagnostics screen (LED 825 in Mach3 code terms), so of course it will work. G31 clearly has no relation to the digitise LED and does not know or care if it operates. G31 appears to only get a skip register signal from Mach3 regular parallel port input (Probe) pin. Therefore, the lesson here is, with Mach3, do not assume, because a software LED lights or something else actions, from one of your inputs, that g-code commands will always respond to it. I solved my problem by connecting my probe to SmoothStepper pin A1 and setting Probe in Mach3 input panel to Port 3, Pin 1 and setting the flag for inverse signal. I will use MODBUS and my Arduino code purely for outputs from Mach3, from now on. I hope this long winded monologue helps someone else!

daedelus
Site Admin
Posts: 272
Joined: Tue Oct 01, 2013 1:41 pm
Location: London, UK
Contact:

Re: G31 Skip is ignored

Postby daedelus » Wed Aug 26, 2015 10:35 am

Thanks :) Yes it often helps me to think and write things down like this too in finding a solution.
http://www.autoleveller.co.uk/. Software to probe and adjust a GCode file for PCB's or any probe-able surface.

http://www.autoleveller.co.uk/cnc-probe-guide/. A short guide to setting up the probe.

-James


Return to “CNC Hardware”

Who is online

Users browsing this forum: No registered users and 1 guest