Hello Guest it is October 18, 2019, 03:35:35 PM

Author Topic: MPG over USB?  (Read 6381 times)

0 Members and 1 Guest are viewing this topic.

MPG over USB?
« on: June 12, 2015, 09:48:54 AM »
Sorry for cross-posting, but it seems this might be a better forum to post this question:

I have Mach3 connected via USB to a Xulifeng (aka Leafboy) controller card. I just bought an XHC HB04 pendant with an MPG. All the functions work except for the MPG. The wheel itself works in continuous and step mode. In MPG mode it operates as if it's in step mode. After much head-scratching is occurs to me that the MPG might be incompatible with this setup. Unlike parallel cards where Mach3 is sending steps, the USB interface is sending some higher level commands. It occurs to me that the USB interface might not support MPG, either because Mach3 doesn't offer low enough level commands, or because the vendor didn't implement the MPG level commands. Anyone know which of these many possibilities is correct?

Thanks

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: MPG over USB?
« Reply #1 on: June 12, 2015, 04:49:44 PM »
IN MPG mode it should operate as  step mode . Each click moves a determined amount as defined in the MPG setup. You SET the resolution of the steps.
.0001, .0010, .0100, .1000, or 1.000.

Just a thought(;-) TP
Re: MPG over USB?
« Reply #2 on: June 12, 2015, 11:44:02 PM »
IN MPG mode it should operate as  step mode . Each click moves a determined amount as defined in the MPG setup. You SET the resolution of the steps.
.0001, .0010, .0100, .1000, or 1.000.

Just a thought(;-) TP

That is how the pendant behaves, but I don't believe it is consistent with the normal meaning of an MPG controller. As you said, each click moves on step based on the current step size. If you turn the wheel faster than the step can be performed, it caches the steps and continues moving even after the wheel has stopped. My understanding of "true" MPG mode is that the machine will move as you turn the wheel. Turn fast, the machine moves fast. Turn slowly, the machines moves slowly. Stop turning the wheel, the machine stops. No caching steps, no dependance on the current step size. And that is why I suspect it can't be implemented in a USB card. Mach3 has to send raw steps (as in stepper motor steps), and I wonder if this is possible via USB.

Offline BR549

*
  •  6,902 6,902
    • View Profile
Re: MPG over USB?
« Reply #3 on: June 13, 2015, 04:34:46 PM »
You have it wrong. It is acting as it should.  it HAS to cache the steps as the machine cannot move as fast as you can  turn the mpg.NOW some machines can run in MPG velocity mode . MPG Vel mode in Mach3 does not work well.

(;-) TP
Re: MPG over USB?
« Reply #4 on: June 13, 2015, 05:26:58 PM »
Thanks for the clarification. As far as I'm concerned, velocity mode is the only interesting MPG mode. Step mode is dangerous, as you can't predict where the machine will stop if you're not counting clicks. Even worse if you're trying to eyeball movement to a position.
Re: MPG over USB?
« Reply #5 on: July 13, 2015, 06:25:49 PM »
Hi Llaves, I have the same issue and understand where you are coming from. Unfortunately I believe I have the answer for both of us, and it's not great.

http://forum.planet-cnc.com/viewtopic.php?f=12&t=1125

The link above is by a guy who reverse engineered the USB protocol for the HB04, it states that the variable which is used to communicate the wheel status consists of 21 descrete steps to describe the speed of the wheel from full speed reverse to full speed forward. As a result this provides very little speed resolution, which is why the caching occurs.

Now what I don't understand is why there is so little reference to this issue for such a popular pendant? Maybe it's specific to our own machine configurations?
Re: MPG over USB?
« Reply #6 on: July 13, 2015, 06:43:31 PM »
One more thing.... When you do the MPG calibration, do you think it works or not? All the boxes just appear to be filled with 0s after going through each of the three steps.
Re: MPG over USB?
« Reply #7 on: July 14, 2015, 11:39:37 PM »
thanks for digging out this information. I had seen references to reverse engineering the protocol, but didn't track them down far enough to see the part about the MPG encoding only supporting 21 discrete values. This seems pretty crazy. Perhaps if the sampling rate is high enough this might be enough, but it sure seems odd. I've pretty much resigned myself to not having MPG capabilities. That's what comes when with an inexpensive device whose manufacturer is essentially impossible to reach. Same goes for my controller card (AKZ250). The card actually supports a direct wired MPG. If I decide I want it bad enough, I 'll guess I'll have to wire one directly to the controller board. I did find a US outfit that sells the pendant and this controller card. They claimed it worked, but when I probed farther there were questions. They promised to go to their lab to test it out, but never called me back. I took that as confirmation they couldn't get it to work.

Apparently Mach3 does support MPG over USB, but the implementation for this controller and/or my card are inadequate to the task.