RobotStudio event

Comparing posititions

Hi there

I am working on a project and need to compare two positions, but can't figure out how to do it.

Thanks in advance!


Comments

  • It looks like it might work.  Single step forward one line at a time so you can see the values and the evaluation of the expressions.
    Lee Justice
  • lemster68 said:
    It looks like it might work.  Single step forward one line at a time so you can see the values and the evaluation of the expressions.
    The values are the same when i compare them doing step by step, I have no clue why it's skipping the If statement. 

  • Well, if even one number is mismatched five decimal places over I suppose it will evaluate to NOT TRUE.  Try instead the Dist() function and use a value that is very small, like 0.5mm.
    Lee Justice
  • lemster68 said:
    Well, if even one number is mismatched five decimal places over I suppose it will evaluate to NOT TRUE.  Try instead the Dist() function and use a value that is very small, like 0.5mm.
    Where can i find this function? 
    Is it Instruction - Mathematics - Distance?
  • It worked! Thank you!
  • Hello,
    Be careful, Distance only give you the distance. It doesn't take care of orientation neither configuration.