First,  the joint 0 following error is related to your ini settings, and the 
max speed or acceleration are set at too great a value for the axis generating 
the error.

At first sight, the code looks ok, but I would try making #<cnt> a global 
variable #<_cnt>

G10 L20 P1

might work better, as co-ordinate system numbering starts at 1 for G54

Marcus
 
On 18 Mar 2018, at 05:27, Ralph Stirling wrote:

> Why oh why does my looping program zip
> right through my moves even with G61.1
> exact stop, and an M0 at the end of the loop?
> Not a single move gets completed:
> 
> Here is my test program (testing my polar
> coordinate machine, doing 90 degree rotations):
> 
> (AXIS,stop)
> (AXIS,hide)
> #<cnt> = 0
> O100 while [#<cnt> LE 4]
> 
> (print, start)
> G61.1
> G1 X15.0 Y30.0 F1000.0
> 
> G1 X20.0 Y20.0 
> 
> #<oldx> = #<_x>
> #<oldy> = #<_y>
> #<x2> = [#<_x> * #<_x>]
> #<y2> = [#<_y> * #<_y>]
> #<x2y2> = [#<x2> + #<y2>]
> #<at> = [atan[#<_y>]/[#<_x>]]
> #<theta> = [#<at> - 90.0]
> #<rho>   = [sqrt[#<x2y2>]]
> #<ct> = [cos[#<theta>]]
> #<st> = [sin[#<theta>]]
> #<x> = [#<rho> * #<ct>]
> #<y> = [#<rho> * #<st>]
> 
> G1 X#<x> Y#<y>
> G10 L20 P0 X#<oldx> Y#<oldy>
> (print, var 5222=#5222)
> (print, end)
> M0
> 
> #<cnt> = [#<cnt> + 1]
> (print,cnt=#<cnt>)
> 
> O100 endwhile
> M2
> %
> 
> The output I get is:
> 
> Emit interp-run
> Emit interp-run
> start
> var 5222=-40.000000
> end
> cnt=1.000000
> start
> var 5222=-80.000000
> end
> cnt=2.000000
> start
> var 5222=-120.000000
> end
> cnt=3.000000
> start
> var 5222=-160.000000
> end
> cnt=4.000000
> start
> var 5222=-200.000000
> end
> cnt=5.000000
> 
> joint 0 following error
> 
> With nary a pause.  It never made the first G1
> move.  I thought G61.1 would make it do each
> move completely before proceeding, and I thought
> an M0 stops until you press "go" again.  What's up?
> 
> And, of course, this is simply a hindrance in figuring
> out why the G10 L20 isn't working as expected.
> 
> Thanks to anybody awake that can clue me in.
> -- Ralph
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to