Re: [Machinekit] I'm pulling my hair out over this, "Can't add linear move at line xxxx, error code -7"
Hi Rob, Thanks for taking a look! Perhaps this information could help you get a predictable case set up. While testing, I'm able to always reproduce the error -7 when my [AXIS_0]HOME_OFFSET is set to 2.7499, [AXIS_0]HOME set to 2.5 and a program that simply moves to 2.5 in X: % G0 X2.5 % The error that is produced in /var/log/linuxcnc.log: user line can't have zero length! xyz start = 2.50007435e+00,2.4910e+00,-2.559125863375e-10, end = 2.5000e+00,2.4910e+00,-2.559125863375e-10 -John On Thursday, January 24, 2019 at 12:33:02 PM UTC-7, Robert Ellenberg wrote: > > Hi John, > > I'm taking another look at this now, and seeing some weird behavior with > the example NGC file in LinuxCNC 2.7.x too (hits an acceleration violation > in the A axis around line 1600). I suspect that there is an issue with the > floating point comparisons as well, in particular since LinuxCNC handles > the case of rotary + linear motion differently than a pure rotary motion. > As such, a motion that has some rotary motion and a pathologically small > linear motion could be triggering the problem. I don't currently have a > machinekit build on my dev PC, but I will set one up and do further testing > in simulation shortly. > > Best, > Rob > > On Thu, Jan 24, 2019 at 10:26 AM > wrote: > >> Hey Robert, >> >> Have you had a chance to look at this any closer? We hit this error 100% >> of the time on the Pocket NC for specific values of various HOME_OFFSETs >> (our current solution is to tweak those values by .0001" until the error >> goes away). The error occurs immediately after pressing the run button on >> any program after homing the machine. Any jogging before running the >> program and it runs fine. I've done a little digging into the code base to >> see what could be causing the issue, but don't have a good enough sense of >> the overall flow of data. Any insights would be appreciated. I've located >> several floating point equality comparisons that would result in a more >> precise comparison than the 1e-20 the trajectory planner is comparing >> against, but haven't had any luck when changing from direct equality (or >> inequality) operations to a difference comparison (i.e. changing x == y to >> abs(x-y) < epsilon). >> >> Here are a few places I've tried adjusting: >> >> https://github.com/machinekit/machinekit/blob/1dfa0045ba95fd68e744826d684efa513cbffa97/src/emc/motion/control.c#L449 >> >> https://github.com/machinekit/machinekit/blob/1dfa0045ba95fd68e744826d684efa513cbffa97/src/emc/rs274ngc/interp_convert.cc#L2465 >> >> (and several other similar instances in that same file) >> >> https://github.com/machinekit/machinekit/blob/1dfa0045ba95fd68e744826d684efa513cbffa97/src/emc/nml_intf/canon_position.cc#L73 >> >> (as well as !=) >> >> I don't know the best way to go about debugging this. Do you know how I >> could find where the zero length moves are being added to the trajectory >> planner and what normally prevents that from happening? >> >> Yours and Schooner's insights have been helpful so far. Maybe we can work >> together to figure out what is going on. >> >> -John >> >> On Saturday, February 25, 2017 at 1:16:32 PM UTC-7, Robert Ellenberg >> wrote: >>> >>> Hi All, >>> >>> My guess is that this is a mismatch between canon and the TP in how a >>> zero length segment is defined. I recall running into a similar issue with >>> LinuxCNC. If we're lucky, it's been fixed already in another branch and >>> it's a matter of porting the fix over to Machinekit. I'll take a look this >>> weekend. >>> >>> Best, >>> Rob >>> >>> On Sat, Feb 25, 2017 at 10:08 AM schoo...@btinternet.com < >>> schoo...@btinternet.com> wrote: >>> On 25/02/17 11:47, schoo...@btinternet.com wrote: On 25/02/17 07:55, icecube45 wrote: It's seemingly a different line each time I run the file, this time it was line 20462, which is either the middle of > G1 X-9.794 Y-69.769 A29.4549 > > G1 X-10.971 Y-71.809 A29.5489 > > G1 X-13.951 Y-71.809 A29.6678 > > or the middle of > G1 X31.776 Y-64.609 A48.9986 G1 X34.755 Y-64.609 A49.1175 G1 X35.933 Y-62.569 A49.2115 defendant on if comments count as lines or not.. Nothing seems out of the ordinary here, which is why I'm so confused. The error is defined as TP_ERR_ZERO_LENGTH https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp_types.h#L61 The trajectory planner is dark magic with which I have no particular familiarity. It was certainly not developed to squirt plastic in tens of thousands of extremely small moves. My only guess might be that depending upon what blending settings you have, it may not recognise a commanded move(s) as any sort of move at all. But I could be completely wrong. Hopefully Robert or someone with m
Re: [Machinekit] I'm pulling my hair out over this, "Can't add linear move at line xxxx, error code -7"
Hi John, It looks like it affects LinuxCNC too, I created an issue to track it here: https://github.com/LinuxCNC/linuxcnc/issues/550 The root cause seems to be that canon and TP have different ideas of what a "small" displacement is. Due to architectural decisions made before my time, the TP has to re-do a lot of the work already done in canon, and one such task is deciding whether to treat a move as purely angular, or linear+angular. This distinction is necessary in the first place because of the way the TP was designed ("progress" along a segment means different things for different moves). Long story short, for this case, canon thinks a move is pure-angular, but TP thinks it's linear + angular. There are several possible fixes for this: 1. Redesign the interface between canon / TP to make the linear / angular choice explicit (API change, possible breakage of out-of-tree uses of motion) 2. Force the TP to use the same units as canon (would be nice for other reasons too, but requires touching a lot of the TP) 3. Do minimum-displacement checks in canon using user (and therefore TP) units, instead of internal units. (Ugly kludge, which is not unusual for canon unfortunately). I'm looking at doing some combination of (1) and (2) in the long term, but (3) is the winner for now since I already have something working there. I'll rebase the fix onto machinekit master once I get more testing done. Best, Rob -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] I'm pulling my hair out over this, "Can't add linear move at line xxxx, error code -7"
Hi Rob, Thanks for taking a look! Here's some information that hopefully will get you a predictable test case. I can reliably create the error -7 by setting my [AXIS_0]HOME_OFFSET to 2.7499, my [AXIS_0]HOME to 2.5 and running a program that simply moves to X 2.5: % G0 X2.5 % -John -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] I'm pulling my hair out over this, "Can't add linear move at line xxxx, error code -7"
Hi John, I'm taking another look at this now, and seeing some weird behavior with the example NGC file in LinuxCNC 2.7.x too (hits an acceleration violation in the A axis around line 1600). I suspect that there is an issue with the floating point comparisons as well, in particular since LinuxCNC handles the case of rotary + linear motion differently than a pure rotary motion. As such, a motion that has some rotary motion and a pathologically small linear motion could be triggering the problem. I don't currently have a machinekit build on my dev PC, but I will set one up and do further testing in simulation shortly. Best, Rob On Thu, Jan 24, 2019 at 10:26 AM wrote: > Hey Robert, > > Have you had a chance to look at this any closer? We hit this error 100% > of the time on the Pocket NC for specific values of various HOME_OFFSETs > (our current solution is to tweak those values by .0001" until the error > goes away). The error occurs immediately after pressing the run button on > any program after homing the machine. Any jogging before running the > program and it runs fine. I've done a little digging into the code base to > see what could be causing the issue, but don't have a good enough sense of > the overall flow of data. Any insights would be appreciated. I've located > several floating point equality comparisons that would result in a more > precise comparison than the 1e-20 the trajectory planner is comparing > against, but haven't had any luck when changing from direct equality (or > inequality) operations to a difference comparison (i.e. changing x == y to > abs(x-y) < epsilon). > > Here are a few places I've tried adjusting: > > https://github.com/machinekit/machinekit/blob/1dfa0045ba95fd68e744826d684efa513cbffa97/src/emc/motion/control.c#L449 > > https://github.com/machinekit/machinekit/blob/1dfa0045ba95fd68e744826d684efa513cbffa97/src/emc/rs274ngc/interp_convert.cc#L2465 > (and several other similar instances in that same file) > > https://github.com/machinekit/machinekit/blob/1dfa0045ba95fd68e744826d684efa513cbffa97/src/emc/nml_intf/canon_position.cc#L73 > (as well as !=) > > I don't know the best way to go about debugging this. Do you know how I > could find where the zero length moves are being added to the trajectory > planner and what normally prevents that from happening? > > Yours and Schooner's insights have been helpful so far. Maybe we can work > together to figure out what is going on. > > -John > > On Saturday, February 25, 2017 at 1:16:32 PM UTC-7, Robert Ellenberg wrote: >> >> Hi All, >> >> My guess is that this is a mismatch between canon and the TP in how a >> zero length segment is defined. I recall running into a similar issue with >> LinuxCNC. If we're lucky, it's been fixed already in another branch and >> it's a matter of porting the fix over to Machinekit. I'll take a look this >> weekend. >> >> Best, >> Rob >> >> On Sat, Feb 25, 2017 at 10:08 AM schoo...@btinternet.com < >> schoo...@btinternet.com> wrote: >> >>> >>> On 25/02/17 11:47, schoo...@btinternet.com wrote: >>> >>> >>> On 25/02/17 07:55, icecube45 wrote: >>> >>> It's seemingly a different line each time I run the file, this time it >>> was line 20462, which is either the middle of >>> G1 X-9.794 Y-69.769 A29.4549 G1 X-10.971 Y-71.809 A29.5489 G1 X-13.951 Y-71.809 A29.6678 or the middle of >>> >>> >>> G1 X31.776 Y-64.609 A48.9986 >>> >>> G1 X34.755 Y-64.609 A49.1175 >>> >>> G1 X35.933 Y-62.569 A49.2115 >>> >>> >>> defendant on if comments count as lines or not.. >>> Nothing seems out of the ordinary here, which is why I'm so confused. >>> >>> >>> The error is defined as TP_ERR_ZERO_LENGTH >>> >>> https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp_types.h#L61 >>> >>> The trajectory planner is dark magic with which I have no particular >>> familiarity. >>> It was certainly not developed to squirt plastic in tens of thousands of >>> extremely small moves. >>> >>> My only guess might be that depending upon what blending settings you >>> have, it may not recognise a commanded move(s) as >>> any sort of move at all. >>> But I could be completely wrong. >>> >>> Hopefully Robert or someone with more knowledge will chime in. >>> >>> >>> Just to flesh this out a bit >>> >>> This is the code which is throwing the error >>> >>> https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp.c#L1937 >>> >>> if (tc.target < TP_POS_EPSILON) { >>> rtapi_print_msg(RTAPI_MSG_DBG,"failed to create line id %d, >>> zero-length segment\n",tp->nextId); >>> return TP_ERR_ZERO_LENGTH; >>> } >>> >>> If you switched on debugging, you should see this message in >>> /var/log/linuxcnc.log >>> >>> This is why I am surmising that an extremely small move, with some >>> rounding down from the tp settings, >>> could be causing the error. >>> >>> TP_POS_EPSILON is defined here >>> >>> https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp_types.h#L44 >>> as 1e-12 (
Re: [Machinekit] I'm pulling my hair out over this, "Can't add linear move at line xxxx, error code -7"
Hey Robert, Have you had a chance to look at this any closer? We hit this error 100% of the time on the Pocket NC for specific values of various HOME_OFFSETs (our current solution is to tweak those values by .0001" until the error goes away). The error occurs immediately after pressing the run button on any program after homing the machine. Any jogging before running the program and it runs fine. I've done a little digging into the code base to see what could be causing the issue, but don't have a good enough sense of the overall flow of data. Any insights would be appreciated. I've located several floating point equality comparisons that would result in a more precise comparison than the 1e-20 the trajectory planner is comparing against, but haven't had any luck when changing from direct equality (or inequality) operations to a difference comparison (i.e. changing x == y to abs(x-y) < epsilon). Here are a few places I've tried adjusting: https://github.com/machinekit/machinekit/blob/1dfa0045ba95fd68e744826d684efa513cbffa97/src/emc/motion/control.c#L449 https://github.com/machinekit/machinekit/blob/1dfa0045ba95fd68e744826d684efa513cbffa97/src/emc/rs274ngc/interp_convert.cc#L2465 (and several other similar instances in that same file) https://github.com/machinekit/machinekit/blob/1dfa0045ba95fd68e744826d684efa513cbffa97/src/emc/nml_intf/canon_position.cc#L73 (as well as !=) I don't know the best way to go about debugging this. Do you know how I could find where the zero length moves are being added to the trajectory planner and what normally prevents that from happening? Yours and Schooner's insights have been helpful so far. Maybe we can work together to figure out what is going on. -John On Saturday, February 25, 2017 at 1:16:32 PM UTC-7, Robert Ellenberg wrote: > > Hi All, > > My guess is that this is a mismatch between canon and the TP in how a zero > length segment is defined. I recall running into a similar issue with > LinuxCNC. If we're lucky, it's been fixed already in another branch and > it's a matter of porting the fix over to Machinekit. I'll take a look this > weekend. > > Best, > Rob > > On Sat, Feb 25, 2017 at 10:08 AM schoo...@btinternet.com < > schoo...@btinternet.com > wrote: > >> >> On 25/02/17 11:47, schoo...@btinternet.com wrote: >> >> >> On 25/02/17 07:55, icecube45 wrote: >> >> It's seemingly a different line each time I run the file, this time it >> was line 20462, which is either the middle of >> >>> G1 X-9.794 Y-69.769 A29.4549 >>> >>> G1 X-10.971 Y-71.809 A29.5489 >>> >>> G1 X-13.951 Y-71.809 A29.6678 >>> >>> or the middle of >> >>> >> >> G1 X31.776 Y-64.609 A48.9986 >> >> G1 X34.755 Y-64.609 A49.1175 >> >> G1 X35.933 Y-62.569 A49.2115 >> >> >> defendant on if comments count as lines or not.. >> Nothing seems out of the ordinary here, which is why I'm so confused. >> >> >> The error is defined as TP_ERR_ZERO_LENGTH >> >> https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp_types.h#L61 >> >> The trajectory planner is dark magic with which I have no particular >> familiarity. >> It was certainly not developed to squirt plastic in tens of thousands of >> extremely small moves. >> >> My only guess might be that depending upon what blending settings you >> have, it may not recognise a commanded move(s) as >> any sort of move at all. >> But I could be completely wrong. >> >> Hopefully Robert or someone with more knowledge will chime in. >> >> >> Just to flesh this out a bit >> >> This is the code which is throwing the error >> https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp.c#L1937 >> >> if (tc.target < TP_POS_EPSILON) { >> rtapi_print_msg(RTAPI_MSG_DBG,"failed to create line id %d, >> zero-length segment\n",tp->nextId); >> return TP_ERR_ZERO_LENGTH; >> } >> >> If you switched on debugging, you should see this message in >> /var/log/linuxcnc.log >> >> This is why I am surmising that an extremely small move, with some >> rounding down from the tp settings, >> could be causing the error. >> >> TP_POS_EPSILON is defined here >> >> https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp_types.h#L44 >> as 1e-12 ( which is 10 to -12 or 0.000 000 000 001 !! ) >> >> Why this is occurring I don't know, but you can switch on debugging and >> confirm that this is indeed the bit causing it. >> >> You can also switch off blending (G64 P0) or adjust the blend tolerance >> settings ( G64 Pn.nn ) and see if it improves. >> >> >> >> >> On Friday, February 24, 2017 at 4:47:47 AM UTC-8, Schooner wrote: >>> >>> >>> On 24/02/17 12:03, icecube45 wrote: >>> >>> Does anyone have any idea what this error code is? It occasionally >>> happens, yet I can't isolate what is actually causing it, nor what the -7 >>> error code actually means. >>> >>> >>> >>> https://github.com/machinekit/machinekit/blob/master/src/emc/motion/command.c#L953 >>> >>> It means that it does not like one of the parameters to a linear
Re: [Machinekit] I'm pulling my hair out over this, "Can't add linear move at line xxxx, error code -7"
I believe you're correct, my logs show the following: > Feb 17 23:45:18 beaglebone rtapi:0: 4:rtapi_app:8608:user line can't have >> zero length! xyz start = >> -9.2650e+00,4.9573e+01,3.8000e-01, end = >> -9.2650e+00,4.9573e+01,3.8000e-01 > > Feb 17 23:45:18 beaglebone rtapi:0: 4:rtapi_app:8608:user failed to create >> line id 5517, zero-length segment > > > On Saturday, February 25, 2017 at 7:08:03 AM UTC-8, Schooner wrote: > > > On 25/02/17 11:47, schoo...@btinternet.com wrote: > > > On 25/02/17 07:55, icecube45 wrote: > > It's seemingly a different line each time I run the file, this time it was > line 20462, which is either the middle of > >> G1 X-9.794 Y-69.769 A29.4549 >> >> G1 X-10.971 Y-71.809 A29.5489 >> >> G1 X-13.951 Y-71.809 A29.6678 >> >> or the middle of > >> > > G1 X31.776 Y-64.609 A48.9986 > > G1 X34.755 Y-64.609 A49.1175 > > G1 X35.933 Y-62.569 A49.2115 > > > defendant on if comments count as lines or not.. > Nothing seems out of the ordinary here, which is why I'm so confused. > > > The error is defined as TP_ERR_ZERO_LENGTH > > https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp_types.h#L61 > > The trajectory planner is dark magic with which I have no particular > familiarity. > It was certainly not developed to squirt plastic in tens of thousands of > extremely small moves. > > My only guess might be that depending upon what blending settings you > have, it may not recognise a commanded move(s) as > any sort of move at all. > But I could be completely wrong. > > Hopefully Robert or someone with more knowledge will chime in. > > > Just to flesh this out a bit > > This is the code which is throwing the error > https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp.c#L1937 > > if (tc.target < TP_POS_EPSILON) { > rtapi_print_msg(RTAPI_MSG_DBG,"failed to create line id %d, > zero-length segment\n",tp->nextId); > return TP_ERR_ZERO_LENGTH; > } > > If you switched on debugging, you should see this message in > /var/log/linuxcnc.log > > This is why I am surmising that an extremely small move, with some > rounding down from the tp settings, > could be causing the error. > > TP_POS_EPSILON is defined here > > https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp_types.h#L44 > as 1e-12 ( which is 10 to -12 or 0.000 000 000 001 !! ) > > Why this is occurring I don't know, but you can switch on debugging and > confirm that this is indeed the bit causing it. > > You can also switch off blending (G64 P0) or adjust the blend tolerance > settings ( G64 Pn.nn ) and see if it improves. > > > > On Friday, February 24, 2017 at 4:47:47 AM UTC-8, Schooner wrote: >> >> >> On 24/02/17 12:03, icecube45 wrote: >> >> Does anyone have any idea what this error code is? It occasionally >> happens, yet I can't isolate what is actually causing it, nor what the -7 >> error code actually means. >> >> >> >> https://github.com/machinekit/machinekit/blob/master/src/emc/motion/command.c#L953 >> >> It means that it does not like one of the parameters to a linear move. >> >> EMCMOT_COMMAND_BAD_EXEC means there was an error trying to initiate the >> command. >> This would suggest the command was valid syntax but the acc, vel, move >> extent or some other factor was not. >> >> Unless you can tell us what the move asked for was, it is impossible to >> guess. >> >> line should be a number, it may not strictly equate to the line >> number but should be a number non the less. >> >> >> >> I'd appreciate any advice on how to fix this error - it's popping up >> randomly and stopping my prints. >> >> For reference, I'm on a BeBoPr++ lineardelta configuration. >> -- >> website: http://www.machinekit.io blog: http://blog.machinekit.io >> github: https://github.com/machinekit >> --- >> You received this message because you are subscribed to the Google Groups >> "Machinekit" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to machinekit+...@googlegroups.com. >> Visit this group at https://groups.google.com/group/machinekit. >> For more options, visit https://groups.google.com/d/optout. >> >> >> -- > website: http://www.machinekit.io blog: http://blog.machinekit.io github: > https://github.com/machinekit > --- > You received this message because you are subscribed to the Google Groups > "Machinekit" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to machinekit+...@googlegroups.com . > Visit this group at https://groups.google.com/group/machinekit. > For more options, visit https://groups.google.com/d/optout. > > > -- > website: http://www.machinekit.io blog: http://blog.machinekit.io github: > https://github.com/machinekit > --- > You received this message because you are subscribed to the Google Groups > "Machinekit" group. > To unsubscribe from this group and stop receiving emails from it, send an > email t
Re: [Machinekit] I'm pulling my hair out over this, "Can't add linear move at line xxxx, error code -7"
Hi All, My guess is that this is a mismatch between canon and the TP in how a zero length segment is defined. I recall running into a similar issue with LinuxCNC. If we're lucky, it's been fixed already in another branch and it's a matter of porting the fix over to Machinekit. I'll take a look this weekend. Best, Rob On Sat, Feb 25, 2017 at 10:08 AM schoone...@btinternet.com < schoone...@btinternet.com> wrote: > > On 25/02/17 11:47, schoone...@btinternet.com wrote: > > > On 25/02/17 07:55, icecube45 wrote: > > It's seemingly a different line each time I run the file, this time it was > line 20462, which is either the middle of > > G1 X-9.794 Y-69.769 A29.4549 > > G1 X-10.971 Y-71.809 A29.5489 > > G1 X-13.951 Y-71.809 A29.6678 > > or the middle of > > > > G1 X31.776 Y-64.609 A48.9986 > > G1 X34.755 Y-64.609 A49.1175 > > G1 X35.933 Y-62.569 A49.2115 > > > defendant on if comments count as lines or not.. > Nothing seems out of the ordinary here, which is why I'm so confused. > > > The error is defined as TP_ERR_ZERO_LENGTH > > https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp_types.h#L61 > > The trajectory planner is dark magic with which I have no particular > familiarity. > It was certainly not developed to squirt plastic in tens of thousands of > extremely small moves. > > My only guess might be that depending upon what blending settings you > have, it may not recognise a commanded move(s) as > any sort of move at all. > But I could be completely wrong. > > Hopefully Robert or someone with more knowledge will chime in. > > > Just to flesh this out a bit > > This is the code which is throwing the error > https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp.c#L1937 > > if (tc.target < TP_POS_EPSILON) { > rtapi_print_msg(RTAPI_MSG_DBG,"failed to create line id %d, > zero-length segment\n",tp->nextId); > return TP_ERR_ZERO_LENGTH; > } > > If you switched on debugging, you should see this message in > /var/log/linuxcnc.log > > This is why I am surmising that an extremely small move, with some > rounding down from the tp settings, > could be causing the error. > > TP_POS_EPSILON is defined here > > https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp_types.h#L44 > as 1e-12 ( which is 10 to -12 or 0.000 000 000 001 !! ) > > Why this is occurring I don't know, but you can switch on debugging and > confirm that this is indeed the bit causing it. > > You can also switch off blending (G64 P0) or adjust the blend tolerance > settings ( G64 Pn.nn ) and see if it improves. > > > > > On Friday, February 24, 2017 at 4:47:47 AM UTC-8, Schooner wrote: > > > On 24/02/17 12:03, icecube45 wrote: > > Does anyone have any idea what this error code is? It occasionally > happens, yet I can't isolate what is actually causing it, nor what the -7 > error code actually means. > > > > https://github.com/machinekit/machinekit/blob/master/src/emc/motion/command.c#L953 > > It means that it does not like one of the parameters to a linear move. > > EMCMOT_COMMAND_BAD_EXEC means there was an error trying to initiate the > command. > This would suggest the command was valid syntax but the acc, vel, move > extent or some other factor was not. > > Unless you can tell us what the move asked for was, it is impossible to > guess. > > line should be a number, it may not strictly equate to the line > number but should be a number non the less. > > > > I'd appreciate any advice on how to fix this error - it's popping up > randomly and stopping my prints. > > For reference, I'm on a BeBoPr++ lineardelta configuration. > -- > website: http://www.machinekit.io blog: http://blog.machinekit.io github: > https://github.com/machinekit > --- > You received this message because you are subscribed to the Google Groups > "Machinekit" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to machinekit+...@googlegroups.com. > Visit this group at https://groups.google.com/group/machinekit. > For more options, visit https://groups.google.com/d/optout. > > > -- > website: http://www.machinekit.io blog: http://blog.machinekit.io github: > https://github.com/machinekit > --- > You received this message because you are subscribed to the Google Groups > "Machinekit" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to machinekit+unsubscr...@googlegroups.com. > Visit this group at https://groups.google.com/group/machinekit. > For more options, visit https://groups.google.com/d/optout. > > > -- > website: http://www.machinekit.io blog: http://blog.machinekit.io github: > https://github.com/machinekit > --- > You received this message because you are subscribed to the Google Groups > "Machinekit" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to machinekit+unsubscr...@googlegroups.com. > Visit this group at https://groups.google.com/group/machinekit. > For more options, visit https://gro
Re: [Machinekit] I'm pulling my hair out over this, "Can't add linear move at line xxxx, error code -7"
On 25/02/17 11:47, schoone...@btinternet.com wrote: On 25/02/17 07:55, icecube45 wrote: It's seemingly a different line each time I run the file, this time it was line 20462, which is either the middle of G1 X-9.794 Y-69.769 A29.4549 G1 X-10.971 Y-71.809 A29.5489 G1 X-13.951 Y-71.809 A29.6678 or the middle of G1 X31.776 Y-64.609 A48.9986 G1 X34.755 Y-64.609 A49.1175 G1 X35.933 Y-62.569 A49.2115 defendant on if comments count as lines or not.. Nothing seems out of the ordinary here, which is why I'm so confused. The error is defined as TP_ERR_ZERO_LENGTH https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp_types.h#L61 The trajectory planner is dark magic with which I have no particular familiarity. It was certainly not developed to squirt plastic in tens of thousands of extremely small moves. My only guess might be that depending upon what blending settings you have, it may not recognise a commanded move(s) as any sort of move at all. But I could be completely wrong. Hopefully Robert or someone with more knowledge will chime in. Just to flesh this out a bit This is the code which is throwing the error https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp.c#L1937 if (tc.target < TP_POS_EPSILON) { rtapi_print_msg(RTAPI_MSG_DBG,"failed to create line id %d, zero-length segment\n",tp->nextId); return TP_ERR_ZERO_LENGTH; } If you switched on debugging, you should see this message in /var/log/linuxcnc.log This is why I am surmising that an extremely small move, with some rounding down from the tp settings, could be causing the error. TP_POS_EPSILON is defined here https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp_types.h#L44 as 1e-12 ( which is 10 to -12 or 0.000 000 000 001 !! ) Why this is occurring I don't know, but you can switch on debugging and confirm that this is indeed the bit causing it. You can also switch off blending (G64 P0) or adjust the blend tolerance settings ( G64 Pn.nn ) and see if it improves. On Friday, February 24, 2017 at 4:47:47 AM UTC-8, Schooner wrote: On 24/02/17 12:03, icecube45 wrote: Does anyone have any idea what this error code is? It occasionally happens, yet I can't isolate what is actually causing it, nor what the -7 error code actually means. https://github.com/machinekit/machinekit/blob/master/src/emc/motion/command.c#L953 It means that it does not like one of the parameters to a linear move. EMCMOT_COMMAND_BAD_EXEC means there was an error trying to initiate the command. This would suggest the command was valid syntax but the acc, vel, move extent or some other factor was not. Unless you can tell us what the move asked for was, it is impossible to guess. line should be a number, it may not strictly equate to the line number but should be a number non the less. I'd appreciate any advice on how to fix this error - it's popping up randomly and stopping my prints. For reference, I'm on a BeBoPr++ lineardelta configuration. -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] I'm pulling my hair out over this, "Can't add linear move at line xxxx, error code -7"
On 25/02/17 07:55, icecube45 wrote: It's seemingly a different line each time I run the file, this time it was line 20462, which is either the middle of G1 X-9.794 Y-69.769 A29.4549 G1 X-10.971 Y-71.809 A29.5489 G1 X-13.951 Y-71.809 A29.6678 or the middle of G1 X31.776 Y-64.609 A48.9986 G1 X34.755 Y-64.609 A49.1175 G1 X35.933 Y-62.569 A49.2115 defendant on if comments count as lines or not.. Nothing seems out of the ordinary here, which is why I'm so confused. The error is defined as TP_ERR_ZERO_LENGTH https://github.com/machinekit/machinekit/blob/master/src/emc/tp/tp_types.h#L61 The trajectory planner is dark magic with which I have no particular familiarity. It was certainly not developed to squirt plastic in tens of thousands of extremely small moves. My only guess might be that depending upon what blending settings you have, it may not recognise a commanded move(s) as any sort of move at all. But I could be completely wrong. Hopefully Robert or someone with more knowledge will chime in. On Friday, February 24, 2017 at 4:47:47 AM UTC-8, Schooner wrote: On 24/02/17 12:03, icecube45 wrote: Does anyone have any idea what this error code is? It occasionally happens, yet I can't isolate what is actually causing it, nor what the -7 error code actually means. https://github.com/machinekit/machinekit/blob/master/src/emc/motion/command.c#L953 It means that it does not like one of the parameters to a linear move. EMCMOT_COMMAND_BAD_EXEC means there was an error trying to initiate the command. This would suggest the command was valid syntax but the acc, vel, move extent or some other factor was not. Unless you can tell us what the move asked for was, it is impossible to guess. line should be a number, it may not strictly equate to the line number but should be a number non the less. I'd appreciate any advice on how to fix this error - it's popping up randomly and stopping my prints. For reference, I'm on a BeBoPr++ lineardelta configuration. -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout. -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout. -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] I'm pulling my hair out over this, "Can't add linear move at line xxxx, error code -7"
It's seemingly a different line each time I run the file, this time it was line 20462, which is either the middle of > G1 X-9.794 Y-69.769 A29.4549 > > G1 X-10.971 Y-71.809 A29.5489 > > G1 X-13.951 Y-71.809 A29.6678 > > or the middle of > G1 X31.776 Y-64.609 A48.9986 G1 X34.755 Y-64.609 A49.1175 G1 X35.933 Y-62.569 A49.2115 defendant on if comments count as lines or not.. Nothing seems out of the ordinary here, which is why I'm so confused. On Friday, February 24, 2017 at 4:47:47 AM UTC-8, Schooner wrote: > > > On 24/02/17 12:03, icecube45 wrote: > > Does anyone have any idea what this error code is? It occasionally > happens, yet I can't isolate what is actually causing it, nor what the -7 > error code actually means. > > > > https://github.com/machinekit/machinekit/blob/master/src/emc/motion/command.c#L953 > > It means that it does not like one of the parameters to a linear move. > > EMCMOT_COMMAND_BAD_EXEC means there was an error trying to initiate the > command. > This would suggest the command was valid syntax but the acc, vel, move > extent or some other factor was not. > > Unless you can tell us what the move asked for was, it is impossible to > guess. > > line should be a number, it may not strictly equate to the line > number but should be a number non the less. > > > > I'd appreciate any advice on how to fix this error - it's popping up > randomly and stopping my prints. > > For reference, I'm on a BeBoPr++ lineardelta configuration. > -- > website: http://www.machinekit.io blog: http://blog.machinekit.io github: > https://github.com/machinekit > --- > You received this message because you are subscribed to the Google Groups > "Machinekit" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to machinekit+...@googlegroups.com . > Visit this group at https://groups.google.com/group/machinekit. > For more options, visit https://groups.google.com/d/optout. > > > -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
Re: [Machinekit] I'm pulling my hair out over this, "Can't add linear move at line xxxx, error code -7"
On 24/02/17 12:03, icecube45 wrote: Does anyone have any idea what this error code is? It occasionally happens, yet I can't isolate what is actually causing it, nor what the -7 error code actually means. https://github.com/machinekit/machinekit/blob/master/src/emc/motion/command.c#L953 It means that it does not like one of the parameters to a linear move. EMCMOT_COMMAND_BAD_EXEC means there was an error trying to initiate the command. This would suggest the command was valid syntax but the acc, vel, move extent or some other factor was not. Unless you can tell us what the move asked for was, it is impossible to guess. line should be a number, it may not strictly equate to the line number but should be a number non the less. I'd appreciate any advice on how to fix this error - it's popping up randomly and stopping my prints. For reference, I'm on a BeBoPr++ lineardelta configuration. -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout. -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.
[Machinekit] I'm pulling my hair out over this, "Can't add linear move at line xxxx, error code -7"
Does anyone have any idea what this error code is? It occasionally happens, yet I can't isolate what is actually causing it, nor what the -7 error code actually means. I'd appreciate any advice on how to fix this error - it's popping up randomly and stopping my prints. For reference, I'm on a BeBoPr++ lineardelta configuration. -- website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit --- You received this message because you are subscribed to the Google Groups "Machinekit" group. To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/machinekit. For more options, visit https://groups.google.com/d/optout.