RobotStudio event

EXOR statement

Hi All <?: prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

I would like to use an exclusive or statement to wait for a specific DI input to be true. I cannot seem to get the syntax right. Is it possible to do something similar to the statement below;

 

WaitUntil DItemp1=1 EXOR DItemp3=1 EXOR DItemp3=1;

 

Comments

  • Hello,
    In RAPID, you use XOR, not EXOR.

     

    However, you have to consider what you want to do. Do you want to go forward if one, and only one of the inputs is 1? That is not what happens in your example.

     

    Hope this helps you, otherwise, please explain in more detail what behaviour you want!

     

    BR frpa
  • Thanks for the syntax
     

    My firt post had a bit of a typo

     

    WaitUntil DItemp1=1 XOR DItemp2=1 XOR DItemp3=1;






    If i am right this should allow it to move on if only one of the inputs are true.
  • Hello,
    No, this does not work.

     

    The statement will be evalutated like this:

    WaitUntil (DItemp1=1 XOR DItemp2=1) XOR DItemp3=1;

     

    Consider the situation where all of the IOs are 1.

     

    The first evaluation will be FALSE, which gives us

    WaitUntil FALSE XOR DItemp3=1;

    which gives us TRUE...

     

    I can't think from the top of my head how to do this with logic, but it can probably be done. Ideas, anyone?

     

    BR frpa
  • This should work...

    WaitUntil (di1+di2+di3=1);

     

    BR frpa
  • Excellent thanks, I will give it a wack.