Trajectory Planner using Ruckig Lib

More
2 years 11 months ago #286764 by Joco
Replied by Joco on topic Trajectory Planner using Ruckig Lib
Hi.  Took those increases out so no multiplier in place.  Still exactly same problem.  Might need to spend some time tracing through where the ferror testing is happening and therefore why it is triggering.  Not tonight and not until tomorrow afternoon as will be in the office for most of the day.

Cheers - J.

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

More
2 years 11 months ago #286786 by ihavenofish
Replied by ihavenofish on topic Trajectory Planner using Ruckig Lib

But what accelerations are you running? That’s where the challenges start to appear.


 
0.3g acceleration. 

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

More
2 years 11 months ago #286815 by Joco
Replied by Joco on topic Trajectory Planner using Ruckig Lib
@Grotius - found this when reading documentation this morning:

The concept of a following error is strange when talking about stepper motors. Since they are an open loop system, there is no position feedback to let you know if you actually are out of range. LinuxCNC calculates if it can keep up with the motion called for, and if not, then it gives a following error. Following errors usually are the result of one of the following on stepper systems.

  • FERROR too small
  • MIN_FERROR too small
  • MAX_VELOCITY too fast
  • MAX_ACCELERATION too fast
  • BASE_PERIOD set too long
  • Backlash added to an axis
Any of the above can cause the real-time pulsing to not be able to keep up the requested step rate.


Any advice/idea on how the runners would be potentially driving requests for too high an acceleration/velocity?  Those being the ones most likely to be at issue?   The min/max follow error look to be looser than the sim and also work just fine with the standard TP.

Thanks - J.

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

More
2 years 11 months ago #286826 by smc.collins
Replied by smc.collins on topic Trajectory Planner using Ruckig Lib
You can use encoders for position feedback with Linuxcnc, there's a bunch of threads about it.

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

More
2 years 11 months ago #286835 by Joco
Replied by Joco on topic Trajectory Planner using Ruckig Lib

You can use encoders for position feedback with Linuxcnc, there's a bunch of threads about it.
 
Yes I understand that. I have that on my mill.  However that is not the issue.  The problem is that for some reason the addition of the ruckig runner instances has somehow/somewhere generated a following error condition within in open stepper system.  So we need to unpick where/why/how that is happening.  As where things stand the code is great in the sim and dead in the water on physical kit, well specifically my phyiscal kit.  Unless someone has tested this latest code line on physical kit and has it working.  If so I REALLY want to see what their config setup is.

I believe following error is calculated, tested and flagged within src/emc/motion/control.c from lines 462 to 489.  Extract post below:
Code:
    /* calculate following error */     if ( IS_EXTRA_JOINT(joint_num) && get_homed(joint_num) ) {         joint->ferror = 0; // not relevant for homed extrajoints     } else {         joint->ferror = joint->pos_cmd - joint->pos_fb;     }     abs_ferror = fabs(joint->ferror);     /* update maximum ferror if needed */     if (abs_ferror > joint->ferror_high_mark) {         joint->ferror_high_mark = abs_ferror;     }     /* calculate following error limit */     if (joint->vel_limit > 0.0) {         joint->ferror_limit =         joint->max_ferror * fabs(joint->vel_cmd) / joint->vel_limit;     } else {         joint->ferror_limit = 0;     }     if (joint->ferror_limit < joint->min_ferror) {         joint->ferror_limit = joint->min_ferror;     }     /* update following error flag */     if (abs_ferror > joint->ferror_limit) {         SET_JOINT_FERROR_FLAG(joint, 1);     } else {         SET_JOINT_FERROR_FLAG(joint, 0);     }


Thanks - J.

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

More
2 years 11 months ago #286836 by Joco
Replied by Joco on topic Trajectory Planner using Ruckig Lib
Updated the code on line around line 484 as follows to spit out the follow error info if it trips.
Code:
    /* update following error flag */     if (abs_ferror > joint->ferror_limit) {         rtapi_print("FERROR tripped on joint <%i> Error = <%f>\n",                         joint_num, abs_ferror);         SET_JOINT_FERROR_FLAG(joint, 1);     } else {         SET_JOINT_FERROR_FLAG(joint, 0);     }

Attached is the log file from this run.
 

File Attachment:

File Name: run.log.txt
File Size:6 KB


Key info is the following error that was recorded on tripping the FERROR:
Code:
FERROR tripped on joint <0> Error = <624.997023> FERROR tripped on joint <1> Error = <299.997023> FERROR tripped on joint <2> Error = <299.997023> FERROR tripped on joint <3> Error = <4.998571> FERROR tripped on joint <0> Error = <624.997407> FERROR tripped on joint <1> Error = <299.997408> FERROR tripped on joint <2> Error = <299.997408> FERROR tripped on joint <3> Error = <4.998756>

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

Time to create page: 0.160 seconds
Powered by Kunena Forum