CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > G-Code Programing


G-Code Programing Discuss G-code programing and problems here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 08-01-2009, 03:03 PM
 
Join Date: Apr 2009
Location: usa
Posts: 8
fattybean is on a distinguished road
Main program vs. subroutine info for Hass VF

Hi I'm new to sub routines and Haas mills(VF2SS and VF0) and pretty weak on cnc mills in general, but have somehow become the "program guy" at my new job.

I am making a program(at home,no access to mill right now) for a new job, we have 2 double vises(4 spots), the part has work on four sides. The boss want us to put in rough stock and pull out a finished part, so a different operation in each vise and pull out a completed part after each cycle start. The part will progress to completion as it is moved from one vise to the next.

I am thinking doing one operation four parts at a time will be more efficient because there will be less tool changes (9 different tools, if my thinking is wrong feel free to let me know).

I am making my programs for each tool complete so they can run by themselves as one long program to complete the part but I also want to use them subroutines to try one operation in four vises.

So my question is, can I make the main program with no tool or location information and just rely on the subroutines for all of this info? for example:

Main Program

O0900
G54
M98 P1000
G55
M98 P1000
G56
M98 P1000
G57
M98 P1000
M30

In the manual it shows the main like this:

Main Program Subroutine
O2000
T1 M06
G00 G90 G54 X0 Y0 S1500 M03
G43 H01 Z.1 M08

M98 P3000
G55
M98 P3000
G56
M98 P3000
G57
M98 P3000
G58
M98 P3000
G59
M98 P3000
G00 Z1.0 M09
G28 G91 Y0 Z0

M30

Are the red sections needed if that info is already in the subroutines?

Also is there a simpler way to repeat a program at 4 different offsets? say something like just adding code to the bottom of the program like :
O0012
XXXg code
XXXXblah blah
XXXX program stuff
XXX M05
XXXM09 Etc.
MXX <<<<and now the unknown code to repeat
G54
G55
G56
G57

or a macro type thing like
#1=G54
#2=G55
#3=G56
#4=G57
If[ #1 IS #1]THEN GOTO 2 ...??
or what ever, like I said I am new to this so please try to keep it simple .
Reply With Quote

  #2   Ban this user!
Old 08-01-2009, 04:32 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,565
Geof will become famous soon enough

Originally Posted by fattybean View Post
...I am thinking doing one operation four parts at a time will be more efficient because there will be less tool changes (9 different tools, if my thinking is wrong feel free to let me know).

I am making my programs for each tool complete so they can run by themselves as one long program to complete the part but I also want to use them subroutines to try one operation in four vises.

So my question is, can I make the main program with no tool or location information and just rely on the subroutines for all of this info? for example:

.... like I said I am new to this so please try to keep it simple .
You arre exactly on the right track; we have hundreds of programs that work this way.

Put all the tool information in a subroutine; for tool #1 we number the subroutine N1000 and it starts with a tool call:

N1000 T1 M06
N1002 G43 H01
N1003 M03 S8000
etc
etc
G49 G53 G00 Z0. (Parks the tool clear of the work before leaving the subroutine)
M99

N2000 would be tool #2

These subroutines can also call nested subroutines which would be number N2100, N2200, etc if you need extra subroutines.

If you want a tool to work on two operations you can also use different numbers like N1100.

The main program only contains position information and it contains all the position information which would be different work zeroes for the different parts.

For your job it sounds like you would do the four operations in the four vise locations so these would be G54, G55, G56 and G57.

Let us pretend tool 1 needs to do something in all four operations and your main program will have these subroutine calls

G54
M97 P1000 (First operation)
G55
M97 P1100 (Second op.)
G56
M97 P1200 (Third...)
G57
M97 P1300 (Fourth...)

If tool #2 only does something during the third operation it would be:

G56
M97 P2000

Etc.

This way you start out with a piece of stock in the G54 vise location and run the program. Then move that partially done part to the G55 location and put a new piece in G54 and run the program, etc, until you have a part finished in the G57 location. From now on a finished part comes out every cycle.

Keeping track of what tools are doing what operation at what location means you do have to be organised and I find it is best to draw a flow chart or a diagram to keep track of subroutine numbers, especially when you are using more than one subroutine per tool.
__________________
An open mind is a virtue...so long as all the common sense has not leaked out.
Reply With Quote

  #3   Ban this user!
Old 08-01-2009, 08:21 PM
 
Join Date: Apr 2009
Location: usa
Posts: 8
fattybean is on a distinguished road

Ok thanks for the help, what are your thoughts on doing 1 step on 4 parts rather than progressively finishing the part for example:

One side needs 5 5/16x18 tapped holes so I was thinking of spotting, drilling and tapping this side in the 4 vises so there are only 3 tool changes for 4 parts rather than 3 tool changes for each part if I were to do this step in just the first vise.

Another side gets 4 6x32s, 4 1/4x20s, 3 3/4 drilled holes and 3 milled pockets, that would be 7 different tool changes for this one side.

The other sides get 3 and 4 tool changes.

That is a total 17 tool changes per 1 completed part if I progressively finish the part through 4 vises doing the 4 different sides getting a complete part every time I open the doors.
If I do one side at a time in the 4 vises I will be getting 4 parts completed with the 17 tool changes, correct?

On 1000 parts that would be 17,000 vs. 4250 tool changes, I save 12,750 tool changes by doing the same step in 4 vises.

That has to be a lot of time saved eliminating all those tool changes.....or have I confused myself?
Reply With Quote

  #4   Ban this user!
Old 08-02-2009, 02:02 AM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,565
Geof will become famous soon enough

Originally Posted by fattybean View Post
Ok thanks for the help, what are your thoughts on doing 1 step on 4 parts rather than progressively finishing the part for example:..

.....That has to be a lot of time saved eliminating all those tool changes.....or have I confused myself?
I have not counted your tool changes but your approach is valid; like I mentioned plot it out on a diagram or flow chart.

I don't think it makes much difference in total time whether you do all the operations separately on four parts or whether your do it like I described. In fact we use both approaches for different jobs.

There is one advantage to doing it sequentially so that a finished part comes out every cycle and that is if you need parts quickly but want to do a large batch you start getting finished parts almost immediately. If you do things in parallel you have to complete the first three operations on all the parts before you get any finished parts.
__________________
An open mind is a virtue...so long as all the common sense has not leaked out.
Reply With Quote

  #5   Ban this user!
Old 01-07-2011, 05:01 PM
 
Join Date: Dec 2010
Location: usa
Posts: 3
swampterror is on a distinguished road

i am having a problem with a new tm1p tool room mill, my boss doesnt want to buy software and i suck at manual g codes so we figured out that we can put parts into dxf format and load into the mdi editor. well that is fine and dandy but it only holds 10 sequences and i have to save each sequence to mdi seprately. when i do it puts a m99 at the end of every sub routine, i went in and tried to take the m99's out and when i did it gave me a g150 alarm but it didnt have any alarms when i tried it with the m99's in there. im still new at this and it is kicking my butt. CAN SOMEONE HELP ME?
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 01-09-2011, 07:18 PM
 
Join Date: Jul 2005
Location: Canada
Posts: 11,565
Geof will become famous soon enough

Post an example of your program before you take out all the M99s and I will have a look at it and might be able to suggest how to compile it into a working program.

Also, buckle down and learn G-coding; I did after 40 years as a manual machinist so you figure out what age I must have been.
__________________
An open mind is a virtue...so long as all the common sense has not leaked out.
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I noticed a Free DNC program download on the main page for CNCzone called CNCnet DNC Rocko1 Haas Mills 4 03-22-2012 11:56 PM
Newbie- can some one show me what a facing program looks like for a Hass Lathe. bobrob General CNC (Mill and Lathe) Control Software (NC) 13 03-16-2009 11:03 AM
Storing Sub-program within main on 21iT? Jdavis733 Fanuc 10 02-12-2008 11:56 AM
Hass VF6 how do you stop in middle of program SpringKing Haas Mills 5 05-14-2007 10:07 AM
Anyone got any basic examples of a program using a subroutine/program? Darc CamSoft Products 11 10-08-2005 11:45 PM




All times are GMT -5. The time now is 12:20 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361