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.
0
Answers
-
Hi Gczerkawski,
You Can use WaitRob to wait until the robot is in position, withWaitRob \InPos;
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.
Good Luck,
Harry
0 -
Thank you!1
-
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?
0 -
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?
Thanks
0 -
Hi Jimli,
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!
Regards,
Harry1
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)
- 798 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings