![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Parametric Programing (custom macro b, fadal macro, okuma user task) |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Good Day all quick qestion for the macro geniuses here. I have Peter Smid's Fanuc custom macros text and it is very good. We have 4 little wheels that are very similiar, nothing sexy. The examples laid out in the text show only one tool being used. I will need 3 tools for the jobs, o/d turn, drill and p/off. Would there be 3 macros used to do this job? The drill would be a P8xxx as would the p/off tool, 8xxx ? I'm kinda thinking they would be, just not really sure. Any help would be a great help. Thanks in advance Gerry |
|
#2
| ||||
| ||||
| I'm not familiar with the text you mentioned, but I would do it as follows, changing the values as required for each part... #500=1.25 (OD) #501=.625 (PART LENGTH) (TURN) G0 X[#500+.1] Z1.0 G1 Z0 (FACE) G1 X0 W.05 G0 X[#500] (FINISH TURN) G1 Z-[#501+.15] <-- the "+.15" allows for the cutoff tool width U.1 Rapid home, tool change to drill G0 X0 Z.1 G1 Z-[#501+.25] <-- "+.25" to allow for drill tip length G0 Z.1 Rapid home, tool change to cutoff G0 X[#500+.1] Z-[#501+.125] <-- "+.125" assumes 1/8" cutoff blade G1 X0 G0 X[#500+.1] Go home, prog stop |
|
#3
| |||
| |||
| Hi ghyman here is what i got from the Peter Smid textbook (PIN-001 TO PIN-004 SERIES - MAIN PROGRAM - MASTER) (X0Z0 - CENTERLINE AND FRONT FINISHED FACE) (BAR PROJECTION FROM CHUCK FACE = PART LG + 5 MM) (-----------------------------------------------------------------------) N1 #33 = 1 (PART SELECT: 1=001 2=002 3=003 4=004) (-----------------------------------------------------------------------) N2 #30 = #4006 N3 IF [#33 GT 4] GOTO991 N4 IF [#33 LT 1] GOTO992 N5 G21 T0100 N6 G96 S100 M03 N7 G00 X53.0 Z0 T0101 M08 N8 G01 X-1.8 F0.1 N9 G00 Z3.0 N10 G42 X51.0 N11 IF [#33 EQ 1] GOTO15 (#33 = 1 SELECTS PIN-001) N12 IF [#33 EQ 2] GOTO17 (#33 = 2 SELECTS PIN-002) N13 IF [#33 EQ 3] GOTO19 (#33 = 3 SELECTS PIN-003) N14 IF [#33 EQ 4] GOTO21 (#33 = 4 SELECTS PIN-004) N15 G65 P8021 A23.0 B44.0 C24.0 D46.0 R3.0 (PIN-001 MACRO ARGUMENTS) N16 GOTO22 N17 G65 P8021 A25.0 B46.0 C28.0 D48.0 R2.0 (PIN-002 MACRO ARGUMENTS) N18 GOTO22 N19 G65 P8021 A19.0 B45.0 C21.0 D47.0 R4.0 (PIN-003 MACRO ARGUMENTS) N20 GOTO22 N21 G65 P8021 A16.0 B40.0 C25.0 D49.0 R3.0 (PIN-004 MACRO ARGUMENTS) N22 G00 G40 X100.0 Z50.0 T0100 M09 N23 GOTO998 (-----------------------------------------------------------------------) N991 #3000 = 991 (PART NUMBER TOO LARGE) N992 #3000 = 992 (PART NUMBER TOO SMALL) N998 G#30 N999 M01 ... O8021 (PIN-XXX MACRO PROGRAM) (*** DO NOT CHANGE SEQUENCE NUMBERS ***) N101 G71 U2.5 R1.0 N102 G71 P103 Q108 U1.5 W0.125 F0.3 N103 G00 X[#3-2*1-2*3] N104 G01 X#3 Z-1.0 F0.1 N105 Z-#1 R#18 F0.15 N106 X#7 R-2.0 N107 Z-[#2+3.0] N108 X54.0 F0.3 N109 G70 P103 Q108 S125 N110 M99 % your suggestion makes sence too. thanks for your input. have a good day Gerry |
|
#4
| |||
| |||
| First, I don't program in metric. Second I don't program the way you do. I asked about it when I first started, but was told not to as the programs have to run in a variety of lathes with as little modifying as possible. So I didn't bother to learn that method. Therefore I won't comment on the program itself with 2 exceptions. Third I have no idea what lathe and control you are using. I do have a few general comments anyway. Who doesn't. ![]() First: G21 should be the default on your lathe. Why do you have to program it? I don't see you switching between inch and metric in your program (and highly discourage doing that). Second: The only Fanuc book I have at home is for the 16i/18i/160i/180i-TA. Quote. "When a value from 0 to 200 is assigned to variable #3000, the CNC stops with an alarm. After an expression, an alarm message not longer than 26 characters can be described." Your control may be different. Third: Why not simplify X[#3-2*1-2*3] to X[#3-8]? Fourth: Are you using macro routines for the drill and part off? The cut-off would be very simple to do. Do the drill sizes vary? I wrote my own macro sub for drilling. I input feedrate, drill diameter, SFM, final c-o position with the option to add a few more variables for using different methods of drilling within the macro sub. The control figures the RPM, final drill depth and the method to be used for drilling. Guess that's about it for now. Aren't you glad. ![]() EDIT: You could do it with 3 separate programs. Or with one. Depends on how involved you want to get with the macro program. |
![]() |
| 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 |
| Searching for family crest DXF. art | FVRacer5 | CNCzone Club House | 11 | 06-25-2010 02:47 PM |
| Need Help!- Associative part family | sk96_me45 | UG NX | 5 | 02-20-2009 06:35 AM |
| Family crest files | FVRacer5 | Machine Created Art | 6 | 01-05-2009 10:21 AM |
| New to the family and question about HAAS | dark-dna | Haas Mills | 10 | 09-29-2007 05:10 PM |
| new member in the family | praveen224 | CNCzone Club House | 2 | 09-27-2006 05:59 PM |