Random values
MBech
✭
in RobotStudio
Is there a standard function in RAPID to generate random values for variables? Something equivalent to the 'rand' or 'randf' function in C?
0
Comments
-
No, but there's probably plenty of ways to make your own. For instance, if the robot is moving, you might try something like:
FUNC num GetRandom()
VAR jointtarget joints;
VAR num nVal;
joints := CJointT();
RETURN nVal:=Round(Sqrt(Abs(joints.rax_3)))
ENDFUNC
Russell Drown0 -
Nowadays you can use Rand()-----------------
David
Swedish freelance ABB robot programmer0
Categories
- All Categories
- 5.5K RobotStudio
- 394 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 309 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings