Jim, This question of general interest so I'm forwarding it to the group, share and share alike.
To address gear changes I typically use a look-up table and a user defined table variable. Below is an example of their usage. The low range is from 0 up to 700 RPM and #Range outputs the code M38. The high range is from anything greater than 700 up to 3150 RPM and outputs an M code of M39. Additional ranges could be added. Since there are no additional ranges, anything higher than 3150 and #Range will still output the code M39. @DECLARE #TBL #Range @Range 700,M38 3150,M39 @START #EVAL(#Range=#SPEED) % #ONBLK G49 #DCOMP #ABSI #PLANE #MOV X#XPOS Y#YPOS T#TOOL M06 #Range S#SPEED #SPNDL G45 H#LOFF Z#ZPOS T#NTOOL @TOOLCHG #EVAL(#Range=#SPEED) M05 < #FXD> #MOV G91 G28 Z0.0 #ABSI X#XPOS Y#YPOS G49 T#TOOL M06 #Range S#SPEED #SPNDL G45 H#LOFF Z#ZPOS T#NTOOL ============================================= Fred Lauzus, CAM Programming Coordinator High Steel Structures, Incorporated mailto:[EMAIL PROTECTED] http://www.highsteel.com ============================================= -----Original Message----- From: Jim Wade [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 05, 2001 8:41 AM To: [EMAIL PROTECTED] Subject: mazak Fred, Would you have in any of your code generators (.tmp file) a way to enter a statement to automatically change spindle gears based on required RPM. If not when I get that information I'll forward a copy to you. Thanks, Jim ====================================================================== To find out more about this mailing list including how to unsubscribe, send the message "info mfg-smartcam" to [EMAIL PROTECTED] ======================================================================
