588,025 active members*
5,158 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Haas Machines > Haas Mills > Running subprograms from hdd
Results 1 to 19 of 19
  1. #1
    Join Date
    Jul 2007
    Posts
    13

    Running subprograms from hdd

    We have been running subprograms via our ethernet connection (netshare). Due to our glitchy network issues we are going to have to move our main programs and subprograms to the HAAS hard drive. For some reason, even though the main and sub programs reside on the hdd the cnc control can't find the subprogram when called with M98. If the G55 program is run from netshare everything works fine. If both files are put on the hdd the control can't find the subprogram. Any ideas??

    main program: G55.NC

    % ( )
    O0001
    G55
    M98 P00002
    G28 G91 Z0
    G28 G91 Y0
    G90
    M30
    %

    sub program: O00002.NC

    %
    O1234
    G17G40G80G90
    G20
    (OPERATION 5)
    (ENDMILL)
    M09
    T8 M06
    M08
    S20000
    M03
    G43 H8 G0 Z1.2000 M08
    X-0.3728 Y0.3542
    Z0.2988
    ...
    G0 Z1.2000
    M09
    M05
    G91G28Z0
    G91 G28 Y0
    M99
    %

    Thanks!

    t.

  2. #2
    Join Date
    Apr 2007
    Posts
    178
    your calling p2 but your program says o1234 the files need to be in the same directory and need to be named properly ie o#####.nc

  3. #3
    Join Date
    Jul 2007
    Posts
    13
    Thanks serviceman. I haven't tried changing that statement at the beginning of the sub-program. It has always worked before across the network as long as the name of the file was correct the statement at the beginning of the program didn't matter. I'm not sure why it would be different running it off the hard drive but I'll give it a try. Thanks for the post.

    t.

  4. #4
    Join Date
    Sep 2007
    Posts
    116
    I'd say because the control is looking for 00002.
    On your PC using the network it resides with the O00002.NC filename, so it likes it. On the control however the first line after the % defines the filename, which in this case is O1234. If you do a directory listing, it will show:
    0001 G55
    1234 G17G40G80G90

    Now a question, could you utilize this as a local sub with M97 P2 instead?
    Much cleaner by both program contained in the same place. Also, editing is easier without the need to switch back and forth.

  5. #5
    Join Date
    Jul 2007
    Posts
    13
    Thanks SeymourDumore.

    I had my operator change "O" line of the file to match and it still didn't work. Bear in mind both the main and sub programs reside on the CNC Hard Drive not in cnc memory. I'll try it again myself in the morning. We have two double sided vises in the CNC with 4 different parts set up. Each part is set up in the CNC as G54, G55, G56, and G57. We have been manually writing our main programs to set the correct work offset then call the program for that particular part. Our ethernet connection has not been reliable lately though and we are forced to find another method. I think an M97 call in this case would be more difficult. Our average CNC program is around 10 to 15 MB. I could write a simple VB program that would combine several CNC programs into one with the appropriate work offsets but the M98 should work. It just blows my mind that it works if the files reside on the PC but doesn't when the files are copied onto the CNC hard drive.

    Thanks again!

    t.

  6. #6
    Join Date
    Sep 2007
    Posts
    116
    Not that difficult.
    If both main and sub program fits on the drive separately, then the combination of both should as well.


    %
    O0001
    G55
    M97 P00002
    G56
    M97 P00002
    G57
    M97 P00002
    G28 G91 Z0
    G28 G91 Y0
    G90
    M30
    N000002 (Sub program)
    G17G40G80G90
    G20
    (OPERATION 5)
    (ENDMILL)
    M09
    T8 M06
    M08
    S20000
    M03
    G43 H8 G0 Z1.2000 M08
    X-0.3728 Y0.3542
    Z0.2988
    ...
    G0 Z1.2000
    M09
    M05
    G91G28Z0
    G91 G28 Y0
    M99
    %

  7. #7
    Join Date
    Jul 2007
    Posts
    13
    Sorry - misunderstanding ... it would be more like

    %
    O0001
    G55
    M97 P00002
    G56
    M97 P00003
    G57
    M97 P00004
    G28 G91 Z0
    G28 G91 Y0
    G90
    M30
    N000002 (Sub Program machines part 1 for customer A)

    10 Mb of code

    N000003 (Sub Program machines part 2 for customer B)

    12 MB of code

    N000004 (Sub Program machines part 3 for customer C)

    15 MB of code

    etc.

    3 Completely different cnc programs for 3 completely different parts probably not even written on the same CAM system.

    Of course this method might still work although it becomes more difficult to manage especially of you want to change part 2 to part 4.

    Thanks again.

    t.

  8. #8
    Join Date
    Mar 2005
    Posts
    1498
    071017-0647 EST USA

    dtmtim:

    I do not have a hard drive system so I can not experiment. From what you have described HAAS has been inconsistent in working from the network compared to from the hard disk.

    Are your so called subprograms larger than the available memory in the machine? If so it means that you are drip feeding. Is that the case?

    In a non-networked machine you can not call an external subroutine when in DNC mode (drip feed) to the best of my knowledge, and certainly not an internal subroutine.

    If you are operating in DNC mode, then we have two different products that could allow you to run RS232 at 115.2 kbaud from a substantial distance. With HAAS's large buffer for DNC I have not had customers that have had a starvation problem in contouring when at 115.2 kbaud.

    In DNC mode one can create a program at the PC that will compose the components that you describe to provide one continuous flow of data from different source files to the HAAS. Note: HAAS starts and ends any program with a % code.

    .

  9. #9
    Join Date
    Sep 2005
    Posts
    28

    try this

    Try this:

    main program: O0055

    % ( )
    O0055
    G55
    M98 P1234
    G28 G91 Z0
    G28 G91 Y0
    G90
    M30
    %

    sub program: O1234 ( no extention )

    %
    O1234
    G17G40G80G90
    G20
    (OPERATION 5)
    (ENDMILL)
    M09
    T8 M06
    M08
    S20000
    M03
    G43 H8 G0 Z1.2000 M08
    X-0.3728 Y0.3542
    Z0.2988
    ...
    G0 Z1.2000
    M09
    M05
    G91G28Z0
    G91 G28 Y0
    M99
    %




    go to hard drive.
    select program O0055
    mem
    cycle start

  10. #10
    Join Date
    Jul 2007
    Posts
    13
    gar,

    Thanks for the reply. We were basically running DNC across the ethernet since we have the ethernet option. Since we also have the hard drive option (I think it's a 10 gig hdd). I would really like to avoid DNC and run from the hard drive. I can run individual programs from the hdd without any issues it just won't run sub-programs.

    Thanks again.

    t.

  11. #11
    Join Date
    Jul 2007
    Posts
    13
    Yossi,

    Thanks, I'll give it a try as soon as the machine stops.

    t.

  12. #12
    Join Date
    May 2007
    Posts
    781
    Is it possible to access the hard drive (or just the data directory on it) using a network path?

  13. #13
    Join Date
    Jul 2007
    Posts
    13
    Quote Originally Posted by Andre' B View Post
    Is it possible to access the hard drive (or just the data directory on it) using a network path?
    The hard drive in the CNC or a hard drive on a networked PC?

  14. #14
    Join Date
    May 2007
    Posts
    781
    The drive in the CNC.

    Like I have a few dirs on my computer here that are networked and I can access them from my computer by ether the "C:\Path\dir" or the network path "\\computername\dir".

    Just not sure if you can do that on the CNC computer.

  15. #15
    Join Date
    Jul 2007
    Posts
    13
    It's not like a PC network. You don't see a path to the root but you can create sub folders. Also, you cannot access the CNC hdd from the PC network you have to use the CNC netshare to "pull" files from the PC network onto the CNC hdd.

    Thanks!

    t.

  16. #16
    Join Date
    Jul 2007
    Posts
    13

    Project Update

    We spoke with a tech at HAAS this afternoon. It turns out that they have a software update to fix this problem. I guess I'm not losing my mind after all. I'll let you guys know how it works out. Thank you all for your suggestions.

    Cheers!

    t.

  17. #17
    Join Date
    Nov 2007
    Posts
    330

    Sub-program from USB

    Hi All,

    Haas VF-2.

    I'm trying to run a main and sub program from the USB driveut it keeps coming up with an error.

    If I put the programs in the CNC memory then it's no problem, but can't do it directly in the USB

    Main Program

    ......
    M98 P21


    Sub:

    O21
    ........
    etc etc etc

    Can someone help me as it'll make life easier. According to the manual I should be able to do it.

    I've tried changing everything so that names match, .nc files etc but not working.

    It's easy on my Fadal with Fanuc, I can call a sub from the card using M198, but it's not happening on my newly aquired Haas.

    Any assistance welcomed

    Matt.

  18. #18
    Join Date
    Jul 2007
    Posts
    13
    Update - We have never been able to get ours to work. Same issue here. We have to Fanuc machines we use M198 to run programs stored on a compactflash card but with the HAAS we have to copy the program from the USB to the HAAS HDD every time. The only answer we were able to get from HAAS was that it "should work" but they were never able to get it to work.

    Best of luck Matt.

  19. #19
    Join Date
    Nov 2007
    Posts
    330
    Thanks for that dtmtim

    I've jammed all the programs into the CNC memory and it's running now, but it would be nice to be able to read from the USB, such as the Fanuc does from the flash card.

    Well, there the annual Metalex exhibition in a couple of days so I'll talk with the boys from Haas and see if they can show me the light.

    Regards,

    Matt.

Similar Threads

  1. Help with adding subprograms to post processor
    By creep_pea in forum Post Processors for MC
    Replies: 9
    Last Post: 11-13-2006, 05:56 PM
  2. Fanuc output program + subprograms
    By Mr_T in forum Fanuc
    Replies: 9
    Last Post: 11-29-2005, 07:21 AM
  3. Up and running
    By bob a job in forum Hobbycnc (Products)
    Replies: 0
    Last Post: 05-13-2005, 10:26 PM
  4. M97 Internal Subprograms?????
    By CAMCRASH in forum G-Code Programing
    Replies: 6
    Last Post: 03-24-2005, 07:10 PM
  5. Up and running!
    By maxxgraphix in forum DIY CNC Router Table Machines
    Replies: 5
    Last Post: 03-16-2005, 02:10 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
  •