Fred's reply will work but it's going to be a lot of macro work.  You might want to consider modifying the tmp file to go thru a @TOOLCHK section that will reset the variables.
 
@TOOLCHK
IF(#DOFF=1,AND #TOOL=1)<#EVAL(#DOFF=1)#EVAL(#TOOL=1)#EVAL(#V1=16)#EVAL(#V2=1)>
IF(#DOFF=15,AND #TOOL=1)<#EVAL(#DOFF=15)#EVAL(#TOOL=1)#EVAL(#V1=16)#EVAL(#V2=1)>
IF(#DOFF=2,AND #TOOL=1)<#EVAL(#DOFF=2)#EVAL(#TOOL=2)#EVAL(#V1=16)#EVAL(#V2=2)>
 
Then in each section you would add #CALL(TOOLCHK)
Note: This will only work if there is a direct correlation between tool and offsets between machines and that once you changed the offsets in the TOOLCHK section the next time thru it would not change them again.
 
The advantage would be that you would only have to change the smf and tmp and recode the file for the new machine.  I am also presuming there are no other changes.

Bill Wepking
Landis Gardner

-----Original Message-----
From: Michael Senack [mailto:[EMAIL PROTECTED]
Sent: Monday, March 10, 2003 4:34 PM
To: 'SmartCAM Users Group ([EMAIL PROTECTED])'
Subject: [mfg-smartcam] Macro inspiration

I'm looking for some ideas to start a macro for automatically changing User Elements.

 

Attached is an Advanced Wire EDM .PM4 program for our Agie wire EDM machine.

 

The program is intended for the Agie 100 control.

However if that machine is tied up, I have to reprogram it to the HS150

Agie by modifying the following user elements manually.

 

Modify Element 3

from #DOFF=15,#TOOL=1  to #DOFF=15,#TOOL=1,#V1=16,#V2=1

 

Modify Element 26

from #DOFF=1,#TOOL=1  to  #DOFF=1,#TOOL=1,#V1=16,#V2=1

 

Modify Element 41

from #DOFF=2,#TOOL=1  to  #DOFF=2,#TOOL=2,#V1=16,#V2=2

 

Modify Element 56

from #DOFF=3,#TOOL=2  to  #DOFF=3,#TOOL=3,#V1=16,#V2=3

 

Is it possible to check if the element is an User Element that is #DOFF=1,#TOOL=1

then if it is change it to #DOFF=1,#TOOL=1,#V1=16,#V2=1 ?

 

Any ideas to get me started are greatly appreciated.

 

Regards,

Michael Senack

Reply via email to