RobotStudio event

IRapidData Interface


Hello there,

it seems that in RAB5.06, it is not necessary to use the IRapidData Interface anymore. The following code is working:

ABB.Robotics.Controllers.RapidDomain.Num myNum = (ABB.Robotics.Controllers.RapidDomain.Num) myRapidData.Value;

While in RAB5.05 it was necessary to use the IRapidData Interface like this:

ABB.Robotics.Controllers.RapidDomain.IRapidData MyIRapid = MyRapidData.Value;

ABB.Robotics.Controllers.RapidDomain.Num MyNum = (ABB.Robotics.Controllers.RapidDomain.Num) MyIRapid;

Is the "new" way now possible for all Rapid Datatypes? The RAB5.06 manual shows both examples, so for me it is not clear what should be used ?!







  • You are now able to use the datatypes directly when the datatype is available for the corresponding rapid data type in CAPI.
    It is more complex to use the interface style and in the product documentation etc will change towards the typed way.
    Note that you should use the following way to "cast"
    myRapidData.Value instead of the C-style though.Then myNum is null if wrong type instead of an exception.
    ABB.Robotics.Controllers.RapidDomain.Num myNum = myRapidData.Value as ABB.Robotics.Controllers.RapidDomain.Num;