What is correct syntax for WaitUntil /inpos?
I cannot get this syntax correct? I want to wait until the robot stops moving after getting to a position. Or waiting for the gripper to close.
You Can use WaitRob to wait until the robot is in position, with
If you use WaitUntil you must provide a True/False condition,
WaitUntil \inpos, Cond;You could use this command as following to achieve the same functionality as WaitRob:
WaitUntil \inpos, TRUE;This will wait until the robot is in position, and check the Cond Boolean which is just set to TRUE, so it will continue.
If you wanted to wait for a gripper as well as the robot being stopped then you would need a Boolean condition or digital input telling you when the gripper is closed, either one:
WaitUntil \inpos, b_GripperClosed = TRUE;
WaitUntil \inpos, diGripperClosed = 1;It depends how you have your system set up.
These funcions are well documented in the 'RAPID Instructions, Functions and Data Types (IRC5)' Help available through File -> Help -> IRC5 Documentation -> RAPID in RobotStudio.
I'll hijack this thread with a follow up question:
If I write the code as:
WaitUntil \inpos, TRUE \Maxtime=2 \Timeflag:=bTimeout;Will the timer start if inpos=0 or will it wait indefinitly?
Hello! I'll just hijack this thread with a follow up question:
WaitUntil \inpos, TRUE \Maxtime=2 \Timeflag:=bTimeout;If i write like this, will the timer start if inpos = 0 or will it wait until end of times?
It should wait until either - the robot is in position, OR, 2 seconds has passed, then it will continue. It will not wait indefinitely, unless you haven't provided a timeout and the robot is not in position and not moving to its position.
If 2 seconds passes and the robot is not in position, it will set bTimeout to TRUE and continue. Note that if you hadn't provided a Timeflag argument then if the timer expired it would throw an error instead.
You can always test it in your simulator!
- 10.4K All Categories
- 5.3K RobotStudio
- 352 UpFeed
- 15 Tutorials
- 9 RobotApps
- 282 PowerPacs
- 404 RobotStudio S4
- 1.8K Developer Tools
- 239 ScreenMaker
- 2.6K Robot Controller
- 252 IRC5
- 36 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 703 RAPID Programming
- 14 Wizard Easy Programming
- 107 Collaborative Robots
- 3 Job listings