RobotStudio event

Get axis data

I try to use the example on page 175 in the userguide.

Dim AMechCol As MechanicalUnitCollection = aController.MotionSystem.MechanicalUnits()
Dim AMechUnit As MechanicalUnit = aController.MotionSystem.ActiveMechanicalUnit
I get error from both lines.
Error 1 'MechanicalUnits' is not a member of 'ABB.Robotics.Controllers.MotionDomain.MotionSystem'. 
Error 2 Value of type 'String' cannot be converted to 'ABB.Robotics.Controllers.MotionDomain.MechanicalUnit'.&nbsp ;
What do i do wrong?
Best regards klaus
Best Regards

Klaus Soenderhegn


  • Hello Klaus,

    This example works for the PC SDK. In the FP SDK, however, there is no MechanicalUnits property, but a GetMechanicalUnits method, so this is obviously an error in the User's Guide, which will be corrected.

    If you take a look in the FP SDK Reference Help you will see a correct example:

    Controller c = new Controller();
    MotionSystem motion = c.MotionSystem;
    MechanicalUnitCollection mecUnits = motion.GetMechanicalUnits();
    foreach (MechanicalUnit m in mecUnits)
    if (m.Name == "ROB_1")
    // Do Something
    Best regards,

    Ingela Brorsson
    Software Engineer
    ABB Robotics, Sweden