587,700 active members*
5,581 visitors online*
Register for free
Login

Thread: macros

Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2007
    Posts
    21

    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

  2. #2
    Join Date
    Mar 2003
    Posts
    765
    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
    Join Date
    Jun 2007
    Posts
    21
    thanks metl, that looks like my way to go with the control not understanding then statements

Similar Threads

  1. Some Smartcam macros
    By dpuch in forum Uncategorised CAM Discussion
    Replies: 2
    Last Post: 12-15-2009, 09:56 PM
  2. Help with macros
    By afterburn25 in forum Haas Mills
    Replies: 4
    Last Post: 04-09-2007, 02:19 PM
  3. Macros
    By cncfreak in forum Uncategorised CAM Discussion
    Replies: 24
    Last Post: 05-06-2005, 11:04 PM
  4. macros
    By toyoda in forum Uncategorised CAM Discussion
    Replies: 0
    Last Post: 05-30-2004, 10:56 AM
  5. Macros
    By MachineSMM in forum Uncategorised CAM Discussion
    Replies: 2
    Last Post: 06-20-2003, 06:41 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
  •