Let me see if I can explain my self properly here or not.... I'm new with the if statements.
I have a part that when I first get it it has a .500" predrill in it and then goes out for broaching and comes back with a .780" square in it were the hole used to be. (I have to use the drill or square as my origin)
I ask the operator (yes/no input) before the program executes "Has the broaching operation been completed" click yes or no.
If operator answers yes I have this:
If/c3.Input=="Yes"
I then measure the lines, create mid lines, intersect them for a point
I then do an alignment translate to the intersect point as my XY origin
End_if/
If operator answers no I have this:
If/c3.Input=="No"
I measure the .500" predrill
I then do alignment translate to the predrill as my XY origin
End_if/
The problem I'm having is that if the operator answered yes it does not ignore the alignment of the No answer. I thought anything between the IF statement and the END_IF/ statement it ignored depending on the answer including the alignments. If this is not correct then I guess I can't do it this way. I could copy the program over and have two programs depending on what has been complete, but I would rather have one that zeros to what ever feature that has been completed at the time.
If the IF statement is the incorrect way to procede because pc-dmis does not ignore alignments in IF statements (which it seems it does'nt), what direction would you take to do handle this type of situation?
Thanks
Dan
I have a part that when I first get it it has a .500" predrill in it and then goes out for broaching and comes back with a .780" square in it were the hole used to be. (I have to use the drill or square as my origin)
I ask the operator (yes/no input) before the program executes "Has the broaching operation been completed" click yes or no.
If operator answers yes I have this:
If/c3.Input=="Yes"
I then measure the lines, create mid lines, intersect them for a point
I then do an alignment translate to the intersect point as my XY origin
End_if/
If operator answers no I have this:
If/c3.Input=="No"
I measure the .500" predrill
I then do alignment translate to the predrill as my XY origin
End_if/
The problem I'm having is that if the operator answered yes it does not ignore the alignment of the No answer. I thought anything between the IF statement and the END_IF/ statement it ignored depending on the answer including the alignments. If this is not correct then I guess I can't do it this way. I could copy the program over and have two programs depending on what has been complete, but I would rather have one that zeros to what ever feature that has been completed at the time.
If the IF statement is the incorrect way to procede because pc-dmis does not ignore alignments in IF statements (which it seems it does'nt), what direction would you take to do handle this type of situation?
Thanks
Dan
Comment