Is it possible to create a program, using RAPID, that allows an articulating arm to write sentences?
A peer and myself are trying to figure out if it is possible to create a program that can separate work objects from routines in such a way that rows and columns can be called and then letter routines can be placed within the rows and columns.
Break down:
We are trying to create a program that will have an articulating arm (IRB 120) write sentences. We are thinking of having 8 rows and 9 columns of work objects and saving each letter as a subroutine. The problem is, we do not know how to properly set this up. We are wanting to be able to easily choose which letters are placed into the work object of our choosing.
Example:
The row and column set up below would be the overall work object and each cell would allow us to write any letter of our choosing. Ideally we would have a plug and play set of routines where you could call out a cell position and a letter, and then a cell position and a letter and it would fill them in respectively.
Another idea we had was to set up an array of rows and columns, but only defined as work objects, so we could plug in a letter routine to the defined cell within the rows and columns.
We greatly appreciate any help!
Thank you for your time,
Ron
0
Comments
-
A FOR loop could be useful in your endeavor. Arrays are also very useful in such loops. However, Robotware doesn't like Workobjects to be in arrays, so you could have an Array which could contain the names of the workobjects to which you could then reference from your routine. Search the forums and you can find some code samples very similar to your question.Lee Justice0
-
hello,
you can use the object part of the wobj to change position of the letter
the uframe defines the start of your paper
the oframe defines the start of your letter
then use someting like thisPERS wobjdata wobj_paper:=[FALSE,TRUE,"",[[200,200,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]];PERS num deltarow:=20; !distance between rowsPERS num maxrow:=9; !max number of characters on 1 rowPERS num deltacolumn:=20; !distance between columnPERS string sentence;PROC writeletter(num row,num column,string strletter)VAR string procname;wobj_paper.oframe.trans.x:=(row-1)*deltarow;wobj_paper.oframe.trans.y:=(column-1)*deltacolumn;procname:="letter_"+strletter;%procname%;ENDPROCPROC Letter_A()MoveL [[10,15,0],[1,0,0,0],[1,0,0,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]],v100,z1,tool0\WObj:=wobj_paper;!.....ENDPROCPROC Write_text()VAR num i;VAR num j;VAR num a;VAR string letter;sentence:="ABC_hello world";i:=1;j:=1;FOR a FROM 1 TO StrLen(sentence) DOletter:=StrPart(sentence,a,1);writeletter i,j,letter;incr i;IF i>maxrow THENi:=1;incr j;endifENDFORENDPROC
0 -
Thank you very much for the suggestions! We are working on the program now, so I’ll hop on another arm and see if this works. We’ll update as soon as we test it.0
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