Problem with arcs from gcodetools

Shop Forum Makelangelo Polargraph Art Robot Problem with arcs from gcodetools

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #6136
    Anonymous
    Inactive

    I have just started testing the GCodeCNCDemo with my DIY plotter and found
    it quite useful. I am using two 28BYJ-48 driven by ULN2003.

    I have used gcodes generated by gcodetools in Inkscape. First I have used flattening of Beziers in Inkscape, so the codes generated are all straight lines. Unfortunately, their approximation, with the tiny imprecision of the mechanics (I know it is tiny, because in raster mode it is quite precise) the result is somewhat disappointing – the curves are distorted, the circles’ ends do not meet, etc.

    That is why I wanted to use arcs and found GCodeCNCDemo. After modifications for my steppers it works exactly the same with straights as my previous method. With arcs, however, I have encountered a strange problem: whenever arcs are commanded, the output is very erratic, including the pen going into negative coordinates, while all commands are using positive coordinates. I have researched the gcode arcs a bit and found this quote:

    “There are a number ways that machine tool builders have chosen to program arc centers for their machines. Some require that the Is, Js and Ks are the location of the center of arc based on the absolute coordinates of the
    program. Others require that the Is, Js and Ks describe the arc center location as an incremental distance and direction from the center of the arc to the start point of the arc.”

    Could that be the reason the arcs do not work?

    #7162
    Anonymous
    Inactive

    Try some test arc.

    starting at 0,0…

    G0 X5
    G2 X-5 I0 J0
    G3 X5 I0 J0

    This should draw a half-circle and then draw the same half-circle again in the other direction. Can you take a video or photo of the results?

    Thanks.

    #7163
    Anonymous
    Inactive

    Hmm… for some reason on one arc command it does not move and on another it goes a short distance and then it stops. The G0 works as expected.

    By the way, I have changed the commands to X500 etc. as X5 would move only 5 steps, which would not be noticeable…

    #7164
    Anonymous
    Inactive

    I have found the source of the problem for now: if the segments variable is too high, then the pen does not move as probably the line segments are too short to be even rendered. If I get the segments lower (by not multiplying them by MM_FOR_SEGMENT and by dividing them by 10), the circle gets drawn. However, it is rather squarish – I will get a picture soon.

    #7165
    Anonymous
    Inactive

    It seems there’s a scale problem, for sure. gcodecncdemo *should* treat 5 as 5mm, not 5 steps.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.