Try using the #WKSCHG flag to check for a tool change and tool index
combined.

    <0>=Tool change or tool plane change

    <1>=Tool change and tool plane change

@TPINDX
#IF(#WKSCHG=1)<#EXIT>
 ( INDEX TO A#INDXA DEGREES)
 #MOV #ABSI #FXD  Z#ZHOME(CLEARANCE POINT)
  A#INDXA
  M60 (A-AXIS BRAKE ON)

 

============================================= 
 Fred Lauzus, CAM Programming Coordinator 
 High Steel Structures, Incorporated 
  mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
http://www.highsteel.com <http://www.highsteel.com/>  
============================================= 
  

 

-----Original Message-----
From: Jon Baker [mailto:[EMAIL PROTECTED]]
Sent: Thursday, November 02, 2000 12:04 PM
To: [EMAIL PROTECTED]
Subject: [mfg-smartcam] 4th axis indexing confusion.


In the pursuit of 100% perfect code, I have nailed it now on 3 axis
machining, however, when I add the 4th axis, I still have a little editing.
OK, this is a little anoyance, however, lets see what the smartest smartcam
minds can do to help out.
 
Here is my tool change section of my TMP file
 
//  TOOL CHANGES
@TOOLCHG
< #FXD> M9 M5
 #MOV G28 G91 Z0 
 T#TOOL M6 (  #TDESC #TLCMT )
  M1
#EVAL(#V9=#SPEED+.2)
#EVAL(#CYCLE=jos(cycle))
#IF(#CYCLE=3,#AND#TLTYPE=4)<G0 G17 G40 G80 G90 E1 S#V9 M90 M5>#ELSE<G0 G17
G40 G80 G90 E1>
#IF(#CYCLE=3,#AND#TLTYPE=4)< G84.2>
#IF(#CYCLE<>3)< #SPNDL S#SPEED>
 #MOV #IF(#WKSCHG<>1) X#XPOS Y#YPOS A#INDXA
#IF(#INDXA<>)< M60 (CLAMP A-AXIS)>
 G43 H#LOFF D#DOFF #IF(#WKSCHG<>1)< Z#ZPOS>#ELSE< Z#ZHOME> #COOLNT
@
 
Here is my A-axis indexing section
// A-AXIS INDEXING
@TPINDX
 ( INDEX TO A#INDXA DEGREES)
 #MOV #ABSI #FXD  Z#ZHOME(CLEARANCE POINT)
  A#INDXA
  M60 (A-AXIS BRAKE ON)
 
Here is the code it is putting out
 
N112 T3 M6 (  1.234 DIA. TWIST DRILL  )
N113  M1
N114(STEP DESC.:    PILOT DRILL BORE)
N115G0 G17 G40 G80 G90 E1
N116 M3 S433
N117 G0  X-0.937 Y0.0 A0.0
N118 M60 (CLAMP A-AXIS)
N119 G43 H3 D3  Z3.5 M8
N120 G73 G98 X-0.937 Y0.0 Z-0.25 R2.55 Q1.234 F5.2
N121 ( INDEX TO A180.0 DEGREES)
N122 G0 G90 G80  Z3.5(CLEARANCE POINT)
N123  A180.0
N124  M60 (A-AXIS BRAKE ON)
N125 G73 G98 X-0.937 Y0.0 Z-0.25 R2.55 F5.2
N126 M9 M5
N127 G0 G28 G91 Z0 
N128 T4 M6 (  1.250 DIA. BORE  )
N129  M1
N130(STEP DESC.:    FINISH BORE)
N131G0 G17 G40 G80 G90 E1
N132 M3 S367
N133 G0  X-0.937 Y0.0 A0.0
N134 M60 (CLAMP A-AXIS)
N135 G43 H4 D4  Z3.5 M8
N136 ( INDEX TO A0.0 DEGREES)    
N137 G0 G90 G80  Z3.5(CLEARANCE POINT)
N138  A0.0
N139  M60 (A-AXIS BRAKE ON)
N140 G88 G98 X-0.937 Y0.0 Z-2.55 R2.55 P500  F1.8
N141 M9 M5
N142 G0 G28 G91 Z0 
 
Now how can I make line 136 thru 139 NOT appear since they already are
updated  in the tool change.
This only happens when I do a tool change AND index to a new A-axis
position.  I thought the #IF line in the tool change would catch it, but
nope.  What am I missing.
Thanks in advance for your input.
Jon

======================================================================
To find out more about this mailing list including how to unsubscribe,
send the message "info mfg-smartcam" to [EMAIL PROTECTED]
======================================================================

Reply via email to