I use FPSDK 5.10, and I would like to know if I can get (and set) the activation status of a mechanical unit. Otherwise, does this feature is planned for a future release of FPSDK?
With the DataChanged event of the class MechanicalUnit, I can know when the activation status change, but I can’t get the current status.
But if my mechanical unit “STN1” (used in w_MyWorkObject) isn’t activated, the method GetPosition raise an error on the FlexPendant, even if I use a try/catch around the call of GetPosition.
I would like to activate the mechanical unit or at least get the activation status in order to give a message to the user.
“Attempt to coordinate motion or calculate position of deactivated single unit STN1.
Actions
Activate unit via Motion Unit key, then Jogging window or program. Check work object and program.”
So I activate the unit “STN1” in the jogging window and after it works.
I think that, for jogging purposes, you can only have one mechanical unit active at a time, so by definition whatever is returned by GetActiveMechanicalUnit implies that every other unit is inactive.
abbMechUnit must be the robot (unit “ROB_1”), otherwise I can’t define abbMechUnit.CoordinateSystem = CoordinateSystemType.WorkObject (and I need this to get the robtarget in the good frame).
I can define my Active Unit to “STN1” :
but I get the same error.
I can change the activation status in Jogging window / Menu “Activate…” :
Here, I can activate several units. If “ROB_1” and “STN1” are activated, it works fine, but “STN1” isn’t always activated (due to our process) and in this case the GetPosition method fails.
This is this “Activation Status” I can’t get or set via FPSDK 5.10.