Need Help! macros


Results 1 to 3 of 3

Thread: macros

  1. #1
    Registered
    Join Date
    Jun 2007
    Location
    usa
    Posts
    21
    Downloads
    0
    Uploads
    0

    Default macros

    hi all ,
    i have a mill with a meldas 500 series controller that i need help with macros while using common variables.
    heres what im doing,
    i have similar parts, same zero, but want to be able to just change one variable and have the hole location move without having to edit program with each different part.
    the way i do it now is as follows,,keep i mind this is for one part

    #512=a (x)
    #513=b (y)

    c,d,e,f being my different hole locations

    and my line will read
    G90G0G73X#512Y#513Z-1R...Q...F...

    what i want to do is something like this

    (part 1 #501)
    (part 2 #502)
    (part 3 #503)

    #501=1


    IF[#501EQ1] then 512 = a and 513 = b
    IF[#501EQ2] then 512 = c and 513 = d
    IF[#501EQ3] then 512 = e and 513 = f


    thanks for any insight
    Bob

    Similar Threads:


  2. #2
    Registered MetLHead's Avatar
    Join Date
    Mar 2003
    Location
    USA
    Posts
    765
    Downloads
    0
    Uploads
    0

    Default

    Hi Bob,

    It looks like you've got it mostly figured out already. You just need to figure out how the branching works. The Mits controls don't allow IF - THEN statements, only IF - GOTO. You just need to structure your program sort of like this:

    #501=1

    IF[#501 NE 1] GOTO 10
    #512 = a
    #513 = b
    GOTO 50

    N10 IF[#501 NE 2] GOTO 20
    #512 = c
    #513 = d
    GOTO 50

    N20 IF[#501 NE 3] GOTO 100
    #512 = e
    #513 = f

    N50 G90G0G73X#512Y#513Z-1R...Q...F...
    M2

    N100 (INVALID PART #)
    #3000=1(INVALID_PART_#)
    M2


    Hope this helps,
    Scott



  3. #3
    Registered
    Join Date
    Jun 2007
    Location
    usa
    Posts
    21
    Downloads
    0
    Uploads
    0

    Default

    thanks metl, that looks like my way to go with the control not understanding then statements



Tags for this Thread

Posting Permissions

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


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

macros

macros