Hello Guest it is June 16, 2019, 03:29:04 AM

Author Topic: Motors stalling /growling  (Read 1323 times)

0 Members and 1 Guest are viewing this topic.

Re: Motors stalling /growling
« Reply #50 on: May 10, 2019, 04:02:09 PM »
Hi,
good question.

The fact that the machine does perform well on most occasions but not all suggests to me that the hardware is
OK.

I am still of the opinion that Mach3. or rather the parallel port driver, is going cranky at certain times. The DriverTest.exe
is very good indeed but what it does not do is show how the parallel port performs when 'under load' ie running Gcode.

I would now be trying to observe the step output pulse with an oscilloscope. That may not be easy. Even modest variation
can cause what looks to be a very poor trace. There are some scopes that collect histogram data about the signal under
test  but they are rare beasts but wuld be ideal for this purpose.

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

Offline reuelt

*
  •  444 444
    • View Profile
Re: Motors stalling /growling
« Reply #51 on: May 10, 2019, 05:04:02 PM »
Hi
One reason I advise to increase the Kernel speed is based on INFO from Mach3Mysteries.pdf by Art Fennerty.

"The MACH3 planner controls the CV'ing of the lines, as well as taking care of making each output equal to 5 times the kernel interrupt time (kernel speed)."

So MACH3's "planner" has to run slower to match any slower kernel speed.

Art even said
"I don’t mind admitting that a 60Khz run even with motors that don’t move
beyond 20khz is the smoothest option to use. "

BUT (faster kernel speed) has to be traded off to processor speed (Computer CPU speed) and the power required to fill the buffer faster than the engine can empty the buffer.

So, I get a very fast CPU that can give me "EXCELLENT" drivertest result at 100,000Hz then INTENTIONALLY slow down the kernel to 60,000Hz (instead of 100K) and MACH3 will run very well.

To run at 25,000Hz kernel means MACH3 CV planner has to be slow and limited to 200ms.
So MACH3 will run more smoothly in CV mode if kernel speed is higher than 25K (provided you have a fast enough CPU to avoid any buffer under-runs).
« Last Edit: May 10, 2019, 05:09:25 PM by reuelt »
"the gift of God is eternal life through Jesus Christ our Lord"
Re: Motors stalling /growling
« Reply #52 on: May 11, 2019, 02:41:35 AM »
Hi,
who cares about CV, at the moment OP is struggling to get the motors to run under certain circumstances
and I don't think kernel speed is the answer. Vast numbers of users run Mach's parallel port at 25kHz without
problem....so why can't OP?

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

Offline reuelt

*
  •  444 444
    • View Profile
Re: Motors stalling /growling
« Reply #53 on: May 11, 2019, 02:52:51 AM »
Hi,
who cares about CV, at the moment OP is struggling to get the motors to run under certain circumstances
and I don't think kernel speed is the answer. Vast numbers of users run Mach's parallel port at 25kHz without
problem....so why can't OP?

Craig

I read his reply #42.
I thought he is already running better now but sometimes having some CV look ahead jerks which can be solved by increasing Kernel speed.
"the gift of God is eternal life through Jesus Christ our Lord"
Re: Motors stalling /growling
« Reply #54 on: May 11, 2019, 03:41:42 AM »
Hi,
I read the same post:

Quote
its the best its done but i can run the mach 3 demo maybe 3 times without any problems but the next 3 times it will stall or have what sounds like vibration

That does not sound like a CV issue to me. Sometimes it runs and then on other occasions 'it sounds like a vibration'.
I guess that 'sounds like a vibration' is excessive jitter in the pulse stream.

Proving it is hard and solving it harder still.

Personally fooling around with a parallel port is so last century....get an ESS and never look back!

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

Offline reuelt

*
  •  444 444
    • View Profile
Re: Motors stalling /growling
« Reply #55 on: May 11, 2019, 06:23:22 AM »
I think we are nearly getting there.
Originally his problem was because he had set the pulse & Step width to 0 u secs.
Attached is Electrical Characteristics of his driver which is based on Toshiba TB6600HG.
It says min. pulse width is 2.2 u secs.
(HIS DRIVER IS NOT LIKE A GECKO DRIVER which only need a Negative edge trigger)

So I have told him to set to 5 and 5 (assuming there will be some PCI bus latency loss too).

Jogging should now be OK (subject to a bit more speed and acceleration FINE tunning).

Perhaps setting the lookahead lines to 200 from the MACH3 default of 20 can also help.

Best Regards.


EDIT; Argumentative / contradictory comments removed by moderator.


« Last Edit: May 11, 2019, 07:10:33 AM by Tweakie.CNC »
"the gift of God is eternal life through Jesus Christ our Lord"
Re: Motors stalling /growling
« Reply #56 on: May 11, 2019, 08:17:50 PM »
Craig, Will you explain what is a ESS? Is that a breakout board?
Re: Motors stalling /growling
« Reply #57 on: May 11, 2019, 11:17:29 PM »
Hi,
sorry, didn't mean to confuse.

ESS stands for Ethernet SmoothStepper, an external motion controller made by a US company Warp9TD.

There are a number of manufacturers including some highly regarded US and European Manufacturers and some widely criticized
Chinese manufacturers. Leaving aside the quality of the device and the support for it...what do you get with an external motion
controller?

Mach, the Windows application program we see is a Gcode interpreter and motion planner. The planned motion is a string
of numerical data describing the position of all axes in 1 ms time slices. A PC is good at crunching numbers as so it can decode
Gcode and plan motion very easily.

What happens to the numerical motion plan?

In the case of a parallel port machine the numerical data is transferred to Machs pulse engine, a block of code living in
kernel 0 level of the CPU. It calculates the required pulse streams and produces them with interrupt driven timers.

A PC's CPU is not optimized for this. Firstly it almost has to shove Windows out of the way and Windows doesn't like it
and fights back. Secondly Windows uses the CPU's interrupt system extensively for its own purposes. We cannot use the system
exclusively for our timers because Window would crash pronto. Lastly a PC's CPU does not have dedicated hardware timers
and so there is a software overhead associated with an interrupt driven timer.

The programming community all said 'it cant be done' and yet Art Fennerty did it and gave hobbyists a cheap (free) motion
controller and that's responsible for the huge popularity of Mach3.

About 10 years ago several manufacturers started making external controllers. They take the numerical data from Mach's motion
planner and generate the required pulse streams for the motors. They all use FPGA's, or microcontrollers or DSP chips or
sometimes all three. All of these devices have sophisticated built in hardware timers and can produce very fast and accurate
pulse streams well in excess of what Mach's pulse engine can do.

What do you get for it all? Firstly the PC's CPU is unloaded of the burden of producing pulse streams and therefore runs Mach
without the stuttering and stalling that often plagues parallel port machines. It means you can run 32 or 64 bit PC's (cf
32 bit only for parallel port), any Windows OS including Windows 10 (cf Windows7 and earlier only for parallel port) and you can
use laptops or desktops (cf desktop only for parallel port).

External motion controllers are faster than a parallel port, the ESS for instance can produce pulse streams up to 4 MHz,
compare that to Mach's parallel port of 25kHz (default). It means you can run high resolution servos and steppers that you
can't with a parallel port.

The ESS I mentioned is connected to the PC by an Ethernet cable and it in turn connects to a breakout board. at the current time
an ESS is about $190US. There are much cheaper units but all the good (US and European) ones are in the same price
bracket, ie not cheap. There are some rubbishy Chinese ones  cheap....but they don't work well....if at all.

I used Mach's parallel port on a dual core Atom min-ITX board PC for a couple of years. It has one built in port and I added another
on a PCI card. It worked really well. You could make it stutter and stall if you were silly but by and large it was pretty good.

Then I bought an ESS. I could now run my steppers 33% faster without losing steps and they seemed to run cooler and
'sweeter' than before. I didn't expect that sort of improvement. I would have sworn that then parallel port was extracting
the best from my steppers but the SmoothStepper is just that...smooth. Mach is very much less inclined
to stutter or stall if some other program is running or it needs to compute a redraw.....and redraws often bugger up
the parallel port.

I apologize if it seems that I'm trying to 'sell' you another piece of equipment but my experience is that the simplicity
and performance that a good external motion controller offers is just light years ahead of a parallel port.
The chances are that an ESS, or other good quality external controller like a UC300 or 57CNC, are cheaper than
a new PC......and you wont have any bother trying to get a parallel port to work!

Craig
My wife left with my best friend...
     and I miss him!
Re: Motors stalling /growling
« Reply #58 on: May 13, 2019, 09:53:07 AM »
Thanks for the information. I've try every setting that has been recommended and still have problem. So i guess i'll be looking at other options until i can get the problem solve. 
Thanks

Offline TPS

*
  •  1,301 1,301
    • View Profile
Re: Motors stalling /growling
« Reply #59 on: May 13, 2019, 01:13:14 PM »
can you post your xml
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.