Hello Guest it is April 26, 2024, 10:03:16 PM

Author Topic: Active line in the is not is not in sync with the machine  (Read 345 times)

0 Members and 1 Guest are viewing this topic.

Active line in the is not is not in sync with the machine
« on: May 22, 2023, 10:38:34 PM »
Single stepping through a program, the display highlights the line that will be executed next.
That worked perfectly in Mach3.
In Mach4  and with Warp9 ESS  it is not reliable, sometimes that highlit line is three-four steps ahead of the machine movements.
I am using Mach4 software  .4809 and the ESS is 285.
Bertho
Re: Active line in the is not is not in sync with the machine
« Reply #1 on: May 23, 2023, 01:10:13 AM »
Hi,
I can only guess is that you are seeing  the delay through the motion buffer.

As you know Mach, both 3 and 4 are buffered motion control solutions. Thus Mach 4 will calculate a move, a numeric motion command, and push it out to the motion control where is goes into a buffer.
That buffer will be several hundreds of milliseconds by default. If I recall the ESS default is 180ms. The ESS will consume each '1ms motion time slice' from the buffer every
1 ms. In the mean time Mah4 may have raced ahead and has actually processed quite a few more instructions......and they will happen, but up to 180ms after Mach has
instructed. This is what a buffered control solution means.

This occurs because Windows is not realtime. If the machine were dependent on Mach and Windows to serve up motion commands it would fail because Windows buggers off and does other
jobs that need doing. Then the machine would starve of data and stall. A machine absolutely must have a continuous stream of data otherwise it fails. Windows PCs can't do that natively,
and must  buffer motion commands so that when Windows goes off to some other task the machine has motion commands to carry on with and hopefully Windows comes back before the motion
controller has consumed all its instructions so Windows/Mach can again fill up the buffer.

The other time I have seen behaviour as described is when Mach is doing very VERY many tiny little moves. Mach's screen does not show anything happening, but that is because Mach's Motion core
is not 'releasing' so Mach's GUI can update. Mach's core and Mach's GUI operate as a cooperative co-routine. If Mach's core is so busy with little moves it never releases and therefore the GUI can get
badly left behind.

I see this when I sometimes use a 1.5mm endmill, which I use a lot with the small parts I make and yet I want to drill a hole of 1.6mm (just right for accepting a 2mm tap). Rather than stop and put in
a drill I circularly interpolate the hole, but that means the X and Y motions are less than 0.05mm. While that is running the GUI does not update at all, you'd swear the machine was broken because
Mach shows that its stopped, but the machine is still spiralling down the hole it meant to. Once the hole is complete then Mach's GUI get processor service and gets back up to date.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Active line in the is not is not in sync with the machine
« Reply #2 on: May 23, 2023, 08:15:13 AM »
Thank you for the detailed description of the interaction between Mach4 and ESS.  The parts made are correct.
In this case it is not a speed issue since it is in single block mode.
For example:
After a tool change, the next selected line is G00 Z15
I click "start".  Nothing happens.
The next line is G00 Z1.  Nothing happens.
The next line is G01 Z-2.  It finally moves.

( By single stepping on a new project, after a tool change, I can verify that the height is 15mm so my offsets are correct)
Bertho