![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| G-Code Programing Discuss G-code programing and problems here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Hi, I am used awea with Fanuc 18 imb kontrol. We need workpiece zero set prg with macro prg is it possible like this mitsubishi we need fanuc #100=54 (Cordinate set G54) #101=[#100-54]x20 #105=5221+#101 #111=5021 M0 (Please push the cycle start button and goto other corner and touch) #112=#5021 #113=[#14+112]/2 #5221=#113 m30 #111=#5022 M0 #112=#5022 #113=[#111+#112]/2 #5022=#113 M30 For Z Axis #[2000+#120]=[#5023+#121] m30 Thanks Last edited by Osmanselim; 10-10-2007 at 07:22 AM. |
|
#3
| |||
| |||
| 071019-0600 EST USA Osmanselim: Does your last message mean that you are in desparate need of an answer? I am not familar with Mitsubishi, and could only guess on Fanuc based on my experience with HAAS. Sorry no one with experience on your machines has responded. . |
|
#4
| |||
| |||
| The macro you listed looks like it all might match up with a fanuc control, except the #101=[#100-54]x20 should be #101=[#100-54]*20 I did not verify the variables used, but they do look right. #5221, 5222 and 5223 are G54 X, Y, Z The #5021-5023 seem like they might be typos for 5221-5223. The logic does not make much sense, are these snipits of code form different programs? I see #14 in there as well, is there a program or line with paramaters that calls these? Dale |
|
#5
| |||
| |||
Osmanselim, I have a few questions, What values are in #120 and #121? What were you using #105 for? Are you just picking up a block? If so, are you trying to calculate to the center of the block? Pick up an edge in X, and Y, and your Z at the top of the part? This should work for center of the part in X and Y, but I am not going to set anything for Z. I am also adding some minor error checking for the work offset value. Please keep in mind, this is a quicky, but you should be close. So, here I go: M00(Move to point #1 in X, put desired work offset in #100) M00(Press Cycle Start) IF[#100 EQ #0]GOTO 3001 #101=[#100-53.] IF[#101 LT 1.]GOTO 3002 IF[#101 GT 6.]GOTO 3003 #102=[[#100-53.]+5020.] #103=[[#101*20.]+#102] #110=#102 M00(Move to point #1 in Y) M00(Press Cycle Start) #112=#102+1. M00(Move to point #2 in X) M00(Press Cycle Start) #111=#102 M00(Move to point #2 in Y) M00(Press Cycle Start) #113=#102+1. [#[#103]]=[[#110+#111]/2] [#[#103+1.]]=[[#112+#113]/2] M30 N3001#3001=1(VARIABLE IS EMPTY) N3002#3001=2(VALUE IS LESS THAN 54) N3003#3001=3(VALUE IS MORE THAN 59) Hope this helps! |
| Sponsored Links |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| fanuc macro | nutty | Fanuc | 6 | 12-22-2010 10:34 AM |
| fanuc 18i KeyWay macro | BeanO | Fanuc | 1 | 02-25-2007 10:29 PM |
| Macro help FANUC 16 I mb | Bluesman | General CNC (Mill and Lathe) Control Software (NC) | 4 | 02-07-2006 03:05 PM |