Results 1 to 5 of 5

Thread: Check Subprogram Exists

  1. #1
    Registered
    Join Date
    May 2004
    Location
    United Kingdom
    Posts
    80
    Downloads
    0
    Uploads
    0

    Check Subprogram Exists

    Is it possible to do a statement such as an "IF THEN ELSE" in a main CNC Program to see if a subprogram already exists in the memory prior to doing a G65Pxxxx or M98 call. I want to skip past the subroutine program call if the subprogram doesn't exist - that then ensures the main program doesn't alarm out?


  2. #2
    Registered Mitsui Seiki's Avatar
    Join Date
    Feb 2007
    Location
    USA
    Posts
    464
    Downloads
    0
    Uploads
    0
    DIR or O(program#) and then "Up or Down arrow" or O(program#) and search.
    Stefan Vendin


  3. #3
    Registered chuy's Avatar
    Join Date
    Aug 2005
    Location
    usa
    Posts
    149
    Downloads
    0
    Uploads
    0
    I'm sure there are some macro wizards out there that can.I knew a guy that created one that would dial his home # if there was a tool breakage alarm.My best advice would be to insert a block skip in front of the that line..


  4. #4
    Registered
    Join Date
    Nov 2005
    Location
    Only the USA
    Posts
    213
    Downloads
    0
    Uploads
    0
    not that I am aware of. Here are is an example of "IF statements that work"

    IF[#530EQ0.]THEN#530=54
    M115
    M161
    IF[#7NE#501]THEN#3000=110(D NOT EQUAL TO #501)
    #501=#7(O.D. OF STOCK)
    #100=#3(CHAMFER AMOUNT)
    #101=#18(RADIUS)
    #102=TAN[22.5]
    #103=COS[45.]
    IF[#13+#19LT1.]THEN#3000=102(M OR S IS NE TO 1)
    IF[#13+#19GT1.]THEN#3000=103(M OR S IS WRONG)
    IF[#13EQ1]GOTO25
    IF[#19EQ1]GOTO30
    #3000=104(CHECK M OR S)


  • #5
    Registered Mitsui Seiki's Avatar
    Join Date
    Feb 2007
    Location
    USA
    Posts
    464
    Downloads
    0
    Uploads
    0
    If the subprogram doesn't excist, why don't you just remove the subprog call(G65/M98)?
    Or am I missing something here?
    Stefan Vendin


  • Similar Threads

    1. Check Program Exists
      By guypb in forum Mazak, Mitsubishi, Mazatrol
      Replies: 8
      Last Post: 02-20-2008, 03:24 PM
    2. Restarting an EIA subprogram
      By ajl6549 in forum Mazak, Mitsubishi, Mazatrol
      Replies: 6
      Last Post: 08-09-2006, 07:06 AM
    3. Fanuc 16T subprogram example??
      By stex in forum Fanuc
      Replies: 11
      Last Post: 03-27-2006, 03:15 PM
    4. Mazatrol subprogram
      By BeanO in forum Mazak, Mitsubishi, Mazatrol
      Replies: 5
      Last Post: 11-24-2005, 04:12 AM
    5. Hello there, glad to see a place like this exists.
      By SagaciousKJB in forum CNCzone Club House
      Replies: 2
      Last Post: 10-15-2005, 07:46 AM

    Posting Permissions



    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.