Manufacturing Information Solutions Forum Index Manufacturing Information Solutions
Your Place for Support and Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How To Automatically Uupdat Work Offsets

 
Post new topic   Reply to topic    Manufacturing Information Solutions Forum Index -> G-Code Programming
View previous topic :: View next topic  
Author Message
mistux
Site Admin


Joined: 25 Jun 2004
Posts: 1042
Location: South Bend, Indiana USA

PostPosted: Fri Jul 02, 2004 12:20 pm    Post subject: How To Automatically Uupdat Work Offsets Reply with quote

I found this while surfing, and wanted to shair it here.

This program automatically updates the current coordinate system's work offsets. The program takes into account the current mirror image state. The program is written for the OM control because #3005 is used to determine the mirror image state. It can be modified for other controls by changing #3005 to #3007 and updating the IF statements.

Code:
%
O9011(SET WORK OFFSET)
#3003=1
(***FIND ACTIVE OFFSET***)
#101=#4014-53
(***FIND MIRROR IMAGE STATUS***)
#100=#3005
N5IF[[#100-1024]LT0]GOTO10
#100=#100-1024
N10IF[[#100-512]LT0]GOTO20
#100=#100-512
N20IF[[#100-128]LT0]GOTO30
#100=#100-128
N30IF[[#100-64]LT0]GOTO40
#100=#100-64
N40IF[[#100-16]LT0]GOTO50
#100=#100-16
N50IF[[#100-8]LT0]GOTO60
#100=#100-8
N60IF[[#100-4]LT0]GOTO70
#100=#100-4
N70
(***SET COORDINATE FOR EACH MIRROR IMAGE***)
IF[#100EQ0]GOTO100
IF[#100EQ1]GOTO200
IF[#100EQ2]GOTO300
#[2500+#101]=-#5021
#[2600+#101]=-#5022
GOTO1000
N100
#[2500+#101]=#5021
#[2600+#101]=#5022
GOTO1000
N200
#[2500+#101]=-#5021
#[2600+#101]=#5022
GOTO1000
N300
#[2500+#101]=#5021
#[2600+#101]=-#5022
N1000#3003=0
M30
%


If you modify it post your changes here for others to shair Exclamation


Legal stuff: I provide this "As Is" and make no express guarantees that it will work and/or will work on your machine. It is intended as a guide and as with all programs should be fully tested before it is ran.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Manufacturing Information Solutions Forum Index -> G-Code Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group