Hello Guest it is July 16, 2019, 02:54:16 PM

Author Topic: Mach3 - MPG - Precise control as it is on an industrial CNC...  (Read 322 times)

0 Members and 1 Guest are viewing this topic.

Good afternoon all,

I posted this on the Zone the other day and didn't get any suggestions so I thought I would try here.  I know Mach 3 is somewhat "extinct" but thought maybe someone could chime in.  Even if the solution lies within MACH 4, I would like to hear about it.

I have MACH 3, been using it for a decade or so. My current setup is: Windows 10, Mach 3, ESS (Ethernet Smooth Stepper). For the MPG, I am using a FANUC MPG wired up using "A" and "B" etc.

Regardless of what computer, what MPG, what machine, what configuration, I have NEVER been able to get the MPG to behave as it does on any industrial control.

I can set the distance per step, and if I slowly rotate the MPG, I will get a near perfect step with every click of the MPG. However, if I rotate the MPG any faster than "SLOW", not all clicks translate into an increment of motion. On industrial CNCs the machine will move 1 increment / click of the MPG.

I know there are settings for velocity mode, multi-step, single step, etc. I believe I have tried every combination of these and I cannot get the machine to perform "correctly". The best is in Velocity mode and the machine will move some distance greater than a single increment, however, it still starts and stops crudely.

I have tried the tuning function as well with no luck.

Has anyone found the magic combination to getting industrial MPG performance on MACH 3?

Thanks in advance!

Chris D.

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Mach3 - MPG - Precise control as it is on an industrial CNC...
« Reply #1 on: June 14, 2019, 07:19:30 PM »
You will not really get what you are looking for with Mach3 and the SmoothStepper.
The CSMIO/IP-A and IP-S do make the MPG behave like you want, not sure about others such as the DSPMC or the CNC drives controllers as I have not used them.
So basically you are stuck with the way the ESS works or change controller.

When I was using the ESS I used to use it almost exclusively in continuous mode and then just change to increment if I wanted to sneak up on something more precisely, it was still not perfect but it is the best you will get.


Edit
By continuous mode I am meaning Multi Step.
« Last Edit: June 14, 2019, 07:21:23 PM by Hood »
Re: Mach3 - MPG - Precise control as it is on an industrial CNC...
« Reply #2 on: June 14, 2019, 07:29:50 PM »
Hi,
I suspect that you are up against the limitation of a Windows CNC solution.

Windows is not a realtime system and due to Windows extensive use of the interrupt system for its own purposes it cannot
ever be a realtime system. CNC IS and IS REQUIRED to be realtime.

To achieve CNC control all Windows CNC solutions are buffered. That is to say that Mach issues P(osistion)V(elocity)overT(ime)
data to a motion controller in a buffer, sometimes as short as 50ms but possibly up to 1000ms. Please note that for the purposes
of this explanation that I consider Machs parallel port a motion controller just like a SmoothStepper or UC100.

Any realtime operation required by the CNC machine MUST be handled by the motion controller. As an example if you
are referencing (homing) your machine and the X axis is advancing towards its home switch. When the switch activates the
axis must stop immediately. The motion controller must do it, it can't wait to send a message to Mach, Mach decide what to do
and then send an instruction back by sticking it in a buffering queue. Its just to slow...the machine would have overrun the
home switch already. This is an example, one of many, of realtime 'supports' that a motion controller must be able to offer
because its nominal 'master' is at the far end (time wise) of a queue.

With respect to jogging, Mach plans a trajectory and issues PVT data to the motion controller by adding to the buffer.

Many, if not all, industrial machine controllers are realtime, thus each 'click' of an MPG results in a 'click or step' at the servo
concerned within microseconds.

It is not surprising then that there is a difference between to two approaches.

I have used Mach3 and Mach4. Mach4 has a somewhat faster response but is still buffered. I leave my Mach4 installation
at its default buffer length of 180ms. With subtle differences they both perform similarly.

If you require realtime response use a dedicated industrial controller or use LinuxCNC. Certain distros of Linux have
R(eal)T(ime)E(xtenstions) and makes a pretty fair realtime system.

It is possible to make Windows into a realtime system, the RTX64 solution of Interval Zero is a very good example and is well
worth Googling. It will help you understand the difference between Windows and buffering verses realtime. At the time I researched
it  was beyond hobby budget.

Note also there is a conversation going on in the Mach4 board that addresses a similar issue. Both that thread and private
communications suggest that an Ethercat solution may be on the cards which rely on RTX64 to provide realtime determinism
to a Windows PC.

https://www.machsupport.com/forum/index.php?topic=41233.0

Craig

My wife left with my best friend...
     and I miss him!

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Mach3 - MPG - Precise control as it is on an industrial CNC...
« Reply #3 on: June 14, 2019, 08:05:55 PM »
Craig
as I have said it can be done with Mach3 but it requires the controller to do it, the CSMIO/IPS and IP-A work exactly like an industrial control does regards the MPG. You set x1, x10 or x100 and it will move the exact distance you have set for each click no matter how fast or slow you turn the MPG.
Re: Mach3 - MPG - Precise control as it is on an industrial CNC...
« Reply #4 on: June 14, 2019, 08:20:37 PM »
Hi Hood,
I was unaware that the CSMIO can process MPG pulses directly into step/direction pulses in realtime.

The CSMIO Mach4 plugin is still lagging other Mach4 controllers and consequently is not well represented amongst
Mach4 users no matter how well built they are.

Craig
My wife left with my best friend...
     and I miss him!

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Mach3 - MPG - Precise control as it is on an industrial CNC...
« Reply #5 on: June 14, 2019, 08:26:04 PM »
Yes I believe that to be the case with the CSMIO and Mach4.
Mach3 does all I need on the two machines I have the CSMIO on, the plasma and the Chiron,  so it is fine for me and no need to upgrade at this time, what the future holds know one can tell, well except for death as that is a certainty :D.

Offline TPS

*
  •  1,354 1,354
    • View Profile
Re: Mach3 - MPG - Precise control as it is on an industrial CNC...
« Reply #6 on: June 15, 2019, 03:05:43 AM »
i use a 80€ XHC USB MPG on my Weyrauch, and does exacly the selected step's.
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Mach3 - MPG - Precise control as it is on an industrial CNC...
« Reply #7 on: June 15, 2019, 07:47:47 AM »
Thanks for all the information guys.  Frankly this is very disappointing.  Being that MACH 4 is promoted more as a industrial control I would have expected that this would have been resolved. 


As for the XHC USB MPG, I have a wireless version of that and it too performs poorly.

Chris D
Re: Mach3 - MPG - Precise control as it is on an industrial CNC...
« Reply #8 on: June 15, 2019, 07:58:59 AM »
Hi,
what exactly do you think should have been resolved?

Windows PCs are not realtime systems that implies certain limitations. If you don't like those limitations don't use
Windows. It's like trying to blame water for being wet.

Craig
My wife left with my best friend...
     and I miss him!

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Mach3 - MPG - Precise control as it is on an industrial CNC...
« Reply #9 on: June 15, 2019, 08:02:33 AM »
It is not really Mach's fault but more the fault of the controllers used with Mach. If the CSMIO can do it with Mach3 then I must assume other controllers could.
With the parallel port then it may not have been possible but even then it may have been if it had been done at driver level, that however is something I know nothing about.