Forum Migration Notice
We're transitioning to a more modern community platform by the end of this year. Learn about the upcoming changes and what to expect.
variable robtarget name
Does anyone know how to specify the name of a robtarget that was constructed from adding strings and numbers together? For example, I have a robtarget that changes based on the job number that we are running, the job number is a variable number, x. I would like to build the robtarget name using the "x" variable such as:
MoveJ "Rob_Move"+NumToStr(x,0),v2500,z100,tool01;
If I am running job number 4, then the point is Rob_Move4. Of course this will change depending on the job that we are running. The NumToStr converts the x variable to a string and adds it to the end of Rob_Move. However, in this example, the name is read as a string and not as a robtarget. Does anyone know how I can construct the robtarget name with the variable and then use it in a move instruction?
0
Comments
-
have done this before (years ago and cant remeber exactly the process)I think I used GetDataValsomething like this;GetDataVal "target"+ ValToStr(num), temprobtargetMoveL temprobtarget0
Categories
- All Categories
- 5.6K RobotStudio
- 401 UpFeed
- 21 Tutorials
- 15 RobotApps
- 306 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.9K Robot Controller
- 365 IRC5
- 84 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 854 RAPID Programming
- 37 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 110 Collaborative Robots
- 5 Job listings