0
$\begingroup$

How do I create something like a class and have instances of it in ABB RAPID language?

$\endgroup$
1
$\begingroup$

In reviewing the PDF for the RAPID language, it looks like you don't. I can't see anything online that states the RAPID language is object oriented. The manual doesn't even contain the word "class" once, and the language doesn't seem to support structures or methods.

$\endgroup$
0
$\begingroup$

Turns out the closest thing to a Struct is a RECORD you can write:

MODULE myModule
    RECORD myRecord
        pos a;
        num b;
        sring c;
    END RECORD

    PROC main()
        myRecord{1,1}.a.x := 123;
        myRecord{1,2}.b := 1234;
    ENDPROC
ENDMODULE

You can put a RECORD within a RECORD but you cannot put an array in a RECORD.

So RAPID is not object oriented

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.