587,011 active members*
3,837 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Haas Machines > Haas Mills > Trying to run code for the first time, and its not working
Page 1 of 2 12
Results 1 to 20 of 23
  1. #1
    Join Date
    Sep 2011
    Posts
    77

    Trying to run code for the first time, and its not working

    Well I finally figured out the cable and I was able to send my short program to my VF-1. When I try to start the program I get an alarm for invalid G code. Any ideas? Below is my code;

    %
    O0( TRACK FEET 1 )
    ( DATE=DD-MM-YY - 15-05-12 TIME=HH:MM - 23:34 )
    ( MCX FILE - C:\MCAMX\MCX\ADJUSTABLE TRACK FEET 1.MCX )
    ( NC FILE - C:\MCAMX\MILL\NC\TRACK FEET 1.NC )
    ( MATERIAL - ALUMINUM INCH - 2024 )
    ( T1 | 1/4 CENTERDRILL | H1 )
    ( T2 | 1/4 DRILL | H2 )
    ( T3 | 1/4 FLAT ENDMILL | H3 )
    N100 G20
    N110 G0 G17 G40 G49 G80 G90
    N120 T1 M6
    N130 G0 G90 G54 X.675 Y.875 C0. S3667 M3
    N140 G43 H1 Z2.
    N150 M8
    N160 Z.3
    N170 G99 G81 Z-.15 R.3 F7.3
    N180 X3.75
    N190 X6.25
    N200 X9.325
    N210 G80
    N220 Z2.
    N230 M5
    N240 G91 G28 Z0. M9
    N250 C0.
    N260 M01
    N270 T2 M6
    N280 G0 G90 G54 X.675 Y.875 C0. S3667 M3
    N290 G43 H2 Z2.
    N300 M8
    N310 Z.3
    N320 G99 G83 Z-.7751 R.3 Q.075 F8.8
    N330 X3.75
    N340 X6.25
    N350 X9.325
    N360 G80
    N370 Z2.
    N380 M5
    N390 G91 G28 Z0. M9
    N400 C0.
    N410 M01
    N420 T3 M6
    N430 G0 G90 G54 X-1.25 Y-.5 C0. S2000 M3
    N440 G43 H3 Z.5
    N450 M8
    N460 Z.1
    N470 G1 Z0. F6.1
    N480 X-.75 F12.2
    N490 G3 X-.25 Y0. I0. J.5
    N500 G1 Y1.75
    N510 G3 X-.75 Y2.25 I-.5 J0.
    N520 G1 X-1.25
    N530 Z.1 F6.1
    N540 G0 Z.5
    N550 X11.25
    N560 Z.1
    N570 G1 Z0.
    N580 X10.75 F12.2
    N590 G3 X10.25 Y1.75 I0. J-.5
    N600 G1 Y0.
    N610 G3 X10.75 Y-.5 I.5 J0.
    N620 G1 X11.25
    N630 Z.1 F6.1
    N640 G0 Z.5
    N650 M5
    N660 G91 G28 Z0. M9
    N670 G28 X0. Y0. C0.
    N680 M30
    %


    Steve

  2. #2
    Join Date
    Jul 2005
    Posts
    12177
    Your program number is not valid. You have O0 and you should have four or five digits in the name following the letter O.

    Try O0001 or O00001

    I copied your program and it ran on my Haas Simulator when I gave it the number O00002
    An open mind is a virtue...so long as all the common sense has not leaked out.

  3. #3
    Join Date
    May 2004
    Posts
    4519
    Try a program number beside O0. I think O0 is reserved for MDI.

  4. #4
    Join Date
    Sep 2011
    Posts
    77
    I completely forgot to mention, I changed the name to the Haas recognized o9999 name and I still got an invalid G code alarm. Do I need to leave in the O0 when I add the name?

    Steve

  5. #5
    Join Date
    Jan 2007
    Posts
    1389
    get rid of the "C"'s

  6. #6
    Join Date
    Jan 2007
    Posts
    1389
    all of them

  7. #7
    Join Date
    May 2004
    Posts
    4519
    Put O12345 on the first line. File name on your computer is not important as long as it ends with TXT or NC. If you have not done so yet, read the manual.

    Invalid G code could be a number of things. I ran it through NC Analyzer with no errors, but that does not mean the Haas control is not seeing one. You might try eliminating the C axis moves and see if that helps.

  8. #8
    Join Date
    Jan 2007
    Posts
    1389
    Quote Originally Posted by txcncman View Post
    Put O12345 on the first line. File name on your computer is not important as long as it ends with TXT or NC. If you have not done so yet, read the manual.

    Invalid G code could be a number of things. I ran it through NC Analyzer with no errors, but that does not mean the Haas control is not seeing one. You might try eliminating the C axis moves and see if that helps.
    You dont need any extention at all not TXT or NC.
    just a program name or number on the computerside.

    also you want the letter "O" with 4 digits not 5. I was told 5 is a no no on a haas

    UNless there is a "C" axis physically hooked up you will get errors. if you just have a "A" in there you will get errors when running the progam as well. again unless its hooked up.

    Also DUMP MASTERCAM UNTIL you know how to program, get rid of line numbers at the very least and you will understand your code more.

  9. #9
    Join Date
    May 2004
    Posts
    4519
    Quote Originally Posted by Delw View Post
    You dont need any extention at all not TXT or NC.
    just a program name or number on the computerside.

    also you want the letter "O" with 4 digits not 5. I was told 5 is a no no on a haas

    UNless there is a "C" axis physically hooked up you will get errors. if you just have a "A" in there you will get errors when running the progam as well. again unless its hooked up.

    Also DUMP MASTERCAM UNTIL you know how to program, get rid of line numbers at the very least and you will understand your code more.
    If you do not have some type of file extension, your PC will not know how to open the file for review. That has to do with what is called "file association". Most DNC software will look for an NC file extension (use whatever works for your DNC software). MasterCam will usually default to the NC file extension. Might as well use it. TXT works if you are manually programming with a generic text editor. Newer Haas machines like 5 digits after the letter O just fine. Older Haas controls will only take the 4 digits.

    I think Delw means he wants you to learn how to program manually (by hand - using a print, a piece of paper, a calculator, and your brain) first so that you fully understand the G-code before depending on the software to get it right. While block numbers are a machine memory waster, they are great for novices to use when they need to discuss their programs with others because they are essentially reference numbers. In MasterCam, it is fairly easy to turn block numbering on and off in the Machine Definition Manager.

  10. #10
    Join Date
    Apr 2002
    Posts
    5003
    Block numbering is good, if you have an indefinite fault in a programpart. For this I insert numbers to determine, where the fault is.

    And in big programs I use it for the position of my tool changes. Then I can easy change the toolname if it collides with a tool, if I don't want to change.

  11. #11
    Join Date
    Mar 2010
    Posts
    1852
    Definitely leave off the C0., you have only X,Y and Z.

    The older machines used four digit program names with the O in front, so O1234 would be good.

    If memory serves me correctly 9000 numbered programs are forbidden, as the control uses the 9000 codes for another use internally, so they are reserved. So O0001 to O8999.

    Have fun!
    Two Haas VF-2's, Haas HA5C, Haas HRT-9, Hardinge CHNC 1, Bother HS-300 Wire EDM, BobCAD V23, BobCAD V28

  12. #12
    Join Date
    Jan 2007
    Posts
    1389
    Quote Originally Posted by txcncman View Post
    If you do not have some type of file extension, your PC will not know how to open the file for review. That has to do with what is called "file association". Most DNC software will look for an NC file extension (use whatever works for your DNC software). MasterCam will usually default to the NC file extension. Might as well use it. TXT works if you are manually programming with a generic text editor. .
    Do you know this for a fact? of is it just a guess or something you looked up.. See I actually run and program machines everyday. So I know for a fact your PC doesnt need a file extension nor does your machine need to see a file extension.
    I can open any not file extenstion file with any editor includeing mastercam smartcam and others.

    not to mention your filename can be anything as long as in your program you have a O0002 or what ever number you want.
    and your file name can be as long as you want with space too. customername part number operation number
    aka boeing a368927 op20

    when you save your program from the haas machine it puts a file extension of .nc on it and saves it as that program number you described in the program.


    Delw

  13. #13
    Join Date
    May 2004
    Posts
    4519
    Quote Originally Posted by Delw View Post
    Do you know this for a fact? of is it just a guess or something you looked up.. See I actually run and program machines everyday. So I know for a fact your PC doesnt need a file extension nor does your machine need to see a file extension.
    I can open any not file extenstion file with any editor includeing mastercam smartcam and others.

    not to mention your filename can be anything as long as in your program you have a O0002 or what ever number you want.
    and your file name can be as long as you want with space too. customername part number operation number
    aka boeing a368927 op20

    when you save your program from the haas machine it puts a file extension of .nc on it and saves it as that program number you described in the program.


    Delw
    You are correct. Using Windows operating system, you can open a program first and then open whatever file you will to read into that program. What I was referring to is using Windows Explorer to locate a file in a given directory (folder) and then double click it to open. If there is no file extension (and resulting file extension association) Windows will ask you to chose a program to open that file. So, what facts about computers and Haas files do I know? All of them. Which facts was I attempting to describe? The ones most people will want to know about and use. You apparently are not most people.

    Yes, file name and program number can be, and usually are different.

    Since you have proven that I am a total dumbass and that I was merely clouding the discussion here, I will happily bow out and let you handle them from now on. Your expertise should never be hidden.

  14. #14
    Join Date
    Jan 2007
    Posts
    1389
    Quote Originally Posted by txcncman View Post
    Put O12345 on the first line. File name on your computer is not important as long as it ends with TXT or NC. If you have not done so yet, read the manual.

    Invalid G code could be a number of things. I ran it through NC Analyzer with no errors, but that does not mean the Haas control is not seeing one. You might try eliminating the C axis moves and see if that helps.
    Quote Originally Posted by txcncman View Post
    You are correct. Using Windows operating system, you can open a program first and then open whatever file you will to read into that program. What I was referring to is using Windows Explorer to locate a file in a given directory (folder) and then double click it to open. If there is no file extension (and resulting file extension association) Windows will ask you to chose a program to open that file. So, what facts about computers and Haas files do I know? All of them. Which facts was I attempting to describe? The ones most people will want to know about and use. You apparently are not most people.

    Yes, file name and program number can be, and usually are different.

    Since you have proven that I am a total dumbass and that I was merely clouding the discussion here, .
    Perfect.
    the problem is you took a simple answer like most of your replies you had no clue other than what you read somewhere and turned a guy who is NEW into a total basket case looking for something that has absolutely NOTHING to due with his problem. you not only make things confusing it also has no relivance on the posts or his problem.

    stick to something you know like reading a book. leave the technical stuff to the people who actually do the work on a daily level and half ass know what there talking about.

    Delw

  15. #15
    Join Date
    Oct 2006
    Posts
    85
    I agree we should try to get the problem solved and leave out the rest....although I'm sure everyone has their best intentions.

    I have the same vintage vf1 and I sent your program to my machine and ran your program both on the "graph" page and actually ran the program cutting air.

    It accepted the program number as O0
    It didn't care what file extension (if any) you had
    It ignored the "C" commands.
    It didn't care if you had "N" numbers at each line
    It didn't care if you produced the program by hand or in MC.

    Did you load your program via an rs232 port? I've seen lines in a program get garbled. For instance sendind "G" instead of "G0."

    You can try resending your program. If that doesn't fix it, single block down your program to find the line that's generating the alarm.

    Hope this helps.

  16. #16
    Join Date
    Jan 2007
    Posts
    1389
    Steve
    newer machines wont run with a "A" "B" "C" etc in them unless there is a unit plugged into the control and turned on. the older machines will.
    mines 09 and wont run it.

    I believe there might be a parameter in there to turn on that will ignore the extra axis but not sure.

    If my full 4th is not turned on and I have "A" anywhere in the program the machine will give me an error.

  17. #17
    Join Date
    May 2010
    Posts
    62
    I've been told by Haas not to use a 90000 (maybe 9000) series program number. Depending on the age of the machine this might or might not be an issue. Start with a safe program number as above. O01234 for instance. Only mention this because I've not seen it above.

    If the program will load, try to set the coordinate offsets. Then push the setting/graph 2x and a graphics screen will show. Push the green cycle start button, and the program will try to run on the screen. If there is an issue/alarm and it stops, push the edit key before doing anything else. The edit screen will show, cursor will be on the line with the error.

  18. #18
    Join Date
    Oct 2006
    Posts
    85
    Steve
    newer machines wont run with a "A" "B" "C" etc in them unless there is a unit plugged into the control and turned on. the older machines will.
    mines 09 and wont run it.

    I believe there might be a parameter in there to turn on that will ignore the extra axis but not sure.


    If my full 4th is not turned on and I have "A" anywhere in the program the machine will give me an error.


    Delw,

    You're right about an "A" command alarming out but that doesn't apply to "C."

    I don't know why but the machine just ignores the "C."

    I'll bet you a beer your machine will ignore "C" just as mine do.

    -Steve


    Attached Thumbnails Attached Thumbnails photo4.JPG   photo1.JPG   photo3.JPG   photo2.JPG  


  19. #19
    Join Date
    Jan 2007
    Posts
    1389
    Quote Originally Posted by metalmansteve View Post
    Steve
    newer machines wont run with a "A" "B" "C" etc in them unless there is a unit plugged into the control and turned on. the older machines will.
    mines 09 and wont run it.

    I believe there might be a parameter in there to turn on that will ignore the extra axis but not sure.


    If my full 4th is not turned on and I have "A" anywhere in the program the machine will give me an error.


    Delw,

    You're right about an "A" command alarming out but that doesn't apply to "C."

    I don't know why but the machine just ignores the "C."

    I'll bet you a beer your machine will ignore "C" just as mine do.

    -Steve


    Steve your 100% correct "C" Is ignored however "B" Wont just like "A". Just tried both, I owe ya a beer

  20. #20
    Join Date
    Mar 2010
    Posts
    1852
    Quote Originally Posted by Delw View Post
    Steve your 100% correct "C" Is ignored however "B" Wont just like "A". Just tried both, I owe ya a beer
    Be that as it may, why the hell put it in there? Eliminate it as totally unneeded.

    Mike
    Two Haas VF-2's, Haas HA5C, Haas HRT-9, Hardinge CHNC 1, Bother HS-300 Wire EDM, BobCAD V23, BobCAD V28

Page 1 of 2 12

Similar Threads

  1. working time calculator
    By oneeye in forum Laser Engraving / Cutting Machine General Topics
    Replies: 3
    Last Post: 07-03-2018, 04:01 PM
  2. Gcode to DXF and working time forecast
    By safecnc in forum OpenSource Software
    Replies: 2
    Last Post: 01-10-2011, 08:17 PM
  3. G-code not working !!!!
    By xray34 in forum HURCO
    Replies: 12
    Last Post: 12-08-2010, 10:39 PM
  4. First time with G code :(
    By ToiletDiver in forum G-Code Programing
    Replies: 10
    Last Post: 06-05-2009, 04:43 AM
  5. Working time calculation
    By Ideas L in forum Laser Engraving / Cutting Machine General Topics
    Replies: 2
    Last Post: 11-09-2007, 01:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •