Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.

Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.

We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.

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
www.cadalysator.dk

Comments

  • 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