![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| General CNC (Mill and Lathe) Control Software (NC) General Discussion of CNC (Mill and Lathe) control software here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
| One More Macro ? 16I Will this work IF[[#3022GT70000.0][LT150000.0]]GOTO10 If not any ideas on how to do this function without spliting into a 1/2 dozen statements Bluesman |
|
#2
| ||||
| ||||
IF[[#3022GT70000.0]AND[#3022LT150000.0]]GOTO10 Regards, Scott |
|
#3
| |||
| |||
| Macro statement Bluesman: You need some kind of boolean operator in the middle of this statement to make it work. Your original statement is: IF[[#3022GT70000.0][LT150000.0]]GOTO10 It sounds to me like you're trying to find out if the value of #3022 is between 70000.0 and 150000.0 and, if it is, jump to line N10 of your program. Any value less than or equal to 70000.0 or any value greater than or equal to 150000.0 will fail the test, and the program will procede to the next block. Now, if we break this down, you can see that the part [#3022GT70000.0] is either going to be "True" or "False". You then need to put an AND operator after it, then make another True/False expression, like [#3022LT150000.0] Here's what I mean: IF[[#3022GT70000.0]AND[#3022LT150000.0]]GOTO10 This statement tests the first True/False expression: [#3022GT70000.0]. If that expression is True, then it tests the next expression: [#3022LT150000.0]. If that is ALSO true, then the entire expression after the IF statement is true, and the GOTO statement will do its thing. Hope this helps. |
|
#4
| ||||
| ||||
| Yes, what Dan said! |
|
#5
| |||
| |||
That is precisly what I need, I am not sure why I did not know that, I have been doi9ng this for so long . Sometime you just need a bit of a boost. Thanks Scott Bluesman |
| Sponsored Links |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |