Hello Guest it is April 26, 2024, 06:36:26 AM

Author Topic: Glitch on X movements  (Read 2007 times)

0 Members and 1 Guest are viewing this topic.

Glitch on X movements
« on: January 12, 2022, 09:32:44 PM »
hi All.
I've built a cnc mill out of an old G0484. It's a 3 axis with clearpath servos and an ESS for the motion controller. This is all run from Mach 4 on a windows 10 PC.

I have a random but not so random movement issue occurring and cannot find the source.
What happens is when traveling in X plain, it will rapid move times 10 speed. Let me try to explain.

1. I use Fusion 360 CAM personal use, so the only rapid moves aloud are basically the G53 moves. Therefor no rapid moves should happen during movements from point A to point B, It should all be G1 moves.

2. I have rapid (G0) moves on Mach 4 set to 10%, G53 moves move at 10%. These random X moves (that are meant to be G1 moves) will happen at 100% rapid. If I have rapid on Mach4 set any higher than 10% and these X movements occur, it will trip the current overload on the servos and halt all movements but the gcode will still be running on Mach4.

3. It only does it to X movements. Not Y movement and not XY movements. And has never happened to Z movements ether.

4. This doesn't happen on all X movements. It only happens on transition moves. Sometimes it wont happen at all on a Gcode program. When it does happen, it is the same every time the program is run. I could run two programs back to back (program A and program B), it could miss behave on program A and run fine on program B. I could loop these programs all day and it will always happen on program A and never happen on program B.

It sounds like it's the Gcode right?? I'm only learning to read gcode but I can't see anything obvious. Post processor maybe?? Has anyone ever struck this before?

I've attached the latest program it did it on. Drilling holes in a PCB. It rapid moved fast all X transition moves, even though rapid on Mach4 was set to 10% and there shouldn't be any rapid transition movement to begin with according to Fusion360.


« Last Edit: January 12, 2022, 09:36:40 PM by gyrojeremy »
Re: Glitch on X movements
« Reply #1 on: January 14, 2022, 02:45:03 AM »
what the size of this random movment? is that happend all long of movment or only at end and begin of segment?
Re: Glitch on X movements
« Reply #2 on: January 14, 2022, 03:45:45 AM »
Will be the entirety of the transition move. Length of move makes no difference.
Re: Glitch on X movements
« Reply #3 on: January 14, 2022, 07:45:25 AM »
bater add video or photo or sketch  because not so clear what you talk about
Re: Glitch on X movements
« Reply #4 on: January 15, 2022, 02:38:21 AM »
Ok here is a video. https://youtu.be/rdZwMy1R7X0
It's doing it on every X move. Rapid is set to 10%, feed rate should be 150 I think but it looks faster than that. G code is attached.
Re: Glitch on X movements
« Reply #5 on: January 15, 2022, 04:53:24 PM »
Hi,

Quote
I have rapid (G0) moves on Mach 4 set to 10%, G53 moves move at 10%. These random X moves (that are meant to be G1 moves) will happen at 100% rapid. If I have rapid on Mach4 set any higher than 10% and these X movements occur, it will trip the current overload on the servos and halt all movements but the gcode will still be running on Mach4.

That's a fault right there. If a servo, any servo, trips out over current, over voltage, following error or what ever then the machine must stop. The servo will certainly stop...and signal the error.
Your Mach4 installation should be monitoring the HLFB fault signal and Estop ALL servos if any one servo trips out. I take it you do not have any fault monitoring? That's a disaster waiting to happen.

Next issue is why the X axis is tripping out? Is the X axis much heavier than the others? In a servo, current is linearly proportional to torque and torque is linearly proportional to acceleration.
Do you have the X axis acceleration set (in the drive OR Mach) higher than the other axes? Have you set (in the drive) a more restrictive current limit?

Not sure what Fusion has to do with it. I use Fusion but a paid subsricption...I don't like paying much, but you do get what you pay for and 'bang for your buck' Fusion can't be beaten for value
for money in my opinion. I use Fusion to design the circuit and then export the files to EAGLE, because EAGLE has a UserLanguageProgram called PCB_to_Gcode that will generate Gcode files
for isolation routing, drill files and mill files. Note that the drill files have a syntax that works with Mach3, which was a bit slack as to what kind of code it would accept, whereas Mach4 is a bit stricter.
The code needs to be edited slightly to work on a Mach4 machine, and I use to do it by hand, but I have written a macro which takes the original (Mach3 compliant) drill file and make a new file
which is Mach4 compliant.

I will post the macro if you want it.

The point is that EAGLE has no BS restrictions over rapids....ie the Gcode produced by 'pcb-gcode' has NO restrictions

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Glitch on X movements
« Reply #6 on: January 15, 2022, 05:35:45 PM »
The servo trips out because of the load it comes under while trying to move at lightning speed. The issue is, it should not be trying to move at those speeds in the first place.
And it doesn't do it on every gcode program. It doesn't do it if I write the program in the mdi.
I do have hlfb for the servos but now that you mention it and due to my lack of knowledge I would guess that Mach4 has no idea what to do with that input. I certainly haven't added any program to trigger E stop from hlfb.
Re: Glitch on X movements
« Reply #7 on: January 15, 2022, 06:13:47 PM »
Hi,

Quote
The servo trips out because of the load it comes under while trying to move at lightning speed. The issue is, it should not be trying to move at those speeds in the first place.

OK, you have some issues there. As I posted earlier current is proportional to torque and that is proportional to acceleration.

I use 750W Delta servos, and this is broadly How I set them up.  I know the rated torque of my servos, its published in the manual.  Additionally I have done a detailed calculation
of the total momentum of each axis, the Y axis being the heaviest I'll start there. My servos can accelerate the Y axis including a reasonable estimate of the weight of the
workpiece, vice and jigs, at 2.7m.s-2. Note this is just rated torque, and therefore rated current. The peak current ( equivalently peak torque) is three times that.
I have tested my machine at that acceleration and it works fine with no overloads but it lurches around something chronic and scares the hell out of me.

What I have done is left the servos programmed that way, namely max acceleration (cont. torque)is at 2500mm.s-2, and the max current at 300% of rated current. So my servos are tuned to
their safe maximum.

In Mach4 however I have detuned them to what I want. For instance I've set the maxium speed of the servos (in the drive) to 5000 rpm rather than their rated max of 3000rpm. This means I can have g0 rapids
of 25m.-1.....but this is scary fast....and so while I can have it I don't really want it. In Machs Motor tuning page I have set the max speed to 12.5m.s-1, it's fast enough.
High acceleration is desirable for good toolpath following, but in turn demands more current in the servos and requires greater dynamic stiffness of your machine....so there is a balance to be struck.
I've settled on (in Machs Motor Tuning page) a max acceleration of 1500mm.s-2.

Note that my Y axis is 115kg of cast iron and I allow a workpiece/vice/jig mass of 35kg for an axis weight of 150kg. It accelerates at 0.15g EASY......and I could have it do much more....but it makes me
sweat just watching it!

The basic idea is to set the servo at its reasonable maximum that does not cause faults and then use Machs Motor Tuning page to select those parameter WITHIN the servos capacity.

Thus if you set Machs max velocity at 12.5 m.s-1 the machine should never exceed 12.5m.s-1 EVEN if the servo drive is programmed to be able to go 25m.s-1.
Likewise I've set Machs max accel to 1500mm.s-2 despite the servos being capable of 2700mm.s-2 at rated current and 7500mm.s-2 at max current.

I have a separate fault signal from each servo, and an on-screen LED, so I can identify which of the servos has faulted. If any one of them faults the machine stops, but I can see which servo it is.
I haven't had a servo trip out in the six months since I finished the machine...they are brilliant.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Glitch on X movements
« Reply #8 on: January 15, 2022, 07:31:07 PM »
Hi,
 its Sunday morning here so I thought I'd make a couple of PCB's, these are ones that I make reasonably often and so like to have one or two in stock if a customer
enquires.

They are surface mount in the main so there are not a lot of through holes, see pics. The drill file takes 1min8sec to drill the twenty-thirty holes or so. The mill file takes 1min24sec
to mill the outline and the four 4.25mm holes.

The top etch file take 46min to run and the bottom etch file 18min.

I could run them faster....but I'm not in that much of a hurry......after all what else would I do....go to church???

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Glitch on X movements
« Reply #9 on: January 16, 2022, 10:35:21 AM »
first about accl deccl , the first improve its to add external resistor this improve a lot but and its long story between me and craig
its about S curve ,its totally game changer ,and because mach not support it you can try the s curve that exist in the servo pack
but you must keep this value same on all axiss that interpolate  and must make the CV more precise