Author Topic: Mach4 and probing  (Read 20712 times)

Mike Abbott

  • Posts: 33
    • View Profile
Mach4 and probing
« on: November 13, 2016, 10:38:32 PM »
I've got a probe setup that does x,y,z probing and connected it up to a pmdx 424.  On the machine diagnostics I see the probe signal working just fine but when I go to use it I periodically (more often that not) get a message saying "Can't transition from MDI RUNNING to STOP".  The probing I'm using is from the Mach4 4.2.0.3124 of the touch menu on the main screen form.  I figured that since the 424 is involved in probing I'd ask here first.

Mike

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: Mach4 and probing
« Reply #1 on: November 13, 2016, 11:10:59 PM »
A couple of things:

(1) There have been several updates/upgrades to the probing code in the Mach4 core and screen sets from build 3124 to 3206 (the latest public release).  My first recommendation is that, unless there is some very specific reason you are staying with Mach4 build 3124, update to 3206.

BEFORE YOU UPDATE YOUR MACH4 VERSION: if your profile name is "Mach4Mill", copy it to a different name.  Installing a different version of Mach4 *will* overwrite the default Mach4Mill profile.  Likewise, if you have made any changes to the screen set, make sure your screen set has been saved to a name that is not "wx4.set".  And let me know if you have made any changes to the screen set.

(2)  If upgrading the Mach4 builds 3206 doesn't fix this, I'd like you to capture a couple of debug log files.  Most of this process is described in our FAQs here:

http://faq.pmdx.com/content/3/3/en/how-to-capture-a-debug-log-file-and-send-to-pmdx.html

After enabling our debug log, exit Mach4 and re-start it.  Then display the Mach4 diagnostic log by going to the "Diagnostic" menu (not the "Machine Diagnostics" tab) and select "Logging".  When the logging window appears, click on the small right arrow to enable the log.

Now try your probing moves.  When the error happens. save the contents of the Mach4 diagnostics log to a file (click on the "Save" button).  The disable our debug log as described in the FAQ, create a profile package and exit Mach4.  Send (or post here) both the profile package AND the saved Mach4 diagnostics log file.

Bob
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

Mike Abbott

  • Posts: 33
    • View Profile
Re: Mach4 and probing
« Reply #2 on: November 14, 2016, 05:59:25 PM »
I updated with the same results so here is the package.  Fortunately I got the error on the first try.  Here are the commands I executed upon starting Mach4:

enable
Reference All Axis
Jog to starting location using pendant

disable/enable (I have no idea why I have to do this after jogging but all the cycle start/feed hold/stop are disabled after jogging)

click touch on the main screen

select the lower left touch button

machine does the z touch and then does the move to find y, gets to the first touch and then
gives the message "Can't transition from MDI RUNNING to STOP"

Mike
« Last Edit: November 14, 2016, 08:28:36 PM by Mike Abbott »

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: Mach4 and probing
« Reply #3 on: November 14, 2016, 09:32:46 PM »
I'll look at the profile a bit later.  Meanwhile, if you see this message and have the time, try this same sequence without using the pendant.  I have been some issues with some versions of the P2S Mach4 plug-in causing invalid motion data during jog moves.  And while I haven't seen it cause this exact problem (with probing after a jog), I would like to try and rule that out.

What version of the P2S plug-in are you running?

And did you capture the Mach4 diagnostics log window messages?  At a quick glance I didn't see anything that looked like that in the profile package.

Bob
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

Mike Abbott

  • Posts: 33
    • View Profile
Re: Mach4 and probing
« Reply #4 on: November 14, 2016, 09:35:31 PM »
I'll be back out at the machine tomorrow afternoon and will get that info.  I think I missed the diag window part (got focused on the debug stuff).  I'll repeat tomorrow and send it all along.

Mike Abbott

  • Posts: 33
    • View Profile
Re: Mach4 and probing
« Reply #5 on: November 15, 2016, 05:05:36 PM »
OK, I did these tests without the PS1 pendant plugged in but the version is FW 1.0 and the software dated on 6/2/2016.  Basically I did a manual jog using the keyboard to get to the starting point and then executed the touch probe for the lower left corner.  I did it twice and it failed in different places but I'm including the log files for each as well as the current copy of the profile package.

Mike

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: Mach4 and probing
« Reply #6 on: November 16, 2016, 03:01:22 AM »
Two things:

(1) It appears that you have the modbus plug-in enabled, and configured to talk to a TCP device at IP address 127.0.0.1 (i.e. this is the TCP "loop-back" address which means the same PC).  Is this intentional?  Do you have a modbus program running on your PC?  I ask because the debug log that you sent is flooded with messages that originate in the modbus plug-in that, in my experience, happen when the modbus plug-in cannot connect to the TCP device.

I don't *think* this is the cause of the problem you are seeing.  This should only be an issue because our plug-in is spending a not-insignificant amount of time dealing with these messages and that *may* be affecting other behavior in our plug-in.  In fact, ALL of the plug-ins are seeing these messages.  If you are not intentionally trying to use a modbus device, please go to the "Configure" menu, select "Plug-ins" and then the "Modbus" plug-in.  In the Modbus dialog, click on the 2nd icon from the left (if you hover over it, it should say "Remove a MODBUS Connection" to remove the unused connection.  Then click on "OK".

(2) In the log file (thanks), I can see the probing motion starting, the probe touching, the probing motion stopping, and the end of "GCode Running" (the probing command, I presume).  All good, so far.  I then see another GCode motion start (I presume this is the MDI command "G 90 F 10" that is shown in the Mach4 log that you sent), and then I see someone else telling Mach to stop.  This does not originate from our plug-in, and unfortunately there is no way to tell WHERE that came from.

SOOoooooo... where to go from here?  The easiest things to try, and to give me time to think of something else to try, are these:

(a) Leave the P2S pendant disconnected.  Go into Configure->Mach, click on the "Plug-ins" tab and disable the P2S pendant plug-in.  Exit Mach4 then re-start it.  See if the probing behaves any differently.

(b) If you still have the probing issue in (a) above, and if you are comfortable using Windows Explorer (or "My Computer") to move files around - Exit Mach4.  Move the P2S pendant plug-in files from the "Mach4HobbyPlugins" directory into some other directory.  I usually create a directory inside the "Plugins" directory called something like "temp" and move them there.  These should be "P2Spendant.m4pw" and "P2Spendant.sig".  Now start Mach4 and run the probing again and see if there are any differences.

After these experiments, restore the P2S plug-in files into the "Plugins" directory and re-enable the P2S plug-in in Mach4, to get things back to your original configuration.

Bob
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

Mike Abbott

  • Posts: 33
    • View Profile
Re: Mach4 and probing
« Reply #7 on: November 16, 2016, 11:16:44 PM »
OK, disabled Modbus, disconnected the pendant, moved the plugins for the pendant out of the plugins directory, same result.

Here are the profile package and the logfile from this test.

Mike

Mike Abbott

  • Posts: 33
    • View Profile
Re: Mach4 and probing
« Reply #8 on: November 23, 2016, 10:03:40 PM »
Just a note but i've got a PMDX 412 that I use for testing purposes on a different computer and I hooked the probe up to it and did a circle center (just ticking the probe by hand) and got the same "Can't transition from MDI RUNNING to STOP" error on my first try.  I did the center again and it did what it's supposed to.  Did it three more times with success on all.

Also did a complete restart of the 412 and mach4 and it didn't repeat the error.

Just another set of datapoints for you.

hooked

  • Posts: 27
    • View Profile
Re: Mach4 and probing
« Reply #9 on: February 20, 2017, 03:14:29 AM »
Mike,

Did you find a solution to this "Can't transition from MDI to stop" error.

I'm setting up a new machine and just trying to do a simple Z axis touch plate instruction gives this error as soon as the touch plate is shorted by the tool.

Cheers

Daryl

Mike Abbott

  • Posts: 33
    • View Profile
Re: Mach4 and probing
« Reply #10 on: February 20, 2017, 11:25:32 AM »
Are you using the touchoff module or the probe screen.  I've not spent much time with the probe screen but the touchoff thing was fixed by increasing the timing in the touchoff module and speeding the feedrate up a bit.  Let me know as I can give some help on one area.

Mike

hooked

  • Posts: 27
    • View Profile
Re: Mach4 and probing
« Reply #11 on: February 20, 2017, 12:04:17 PM »
Hi Mike,

THANKS for the reply.  I'm just using the touch off screen.  If I keep pulling my hair out I will be bald within days.

Also THANKS for your offer to give some direction which is gratefully accepted.

Cheers

Daryl

Mike Abbott

  • Posts: 33
    • View Profile
Re: Mach4 and probing
« Reply #12 on: February 20, 2017, 06:20:21 PM »
OK, here goes...

Fist off, you need to make sure the Probe Feed Rate in the touchoff screen is set high enough.  Mine seemed to have some issues with it moving too slow and giving a false signal.  It'll take some testing to make sure you don't drive a bit through your touch plate (the way I did it was to just put the bit in the tool holder a bit loose so if it didn't stop the probe it could move and not tear up the bit or the part).

The second thing I did was changing the LUA code.  If you're playing with this stuff I'll assume you have some familiarity with your computer so the following file on my system was modified:  c:Mach4HobbyModules/mcTouchOff.Lua

If you search for "CheckProbe" and look at that function there are 2 lines that say "wx.wxMilliSleep(20)".  Change the first one to read "wx.wx.MilliSleep(75)".  You might try fiddling with the number but 75 seems to be where it worked well for me.

Also, to check the probe and the fact it's working right, in that same area on the screen where you click touch there are 4 little boxes.  The one on the left is where mach expects to see the probe so if you test your probe and watch that screen (if it's just z touch then a fairly simple test to complete the circuit).  If that doesn't work then you have a bit more troubleshooting to get the probe working.

That's about all I can think if, let me know how it goes.

Mike

hooked

  • Posts: 27
    • View Profile
Re: Mach4 and probing
« Reply #13 on: February 21, 2017, 03:30:07 AM »
Good work Mike,

I now have it working woohoo.

OK but there still may be an issue.  This is my second CNC build. The first one was using an Arduino based system and was all logical for me.

Example:  When I touch off with the Arduino based CNC, and I touch off the Z position is logical.
Firstly, set Z axis to Zero have retract set at 10mm,  touch plate is 5mm thick - After touch off new Z position shows 15mm

With Mach4 - Set Z axis to zero, Retract set to 10, touch plate 1mm.  My expectation is new Z position after touch off would be 11mm.

However, in the History window I get the Z position after touch off -5.4mm and the current Z position shows 12.6mm 

Nothing seems logical in these figures.

Any ideas????

Cheers

Daryl

Mike Abbott

  • Posts: 33
    • View Profile
Re: Mach4 and probing
« Reply #14 on: February 21, 2017, 08:55:59 AM »
I'm not sure where the retract gets calculated from but a sanity check is simple enough to perform, just do a "g1 z0 f5" or something of that sort and your tool should be at the correct z0.  keep an eye on the machine during that command and get ready to estop if it's driving into something important (like the table) ;-)