Skip to content

pncconf: update of the last page - #4930

Open
zz912 wants to merge 1 commit into
LinuxCNC:masterfrom
zz912:pnc-last-page
Open

zz912 wants to merge 1 commit into
LinuxCNC:masterfrom
zz912:pnc-last-page

Conversation

@zz912

@zz912 zz912 commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

The text on the final page of PNCconf was copied from STEPconf. I updated it to make sense for applications using Mesa cards. I also replaced a broken URL link to the wiki.linuxcnc.org site.

pnc-last_page

Comment thread src/emc/usr_intf/pncconf/finished.glade Outdated

Click "Done" to write your configuration files to disk.

<b>If you experience lost steps while running LinuxCNC:</b>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pncconf also builds servo configs with encoder feedback. Would a user on that setup look for "lost steps", or for a following error?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. I understand your point, but I would prefer to keep these two issues separate.

The lost-steps advice is specifically intended for open-loop stepper drives, where LinuxCNC has no position feedback and cannot detect missed steps. In this case, I want to guide users towards checking the stepper driver configuration and hardware rather than looking for a problem in LinuxCNC or the Mesa FPGA.

I would also add a note about low-cost stepper drivers. Some of them use relatively slow optocouplers on their STEP inputs, sometimes operating close to their timing limits. Increasing the STEP pulse length can often resolve intermittent lost steps in these cases.

I would deliberately leave following errors out of this section. Their causes are more complex and can involve several parts of the motion system, including the Mesa step generator in velocity mode. I don't think the final pncconf page is the right place for such a broad troubleshooting topic.

My intention is to keep this page short and focused on a few practical hints for the most common issues, rather than trying to cover every possible motion-related problem.

Proposed text revision:

If you experience position loss with STEP/DIR drives without position feedback to LinuxCNC:

- First verify that you entered the proper timings for your stepper drivers.
- Some low-cost stepper drivers use slow optocouplers. Increasing the STEP pulse length may help prevent lost steps.
- Check the motor current, acceleration and maximum velocity settings.
- Check for mechanical problems or excessive load.

Do you agree with this revision?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't use pncconf these days, but I do remember a lot of following errors when I first started setting things up with it ages ago, now I don't because I know what I'm doing (at least I think I do), maybe an f-error link to the docs would help as well, IMO it is a very common issue when you starting with LinuxCNC, and the instinct might be putting a huge value, and you don't really want to do that...
If you are of the opinion that f-error is currently a solved thing and is not high in probable issues one faces when starting things up the first time, then I would concede the point as having an antiquated view, I am talking 2.5 era so it probably is ;-)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think following errors are a solved problem. My concern is that I cannot summarize the troubleshooting steps in just a few sentences without oversimplifying the issue.

I would also prefer to keep position loss and following errors separate. They are different problems, with different causes and troubleshooting approaches, so I don't think combining them under one heading would be helpful.

If you could suggest a specific link to documentation explaining how to diagnose and resolve following errors, I would be happy to include it on the final page.

I agree that it is a common issue for users getting started with LinuxCNC, and I don't want to dismiss it. I just want to avoid giving users oversimplified or potentially misleading advice.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your lost-steps revision reads well to me, and so does the hm2_eth heading.

I could not find one page on diagnosing following errors. Would a short section that links out work?

<b>If you get a joint following error:</b>
- Do not just raise FERROR; a large value hides real faults.
- Keep STEPGEN_MAXVEL and STEPGEN_MAXACCEL above the joint MAX_VELOCITY and MAX_ACCELERATION.
- Check the encoder scale and direction, if fitted.
- Tune the PID loop, used on stepgen joints too:
  https://linuxcnc.org/docs/html/motion/pid-theory.html#_loop_tuning
- Read about FERROR, MIN_FERROR and the stepgen limits:
  https://linuxcnc.org/docs/html/config/ini-config.html#sub:ini:sec:joint-num

If you think it is too much for this page, I get it; feel free to leave it out.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think a short section with links could be useful.

I have one question regarding this recommendation:

"Keep STEPGEN_MAXVEL and STEPGEN_MAXACCEL above the joint MAX_VELOCITY and MAX_ACCELERATION."

As far as I understand, pncconf calculates STEPGEN_MAXVEL and STEPGEN_MAXACCEL automatically, so the user cannot directly adjust these values in pncconf. Therefore, I'm not sure how actionable this advice is for someone using pncconf.

Personally, I tend to increase STEPGEN_MAXVEL and STEPGEN_MAXACCEL manually in the INI file, as much as reasonably possible, and this seems to help with following errors. However, I'm not sure whether this is actually the correct approach or just a workaround.

What is your opinion on this? Would increasing these limits be a reasonable troubleshooting step?

I don't want to expand the scope of this PR, but it made me think that pncconf could perhaps offer a configurable multiplier for STEPGEN_MAXVEL and STEPGEN_MAXACCEL. This could give users more control without having to edit the INI file manually.

I would replace the sentence:
Check the encoder scale and direction, if fitted.
with:
Check the encoder scale and direction, if encoder feedback is used by LinuxCNC.

https://www.forum.linuxcnc.org/38-general-linuxcnc-questions/38043-mesa-stepgen-motion-profile-and-joint-following-error

PCW explained that the acceleration mismatch was expected because LinuxCNC's trajectory planner at that time was a second-order planner without jerk limiting. However, he attributed the velocity-dependent following error mainly to incorrect FF1 tuning or feedback scaling.

So I don't want to suggest that an S-curve planner is a general solution for following errors.

My question is whether it would be worth mentioning S-curve planning as a possible way to reduce acceleration mismatch and drive lag, particularly with velocity-mode step generators, or whether you would leave this out of the final page entirely.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MAXVEL advice is a premonition, in case of manual edits, you can omit it if you think it is irrelevant.

On a servo drive setup with feedback, enabling scurve on the controller enables you to get rid of it on the servos, and that will lower the ferror, that could be a relevant advice, I wouldn't mind seeing it here, something along those lines or whatever you think is useful and easy to grasp for a new user. S-curve can also alleviate other issues but I would not expand too much on it in the text here.

By the way, another thing that is improving and should see less overshooting/ferror is kinematics, TP will be more aware of joint limits and plan accordingly, still work in progress, somewhat relevant but probably not worth mentioning here :-)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on your suggestions, I propose adding the following section for joint following errors:

<b>If you get a joint following error:</b>
- Do not simply increase FERROR; a large value can hide real problems.
- Check the encoder scale and direction, if encoder feedback is used by LinuxCNC.
- Tune the PID loop:
  https://linuxcnc.org/docs/html/motion/pid-theory.html#_loop_tuning
- For servo systems with position feedback to LinuxCNC, enabling S-curve trajectory planning in LinuxCNC may help reduce following errors.
- Read about FERROR, MIN_FERROR and the stepgen limits:
  https://linuxcnc.org/docs/html/config/ini-config.html#sub:ini:sec:joint-num

Could you please review this wording and let me know if you see any technical inaccuracies or would suggest any changes?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes that will do, thanks

Comment thread src/emc/usr_intf/pncconf/finished.glade Outdated
- Run a more thorough latency test as described in the LinuxCNC documentation:
&lt;a href="https://linuxcnc.org/docs/html/install/latency-test.html"&gt;https://linuxcnc.org/docs/html/install/latency-test.html&lt;/a&gt;

&lt;b&gt;If the Mesa watchdog is triggered:&lt;/b&gt;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With an Ethernet card, is the watchdog what people usually report first, or is it hm2_eth: error finishing read? Would naming that message help someone searching the forum?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest replacing:

"If the Mesa watchdog is triggered:"

with:

"If you experience "hm2_eth: error finishing read" or a Mesa watchdog timeout:"

This makes the section more useful by explicitly mentioning the Ethernet communication error that users may encounter before a watchdog timeout occurs.

Comment thread src/emc/usr_intf/pncconf/finished.glade Outdated
&lt;b&gt;If the Mesa watchdog is triggered:&lt;/b&gt;
- Check for excessive realtime latency or communication problems between the PC and the Mesa card.
- Verify that your system can reliably meet the configured servo-thread period.</property>
<property name="use-markup">True</property>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The label has no wrap. The English fits in your screenshot, but what happens to the window width when a translation makes the longest line half again as long?

@zz912

zz912 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor Author

Current status:
pnc-last_page2
I have also added scroll and wrap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants