EXOR statement
Dup
✭
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;
0
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 frpa0
-
Thanks for the syntaxMy 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.0 -
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 usWaitUntil 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 frpa0
-
This should work...
WaitUntil (di1+di2+di3=1);BR frpa0 -
Excellent thanks, I will give it a wack.0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings