Using Direction within a IF statement

Hello all!

I maybe have a silly question.
I would like to hear if you could use an Direction within a IF statement.

My wish is to have a Direction with Move to Contact within a IF statement and use that as turn point.
As the TCP move in Z and if it make contact with the Move to Contact it will do something like instead of moving on in the program tree… (if that make sense)

Yes, you can put Direction moves in IF statements. From here you can branch off in different directions, go to a different CASE selection, etc. You can also add multiple Until statements in a single Direction move to trigger a variable value that can be used to change the direction of flow. Lots of options here, probably only limited by your imagination.

That is just what I need. I have not had any luck with it, but gonna keep trying. Thank you for the reply it help so much :slight_smile:

Glad it helps.

If you post the code in question along with your intent we can probably get you all dialed in.