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 09-20-2008, 07:50 AM
cnc-king's Avatar  
Join Date: Jul 2003
Location: united states
Posts: 232
cnc-king is on a distinguished road
tool offset macro

need some help from the macro gurus

is there a way to create a macro that will load the active work and tool offsets from the variables into a separate subprogram so i can save them whenever i upload my programs and how do i go about doing that?

thanks
__________________
If you can ENVISION it I can make it
Reply With Quote

  #2   Ban this user!
Old 09-20-2008, 01:48 PM
dcoupar's Avatar  
Join Date: Mar 2003
Location: USA
Posts: 2,312
dcoupar is on a distinguished road

I'd think you could DPRNT the offsets to the PC, but that sounds like more bother than just PUNCHing the offsets at the end of each job. I don't recall seeing a command to write the variables to a program.
Reply With Quote

  #3   Ban this user!
Old 09-21-2008, 07:52 AM
 
Join Date: Sep 2005
Location: USA
Age: 60
Posts: 755
Dan Fritz is on a distinguished road

You can write a macro to transmit tool offsets like dcoupar says, but why would you want to? Just punching your tool offsets directly will output a file with a bunch of G10 commands, which you can read back in like a part program.
Reply With Quote

  #4   Ban this user!
Old 09-21-2008, 02:20 PM
padobranac's Avatar  
Join Date: Mar 2006
Location: Croatia
Posts: 107
padobranac is on a distinguished road

Originally Posted by Dan Fritz View Post
You can write a macro to transmit tool offsets like dcoupar says, but why would you want to? Just punching your tool offsets directly will output a file with a bunch of G10 commands, which you can read back in like a part program.
...and how to do that?
Punch out parameters of tool offsets one by one, or there is a more simple way?
__________________
Sorry for bad english
Reply With Quote

  #5   Ban this user!
Old 09-21-2008, 02:29 PM
dcoupar's Avatar  
Join Date: Mar 2003
Location: USA
Posts: 2,312
dcoupar is on a distinguished road

EDIT - OFFSET/SETTING - (OPRT) - > - PUNCH - EXEC
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 09-21-2008, 07:35 PM
cnc-king's Avatar  
Join Date: Jul 2003
Location: united states
Posts: 232
cnc-king is on a distinguished road

the reason i would like to do this is our x-fer is set up to do remote upload and download to and from the machines. we do not have to go to a terminal per say and set the computer to upload or download. every thing is done at the machine control.for us to x-fer programs the system looks for cnc programs, since the offsets are not set up as programs we cannot send them out that way. we have to set the computer to receive and physically edit the programs to add the offsets to the programs. no offense to any one but too many hands editing programs in the servers can cause too much problems. we are getting away from the operators doing any editing ( too many problems etc. every one not on the same page )
__________________
If you can ENVISION it I can make it
Reply With Quote

  #7   Ban this user!
Old 09-21-2008, 10:43 PM
 
Join Date: Sep 2005
Location: USA
Age: 60
Posts: 755
Dan Fritz is on a distinguished road

Our PC-DNC Plus software does remote file requests also. Here's how we do tool offsets:

First of all, it's usually better to save the offsets as one file, then save the part program (or programs) as another file. The reason for this is that if your part program has a bunch of G10 commands at the begining, it will keep resetting those offsets whenever the program is run. If you then manually alter any offset value, just running the program again will set it back to what it was. That's not convenient. We like to save the program as one file, then save the offsets as another file with the same name, but a different file extension, like ".OFS" for example.

When our PC-DNC Plus receives a part program from the CNC, we can automatically name the file using the O-number, or using a comment within the program. If, for example, the first block of the part program looks like this:

O0001 (VALVE BODY OP1) ;

we can automatically save the file as "O0001" or as "VALVE BODY OP1". We can also automatically add any extension you like (say, .NC or .TXT) to the file name.

Now, to save your part program, you just PUNCH it and the DNC system will receive it and give it the appropriate name. The next step is to save the tool offset file with a similar file name. Let's say for the sake of this example, you save your part program as "VALVE BODY OP1.TXT" and you want to save the offsets as "VALVE BODY OP1.OFS". Here's how that's done:

Just send your part program with the comment shown above. PC-DNC Plus can save the file as "VALVE BODY OP1.TXT".

Create a 1-block "dummy" file to send this message to PC-DNC Plus:

O7777 (PUT-VALVE BODY OP1.OFS) ;

When you PUNCH this 1-block program (O7777), you are requesting that PC-DNC Plus save any data that comes in after it as file "VALVE BODY OP1.OFS". The "(PUT-" command is a request to save a file with the specified file name.

Once O7777 is sent, you then go to the OFFSET page and press PUNCH and EXEC. This saves all the G10 commands in the file "VALVE BODY OP1.OFS". Notice that this file WILL NOT have an O-number in it, so there is a bit of a trick sending back to the CNC.


Now, the two files are saved on the DNC system, and you want to request them back into the CNC. We use a "File request" command like "(GET-", so the operator can go to another dummy file and make this request for TWO files:

O7778 (GET-VALVE BODY OP1.TXT) ;
(GET-VALVE BODY OP1.OFS) ;

When you PUNCH program O7778 to PC-DNC Plus, it will queue up BOTH the part program (first) and then the offset file (second). To download the part program, just go to the PROGRAMS page and press READ, then EXEC. That will download "VALVE BODY OP1.TXT" into part program memory, using whatever O-number is in the file. (now for the trick):

Switch to the OFFSET page on the CNC, then press READ and EXEC. That will download the offset data directly into the CNCs offsets (not into part program memory)

If you want to download the offsets into part program memory instead, just stay on the PROGRAMS page and then key in an O-number, then key in READ, then EXEC. The reason for the O-number is because the file itself does not have an O-number in it. Since the Fanuc needs an O-number, you must manually key one in. If you decide to download the offsets as a part program, you will have to RUN that program in memory mode to actually change all the offsets.

The only reason I could see for downloading the offsets as a file is if I were downloading them in background editing mode BEFORE I needed them. If you're running another job, and you want to get ready to run the VALVE BODY OP1 program, you can download both the part program and the offsets as program files using different O-numbers, then just not run the offset program until you need it for the next part.

If you want to save the offsets and the part program as ONE file, then load it back in the same way, we can do that too. Just set PC-DNC Plus to use a longer "timeout" at the end of a file, so you can send your "(PUT-" command with a file name, send the offsets, then switch to the PROGRAMS page and send the file before PC-DNC Plus times out. That will save one file with the offsets first and the part program after it.

If you save the part program first, no (PUT- command is needed. Just send the part program file, then send the offsets before PC-DNC Plus times out. That will save one file with the part program data first, and the offset data after that.
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
Changing tool diameter in the tool offset screen Vern Smith Haas Mills 21 09-24-2008 09:54 AM
macro program for work offset cncwhiz Fanuc 4 12-14-2007 06:28 AM
Tool Offset (G45,G46,G47,G48) jorgehrr G-Code Programing 6 11-13-2007 01:54 AM
Tool offset ... patrickb Fanuc 13 08-21-2006 10:53 AM
Macro for positive offset qmas99 General CAM Discussion 0 02-11-2006 09:37 PM




All times are GMT -5. The time now is 05:33 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