![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Mazak, Mitsubishi, Mazatrol Discuss Mazak, Mitsubishi and Mazatrol systems here! |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
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
| ||||
| ||||
| 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 |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Some Smartcam macros | dpuch | SmartCAM | 2 | 12-15-2009 02:56 PM |
| Help with macros | afterburn25 | Haas Mills | 4 | 04-09-2007 08:19 AM |
| Macros | cncfreak | General CAM Discussion | 24 | 05-06-2005 05:04 PM |
| macros | toyoda | General CAM Discussion | 0 | 05-30-2004 04:56 AM |
| Macros | MachineSMM | General CAM Discussion | 2 | 06-20-2003 12:41 PM |