STEPGEN_MAXACCEL from PNCconf

More
03 Oct 2022 13:08 #253347 by zz912
Hello,
I made a CNC machine work for a friend a few years ago.
zz912.webnode.cz/joes-cnc/

It was my first introduction to LCNC. At first it had unreliable electronics with a parallel port. The machine was a nightmare for me. it was a machine that churned out scraps all the time. The problem was that I had little experience with electronics and the error (lossing of steps) only appeared a few times in many hours. First, we replaced ordinary weak stepper motors with high-quality stepper motors with feedback. Only after installing the Mesa 7i96 card did the machine start working NON-STOP without any problems.

It worked until the hard drive in the PC failed. When I replaced the hard drive in the PC I did a new configuration of the machine via PNCconf, because the original configuration was my beginner's combination of PNCconf, JT configurator and my manual adjustments. I also switched his GUI from AXIS to Gmoccapy.

Everything worked fine when I was there. When I left, his machine started to stop. I have already started to stress that I will have to deal with it again for a year and a half.First

I replaced the PC. After that I thought it was Gmoccapy problem so I asked here:
forum.linuxcnc.org/gmoccapy/47029-error-...oad-gmoccapy-vs-axis

Then I remembered that when I first install this machine with a Mesa card, I had this problem (joint X follow error) as well. At that time, my colleague Mex from the Czech forum advised me to increase the value STEPGEN_MAXACCEL to twice the MAX_ACCELERATION value.

I then created a workplace to test this theory. At home I connected two 7i96 Mesa cards to two computers. I uploaded the same firmware to both cards, uploaded the same LCNC config to the computer and ran the same G-code as my friend had.
 

First, I ran the G-code with the same settings as my friend. Both computers stopped working after about an hour. I then increased the STEPGEN_MAXACCEL value to double the MAX_ACCELERATION value and now the two computers are running the second nine-hour G-code without error. I also made this change at my friend's, and his machine can now handle long programs as well.

 I know that in the ini file it says:
# The values ​below should be 25% greater than MAX_VELOCITY and MAX_ACCELERATION
# When using BACKLASH compensation, STEPGEN_MAXACCEL should be 100% larger.

But I wonder why the default value is only 1.25x? I would like to change it to 2x. Is it good idea? Would this be a problem with a specific card? If so, wouldn't it be a good idea to increase this value only for the 7i96 card?

The fact that I solved this problem was due to the fact that I already have some experience with LCNC and also to the fact that I was a little lucky.

Since I've spent almost the entire weekend trying to fix this problem, I'd like to fix it for everyone. I would like to make a Pull Request where I would change the value of 1.25x to 2x in the PNCconf source codes. But first I want to discuss it with you here on the forum.
Attachments:
The following user(s) said Thank You: arvidb

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

More
03 Oct 2022 15:33 #253354 by PCW
Replied by PCW on topic STEPGEN_MAXACCEL from PNCconf
I think another problem is involved. 1.25x is plenty of headroom for the
PID loop operation at the joint max_accel limit. Can you plot the following error
(along with joint velocity) at a following error event? (trigger on joint.0.f-errored)
The following user(s) said Thank You: zz912

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

More
03 Oct 2022 16:15 - 03 Oct 2022 16:27 #253356 by zz912
Replied by zz912 on topic STEPGEN_MAXACCEL from PNCconf
Do I have the oscilloscope set up correctly?
 

The problem is that two computers are stuck on "joint 2 follow error" and one computer is stuck on "joint 0 follow error".
I don't remember which one it was on.

At the same time, the error appears sometimes in 1 hour, sometimes in 4 hours.
That's why I'm asking you to check the Oscilloscope.

Idealy, if you should send me config of HAL Scope.

 
Attachments:
Last edit: 03 Oct 2022 16:27 by zz912. Reason: I asked for config of HAL Scope.

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

More
03 Oct 2022 16:37 - 03 Oct 2022 17:45 #253357 by PCW
Replied by PCW on topic STEPGEN_MAXACCEL from PNCconf
That looks about right except I would scale the following error so
the following error limit would be on screen.

Also could you post your current hal/ini files?
Last edit: 03 Oct 2022 17:45 by PCW.

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

More
04 Oct 2022 04:02 #253411 by zz912
Replied by zz912 on topic STEPGEN_MAXACCEL from PNCconf
It is weird, nothing happen. 
  

File Attachment:

File Name: halscope.log.txt
File Size:253 KB
Attachments:

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

More
04 Oct 2022 04:14 - 04 Oct 2022 04:37 #253412 by PCW
Replied by PCW on topic STEPGEN_MAXACCEL from PNCconf
what are the ferror limits?

I would also use no slower than 100 ms per division
as you may lose samples  at slower rates

(note there are only 4000 samples but 500 ms*10 divisions is
5000 servo thread cycles so you may miss details)
Last edit: 04 Oct 2022 04:37 by PCW.
The following user(s) said Thank You: tommylight

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

More
04 Oct 2022 10:04 #253428 by zz912
Replied by zz912 on topic STEPGEN_MAXACCEL from PNCconf

what are the ferror limits?


FERROR = 10.0
MIN_FERROR = 1.0

All configs and G-code, that cause stop machine are here:
forum.linuxcnc.org/gmoccapy/47029-error-...ccapy-vs-axis#253227

(note there are only 4000 samples but 500 ms*10 divisions is
5000 servo thread cycles so you may miss details)


I have no choice if I need 3 channel:
 

I dont know what should I do now.
Attachments:

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

More
04 Oct 2022 14:21 #253451 by PCW
Replied by PCW on topic STEPGEN_MAXACCEL from PNCconf
If you set the time per division to100 ms, can you see the ferrored signal?
Unless that can be captured, this will be difficult to debug

Can you set the scope to single sweep (so if you have a captured ferrored signal
its guaranteed that the scope captured it)

You might check the scope setup by deliberately generating a following error
(say by setting the PID maxoutput to 0.01)

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

Moderators: PCWjmelson
Time to create page: 0.134 seconds
Powered by Kunena Forum