![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Fanuc Discuss Fanuc controllers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Since fanuc only has work shift G54-G59 i want to create a program where i can store my work shift coordinates, would this be possible and how would it look like? I need this because i have many part's that uses the same work shift's and if i need to change one i would need to manually change them all. So let's say work shift program has 20 lines of different work shift's how would i read work shift 4 from main program? |
|
#2
| ||||
| ||||
| What model Fanuc do you have? Does your control have the Custom Macro B option? You could write a custom macro to do this. An easier method would be to set the Work Coordinates at the beginning of each program with a G10 command. An example for a Model 21M-B: G90 G10 L2 P1 X-12.437 Y-6.562 (G54) G10 L2 P2 x-10.375 Y-6.531 (G55) G10 L2 P3 X-8.903 Y-6.533 (G56) |
|
#5
| |||
| |||
| #5221 = G54 X #5222 = G54 Y #5223 = G54 Z #5224 = G54 4TH #5241 = G55 X #5242 = G55 Y #5243 = G55 Z #5244 = G55 4TH and so it goes on by adding 20 to get the address of the next Work Shift number. The approach would be to use Common Variables that are not reset when the power is turned off; these are in the range of #500 to #531 as standard and #532 to #999 are available as an option. You would need to make sure that the Common variables you use are not used by other Macro programs that may be being used by the machine, such as a Tool Change Macro program. Because the variables are common, it means that as well as the variable being able to be read by all programs that use it, it can also be altered by any of the programs that access it. You will have sufficient common, nonvolatile, variables to be able to record the values for X,Y and Z for your Work Shifts G54 through to G59 and at the beginning of each program you could have something like the following: For G54 #5221 = #500 #5222 = #501 #5223 = #502 For G55 #5241 = #503 #5242 = #504 #5243 = #505 The actual values for the respective Work Shifts are recorded in the Macro Variable Table, similar to how you register a value into the tool offset table. When the program executes, these values will by read and allocated to the system variables that correspond to the respective Work Shift numbers. If a Work Shift value needs to be altered, then it is altered in the Macro Variable Table, and the changed variable is read by each of your various programs when they execute. Regards, Bill |
| Sponsored Links |
|
#8
| |||
| |||
| Will try to explain this the best i can. (not that good on english) This is a big lathe, and we produce allot of similar parts, what i do is setting up different axles on the table to put my part's on, so when i go from one part to another i don't have to think about setting my work shift wrong since i have already done in the past. I could write all of theese down but i can't risk setting wrong value. I only need different work shift's in Z direction. Hope you understand better, would be similar to what you would do on a mill with multiple tables. |
|
#9
| ||||
| ||||
O1234(PART NO. 1) G10 L2 P1 Z10.437 (SET G54 Z OFFSET VALUE) N1 G0 G40 G97 G99 ... ... ... M30 |
|
#10
| |||
| |||
|
Problem here is that if i change my axle stands due to mark's or something else i would need to change the G10 line in every program. As of now that would be around 10 program's, in a few month's maybe 30. |
| Sponsored Links |
|
#11
| |||
| |||
| However, if you still want to have all previously set Work Shifts globally changed for programs using the same Work Shift number, you could still use the User Macro approach described earlier. Because only Z has to be catered for, it will allow you, in some degree, to associate the variable number with the Work Shift number. This would allow 18 distinct different Work Shift job groups to be used and still retain some semblance of association, and no limit to how many programs use that same Work Shift (macro variable) value. Of course good record keeping would have to be in place so that if and when Work Shift had to be altered, the value of the correct, corresponding variable is altered. As explained before, the work Shift values would be registered with each corresponding variable and altering the variable would alter the associated Work Shift of programs using that variable. You could expand the User Macro approach further by creating a coordinate setting Macro program, so that when you touched off a tool to set, say, G55, then the associated #502, #512, or #522, or whatever variable numbers you use, is automatically set. User Macro programming is limited only by your imagination. Regards, Bill For G54(1) #5223 = #501, #511, #521 For G55(2) #5243 = #502, #512, #522 For G56(3) #5263 = #503, #513, #523 For G57(4) #5283 = #504, #514, #524 For G58(5) #5303 = #505, #515, #525 For G59(6) #5323 = #506, #516, #526 O1111(PART NO. ? USING G54-1) #5223 = #501 (SET G54 Z OFFSET VALUE) N1 G0 G40 G97 G99 ... G54... ... M30 O222(PART NO. ? USING G54-2) #5223 = #511 (SET G54 Z OFFSET VALUE) N1 G0 G40 G97 G99 ... G54... ... M30 O5555(PART NO. ? USING G55-1) #5243 = #502 (SET G55 Z OFFSET VALUE) N1 G0 G40 G97 G99 ... G55... ... M30 O6666(PART NO. ? USING G55-2) #5243 = #512 (SET G55 Z OFFSET VALUE) N1 G0 G40 G97 G99 ... G55... ... M30 |
|
#12
| |||
| |||
Haven't started learning macro yet, good way to start i gues ![]() Would there be possible todo it like this? O5000(WORK SHIFT) (PART 1); N1G10L2P1Z123; (PART 2); N2G10L2P1Z234; (PART 3); N3G10L2P1Z345; (PART 4); N4G10L2P1Z456; etc O4000(MAINPROGRAM1) GOTO N1 O5000(READ Z ZERO) G00G54 .......... M30 |
![]() |
| 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 |
| shift Z-zero inside mazatrol program | kendo | Mazak, Mitsubishi, Mazatrol | 1 | 05-22-2010 08:21 AM |
| System Variable Z Work Shift | ggborgen | Parametric Programing | 3 | 11-25-2009 11:57 PM |
| work shift | teamus | Hardinge Lathes | 22 | 06-10-2009 05:32 AM |
| Need Help!- 18 SQT-MY Mazatrol program shift | 337MPH | Mazak, Mitsubishi, Mazatrol | 6 | 01-23-2009 02:06 AM |
| Problem- c axis work shift | Atlas_Too | Fanuc | 3 | 10-13-2008 12:14 PM |