
How to assigne varible's name in a loop?

WuYue
✭
in RobotStudio
Hi,
I want to write a loop to assign variable names:
For i FROM 1 to 100 DO
VAR pos Mypos_(i) ! I want to have Mypos_1 all the way until Mypos_100. how to achieve this in RAPID?
END
Thanks!
Tagged:
0
Best Answer
-
Not possible to declare variables in code. Why not use an array??? See example picturePer Svensson
Robotics and Vision Specialist
Consat Engineering6
Categories
- All Categories
- 5.6K RobotStudio
- 398 UpFeed
- 20 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 327 IRC5
- 65 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 820 RAPID Programming
- 7 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings