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 > G-Code Programing > Parametric Programing


Parametric Programing (custom macro b, fadal macro, okuma user task)


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #13   Ban this user!
Old 11-12-2009, 01:12 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

Originally Posted by Khalid.Ins-Tek View Post
Thanks to all but i can't inter( IF [[#) likes value
Set parameter 3204#0 to 0 for a square bracket, instead of parenthesis.
Reply With Quote

  #14   Ban this user!
Old 11-12-2009, 07:39 AM
 
Join Date: Jun 2008
Location: United States
Posts: 1,507
stevo1 is on a distinguished road

Originally Posted by sinha_nsit View Post
Set parameter 3204#0 to 0 for a square bracket, instead of parenthesis.
Sinha....IIRC there is no parameter 3204 for the O series control. You are probably refering to the newer Oi series control.

Stevo
Reply With Quote

  #15   Ban this user!
Old 11-12-2009, 07:53 AM
 
Join Date: Jan 2009
Location: USA
Posts: 39
ggborgen is on a distinguished road
Question IF[#120AND7EQ1]GOTO1

Gentlemen,
So what is the answer to my original question, IF[#120AND7EQ1]GOTO1
would number 7 be read as a local variable #7? Had a apps. guy tell me
that the pound sign from #120 would be carried to the number 7 but
he did not seem to confident in his answer so that's why I come to the
experts here on CNC Zone. Thank You
Reply With Quote

Sponsored Links
  #16   Ban this user!
Old 11-12-2009, 08:14 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

Originally Posted by stevo1 View Post
Sinha....IIRC there is no parameter 3204 for the O series control. You are probably refering to the newer Oi series control.

Stevo
YES!
0 series may have a similar parameter (?)
Reply With Quote

  #17   Ban this user!
Old 11-12-2009, 08:17 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

Originally Posted by ggborgen View Post
Gentlemen,
So what is the answer to my original question, IF[#120AND7EQ1]GOTO1
would number 7 be read as a local variable #7? Had a apps. guy tell me
that the pound sign from #120 would be carried to the number 7 but
he did not seem to confident in his answer so that's why I come to the
experts here on CNC Zone. Thank You
Superman has already suggested the correct method.
IF[#120AND7EQ1]GOTO1 would not do what you want. It means entirely different thing.
Reply With Quote

  #18   Ban this user!
Old 01-11-2010, 07:25 PM
 
Join Date: Dec 2009
Location: United States
Posts: 8
SwissPR0 is on a distinguished road
DID IT WORK?

I was just reading through this thread now, BUT I and am curious to see how it worked out for you.
I ran it through using NCplot, it seemed to work just fine.

#120=1
#7=1

IF [[#120 EQ 1] AND [#7 EQ 1 ]] GOTO 1
M00
N1
Reply With Quote

  #19   Ban this user!
Old 04-11-2012, 04:26 PM
christinandavid's Avatar  
Join Date: Aug 2009
Location: New Zealand
Posts: 573
christinandavid is on a distinguished road

I want to resurrect this thread to get to a satisfactory conclusion. Looking through some Inspection Plus macros I see this kind of AND format everywhere and I really don't understand it...

examples from the 'settings' macro: -

IF[#120AND8NE8]GOTO6

IF[#120AND3EQ3]GOTO4

IF[#120AND3EQ2]GOTO3



DP
Reply With Quote

  #20   Ban this user!
Old 04-12-2012, 03:42 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

This is bitwise AND.
(#120 AND 8) checks the status of fourth bit of binary representation of #120 (starting counting from bit-1, bit-2, and so on) from right.
If #120 AND 8 is equal to 8, then fourth bit is 1.
#120 gets its value from input interface signals.(#120 = #1032)
Let us say first five signals are all 1. Then #1032 would be binary interpretation of 11111 i.e., 31.
31 AND 8 is equivalent to binary 11111 AND 01000 which gives 01000, i.e., 8.
8 means that the fourth bit is ON.
If the fourth bit is not ON, the value returned would be 0.
Thus the first statement means that "if the fourth input signal is 0 (OFF), jump to block number 6." (IF[#120AND8NE8]GOTO6)
Read the attachment for more details.
Attached Files
File Type: pdf logical functions.pdf‎ (92.1 KB, 12 views)
Reply With Quote

Sponsored Links
  #21   Ban this user!
Old 04-12-2012, 04:49 PM
christinandavid's Avatar  
Join Date: Aug 2009
Location: New Zealand
Posts: 573
christinandavid is on a distinguished road

Cheers Sinha,

Any chance you could attach the next couple of pages so I can see your multi pallet application example?

DP
Reply With Quote

  #22   Ban this user!
Old 04-12-2012, 07:38 PM
 
Join Date: Sep 2010
Location: Australia
Posts: 733
angelw is on a distinguished road

In Sinha's example, bitwise "AND" is being used to determine if one number is contained in the other, and is whats called for in the example you supplied. Using bit wise "AND" in the comparison of two numbers produces a third based on a bit by bit comparison of the two, and is how either 8 or zero is returned in Sinha's example. Bit wise "AND" can also be used to determine what number, if any, is contained in the two numbers being compared. The third number is created when the bit by bit comparison is made. If the corresponding bits are different,or are both "0", a "0" is returned for that particular bit,if they're both "1", a "1" is returned.

In the following example:
A = 9 AND 29
A = 8
This result is achieved as follows:

-----16 8 4 2 1
0 0 0 1 1 1 0 1 = 29
0 0 0 0 1 0 1 0 = 9
0 0 0 0 1 0 0 0 = 8

Regards,

Bill
Reply With Quote

  #23   Ban this user!
Old 04-13-2012, 01:35 AM
 
Join Date: Feb 2006
Location: india
Posts: 1,187
sinha_nsit is on a distinguished road

Originally Posted by christinandavid View Post
Cheers Sinha,

Any chance you could attach the next couple of pages so I can see your multi pallet application example?

DP
Two methods are explained. The second method on page 75 is much better.

Incidently, why don't you purchase a copy of the book. Its "used" price is as low as $5.92; virtually free!
Amazon.com: CNC Programming using Fanuc Custom Macro B (9780071713320): S.K Sinha: Books Amazon.com: CNC Programming using Fanuc Custom Macro B (9780071713320): S.K Sinha: Books
Attached Files
File Type: pdf pallet example.pdf‎ (43.9 KB, 9 views)
Reply With Quote

  #24   Ban this user!
Old 04-15-2012, 09:21 PM
christinandavid's Avatar  
Join Date: Aug 2009
Location: New Zealand
Posts: 573
christinandavid is on a distinguished road

Thanks Bill, Sinha,

Once I've got my head around it I may find a use for it, or just incorporate it into my macros to confuse others...thanks for another preview of your book Sinha, you always cut it off just as it's getting onto another interesting topic and leave me wanting more...hey, maybe if I scanned this entire site I might be able to reconstruct the complete works

DP
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





All times are GMT -5. The time now is 01:06 AM.





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