Hello... I wrote same question on linuxcnc forum bit got no replies. Maybe is just wrong place to ask. So here is again problem.
Hello.. I write hole center probe subroutine and works nice if it's called from main program. in test.ngc I have ;----------------------------------- o<hcenter> call M02 ;----------------------------------- and that's works without problem. but if I type o<hcenter> call in MDI mode the only 1's move is ok and after that the move's are unpredictable for my opinion. and there is hcenter.ngc ;----------------------------------- o<h Center> sub F200 ;set feedrate for probe G30.1 ;Save current coordinate G38.3 Y285 ;Scan +Y limit #100 = #5062 ;Save +Y limit G30 ;Back to start cordinate G38.3 Y-4 ;Scan -Y limit G0Y[[#5062+#100]/2] ;goto aprox Y center G30.1 ;Save current coordinate G38.3 X255 ;Scan +X limit #101 = #5061 ;Save +X limit G30 ;Back to start cordinate G38.3 X0 ;Scan -X limit G0X[[#5061+#101]/2] ;goto exact X center #101= [#101-#5061] ;calculate span X G30.1 ;Save current coordinate G38.3 Y285 ;Scan +Y limit #100 = #5062 ;Save +Y limit G30 ;Back to start cordinate G38.3 Y-4 ;Scan -Y limit G0Y[[#5062+#100]/2] ;goto exact Y center #100= [#100-#5062] ;calculate span Y #102=[#100-#101] ;excentricy #100=[[#100+#101]/2] ;XY diameter (debug, Diameter+probe=#100, excentricy=#102) o<h Center> endsub m02 ;----------------------------------- ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
