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 06-21-2011, 05:32 PM
 
Join Date: Nov 2007
Location: usa
Posts: 36
marcwdci is on a distinguished road
Macro problem w/16i

Hi all-
Having a problem getting a macro to "play nice" in single-block mode. What we are doing is "hijacking" the hard-coded (ladder) M6 command via a user-defined macro as follows:
Param 9071 = 6
Macro:
O9001 M6;
POPEN;
DPRNT[STUFF WE WANT TO SEND];
PCLOS;
M99;
OR
Param 6080 = 6
Macro:
O9020 M6 T#4120;
POPEN;
DPRNT[STUFF...]
PCLOS;
M99;

Problem is, when the customer runs in single-block mode, the screen jumps into the macro, and when cycle start is pressed a sufficient number of times to step through the macro, the next step of the calling program is executed immediately!
The problem is not seen on 15 control we installed on recently, and I have tried param 6000 b5 (SBM) which causes the DPRNT stuff to flow through, and param 3450 b4 (NPS) which causes the M99 to flow through.
But once I'm out of the macro, the next block fires off. It seems to be more of a display problem than a behavior problem; if somehow the macro was "invisible" during single-block mode I think that would solve the problem.

Any ideas?
Thanks
Marc
Reply With Quote

  #2   Ban this user!
Old 06-22-2011, 02:00 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

Originally Posted by marcwdci View Post
Param 6080 = 6
Macro:
O9020 M6 T#4120;
POPEN;
DPRNT[STUFF...]
PCLOS;
M99;
Please explain:
If you store 6 in param 6080, then M6 would call macro O9020. This is what you are doing, but M6 T#4120 inside the macro will not do anything beacuse the current tool is already there in the spindle.

For your problem, try inserting some extra EOBs and check if it helps.
Reply With Quote

  #3   Ban this user!
Old 06-22-2011, 09:24 AM
 
Join Date: Nov 2007
Location: usa
Posts: 36
marcwdci is on a distinguished road

Sinha
Thanks for your response!

Re M6 T#4120-
We are trying 2 types of macro- the p.6071=6 version calls O9001; in this configuration, the M6 (tool change)seems to already "know" the tool number from the calling program, so it executes ok. When we use p.6080=6, calling O9020 we have to tell it the tool no. hence the T#4120. Don't know exactly why, but if we don't do it it does not work.

The overall point of the macro is to intercept the M6 tool change and send some info (the tool number) to our device, and allow the customer to continue using all his original, un-edited programs and have our device work transparently.

It works great until the user runs in single block mode and wants to see the next main program block before he executes. We have discussed adding a null block (EOB alone) after each M6 call, but there is resistance to editing any main part programs.

Hope that clarifies the problem
Marc
Reply With Quote

  #4   Ban this user!
Old 06-23-2011, 03:44 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

A program can be called by an M code (such as M6) as a subprogram or as a macro. If called as a macro, it is possible to pass paramaters inside the macro, and the called program would have its own set of local variables. But if called as a subprogram, it is like an M98 call.
9001 is called as a subprogram by M6.
9020 is called as a macro by M6 (with or without paramaters).

It is not clear how the tool is changed. M6 T#4120 will not change to a new tool.
Reply With Quote

  #5   Ban this user!
Old 06-23-2011, 08:59 AM
 
Join Date: Nov 2007
Location: usa
Posts: 36
marcwdci is on a distinguished road

Sinha-
Thanks again for the response.
I never fully understood the difference(s) between a macro call and a subprogram call when called by an M-function- we use whichever works best in the particular application. Your feedback is a help!

As for the 9020 M6 T#4120- if I run it without the "T#4120" the tool change does not execute, if I include it, it does. I didn't confirm at the time if I was getting the correct tool, though. One (I) would assume that #4120 is the tool already in the spindle, so I don't understand it either. May need to pass the "T" parameter as something else if I go this route...

In any event, the original problem still stands: when running in single-block mode, how can I have the operator see the block following the macro/subprogram call before execution?

Thanks again for any help!
Marc
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 06-23-2011, 05:33 PM
 
Join Date: Feb 2006
Location: United States
Posts: 273
dpuch is on a distinguished road

Am I correct that everything runs correctly, so it is not a matter of function? (normal or single block) If there is any function issues, you might want to look over the tool change macro I posted.

The only issue is the displayed code when single block is active?


ie.
Main prog:
Code:
N10
N20
N30
N40 M6
N50
N60 ect.
And that is what you want displayed? even when it executes M6 macro? Or is it ok to show the code in the M6 macro after it executes the M6 line?

Main prog:
Code:
N10
N20
N30
N40 M6
M6 N10
M6 N20
M6 N30 M99
N50
N60 ect.
I know you can lock down editing O9000+ programs, and I think you can block seeing them with a similar parameter. If that is the case, I do not know if that will stop them from displaying execution on the screen as well.
Reply With Quote

  #7   Ban this user!
Old 06-23-2011, 07:37 PM
 
Join Date: Nov 2007
Location: usa
Posts: 36
marcwdci is on a distinguished road

dpuch-
Thanks for the reply.
No, its not really a function problem- the thing works as desired. The problem is that when the main program executes the macro- in single block mode, the contents of the macro replace the main program on the screen. (I don't care if the op. or anyone else sees it, it's not that big a secret) After the last block of the macro is executed, the macro remains on screen and the next press of cycle start begins execution of the following block in the main program. The problem is, the operator can't see that next block before it starts running. If that next block were a null block (EOB only) that might work, but the user doesn't want to do that.
As for blocking 9000 progs, I have tried that (p3202 b4?) it will prevent editing, but does not fix this issue.
Thanks for your input.
Any more ideas?

Marc
Reply With Quote

  #8   Ban this user!
Old 06-24-2011, 03:37 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

Set 3232#0 (ND8) to 1, and 3232#1 (ND9) to 1.

This will not display the subprogram/macro (8000 series and 9000 series, respectively) during its execution. I believe, it would continue displaying the main program (not tried it) which is what you want.
Reply With Quote

  #9   Ban this user!
Old 06-24-2011, 10:54 AM
 
Join Date: Nov 2007
Location: usa
Posts: 36
marcwdci is on a distinguished road

Sinha-
Thanks for the info!
I spent a whole day trying to find exactly that sort of parameter in the 16i parameter manual and I didn't see it- did I just miss it or is it not documented? In any event , I will be back on-site next week and try it. It sounds like it would be a major part of my solution.

Thanks again, I will let you know how I make out!

Marc
Reply With Quote

  #10   Ban this user!
Old 06-28-2011, 05:08 PM
 
Join Date: Nov 2007
Location: usa
Posts: 36
marcwdci is on a distinguished road

Sinha-
That parameter setting does the job!
Thank you very much!
By the way, I couldn't find any reference to it in the parameter manual with the machine, and the parameter display shows no indication of ND9 or ND8. Is this an undocumented parameter?

Thanks again!
Marc
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 06-29-2011, 01:30 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

Marc,
It is there in 0i parameter manual.
Possibly, your manual is an older version.
But the parameter display should show it if it is available on the machine. Otherwise how can one edit it (did you use G10)?
Sinha
Reply With Quote

  #12   Ban this user!
Old 06-29-2011, 06:02 AM
 
Join Date: Jul 2010
Location: south africa
Posts: 23
norbert.barnard is on a distinguished road
Smile macro v.s. single block execution

Hi,
by not displaying a macro-called program the single-block function is not disabled.

#3003=0 or 1 enable or disable function, this is usefull to manupilate the behaviour of the program at any level.

regards
norbert
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
Newbie- Macro problem with Haas VF-1 and HS-1 colton_m Haas Mills 6 03-04-2010 11:02 PM
Need Help!- Alarm Code 126 - Macro problem NickDP Fanuc 2 07-09-2009 08:20 AM
Short macro problem scrapper400 G-Code Programing 11 12-05-2008 07:56 AM
Drill Macro problem toolmanwaz CamSoft Products 5 04-01-2008 10:47 AM
VF0E Macro Problem stang5197 Haas Mills 1 06-14-2007 05:34 PM




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