Hello Guest it is April 25, 2024, 01:45:17 AM

Author Topic: dangerous malfunction of a machine driven by Mach4  (Read 4553 times)

0 Members and 1 Guest are viewing this topic.

dangerous malfunction of a machine driven by Mach4
« on: February 20, 2022, 11:24:33 AM »
Hi guys,

I faced with a very dangerous error yesterday while running a gcode in Mach4, in short the problem is; Mach4 looses its zero point while running gcodes, this happens once in a while, like 1 out of 8 jobs. At first it was like missing the zero point in X(generally X, couple times it happened in the Y too) within 40-50mm, i was stopping the code and realign the axis and go on from there, but yesterday it lost the zero point by 400mm!! i was not close to the machine so it went 400mm(approx.) back in -X direction and hit the limit switch so that the machine stopped. (There is a malfunction in the front, +X direction limit switch, i ordered the new one and waiting for it to arrive to change it, so if it moved in the + direction it would not stop by hitting the limit switch and that would kill the machine for sure, this is a c3 ballscrews attached 4 ton machine, so it would cost very much). First thing tomorrow i will attach a small limit switch i have in hand to the +X direction before running the machine again.

But this problem is very weird, most of the code runs normally, i always generate the gcode from Solidworks, HSMworks with Mach3 post processor, so there is nothing wrong with the code(i am posting the code anyway), in general there is no noticeable noise in the machine and if it was noise i think i should get the same error in every gcode i run but this happens once in a while and can not say when actually. Gcode runs normally but suddenly at some point zero point of X moves back to 400mm and machine thinks that it is in the wrong place and moves back to keep up with the coordinate in the code, so it moves in a wrong place. It ruins the part, in addition to that a high quality PCD bit and sdc holder was installed yesterday and just because of the luck it didnt hit to anything while moving to the wrong coordinate. the plate is relatively big so in general i attach other jigs on the plate i was lucky it didnt hit them.

So as you can understand this is a very very serious malfunction for a cnc machine in every aspect.

I searched the web and forums for a similar error and found out that Mach3 users faced with the exact same error before but no one understood why this happened or didnt post any solution about it.

X axis is driven by a 16NM stepper motor, 100 microstep / 30.000 pulse per revolution, (i have a 11NM servo and using the stepper because its more powerful, the Y+Z axis is 600kg in weight approx.) its driving a 40mm diameter, C3, zero backlash, 5mm pitch ballscrew, i also attached the speed, accel. values for you guys to check. My positioning accuracy is within 5microns.

I was using my own screen while this first started, thought that it may happen because of the screen and reinstall Mach4 and ESS plugins with latest stable versions and started to use Mach4 standard screen as is with no modifying on it. The PC motherboard and ram capacity is more than enough for running Mach4, nothing wrong in device manager and all drivers are up to date including the gpu.

Do you guys have any ideas about the reason and solution of this weird problem? anyone faced with the same error while running a gcode? why would Mach4 loose its zero point by 400mm during operation? any ideas are really appreciated, thanks in advance.

Hakan

Offline Graham Waterworth

*
  • *
  •  2,673 2,673
  • Yorkshire Dales, England
    • View Profile
Re: dangerous malfunction of a machine driven by Mach4
« Reply #1 on: February 20, 2022, 12:09:01 PM »
I would start by reducing the micro stepping to 10 from 100 as the machine can never achieve that resolution and it will reduce the load on the stepper drives and pulse generator and increase the torque.
Without engineers the world stops
Re: dangerous malfunction of a machine driven by Mach4
« Reply #2 on: February 20, 2022, 01:21:37 PM »
Hi,

Thanks for the advice, i will try to reduce the micro stepping, i did that to achieve high resolution for positioning since the ballscrew is capable of doing that. u are right it can overload the pulse generator, will try and run the same code in air.

Hakan
Re: dangerous malfunction of a machine driven by Mach4
« Reply #3 on: February 20, 2022, 03:30:31 PM »
Hi,
your machine is loosing steps, or one of the steppers is stalling.

Mach4 IS NOT A FEEDBACK controller, that is to say if Mach issues pulses for a stepper to go to a certain location it assumes the stepper does so because there
is no way for Mach to tell otherwise, it does not get feedback from the stepper.

Many Mach users prefer closed loop steppers or servos because the the stepper/servo drive uses feedback from the stepper/servo to determine whether its in agreement with
Machs commands. In fact if it differs from where Mach has commanded it be then the drive will issue pulses to try to correct the error. If the stepper/servo cannot for whatever
reason keep up with Machs commands and it slips behind it will fault out, produce an alarm and usually Estop Mach rather than carry on machining when its well out of correct
location. Note that Mach is still not a feedback controller in this circumstance, but the stepper/servo drive is smart enough to know when its stepper/servo is out of position.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: dangerous malfunction of a machine driven by Mach4
« Reply #4 on: February 20, 2022, 04:39:02 PM »
Hi Craig,

I know that thanks for reminding me, X axis has open loop 3 phase stepper, Y axis has closed loop 1.8 degree stepper, z axis has a servo motor, this is a prototype machine to test all types of motors.

This error happens in both open loop stepper(X axis) and closed loop stepper (Y axis) so i dont think its about position feedback, and about missing steps; missing steps is 1 step or 10 steps, i dont think it can be couple million steps. loosing zero point for about 400mm with 100 microstep(30000 pulse/revolution) and 5mm pitch ballscrew u have to loose 2.400.000 steps if i am not mistaken.

About the stalling, motors are not stalling they keep on working normal just the zero point in mach4 is shifting, i am not sure about the open loop 3 phase driver but closed loop driver(fastech ezi-servo https://fastech.co.kr/new/eng/sub0102.php )  has a fault function, it even stops immediately if the axis slightly hit something so it has all kinds of protection for the stall, overload etc. Its a precision product made by koreans, they say its better than servo motor ;)

I can not say for sure but this may be happening when i increase the fro during operation, so closed loop stepper has high micro stepping too, i remember adjusting it as the highest it can get so maybe mach4 and ess can not catch the required pulse number when fro increased. And the reason that it happens time to time may be when both axis make small and sudden movements like small helixes while diving in to part etc. 

sorry for my english, it is rusty little bit but that is what comes to my mind after Graham's advice, what do u say?

Hakan
Re: dangerous malfunction of a machine driven by Mach4
« Reply #5 on: February 20, 2022, 04:51:45 PM »
Hi,

Quote
i remember adjusting it as the highest it can get so maybe mach4 and ess can not catch the required pulse number when fro increased.

Mach produces numeric data so is in no way limited by FeedRate or otherwise. The ESS has a max output frequency of 4MHz so it too is very unlikely to be pulse rate
limited. Your BoB however may be pulse rate limited and almost certainly the steppers drivers will have some  max input pulse rate.

Mai I suggest that you reduce the microstepping such that the pulse rate at max axis speed is 100kHz or less.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: dangerous malfunction of a machine driven by Mach4
« Reply #6 on: February 20, 2022, 05:13:51 PM »
Hi,

Bob is pmdx-125, yes u are right about ess and mach4 but as it seems this looks like mach4 related to me because its the one which shifts the zero point by 400mm, there is no such command in the gcode, for some reason it suddenly thinks that the axis moved forward by 400mm and tries to fix it, that is what it is doing. For what reason zero point shifts during operation? stalling came to my mind at first also but for that much shifting u have to hear a stalling noise(and u know the noise and oscillation that big steppers does) for about 6-10seconds at least. so its very close to impossible to not to hear/feel it when it happens.
 
Tomorrow i will try decreasing the microsteps , and if that doesnt fix it i can also try to make improvement for stalling, what would be your advice to fix it if we assume X axis stepper stalls(i never heard that noise during operation as i said but lets try it also) i dont want to lower the accel. too much as u know it may lead to loose positional accuracy, what would be your advice for the velocity and accel. values? Its driving 600kg of weight via 40mm diameter 5mm pitch 2000mm long ballscrew.

Hakan
Re: dangerous malfunction of a machine driven by Mach4
« Reply #7 on: February 20, 2022, 05:41:40 PM »
Hi,

Quote
yes u are right about ess and mach4 but as it seems this looks like mach4 related to me because its the one which shifts the zero point by 400mm,

I've been using Mach4 for seven years, and other users for as long and longer. If there were such a fault in Mach4 do you not think that it would have been detected by now?

One possibility is an extraneous g28 in the Gcode. I have seen some post processors that include g28's which will result in large unexpected excursions by the machine.
It possibility is an extraneous g92.

Craig.
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: dangerous malfunction of a machine driven by Mach4
« Reply #8 on: February 20, 2022, 06:59:04 PM »
The PMDX-125 (and PMDX-126) provide a noise filter on step signals that limits the step rate to 500,000 steps per second.

At 30000 pulses per revolution and 5mm travel per revolution this filter would limit the commanded motion to 5000 mm per minute or about 196 inches per minute. Step commands issued at a faster rate would simply drop out. This is not a sharp cutoff value as this is an analog filter.

It also happens that the servo driver you are using specifies a maximum step frequency input of 500,000 steps per second at a 50% duty cycle. I would recommend that you provide some margin for the ESS and the PMDX-125 in case there is some duty cycle distortion.

It is likely that your stepper motor drivers have even lower limits on maximum step signal frequency.

Steve Stallings
www.PMDX.com
Steve Stallings
www.PMDX.com
Re: dangerous malfunction of a machine driven by Mach4
« Reply #9 on: February 20, 2022, 07:07:38 PM »
Hi,

I didnt say its a general fault of Mach4, i said its something Mach4 is doing because i can see that the zero point in Mach4 has changed after this happens, something is triggering that error in my case, i am trying to find out what it is.

If it were a general error all of u should see it, its not a general error. But its a fact that something is triggering it to happen. and the weird thing is i get all of the gcodes from hsmworks/mach3 post processor and most of them works fine without any error.

u mean instead of g28 it should code g92? I could try that also, its simple to find out if it is the problem, when i ran the code in the air, if it does the same movement in same place than its because of the g28, if its because of the gcode, error should repeat itself right?

Hakan