![]() | |
| 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
| |||
| |||
I'm trying to write a "chip drop" sub program for our lathes. How do I get the controller to remember it's last Z position? Citizen 32J machine. Mitsubishi control. example; ..., T1500 G50X6.3 G97S1=3500M96 G99G0X0.475Z8.2854T15 X0.3918F0.002 G1X0.3647Z8.299F0.0005 ***** Z9.185(HOW DO I STORE THIS Z?) X0.473 G97G0X6.3T0 M98P500 (CHIP DROP SUB PROGRAM) O500; G98 G1 Z-0.1 F50.0; G4 U0.5; G1 Z(PREVIOUS Z(IE;Z8.299))F75.0; M99 I WANT TO USE THIS SUB PROGRAM ON ALL DIFFERENT LENGTH PARTS. HOW DO I GET IT TO REMEMBER THE LAST Z POSITION? |
|
#2
| ||||
| ||||
| You did not say what control you have? For a while, Mitsubishi controllers have used storage variables 5001 to 5103 for machine coordinates, work coordinates, skip coordinates and Servo deviation. Al.
__________________ CNC, Mechatronics Integration and Machine Design. “Logic will get you from A to B. Imagination will take you everywhere.” Albert E. |
|
#5
| |||
| |||
| Chataman, You say "#500=#5003(PRESENT Z POS.)". Will I have to input that Z position on the variable page or will it store it automatically? My sub program should look like this.?. e.g. T1500 blah blah Z9.185(STORE THIS Z?) #500=#5003(PRESENT Z POS.) X0.473 G97G0X6.3T0 M98 P500 (CHIP DROP SUB PROGRAM) O500; G98 G1 Z-0.1 F50.0; G4 U0.5; G1 Z#500 F75.0; M99 I want to be able to throw the M98 P500 any where in any program at whatever Z length the chips ball up, maybe with an \ block skip at every tool change. Do I have to input the Z position in variable #5003? |
| Sponsored Links |
|
#6
| |||
| |||
| Yes the #500 will be set to 9.185 when it reads the #500=#5003. Now when you call your 500 sub program and write G1Z#500F75. it will go to Z9.185. So for example if you pick up a Z from another place and set the #500 to 2.6”. Now you slap a M98P500 in a program and forgot to pick up a Z for what you are doing and it is suppose to be Z9.185 you are going to have problems. I would set the current position in your 500 program that way all you have to do is put the M98P500 in the program were you want and not have to worry about if you remembered to set the #500 variable. e.g. T1500 blah blah Z9.185(STORE THIS Z?) X0.473 G97G0X6.3T0 M98 P500 (CHIP DROP SUB PROGRAM) O500; #500=#5003----as long as you did not move your Z before the M98 call. Or put the M98 right after the Z. G98 G1 Z-0.1 F50.0; G4 U0.5; G1 Z#500 F75.0; M99 I would probably use one of your common variables #100-#199 these variables clear at power down. Less chance for error. If you wanted to be really safe you could use your local variables #1-#33. These clear at reset and program end. You could then put a statement in the program to alarm out if the Z position was never established. Ex. Blah blah Z9.185 #1=#5003 .. .. M98P500 … O500 IF[#1EQ#0]TH#3000=1(NO Z VALUE)—program will alarm out here if you forgot the #1=#5003 in your main program. G1Z#1F75. M99 Stevo |
|
#8
| |||
| |||
| Hey Citezen E32/E25 guys, If #5003 = Z1, what variable would Z2 & Z3 be? I want to put a statement in this sub-program that if #500* (Z3) <>, is anything other than zero, than skip sub-program. I wouldn't want to put the sub-spindle thru the guide bushing...again. |
|
#9
| |||
| |||
| This is not for all machines but for this situation: #5001=current absolute “X” position #5002=current absolute “Y” position #5003=current absolute “Z” position There can be only 1 current absolute Z position. So what positions are you looking for when you say Z2 and Z3? Stevo |
|
#10
| |||
| |||
| Uh.... I think he's trying to capture current position Z at any given point in the cut? If so... you can't.... at least not to keep it programmable. Why not just put in 'chip drop' subs at predetermined points along Z and just hard code it in?
__________________ It's just a part..... cutter still goes round and round.... |
| Sponsored Links |
|
#11
| ||||
| ||||
| Sorry guys , I don't work Mitsubishi ( so forgive my syntax, but you may understand ) but can I suggest another improvement -- use incremental -- -- have an internal variant -- -- feed off @ 45 degree, rapid out , dwell, rapid in, feed in @ 45 to last cutting point -- None of these subs will not work if reverse tapers or inward steps exist by the way. O500 (CHIP DROP SUB PROGRAM-**OD**); #1=#5001 #3=#5003; IF[#1 EQ #0] TH#3000=1 (NO X VALUE); IF[#3 EQ #0] TH#3000=1 (NO Z VALUE); IF[#3 GT #0] TH#3000=1 (+IVE Z VALUE); in case the origin is @ LH end G98 G1 U0.2 W0.1 F50.0; G0 W-[#3+0.1]; -ive times -ive = +ive (ie #3=-9.185 then W- x (-9.185+ 0.1) = W9.285 = Z0.1 G4 U0.5; G0 Z[#1+0.1] G1 X#1 Z#3 F50.0; M99 (_); O501 (CHIP DROP SUB PROGRAM-**ID**); #1=#5001 #3=#5003; IF[#1 EQ #0] TH#3000=1 (NO X VALUE); IF[#3 EQ #0] TH#3000=1 (NO Z VALUE); IF[#3 GT #0] TH#3000=1 (+IVE Z VALUE); in case the origin is @ LH end G98 G1 U-0.2 W0.1 F50.0; G0 W-[#3+0.1] G4 U0.5; G0 Z[#3+0.1] G1 X#1 Z#3 F50.0; M99 |
|
#12
| |||
| |||
| It would still be #5003. These variables are per system just as 1-32 and 100-149 are. So... #100=#5003 in $1 would be Z1 position #100=#5003 in $2 would be Z2 position all of which you could and SHOULD test in MDI Good Luck! ... this does not sound like much fun! |
![]() |
| 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 |
| Need Help!- angle position axis | bfservice | Fanuc | 2 | 09-28-2008 09:51 PM |
| Help needed with z-axis position | Spazdemon | AjaxCNC Control Products | 5 | 05-08-2008 11:24 PM |
| X2 y-axis motor position | Clot | Benchtop Machines | 8 | 03-12-2008 04:43 PM |
| x-axis losing position...??? | shnitzel | Servo Motors and Drives | 11 | 09-29-2007 12:46 PM |