Axis position shift during helical boring - Fusion 360 Personal + Mesa 7i96s + C

More
7 months 2 weeks ago - 7 months 2 weeks ago #344425 by hmnijp

DRO shows identical position at arc entry and exit — LinuxCNC believes the machine returned to the correct point. But probing a fixed reference shows X shifted +9.3mm and Y shifted -12.2mm. HLFB is configured at 20 counts and did NOT trigger. This means every commanded step was executed by the motor. The error is in the arc interpolation — the step path LinuxCNC generates to trace the circular arcs does not sum back to the correct physical position.
LinuxCNC version: Master (2.9), running on Raspberry Pi 5 (4GB), Debian Bookworm, Mesa 7i96s over ethernet (hm2_eth), SERVO_PERIOD = 1000000.
 

Linuxcnc doesn't generate a step signal. All planner calculations are based on position (float64 number) and velocity signals.These numbers (not steps or pulses) for each servo cycle are sent to the Mesa board, where "stepgens" converts them into pulses.

These are the connections in hal:
joint.N.pos-cmd -> hm2.N.stepgen.position-cmd;

Each cycle, Mesa sends back the counted number of generated pulses for reporting:
joint.N.pos-fb <- hm2.N.stepgen.position-fb;

The difference between the sent position and the feedback is tracked using the joint.N.f-error pin.The path planner (on the computer) and stepgen (inside the Mesa board) do not influence each other, but each performs its own role in the chain.

I hope you understand that, in this logic, the position can't simply shift in the planner. If there was an error, it would mean it was transmitting an incorrect coordinate to the mesa, and the same incorrect coordinate would be visible in your DRO (since it's also connected to the joint.N.pos-cmd == axis.N.pos-cmd signal). And the incorrect path would be drawn in the graphics window. The "live plot" draws either based on the pos-cmd or pos-fb numbers. there's a switch for this.

If "LinuxCNC believes the machine has returned to the correct point," then the planner has indeed returned to that point and is transmitting that exact position command to mesa.If the error occurred in stepgen inside mesa, then the position-fb counter would have returned an incorrect number of counts (as a float64 number, not pulses).

If your servos don't report their own following error, then there remains the possibility of an error between Mesa => Servo. Due to electrical interference/noise, not all pulses could have been received by your servo - it thinks it's following the path, but in fact, not all the pulses reached it.
This is confirmed by the fact that you saw a connection between the error and pulse timings.

I have been working with linuxcnc and fusion 360 for a long time as post programmer, so I can assure you - there is no connection between the post processor, pathplanner and your problem. Both work fine.
Last edit: 7 months 2 weeks ago by hmnijp.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago #344432 by tommylight

HLFB is configured at 20 counts and did NOT trigger.
How much is that in distance?
And that goes both directions, so the actual error can hypothetically be 39 counts without triggering.
Granted, i agree with others, interference is the first thing t eliminate as you do have cumulative errors on both axis, and probably the third, too.

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago #344437 by PCW
I would also try:

1. Single ended step/dir wiring:

7I96S +5V --> MOTOR STEP+
7I96S STEP- --> MOTOR STEP-
7I96S +5V --> MOTOR DIR+
7I96S STEP- --> MOTOR DIR-

2. Increase the step length (double if possible)

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago #344441 by spumco

How much is that in distance?
 

Tommy...
The standard encoder for Clearpath is 800 counts/rev.  With 4mm pitch screws that's about +/- 20 microns before the servo vomits.

OP...
I've had issues with clearpath step/dir that were resolved using the resistor they indicate in the user manual.  Your cables may not be very long (mine were ~20 feet), but it did help with lost pulses from the PLC to the motor.

Note that I never had an issue with direction changes, only the motors not moving as far as I'd expected.  I chased couplings, planetary reducer shaft clamps, and everything mechanical until I put the resistors in.

Also, Clearpath has an input filtering setting in MSP software; might want to play with that if you think some of the pulses are going astray.

 


 

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago #344442 by dbtayl
Running the ClearPath motors in quadrature mode is free, same wiring and everything. AFAIK there are only upsides to doing so- your fastest signal becomes half as fast, so you gain margin, and noise is less likely to accumulate into "permanent" errors, more likely to jitter back/forth one step. Which is still bad, but less bad.

Even if that has nothing to do with anything you're experiencing, I'd still advocate for it as technically better.
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

More
7 months 2 weeks ago #344489 by Teknic_Servo
Hi maruf1777,

I’m an engineer with Teknic and I came across your thread. There are a lot of good recommendations from other users, and it looks like you’ve got some solid next steps to test. If you want direct help from Teknic, feel free to contact us at 585‑784‑7454 or www.teknic.com/contact/ and one of our engineers will be happy to assist.

Also to build on dbtayl’s quadrature note: when ClearPath is set to quadrature input, it treats each edge transition on the A and B signals as a count. So if you keep the same command resolution (counts/rev), the required signal rate on each line is actually 1/4 the pulse frequency you'd need when using step & direction. If your Mesa card supports quadrature output, you can set ClearPath’s Input Format to Quadrature in ClearPath‑MSP, which can help if you’re running into pulse‑rate limits or signal‑integrity issues.

Best regards,
Nick D. - Teknic Servo Systems Engineer

Please Log in or Create an account to join the conversation.

Time to create page: 0.196 seconds
Powered by Kunena Forum