please look over my shoulder if this is bona fide bug:

it seems that a G38.3 failed probe interacts with O-word if/then/else  
in a strange way.

reproduce by:

expected behaviour:

- touchoff x,y,z to 0
- execute in MDI:
        g38.3 z-3
        g0 z0
- z feed moves to -3 where probe times out without contact, g0  
retracts to 0 properly.

unexpected behaviour:

- same thing done through a sub stored in a file
- save subroutine below
- call in MDI with O4711 call [1] - g1 and g0 moves work as expected
- call in MDI with O4711 call [0] - G38 probe times out, following  
G0Z0 is NOT executed, z remains at -3

if the G0 Z0 move is changed to a Z value <> 0, it actually IS executed.

It seems in the else path emc thinks it actually already is at 0 while  
it's actually at -3 - which doesnt happen when executed in manually in  
MDI


-Michael


save this as 4711.ngc :
------------------snip------
O4711 sub
f50

O102 if [#1 GT 0]
(debug, normal g1/g0 moves)
g1 z-3
g0 z0
O102 else
(debug, probe without contact, then retract)
g38.3 z-3
; the following move is NOT executed:
g0 z0
; if z <> 0, it actually IS executed
; these ones ARE executed:
g0 x5
g0 y3

O102 endif
O4711 endsub

m2
---------------- snip ----

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to