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


2 Answers 2


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.


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

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

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

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

So RAPID is not object oriented


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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