![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Fanuc Discuss Fanuc controllers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
OK why is this generating a MACRO format alarm? #954=[#952EQ#1002]OR[#953EQ#1003] Can I not use the AND OR XOR Bitwise operators on a Fanuc 16I Just when I thought I knew everything too. I have other ways to do this same comparison but was hoping to take care of it all in one line Bluesman |
|
#2
| |||
| |||
| Bluesman: The statement to the right of your equal sign would result in a "true" or "false", not an integer. It's not possible to assign a true/false result to variable #954. I'm not sure what you're trying to do here, but when you use that "EQ" operator, the result is always true/false, so the OR operator of two true/false results will also be true/false You can use a statement like: IF[#952EQ#1002]GOTOxxx (true/false result) Or you can say: [#952+#1002]OR[#953+#1003] (boolean OR of two integers) Hope this helps |
|
#3
| |||
| |||
| I was trying to send a value of 1 to #954 if either of the 2 statements were true. I need to make sure that if a cycle interuption happends before pallet exchange and after my broken tool logic traps the cycle. At a restart when it goes into a program loop it checks to see of the pallet it alarmed out on is till in the machine. If it is I need to complete the index before finishing the trap. So I take #1002 or #1003 and transfer the value to #952 or #953 respectivly If at a restart both #952 and #1002 have a value of 1 then I know the pallet never indexed out and so I GOTO and M60 then continue on with my containment part of the prigram. But I just changed it with IF[[#952+#1002]EQ2]GOTO11 and that is doing the same thing I was just trying to figure out a simple way of doing it all in one statement. I need to brush up on my MACRO B skills. I am going to FANUC in 2 weeks for soem much needed learnin Thanks for your help, BLUESMAN |
|
#4
| |||
| |||
The result of [#952EQ#1002] and the other expression is TRUE or FALSE, which is considered a boolean value by Fanuc, even though the value is 0 or 1 (which can be used in some other expression, as arithmetic values). |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |