CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > Fanuc


Fanuc Discuss Fanuc controllers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 03-13-2011, 05:28 AM
 
Join Date: Jan 2010
Location: Norway
Posts: 72
ProToZyKo is on a distinguished road
work shift program

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?
Reply With Quote

  #2   Ban this user!
Old 03-13-2011, 09:39 AM
dcoupar's Avatar  
Join Date: Mar 2003
Location: USA
Posts: 2,312
dcoupar is on a distinguished road

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)
Reply With Quote

  #3   Ban this user!
Old 03-13-2011, 10:18 AM
 
Join Date: Jan 2010
Location: Norway
Posts: 72
ProToZyKo is on a distinguished road

I think it has it, might upgrade if not.
How would such a code look like?
G10 would work but since i have 5-6 part's using the same work shift i would have 5-6 programs to change for each work shift.
Reply With Quote

  #4   Ban this user!
Old 03-13-2011, 03:41 PM
 
Join Date: Jan 2010
Location: Norway
Posts: 72
ProToZyKo is on a distinguished road

Obs forgot model. Fanuc 18i-TB.
Reply With Quote

  #5   Ban this user!
Old 03-13-2011, 06:03 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by ProToZyKo View Post
I think it has it, might upgrade if not.
How would such a code look like?
G10 would work but since i have 5-6 part's using the same work shift i would have 5-6 programs to change for each work shift.
User Macro system variables for G54 - G59 start at #5221 through to #5324. They are allocated in groups of four and increment by 20 for the next Work Shift number as explained in the following example:

#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
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 03-13-2011, 07:33 PM
dcoupar's Avatar  
Join Date: Mar 2003
Location: USA
Posts: 2,312
dcoupar is on a distinguished road

Originally Posted by ProToZyKo View Post
Obs forgot model. Fanuc 18i-TB.
18i-TB? What are you using all those work shifts for on a lathe? How many spindles does it have, anyway?
Reply With Quote

  #7   Ban this user!
Old 03-13-2011, 08:25 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by dcoupar View Post
18i-TB? What are you using all those work shifts for on a lathe? How many spindles does it have, anyway?
Good point, I didn't pick up on the control model.

Regards,

Bill
Reply With Quote

  #8   Ban this user!
Old 03-14-2011, 06:16 AM
 
Join Date: Jan 2010
Location: Norway
Posts: 72
ProToZyKo is on a distinguished road

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.

Originally Posted by angelw View Post
Good point, I didn't pick up on the control model.

Regards,

Bill
Reply With Quote

  #9   Ban this user!
Old 03-14-2011, 07:06 AM
dcoupar's Avatar  
Join Date: Mar 2003
Location: USA
Posts: 2,312
dcoupar is on a distinguished road

Originally Posted by ProToZyKo View Post
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.
I would add a G10 L2 P1 Znnn.nnnn at the beginning of each program.

O1234(PART NO. 1)
G10 L2 P1 Z10.437 (SET G54 Z OFFSET VALUE)
N1 G0 G40 G97 G99
...
...
...
M30
Reply With Quote

  #10   Ban this user!
Old 03-14-2011, 09:32 AM
 
Join Date: Jan 2010
Location: Norway
Posts: 72
ProToZyKo is on a distinguished road

Originally Posted by dcoupar View Post
I would add a G10 L2 P1 Znnn.nnnn at the beginning of each program.

O1234(PART NO. 1)
G10 L2 P1 Z10.437 (SET G54 Z OFFSET VALUE)
N1 G0 G40 G97 G99
...
...
...
M30
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.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 03-14-2011, 04:02 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by ProToZyKo View Post
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.
The Series 18 Control is an easy control to use to touch off a tool and reset the coordinate system for Z when each job it put up.

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
Reply With Quote

  #12   Ban this user!
Old 03-14-2011, 04:22 PM
 
Join Date: Jan 2010
Location: Norway
Posts: 72
ProToZyKo is on a distinguished road

Originally Posted by angelw View Post
This would allow 18 distinct different Work Shift job groups to be used and still retain some semblance of association,
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
Gues that i can create 100's of work shift by doing this? No reason to jump 10 variables each time? G54 can use variable 501,502,503,504,505,506 etc etc right?
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
Reply With Quote

Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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




All times are GMT -5. The time now is 01:08 PM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361