Hi Dan,
Apologies, they say presumption is the mother of all evil. I presumed you did not know about the VB files.
This is one example. Open Mach3, and zero your X and Y DRO's
Open the VBScript utility in the Operator menu.
Copy and paste this:
Dim xpos As Variant
Dim ypos As Variant
Dim result As Variant
GetDRO ( 0 )
xpos = GetDRO ( 0 )
GetDRO ( 1 )
ypos = GetDRO ( 1 )
result = xpos Xor ypos
MsgBox (result)
(Edit) I forgot to mention, you have now a value in "result" that you can use in an if statement to test for conditions, or against other variables etc. There is actually many
ways that you can utilise logical operators in an if statement.
After the VBScript jog the x and y some distance and run the script again. You will get a value in the Msgbox. You can't do much with it, as it is just an example. As I said earlier, you can apply it to achieve something specific which depends on what your application is. The "And" operator can be used in a similar way. Experiment with it, and work out what the values mean, then you can apply it.
Best regards
William