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-23-2011, 08:38 AM
beege's Avatar  
Join Date: Feb 2008
Location: USA
Posts: 518
beege is on a distinguished road
Macro A Anyone?

Hi,


I thought this needed to be posted. There are so many questions having to do with Macro B, which some machines don't have, but perhaps they DO have Macro A, which nobody ever talks about.

I'd like to see if someone tests for Macro B and it doesn't work
(MDI ---> #500 = 1 EOB, Cycle start)
Tests also for Macro A (MDI --> G65 H01 P#500 Q1 EOB, cycle start) and finds it does work.

Macro A is cumbersome, but could be a live option for some.



From a 0M Operator's Manual, Macro A usage:

G65 H01 Pn Qn (Definition or substitution)
Macro B == #P = #Q

G65 H02 Pn Qn Rn (Addition)
Macro B == #P = #Q + #R

G65 H03 Pn Qn Rn (Subtraction)
Macro B == #P = #Q - #R

G65 H04 Pn Qn Rn (Multiplication)
Macro B == #P = #Q X #R

G65 H05 Pn Qn Rn (Division)
Macro B == #P = #Q / #R

G65 H11 Pn Qn Rn (Logical sum)
Macro B == #P = #Q OR #R

G65 H12 Pn Qn Rn (Logical product)
Macro B == #P = #Q AND #R

G65 H13 Pn Qn Rn (Exclusive OR)
Macro B == #P = #Q XOR #R

G65 H21 Pn Qn (square root)
Macro B == #P = SIN[#Q]

G65 H22 Pn Qn (Absolute Value)
Macro B == #P = ABS[#Q]

G65 H23 Pn Qn Rn (Remainder)
Macro B == ???

G65 H24 Pn Qn (BCD to Binary)
Macro B == #P = BIN[#Q]

G65 H25 Pn Qn (Binary to BCD)
Macro B == #P = BCD[#Q]

G65 H26 Pn Qn Rn (Combined multiplication / division)
Macro B == #P = [#P X #Q] / #R

G65 H27 Pn Qn Rn (Combined square root)
Macro B == #P = SQRT[[#Q X #Q] + [#R X #R]]

G65 H28 Pn Qn Rn (Combined square root)
Macro B == SQRT[[#Q X #Q] - [#R X #R]]

G65 H31 Pn Qn Rn(Sine)
Macro B == #P = #Q X SIN[#R]

G65 H32 Pn Qn Rn (Cosine)
Macro B == #P = #Q X COS[#R]

G65 H33 Pn Qn Rn(Tangent)
Macro B == #P = #Q X TAN[#R]

G65 H34 Pn Qn Rn (Arctangent)
Macro B == #P = #Q X ATAN[#R]

G65 H80 Pn (Divergence)
Macro B == GOTO #P

G65 H81 Pn Qn Rn (Conditional Divergence 1)
Macro B == IF #Q EQ #R GOTO #P

G65 H82 Pn Qn Rn (Conditional Divergence 2)
Macro B ==IF #Q NE #R GOTO #P

G65 H83 Pn Qn Rn (Conditional Divergence 3)
Macro B ==IF #Q GT #R GOTO #P

G65 H84 Pn Qn Rn (Conditional Divergence 4)
Macro B ==IF #Q LT #R GOTO #P

G65 H85 Pn Qn Rn (Conditional Divergence 5)
Macro B ==IF #Q GE #R GOTO #P

G65 H86 Pn Qn Rn(Conditional Divergence 6)
Macro B ==IF #Q LE #R GOTO #P

G65 H99 Pn (Alarm Occurrence, generates a P/S Alarm with number code 500+Pn)
Macro B == #3000 = 1 (ALARM NOTE)

Last edited by beege; 03-23-2011 at 10:24 AM.
Reply With Quote

  #2  
Old 03-23-2011, 09:11 AM
Al_The_Man's Avatar
Community Moderator
 
Join Date: Dec 2003
Location: Canada
Posts: 16,538
Al_The_Man is on a distinguished road
Buy me a Beer?

Do you have A right now and need of Macro B or just pointing out the differences?
Al.
__________________
CNC, Mechatronics Integration and Machine Design.
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
Reply With Quote

  #3   Ban this user!
Old 03-23-2011, 09:18 AM
beege's Avatar  
Join Date: Feb 2008
Location: USA
Posts: 518
beege is on a distinguished road

Just bringing some information to the forum here. I thought it was needed. Can't find Macro A info anywhere using <insert search engine here>, and some here might need it.
Reply With Quote

  #4   Ban this user!
Old 03-23-2011, 09:09 PM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Good call Beege. I don't understand a bit of it but you are right that it may help many others.

I am sure you know exactly were I stand on macroA vs. macroB

Thanks for the info.

Stevo
Reply With Quote

  #5   Ban this user!
Old 03-24-2011, 01:43 AM
christinandavid's Avatar  
Join Date: Aug 2009
Location: New Zealand
Posts: 573
christinandavid is on a distinguished road

A quite effective way to encrypt macro programs...

DP
Reply With Quote

Sponsored Links
  #6   Ban this user!
Old 03-24-2011, 01:30 PM
ED209's Avatar  
Join Date: Jul 2003
Location: Alberta, Canada
Posts: 67
ED209 is on a distinguished road

Thanks Beege I just bought a lathe that had 4 Macro A progs in it now I have a better understanding of whats going on, they're for the tool sensor arm, which no longer exists on the machine. I do know Macro B & have written many a program.
Reply With Quote

  #7   Ban this user!
Old 03-24-2011, 03:00 PM
tc429's Avatar  
Join Date: Feb 2011
Location: USA
Posts: 325
tc429 is on a distinguished road

dont macroB require a full key MDI? not all machines have them- none of the Zeroes we ordered ever did except one for a customer that wanted macro B...

almost all of the stuff Ive written here has been macro-A, not that bad...I also typed up a list like yours for the setup guys though- why Fanuc describes them in xyz instead of the required pqr format is beyond me- reading the manual just confuses folks. Macro B is a lot more readable, no doubt, but its still pretty powerful. I just ran into another issue with unpublished variables a few weeks ago,- wrote a macro to increment thru the variables to put a weird number in the one I wanted, found it that way...almost every register in the control is available in the macro table, but they dont tell you where they are- at least not where Ive found...

Important to note if writing Macro, the controls buffer 3 lines at a time- if one step effects a change in a variable of the next step, it will not work right...put two extra EOBs in there to fill the buffer and all works fine (till someone deletes the extra EOBs!!!)

Tim
Reply With Quote

  #8   Ban this user!
Old 03-24-2011, 07:55 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

Originally Posted by tc429 View Post
dont macroB require a full key MDI? not all machines have them- none of the Zeroes we ordered ever did except one for a customer that wanted macro B...

Tim
Tim,
There are quite a few machines that used Macro B code in their tool change routines and don't have the full key pad. For machines configured in this way, you can write the Macro programs using a PC and upload to the control.

Regards,

Bill
Reply With Quote

  #9   Ban this user!
Old 04-02-2012, 07:28 PM
 
Join Date: Jun 2007
Location: US
Posts: 22
trio is on a distinguished road
Thumbs up Thanks for the list!

I also couldn't find any info on Macro A online anywhere!

I used it often with older controls, but lost my own list over the years. I really liked how you made the equivalent macro b very evident!
Reply With Quote

  #10   Ban this user!
Old 04-02-2012, 07:51 PM
 
Join Date: Jul 2007
Location: USA
Posts: 16
oldgoat is on a distinguished road

G65 H23 Pn Qn Rn (Remainder)
Macro B == ???
#P = #Q MOD #R

Or as Fanuc notates it: #i = #j MOD #k (Remainder)

Extracted from the custom macro section of a Fanuc manual.
Reply With Quote

Sponsored Links
  #11   Ban this user!
Old 04-03-2012, 07:27 AM
beege's Avatar  
Join Date: Feb 2008
Location: USA
Posts: 518
beege is on a distinguished road

Thanks "oldgoat" for filling in that blank. I couldn't make that connection myself for some reason.
Reply With Quote

  #12   Ban this user!
Old 04-03-2012, 11:49 AM
rai rai is offline
 
Join Date: Feb 2006
Location: INDIA
Posts: 164
rai is on a distinguished road
Smile

Lots of thanks.........................




Originally Posted by beege View Post
Hi,


I thought this needed to be posted. There are so many questions having to do with Macro B, which some machines don't have, but perhaps they DO have Macro A, which nobody ever talks about.

I'd like to see if someone tests for Macro B and it doesn't work
(MDI ---> #500 = 1 EOB, Cycle start)
Tests also for Macro A (MDI --> G65 H01 P#500 Q1 EOB, cycle start) and finds it does work.

Macro A is cumbersome, but could be a live option for some.



From a 0M Operator's Manual, Macro A usage:

G65 H01 Pn Qn (Definition or substitution)
Macro B == #P = #Q

G65 H02 Pn Qn Rn (Addition)
Macro B == #P = #Q + #R

G65 H03 Pn Qn Rn (Subtraction)
Macro B == #P = #Q - #R

G65 H04 Pn Qn Rn (Multiplication)
Macro B == #P = #Q X #R

G65 H05 Pn Qn Rn (Division)
Macro B == #P = #Q / #R

G65 H11 Pn Qn Rn (Logical sum)
Macro B == #P = #Q OR #R

G65 H12 Pn Qn Rn (Logical product)
Macro B == #P = #Q AND #R

G65 H13 Pn Qn Rn (Exclusive OR)
Macro B == #P = #Q XOR #R

G65 H21 Pn Qn (square root)
Macro B == #P = SIN[#Q]

G65 H22 Pn Qn (Absolute Value)
Macro B == #P = ABS[#Q]

G65 H23 Pn Qn Rn (Remainder)
Macro B == ???

G65 H24 Pn Qn (BCD to Binary)
Macro B == #P = BIN[#Q]

G65 H25 Pn Qn (Binary to BCD)
Macro B == #P = BCD[#Q]

G65 H26 Pn Qn Rn (Combined multiplication / division)
Macro B == #P = [#P X #Q] / #R

G65 H27 Pn Qn Rn (Combined square root)
Macro B == #P = SQRT[[#Q X #Q] + [#R X #R]]

G65 H28 Pn Qn Rn (Combined square root)
Macro B == SQRT[[#Q X #Q] - [#R X #R]]

G65 H31 Pn Qn Rn(Sine)
Macro B == #P = #Q X SIN[#R]

G65 H32 Pn Qn Rn (Cosine)
Macro B == #P = #Q X COS[#R]

G65 H33 Pn Qn Rn(Tangent)
Macro B == #P = #Q X TAN[#R]

G65 H34 Pn Qn Rn (Arctangent)
Macro B == #P = #Q X ATAN[#R]

G65 H80 Pn (Divergence)
Macro B == GOTO #P

G65 H81 Pn Qn Rn (Conditional Divergence 1)
Macro B == IF #Q EQ #R GOTO #P

G65 H82 Pn Qn Rn (Conditional Divergence 2)
Macro B ==IF #Q NE #R GOTO #P

G65 H83 Pn Qn Rn (Conditional Divergence 3)
Macro B ==IF #Q GT #R GOTO #P

G65 H84 Pn Qn Rn (Conditional Divergence 4)
Macro B ==IF #Q LT #R GOTO #P

G65 H85 Pn Qn Rn (Conditional Divergence 5)
Macro B ==IF #Q GE #R GOTO #P

G65 H86 Pn Qn Rn(Conditional Divergence 6)
Macro B ==IF #Q LE #R GOTO #P

G65 H99 Pn (Alarm Occurrence, generates a P/S Alarm with number code 500+Pn)
Macro B == #3000 = 1 (ALARM NOTE)
Reply With Quote

Reply

Tags
fanuc, g65, macro, macro a




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
Macro Help AndyF Haas Mills 4 07-16-2010 09:26 AM
"difference between Custom Macro A and Custom Macro B" arulthambi Parametric Programing 4 10-05-2009 03:34 PM
Need Help!- Macro A or Macro B On fanuc o-md macrosat Fanuc 1 07-29-2009 06:49 AM
Testing program for Macro (Fanuc Macro B) NickDP Fanuc 2 03-27-2009 03:15 PM
Convert Fanuc Macro to Fadal Macro bfoster59 Fadal 1 11-08-2007 11:41 PM




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