![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Parametric Programing (custom macro b, fadal macro, okuma user task) |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#2
| |||
| |||
IF[#120AND7EQ1]GOTO1 would give a false return. #120 may equal 1 but 7 never will. The control will read '7' as a constant and not a variable. However, I ran this: #120 = 1; n2 IF[#120 AND 7 EQ 1] do1; goto2; end1; m1; and got it into an infinite loop. This is odd. This will confuse me for a while. I would expect this to go straight to m1, but the machine is counting the statement as true when I would expect it not to. F[#120AND#7EQ1]GOTO2 also gave an infinite loop. Very strange. |
|
#3
| |||
| |||
| AND is an operator so I think in your loop, this becomes bitwise. Therefore, the product of bin 1 and 7 = 0001 ... or in other words equal to "1". So the program loops...
__________________ It's just a part..... cutter still goes round and round.... |
|
#4
| |||
| |||
| You are right. AND can be both bitwise and Boolean. It depends on what you have as its arguments. In fact, it is also possible to have "different" ANDs in the same Block! IF [[[#1 AND #2] LT 100] AND [#1 LT #2]] GOTO 10; Of course,parameter 6000#0 should be 1 to allow use of AND as a Boolean function in a conditional statement. Incidently, arithmetic 0 and 1 are not equivalent to Boolean FALSE and TRUE, as believed by Peter Smid. Last edited by sinha_nsit; 11-08-2009 at 11:16 PM. |
|
#5
| ||||
| ||||
| IF [[#120 EQ 1] AND [#7 EQ 1 ]] GOTO 1 Would this not be an easier way of getting the syntax correct ? You are breaking up the query to each variable and get a yes/no from each, if either give a 0 return then the IF statement will not jump |
| Sponsored Links |
|
#6
| |||
| |||
| This is what he perhaps wants to check. This would be the simplest method. |
|
#7
| |||
| |||
| Hi to all. iI have vmc (Jih Fong Machinery Co) of taiwan with Fanuc 0-MD 20# of tool changer i have lost of its all macro and sub programs i am not able make the macro program how to call the 20 tools step by step please help me thanks to all. |
|
#8
| |||
| |||
| For a better response, start a new thread for a new problem. Can call a tool without using any macro. Send it to a safe position (say, reference position), and command T1 M06, for example. Then bring it to the machining area, incorporate length offset and continue... |
|
#10
| |||
| |||
|
If you do not have the full keypad with these functions on it then you have to write the program and download it to the control. Stevo |
| Sponsored Links |
|
#12
| |||
| |||
| You are doing a download and not dripfeeding correct? Stevo |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |