while/endwhile constructs do longer work

Results 1 to 13 of 13

Thread: while/endwhile constructs do longer work

  1. #1

    Default while/endwhile constructs do longer work

    I have over 100 hand coded gcode files that ran perfectly on a Mk1 controller with 2.10.1412.1501 on WindowsNT. I recently updated to 2.10.1807.2601. After the update all my existing files that had while/endwhile constructs stopped execution (actual and simulated) after the first encountered endwhile statement. All existing files that did not have while/endwhile constructs continued to run perfectly after the update.

    Any suggestions?
    Is a download of 2.10.1412.1501 available to revert my update?

    Similar Threads:


  2. #2
    Member deadlykitten's Avatar
    Join Date
    Jun 2015
    Location
    Antarctica
    Posts
    4131
    Downloads
    0
    Uploads
    0

    Default Re: while/endwhile constructs do longer work

    hy what about replacing all your loops with linear code ? maybe i can help you



  3. #3
    Member PlanetCNC's Avatar
    Join Date
    Mar 2017
    Location
    Slovenia
    Posts
    1293
    Downloads
    0
    Uploads
    0

    Default Re: while/endwhile constructs do longer work

    Send me this g-code and I'll check what is wrong.



  4. #4

    Default Re: while/endwhile constructs do longer work

    Here's an example of the g-code. Before the software update to 2.10.1807.2601 this gcode drew two concentric five point stars (it's a test pattern). After the update it only draws the smaller star and stops execution after line 30. I've attached a screen shot. It shows only the single star.

    Thanks. Your help is greatly appreciated!

    %
    (Star test pattern - little first)
    (For 450nm laser)
    (Laser uses output 1)
    (Use M3 to turn laser on)
    (Use M5 to turn laser off)

    (X, Y = 0 is the center of the star)
    (Z = 0 is laser focal point)

    G17 G21 G40 G80 G90
    G92.1

    F[1000]

    #1 = [15] (little R)
    #2 = [#1 * [1.5 - [sqrt[5] / 2]]]
    #3 = [0] (rotation angle)

    G0 x[0] y[#1] (starting point)

    M7 (turn mist/air on)
    M3 (turn laser on)

    o100 while [#3 LE 288]
    G1 x[#2 * sin[36 + #3]] y[#2 * cos[36 + #3]]
    G1 x[#1 * sin[72 + #3]] y[#1 * cos[72 + #3]]
    #3 = [#3 + 72]
    o100 endwhile

    M5 (turn laser off)

    #1 = [25] (big R)
    #2 = [#1 * [1.5 - [sqrt[5] / 2]]]
    #3 = [0] (rotation angle)

    G0 x[0] y[#1]

    M3 (turn laser on)

    o200 while [#3 LE 288]
    G1 x[#2 * sin[36 + #3]] y[#2 * cos[36 + #3]]
    G1 x[#1 * sin[72 + #3]] y[#1 * cos[72 + #3]]
    #3 = [#3 + 72]
    o200 endwhile

    M5 (turn laser off)
    M9 (turn mist/air off)

    M2
    %

    Attached Thumbnails Attached Thumbnails while/endwhile constructs do longer work-star-test-pattern-little-first-jpeg  


  5. #5
    Member PlanetCNC's Avatar
    Join Date
    Mar 2017
    Location
    Slovenia
    Posts
    1293
    Downloads
    0
    Uploads
    0

    Default Re: while/endwhile constructs do longer work

    I can confirm this is a bug.



  6. #6

    Default Re: while/endwhile constructs do longer work

    Thanks. Do you know where I can find a download of 2.10.1412.1501? That was the version I was using before the update that worked.

    I checked the planet-cnc.com web site but there didn't appear to be any place to download older versions.



  7. #7
    Member PlanetCNC's Avatar
    Join Date
    Mar 2017
    Location
    Slovenia
    Posts
    1293
    Downloads
    0
    Uploads
    0

    Default Re: while/endwhile constructs do longer work

    Contact our support



  8. #8

    Default Re: while/endwhile constructs do longer work

    Thanks! I'll contact support now.



  9. #9

    Default Re: while/endwhile constructs do longer work

    Is there any fix for this bug?



  10. #10
    Member PlanetCNC's Avatar
    Join Date
    Mar 2017
    Location
    Slovenia
    Posts
    1293
    Downloads
    0
    Uploads
    0

    Default Re: while/endwhile constructs do longer work

    Both stars are visible and g-code runs as it should.

    while/endwhile constructs do longer work-planetcnc32d_vz1r9e3beq-png

    Attached Thumbnails Attached Thumbnails while/endwhile constructs do longer work-planetcnc32d_vz1r9e3beq-png  


  11. #11

    Default Re: while/endwhile constructs do longer work

    Hello,
    yesterday I was playing with nested while and it seems that only one cycle of the outside loop is executed.
    I've also tried to use a simple counter in the outside loop instead of the derided behaviour to exlude any programming error

    %
    G21G54G90G17

    #1=12 (diameter)
    #2=30 (x side)
    #3=22 (y side)
    #4=0.4 (stepover)
    #5=0 (z)
    #9=300 (vertical feedrate)
    #<_DEPTH>=-10
    #<_ZSTEP>=-1
    #<_HFEED>=2000
    #<_STEPOV>=[#1*#4]

    #<_RADIUS>=[#<_STEPOV>/2]

    #<_ENDY>=[#3+#1]


    (start outside)
    #10=[0 - #1*2]
    #11=[0 - #1*[1-#4]]

    G0 X#10 Y#11

    G0Z0.1


    #10=[#2+#1]

    #<_CURRZ>=#<_ZSTEP>

    (cycle Z)

    #100=0

    (O100 WHILE [#<_CURRZ> GT #<_DEPTH>])

    O100 WHILE [#100 LT 10]
    (G1 Z#<_CURRZ> F#9)
    G1 Z#100 F#9

    (cycle XY)
    O110 WHILE [#11 LT #<_ENDY>]

    G1 X#10 F#<_HFEED>

    #11=[#11+#<_STEPOV>]

    G3 Y#11 R#<_RADIUS>
    G1 X[0-#1]

    #11=[#11+#<_STEPOV>]
    G2 Y#11 R#<_RADIUS>
    O110 ENDWHILE


    #<_CURRZ>=[#<_CURRZ> + #<_ZSTEP>]
    #100=[#100+1]
    O100 ENDWHILE
    G0Z10
    G28


    %





    P.S. I have version 2.10.1807.2601 like the user at the beginning of the thread



  12. #12
    Member PlanetCNC's Avatar
    Join Date
    Mar 2017
    Location
    Slovenia
    Posts
    1293
    Downloads
    0
    Uploads
    0

    Default Re: while/endwhile constructs do longer work

    CNC USB software is obsolete for 10 years and not supported any more.
    You should update to latest TNG software.



  13. #13

    Default Re: while/endwhile constructs do longer work

    Problem is: I have a MK2/4 board. I suppose it is not supported by TNG. Am I wrong?
    Unluckly, I bought the MK2/4 board many years ago but I have completed my cnc project only this year!



Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

while/endwhile constructs do longer work

while/endwhile constructs do longer work