discriminant -0.000000 < 0 in velocity calculation

More
14 Jun 2014 03:13 #47961 by galalex
Hello everyone,

I am having a strange error from time to time when executing some gcodes.

I am using a beaglebone black + BeBoPr-Bridge setup + linuxcnc python api.

Linuxcnc is version: 2.7.0~pre0

The error is:

Error: (11, 'discriminant -0.000000 < 0 in velocity calculation!\n')

I found the place where the error occurs in the code:
In the source code: 1994@src/emc/tp/tp.c
// Descriminant is a little more complicated with final velocity term. If
// descriminant < 0, we've overshot (or are about to). Do the best we can
// in this situation

However, I still do not understand what can cause it. Could it be my .init file settings ?

Here are my axis settings:
[AXIS_0]

TYPE =              LINEAR
MAX_VELOCITY =       400.0
MAX_ACCELERATION =   400.0
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL =    480.0
STEPGEN_MAX_ACC =    480.0

BACKLASH =           0.000

SCALE =  -17.65

MIN_LIMIT =             -850.0
MAX_LIMIT =             1.0

FERROR =     10.0
MIN_FERROR = 1.0

HOME =                  0.0
HOME_OFFSET =           0.0
HOME_SEARCH_VEL =       20.0
HOME_LATCH_VEL =        0.50

#HOME_USE_INDEX =        YES
#HOME_IGNORE_LIMITS =    YES


# nanoseconds units
DIRSETUP   =              200
DIRHOLD    =              200
STEPLEN    =              1000
STEPSPACE  =              1000


[AXIS_1]

TYPE =              LINEAR
MAX_VELOCITY =       8.0
MAX_ACCELERATION =   6.0
# Set Stepgen max 20% higher than the axis
STEPGEN_MAX_VEL =    9.6
STEPGEN_MAX_ACC =    7.2

#BACKLASH =           0.000

SCALE =  -754.7

MIN_LIMIT =             -150.0
#MIN_LIMIT =             -190.0
MAX_LIMIT =             1.0

FERROR =     10.0
MIN_FERROR = 0.5

HOME =                  0.00
HOME_OFFSET =           0.00
HOME_SEARCH_VEL =       5.00
HOME_LATCH_VEL =        2.50

#HOME_USE_INDEX =        YES
#HOME_IGNORE_LIMITS =    YES

# these are in nanoseconds
DIRSETUP   =              200
DIRHOLD    =              200
STEPLEN    =              1000
STEPSPACE  =              1000


Cheers,

Alex

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

More
14 Jun 2014 15:43 #47964 by ArcEye
Hi

Could you attach your complete config dir in a zip, along with some gcode that produces the error.

I have asked the developers list to look at this when that info is available.

There has been a lot of work on the trajectory planner recently. It is possible that this error is connected and you are doing something they never thought to test, so it did not occur for them.

regards

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

More
16 Jun 2014 21:59 - 16 Jun 2014 22:00 #48006 by galalex
Hello,

Please see attachment for the config dir.

I will post very soon some gcodes that cause this error (I gotta trim them down first).

Thank you,

Alex
Attachments:
Last edit: 16 Jun 2014 22:00 by galalex. Reason: forgot attachment.

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

More
16 Jun 2014 22:35 - 16 Jun 2014 22:47 #48007 by galalex
Okay, I managed to create a small gcode file that reproduces the bug.

The gcode (also in attachment):
G61
G1 X -850  F6000
G0 X -325 ; bug appears here
G1 X -275 F300
G0 X -52
G1 X -2 F300
M2
Attachments:
Last edit: 16 Jun 2014 22:47 by galalex. Reason: showing where the bug happens

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

More
16 Jun 2014 22:55 #48008 by galalex
Here is another gcode file that reproduces the bug:
G61
G0 X -850
G0 X -325 ; bug happens here
G0 X -0.1
M2

Thank you,

Alex
Attachments:

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

More
16 Jun 2014 23:12 #48009 by galalex
Another observation:

If I replace G61 by G64 (with some G4 P0.1) the problem does not apear.

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

More
17 Jun 2014 01:15 #48010 by cradek
Thank you for the test gcode! Unfortunately I can not reproduce this. I am on the tip of master, which is currently 377f171, running sim/axis/axis_mm edited so the velocities and accelerations match yours. Exactly what version are you using (git log --oneline -1)? Can you reproduce it in sim?

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

More
17 Jun 2014 03:40 #48014 by galalex

Thank you for the test gcode! Unfortunately I can not reproduce this. I am on the tip of master, which is currently 377f171, running sim/axis/axis_mm edited so the velocities and accelerations match yours. Exactly what version are you using (git log --oneline -1)? Can you reproduce it in sim?


Thanks for tips.

I am unable to find 377f171.

The machinekit on the beaglebone black is setup with this repo:
github.com/machinekit/machinekit.git

I just did a git pull so now I am at:
a81e30b Merge pull request #225 from zultron/master

I recompiled everything but the bug is still there.

##
Originally, I was using repo: github.com/machinekit/machinekit.git and the last commit was:
63ff141 Merge pull request #180 from luminize/vel-control-extruding


I will try with sim/axis/axis_mm (with the modifications) and report the results...

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

More
17 Jun 2014 13:19 #48023 by ArcEye

The machinekit on the beaglebone black is setup with this repo:
github.com/machinekit/machinekit.git

I just did a git pull so now I am at:
a81e30b Merge pull request #225 from zultron/master


You did not say you were running machinekit.

You are on the wrong forum, go here and ask the question
groups.google.com/forum/#!forum/machinekit

Machinekit is a fork of linuxcnc, it does not follow all linuxcnc commits and has a lot of
commits of code not found in linuxcnc.

regards

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

More
17 Jun 2014 20:52 #48038 by galalex
Oops, my bad.

Thanks for the link.

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

Time to create page: 0.085 seconds
Powered by Kunena Forum