Author Topic: MDI movement using G-Code different to jogging  (Read 11837 times)

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
MDI movement using G-Code different to jogging
« on: March 10, 2015, 09:16:52 AM »
This thread is copied from the original starting thread on the MachSupport Mach4 forums (http://www.machsupport.com/forum/index.php/topic,29440.0.html) to continue the (presumed) PMDX-SmartBOB debugging here on our forums.  The final resolution will be cross-posted back to the original MachSupport thread. 

Here is the original pertinent info from NeilD321:

I am finalising the setup of my new machine and have discovered something I don't understand.
I have setup a pen where my end mill will be to test that all works correctly.

If I set the pen on some paper and zero all axis I can draw a perfect 2 inch by 2 inch square by just jogging the X and Y axis to 2.0 and back while watching the RDOs.
I assume this means I've managed to set the motor and axis parameters correctly.

So I moved to issuing MDI G-code commands to start learning what is what.
But if I, again, put the pen on the paper and zero the machine and then issue a G01 X2.0 command, I expected the machine to move 2.0 inches on the X axis.
It didn't. It moved 0.8142 inches.
To make matters worse, if I now press "Go To Zero" the X axis moves but ends up at -0.2576 in the RDO.

I have the PMDX-422 SmartBobUSB
MACH 4 build 4.0.1.2230 on Windows 7
SmartBobUSB Plugin version 0.17.86
Boot loader: 1.5.58
Firmware: 0.32.104

I have the Velocity Units/Minute set to 31 for all motors.

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

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: MDI movement using G-Code different to jogging
« Reply #1 on: March 10, 2015, 10:05:19 AM »
I want to try and replicate this behavior here.  Would you please send me a copy of your "Machine.ini" file from your Mach4 profile.  See the FAQ here for where to find this file.

http://www.pmdx.com/PMDX-Forums/index.php?topic=75.0

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

neilD321

  • Posts: 19
    • View Profile
Re: MDI movement using G-Code different to jogging
« Reply #2 on: March 10, 2015, 07:03:56 PM »
Machine.ini attached (although disallowing the upload of file types ending in .ini is a little unfriendly)

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: MDI movement using G-Code different to jogging
« Reply #3 on: March 11, 2015, 04:01:40 PM »
I am still unable to replicate the movement issues you are seeing.  So....  I would like you to run a test for me.

Here is how to run the test:
- Find the directory with your Mach4 profile (if you installed Mach4 Hobby in the default directory this would be "C:Mach4HobbyProfilesYourProfileName")
- In that profile directory, rename your current "Machine.ini" file to something else like "Machine_safe.ini"
- Download the attached INI file and copy it to your profile directory (in place of the file you renamed above)
- Run Mach4, jog the machine to X=2 then X=0 (and also the Y axis) as you did in your initial tests
- Execute the "G01 X2.0" MDI command
- Click on the "Goto Zero" button.
- Note the ending position shown in the DROs
- Exit Mach4
- Delete the "Machine.ini" file in your profile directory and rename your "Machine_safe.ini" back to "Machine.ini".

Find the following 3 files and send them to me (the directory paths are presuming the default Mach4 install directory).  This can be as 3 attachments or you can combine them into a ZIP file:
- C:Mach4HobbyPMDX-SmartBOB-Motion.log
- C:Mach4HobbyPMDX-SmartBOB-IO.log
- C:Mach4HobbyPluginsPMDX-SmartBOB-USBPMDX-SmartBOB-USB.log


As an aside - I noticed that you are using the EStop input as active low.  We generally recommend wiring your system so that the EStop is active high (and your EStop switch opens on EStop).  This helps act as a fail-safe.  When active high, if any of the wires break between the SmartBOB board and your EStop switch, the system will halt.

Bob
« Last Edit: March 11, 2015, 06:21:51 PM by Bob at PMDX »
Engineering Hell: Everything's right and nothing works.
Bob's Corollary: If everything's right and nothing works, double check your assumptions.

neilD321

  • Posts: 19
    • View Profile
Re: MDI movement using G-Code different to jogging
« Reply #4 on: March 11, 2015, 11:39:34 PM »
Hi Bob,

I replaced the Machine.ini as you requested and ran the tests.
The mill ran faultlessly (except I had to throw all the limit switch inputs to Active Low)
All distances were correct using jog or MDI. Go To Zero actually went to zero.

Hmm... OK, went back to my original .ini file and redid all the tests. The mill is running beautifully.
Stuck a pen in it and drew a lovely roadrunner.

I swear I touched nothing in-between logging the issue and running these tests.
Actually, that's not true, I did replace a faulty spindle speed controller that the PMDX-422 is connected to via an SSR-25 DD relay on pin 14.
But I can't see how that would affect it.



Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: MDI movement using G-Code different to jogging
« Reply #5 on: March 12, 2015, 01:31:45 AM »
Oops - sorry about changing the limit switch polarities :-)  I had to do that to get it to run on my systems and I obviously forgot to change it back.

On the one hand I'm glad it now appears to be working as it should.  On the other hand, I really don't like problems that "just go away".  And you are right, I can't see how changing the SSR would affect the motion.

If the problem pops up again let us know and we'll try this again.

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

jcrowe

  • Posts: 6
    • View Profile
Re: MDI movement using G-Code different to jogging
« Reply #6 on: April 09, 2015, 03:10:29 PM »
I'm having a similar issue.  I made a simple code to move on only 1 axis.  It works flawlessly with the Mach4 Sample profile but not with PMDX Sample or any time I enable the SmartBob as the motion device. For example, I tried to move 2 in in X axis and would sometimes get .39, .86, 3623.00... Seems really random.  I am new to this software and board, but I'm totally lost now.  I need to get this running and delivered by tomorrow, but I'm stuck

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: MDI movement using G-Code different to jogging
« Reply #7 on: April 09, 2015, 04:58:44 PM »
I've sent you a private email asking you to call me.  Based solely on the screen shot you gave us I have these questions and comments:

(1) I notice that that Mach4 message bar (bottom left of the screen) shows "Vertex Buffer Objects requested...".  This warning is harmless.  It is telling you that Mach4 is not using a display accelerator feature because your PC hardware doesn't support it.  To get rid of this warning, go to the "Configure" menu and select "Mach...".  On the "General" tab, check the box in the "Misc" section at the right edge that says "Disable VBO Tool Path".

(2) To see if there are any other errors "hidden" by the "Vertex Buffer" message, click on the "History" button next to the message bar.

Does the machine move the expected distance but the DRO shows the incorrect values?  Are the DRO values like those shown in the image only show up while the machine is moving, and they return to possibly normal values once the machine stops?  Do the DROs increment/decrement when they show the incorrect values or are the numbers static (un-changing)?

Which version of Mach4 and our plug-in are you running?  And what version of Windows (32-bit or 64-bit)?  And it this a desk-top PC or a laptop?

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

jcrowe

  • Posts: 6
    • View Profile
Re: MDI movement using G-Code different to jogging
« Reply #8 on: April 09, 2015, 05:10:27 PM »
I did learn about the Buffer Objects and disabled that as this machine is older and probably has no OpenGL support or whatever it's looking for.

It isn't connected to the machine.  We expect to do that tomorrow as the machine is in our manufacturing facility off site.  Currently, I'm just using the PC intended for the CNC Mill, connected to the SmartBob and looking at the signal with a scope, so not sure how much it was actually moving. It does sometimes clear those crazy DRO numbers at the end of the code, but sometimes, they stay.   The numbers were incrementing but not correctly.

Now here's the scary part.  I loaded your Machine.ini from above.  Tried a couple files.  Then removed your .ini file and replaced it with mine.  Made a backup of my profiles and uninstalled/reinstalled SmartBob.  Ever since it seems to be behaving much better (using the same profile as before).  Not sure if I should be happy with the result yet or not ;)   I'm with you.  I don't like problems that just go away especially when it won't be nearby for me to debug later.

Mach4 is 4.0.1.2270 Build 2270 (I'm currently waiting on an email response from someone at PMDX/Newfangled with a license code)
My board says Rev B1 Serial # 32785 (It's brand new as 2 weeks ago, so I assume it's fairly current)
It's win XP 32 bit on a Desktop PC that will be installed into the cabinet on our CNC machine





Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: MDI movement using G-Code different to jogging
« Reply #9 on: April 09, 2015, 05:22:01 PM »
You bought the PMDX-422-Bundle from us (thank you!  and you saved $10), which means you need to get the Mach4 license through us, not directly from Newfangled Solutions.  You should have received an email from Steve (my boss) asking for your PCID from Mach4.  Once in a while we miss sending them out (yeah, it is not fully automated yet :-).

To get your PCID, go to the Mach4 Help->About box, select your network adapter (if you have more than one), then copy the PCID to the clipboard.  Send us the PDIC and we will send you a license file.

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

jcrowe

  • Posts: 6
    • View Profile
Re: MDI movement using G-Code different to jogging
« Reply #10 on: April 09, 2015, 05:50:11 PM »
I did email Steve my ID today.. He did send the request immediately, but I had to be sure I was using a good machine etc so we wanted to run in demo mode for a short time.  Please nudge him for me :)

jcrowe

  • Posts: 6
    • View Profile
Re: MDI movement using G-Code different to jogging
« Reply #11 on: April 09, 2015, 05:53:34 PM »
We did notice that on the original BOSS controller (that is being replaced) the steps were at about 50% duty cycle.  We are looking at the step pulses that the SmartBob is outputting and we are getting narrow pulses about 5-10uSec pulse.  Is this normal? 

jcrowe

  • Posts: 6
    • View Profile
Re: MDI movement using G-Code different to jogging
« Reply #12 on: April 09, 2015, 05:58:38 PM »
Doesn't seem to matter whether we check the 5us or 10us option, we are getting a 5 uSec pulse all the time.

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: MDI movement using G-Code different to jogging
« Reply #13 on: April 09, 2015, 06:02:52 PM »
I did email Steve my ID today.. He did send the request immediately, but I had to be sure I was using a good machine etc so we wanted to run in demo mode for a short time.  Please nudge him for me :)

We are in throws of packing for the Cabin Fever show (http://www.pmdx.com/PMDX-Forums/index.php?topic=84.0).  I'll see if we can get this later tonight.

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

Bob at PMDX

  • Administrator
  • Posts: 368
    • View Profile
    • PMDX
Re: MDI movement using G-Code different to jogging
« Reply #14 on: April 10, 2015, 05:24:18 PM »
Doesn't seem to matter whether we check the 5us or 10us option, we are getting a 5 uSec pulse all the time.

This is being addressed in another thread here:
http://www.pmdx.com/PMDX-Forums/index.php?topic=102

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