Is it possible to create a program, using RAPID, that allows an articulating arm to write sentences?

MisterAliasMisterAlias West Virginia United States
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.

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,


  • lemster68lemster68 United States ✭✭✭
    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 Justice
  • Peter1Peter1 ✭✭
    edited April 2019
    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 this

      PERS 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 rows
        PERS num maxrow:=9;     !max number of characters on 1 row
        PERS num deltacolumn:=20; !distance between column
        PERS string sentence;

        PROC writeletter(num row,num column,string strletter)
            VAR string procname;

        PROC 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;

        PROC Write_text()
            VAR num i;
            VAR num j;
            VAR num a;
            VAR string letter;
            sentence:="ABC_hello world";
            FOR a FROM 1 TO StrLen(sentence) DO 
                writeletter i,j,letter;
                incr i;
                IF i>maxrow THEN
                    incr j;

  • MisterAliasMisterAlias West Virginia United States
    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.
Sign In or Register to comment.