Dynamic Robtarget How p10+variable,v1000
Hello everybody
i have a question for robtarget i want to use dynamic robtarget in our system
for example :
PERS num activeprogram:=1;
pers robtarget drop:=[[1942.00,0.00,2110.00],[0.707107,0,0.707107,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
pers robtarget drop1:=[[1942.00,0.00,2110.00],[0.707107,0,0.707107,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
pers robtarget drop2:=[[1942.00,0.00,2110.00],[0.707107,0,0.707107,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
pers robtarget drop3:=[[1942.00,0.00,2110.00],[0.707107,0,0.707107,0],[0,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];
MoveL drop, v1000, z50, tool0;
when num activeprogram value change i want to change drop point value easy way how can i do this i try MoveL "drop"+(activeprogram), v1000, z50, tool0; but not work
thanks for your help.
blackcoder2012-10-02 16:26:44
0
Comments
-
A few ways to do this. You are trying to late bind a robotarget name based on a program number. What you have shown is a mixture of string and number being stuffed into a robotarget data element. I would suggest making a simple Test or IF statement prior to your motion to dynamically load a generic target with your desired positional information from your various conditions. Other ways to do it.. More complicated I think these achieves your request simply.<?: prefix = o ns = "urn:schemas-microsoft-com:office:office" />
TEST nActiveProgram
CASE 1:
!;
pDrop:=pDrop1;
CASE 2:
!;
pDrop:=pDrop2;
CASE 3:
!;
pDrop:=pDrop3;
CASE 4:
!;
pDrop:=pDrop4;
DEFAULT:
!ERROR
ENDTEST
0
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)
- 801 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings