Robot writin on desk
St4rk
✭
in RobotStudio
Hello everyone, At first I'm sorry for my English.
I want do program that robot IRB 120 write on table word that person write on flexpendant. How I should this do ? I think I should do one letter-one module and then call individual letter. But I dont know how I should do that one string ex.("Hello") program generate module for every letter.
I want do program that robot IRB 120 write on table word that person write on flexpendant. How I should this do ? I think I should do one letter-one module and then call individual letter. But I dont know how I should do that one string ex.("Hello") program generate module for every letter.
0
Comments
-
Hello
You can have different procs/routines for each letter which you can call with a another proc that reads the input string of the word you want to write
Here is example:MODULE PROGPERS string sText;PROC main()prWriteText "Hi";ENDPROCPROC prWriteText(string sText)VAR string sStringPart;VAR num nLenght;nLenght:=StrLen(sText);FOR i FROM 1 TO nLenght DOsStringPart:=StrPart(sText,i,1);IF sStringPart="H" OR sStringPart="h" THENprMotion_for_H;ELSEIF sStringPart="I" OR sStringPart="i" THENprMotion_for_I;ENDIFENDFORENDPROCPROC prMotion_for_H()!Robot motions for H letterENDPROCPROC prMotion_for_I()!Robot motions for I letterENDPROC1 -
Thanks Pavel for response, I'm going try it and then I ask again if I will have doubt. And one more question, How I do that the next letter is moved by a set distance ?0
-
Hello St4rk
You can add an offset to the FOR loop, so for each loop cycle it will add 100mm offset starting from 0.
See example:MODULE PROGPERS string sText;PERS num nLetterDistance;PERS robtarget pWrite_H_1;PROC main()prWriteText "Hi";ENDPROCPROC prWriteText(string sText)VAR string sStringPart;VAR num nLenght;nLenght:=StrLen(sText);FOR i FROM 1 TO nLenght DOnLetterDistance:=(i-1)*100;sStringPart:=StrPart(sText,i,1);IF sStringPart="H" OR sStringPart="h" THENprMotion_for_H;ELSEIF sStringPart="I" OR sStringPart="i" THENprMotion_for_I;ENDIFENDFORENDPROCPROC prMotion_for_H()!Robot motions for H letterMoveL Offs(pWrite_H_1,nLetterDistance,0,0),v1000,z50,tool0\WObj:=wobj0;ENDPROCPROC prMotion_for_I()!Robot motions for I letterENDPROCENDMODULE0
Categories
- All Categories
- 5.5K RobotStudio
- 395 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 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