Hello Guest it is May 17, 2021, 06:16:11 PM

Author Topic: Mach4 MPG axis stop after inc steps overflow  (Read 1373 times)

0 Members and 1 Guest are viewing this topic.

Re: Mach4 MPG axis stop after inc steps overflow
« Reply #10 on: February 26, 2019, 12:49:21 PM »
Yes I've tried. The thing is, I saw you are using vista pendant, which has plugin doing the communication with m3/m4. And the way velocity mode works is, like you would be holding jog button down and constantly adjust jog rate % up to 100% depending on how fast you turn the wheel. This is why step overflow doesn't happen. Sadly this is not what I am trying to achieve, I would still like to have precise one encoder pulse equals set inc distance, I just want to prevent steps overflow, or steps building up.
Re: Mach4 MPG axis stop after inc steps overflow
« Reply #11 on: February 26, 2019, 01:00:01 PM »
Hi,
but that contradicts the idea of each click advancing the axis one increment.

If you spin the  MPG two revolutions at 100 clicks per rev then the axis should advance 200 mm (1mm increment).
If you however determine that no more than five clicks should be 'stored up' then the axis may move 25mm before
the limit is reached and thereafter the remaining clicks get ignored. Thus you have turned the MPG two turns but
the axis will not move 200mm.

Craig
My wife left with my best friend...
     and I miss him!
Re: Mach4 MPG axis stop after inc steps overflow
« Reply #12 on: February 26, 2019, 01:04:09 PM »
Hi,

Quote
And the way velocity mode works is, like you would be holding jog button down and constantly adjust jog rate % up to 100% depending on how fast you turn the wheel

That is not how it works in practice. In reality if you turn the MPG at moderate speed the axis accelerates to it current
maximum speed, a programmable percentage of G0 speed. Once the MPG stops pulsing the axis stops immediately.

Craig
My wife left with my best friend...
     and I miss him!
Re: Mach4 MPG axis stop after inc steps overflow
« Reply #13 on: February 26, 2019, 01:19:19 PM »
One could argue it contradicts idea of mpg step mode, and yes, steps would get ingored. But it makes sense to me to stop axis when mpg is not turning, and it is the way industrial controllers work. It will follow step inc, as long as it won't violate max machine speed, if you spin it too fast, it will just let go those extra pulses. I've checked video of how vista pendant works, and how it is presented there, faster you turn the mpg, the faster axis moves, if you move it as fast as G0or faster, it will run at G0. As soon as you stop, motion stops. If you turn mpg one click, it makes almost random move every time. I am 99% sure plugin uses JOG function, so when you start rotating your mpg, it triggers jog, and it constantly calculates percentage of jog depending on how fast you turn the mpg. As you stop turning it, it releases jog, and motion stops. But correct me if I am wrong.

Offline jevs

*
  •  315 315
    • View Profile
Re: Mach4 MPG axis stop after inc steps overflow
« Reply #14 on: August 29, 2019, 10:04:24 PM »
Hi,
try Continuous mode, that's what its for.

Craig

I have been trying to figure out how to get the MPG to work in continuous mode for two days.....nowhere can I find how to do this or anything in the API that sets the MPG to continuous....
Re: Mach4 MPG axis stop after inc steps overflow
« Reply #15 on: August 30, 2019, 03:28:36 PM »
I look at the view screen script under Operator.
I copy everything and past in a text editor and then search for examples
shows me the line numbers and some coding possibilities of how I might use it.
Hopefully I can set break points and then test by single stepping through my code.
You still have to put that code it in the MPG script your using, or i'm sure you could use a module and a shared function. called by any mpg device code.
« Last Edit: August 30, 2019, 03:32:32 PM by Ya-Nvr-No »

Offline jevs

*
  •  315 315
    • View Profile
Re: Mach4 MPG axis stop after inc steps overflow
« Reply #16 on: August 30, 2019, 04:16:48 PM »
But that is button jogging. I cannot find a way to relate that to the MPG??? I tried a couple things and had no luck.
Are those actually the functions that can be made to work for Velocity jogging with the MPG?