![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| General CAM Discussion Discuss CAD/CAM software and Design software methods here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
I am taking a cnc programming class at our local community college and we are working with subroutinges this week. What we are programming is a simple grid of drilled holes (10 holes x 10 holes) in a staggered location. I am using NC Plat to try to verify the program, but it does not show what I figured it would. I checked the program and do not find anything wrong so I am thinking it does not recignize some of the code. Can someone check this over for me? Can anyone recommend a software that will properly display this program correctly? This is for a HAAS Mill. Thanks Dan
__________________ Check out what I am working on at www.routerbitz.com! |
|
#2
| ||||
| ||||
| I think your M98 call should refer to the program number of the subprogram, and I don't see that in your code. But, I never have run a subprogram on Haas, I've always used M97 local subroutines. Apart from that, your code should run I believe. It could be the case that the way you have set up your code lacks enough gcodes for NCPlot to interpret it correctly when it returns from the sub. For example, although you switched back to absolute mode within the subprogram, NCPlot may or may not be able to interpret the axis moves in the main program correctly. You could add a G00 G90 in front of each move in the main to help NCPlot switch modes correctly.
__________________ First you get good, then you get fast. Then grouchiness sets in. (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management) |
|
#3
| |||
| |||
Thank you for looking. Yes you are correct that I did not correctly call out the name of the subroutine. Copy and paste error on my part. Unfortunately it did not fix the problem. Any other ideas? I am posting the updated program. % O1413 (EX 14.1 BY DAN REEDY) (PECK DRILL .25" DIAM HOLE 1/4" DEEP) T01 M06 S1800 MO3 G00 G90 G54 X.5 Y.5 M08 G43 H01 Z.1 G83 Z-.25 Q.05 R.1 F8.0 M98 P1414 L4 X1.0 Y1.0 M98 P1414 L4 X.5 Y1.5 M98 P1414 L4 X1.0 Y2.0 M98 P1414 L4 X.5 Y2.5 M98 P1414 L4 X1.0 Y3.0 M98 P1414 L4 X.5 Y3.5 M98 P1414 L4 X1.0 Y4.0 M98 P1414 L4 X.5 Y4.5 M98 P1414 L4 X1.0 Y5.0 M98 P1414 L4 G80 G00 G91 G28 Z0 M05 G28 Y0 M09 G90 M30 % % O1414 (SUBPROGRAM 1 - CHANGE LOCATION OF .25" HOLES) G91 X1.0 G90 M99 %
__________________ Check out what I am working on at www.routerbitz.com! |
|
#5
| |||
| |||
It doesn't give me an error, just does not plot correctly. It will plot the first hole for every line. It plots the hole location in the main program but does not seem to go to the sub program at all. Thank you Dan
__________________ Check out what I am working on at www.routerbitz.com! |
| Sponsored Links |
|
#6
| |||
| |||
. It runs perfectly well on my Haas Simulator.Does your college not have Haas Simulators? They are dirt cheap at less than $1700 (I think) for one that simulates Mill or Lathe. I have tried running programs with subroutines through NC Plot and never had success. Being a bit picky I will point out you are working with a subprogram not a subroutine. As Hu points out the call is different M97 for a subroutine included with the running program and M98 for the external call. Possibly your instructor is not as precise as could be and does not make distinction between the two. And here is a challenge for you. Your program has thirty or so lines and multiple repeating lines, the subprogram calls. I think you should be able to shorten it by writing a program using nested subroutines and reduce your line count. Maybe not an issue with a ten by ten array but if you wanted to do a hundred by a hundred the nesting helps.
__________________ An open mind is a virtue...so long as all the common sense has not leaked out. |
|
#7
| ||||
| ||||
| This is what I get when I run it in NCPlot. Just make sure you don't have it set to ignore M98 subprograms (see screenshot). This is under the menu "Setup". There is also a setting on the machine configuration, under the G/M Code page that sets how the M98 command is recognized. Make sure it is set to the first option, "M98 P1 L1". Thanks, Scott |
![]() |
| 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 |
| Edit/Modify MC Post, Then Verify??? | Dugg | Mastercam | 8 | 12-30-2006 07:16 AM |
| HELP! Rotating an STL file generated in verify | AMCTony | Mastercam | 7 | 07-24-2006 08:25 AM |
| Please verify my Driver Wires | electron | Stepper Motors and Drives | 1 | 02-22-2006 09:54 PM |
| 4 axis verify utility? | DAB_Design | General CNC (Mill and Lathe) Control Software (NC) | 6 | 04-27-2005 12:38 AM |
| Gcode verify autocad plugin | balsaman | General CAM Discussion | 1 | 10-31-2003 11:22 AM |