cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

Error while commanding a Delta robot positioning with ML_KinMoveLinAbs CXA_Motion function

Error while commanding a Delta robot positioning with ML_KinMoveLinAbs CXA_Motion function

giustola69
Long-established Member

Hello,

I'm trying to set a command position to a Delta robot kinematic using the ML_KinMoveLinAbs function from the CXA_Motion library but I got this error and I could not understand the reason.

Please could you help me to solve the problem and tell me what I'm doing wrong ?

Many Thanks

Giuseppe

 

2024-05-16_11h32_34.png

2024-05-16_11h32_49.png

2024-05-16_11h34_22.png

2024-05-16_11h36_33.png

 

 

4 REPLIES 4

CodeShepherd
Community Moderator
Community Moderator

As we can only see a small part of your program its a little hard to tell whats going on. But in the second screenshot there are commands ML_KinEnable and ML_KinMCSP missing for full functionality.

The error on the second screenshot shows that command ML_KinMCSP was executed but MCS set configuration seems to be faulty. Could you please check following node in the data layer as there all configuration errors are listed:
motion/kin/<name of knematic>/state/coord-systems/mcs/<name of MCS set>

The error on the last two screenshots seems to be a following error: No add_cmd during error reaction. It means that probably the move command was set while MCS error was already present.

For further investigation you could send us a system report (How to generate a system report and switch on additional traces) including your app data.

giustola69
Long-established Member

Hello,

I've attached to this topic the file you've asked for plus My plc project and the app archive so you should have the same situation I'm working on.

Please let me know if you find sothing wrong in my code and how it is correct to manage it.

P.S.:

1. the ML_KinMoveLinAbs function returns TRUE as result but the Motion goes in error .

2. The axis enable and group enable are performed byt the FB called in the rows above the call of the funcion ML_KinMoveLinAbs

3. I also tried to call the ML_KinMCSP and eve it returns true as result but the error is still there.

Many Thanks

Giuseppe

 

giustola69
Long-established Member

Hello,

I did some more test and I found that maybe the problem could be related with the ML_KinEnable function:

When I set this function in my plc code it seem that the kinematik is correctly grouped and put in standby but as you can see in the screeshot the TCP feedback position are not updated correctly and if I try to send a position command both from PLC ( ML_KinMoveLinAbs) or from the commissioning tool page I get the error above.

If I you the "Group" pushbutton on the commissionig page to enabe the kinematic all work properly.

Maybe I'm missing somethin in my code to enable correctly the kinametic but the ML_KinEnable function seem to be executed rightly.

2024-05-17_10h03_20.png

2024-05-17_10h04_04.png

2024-05-17_10h05_33.png

 

Please help me to understand what I'm doing wrong in my plc code to properly enable the kinematic

Many Thanks

Giuseppe

 

 This is my fb code:

FUNCTION_BLOCK FB_KinGroup
VAR_INPUT
I_bKinGroup: BOOL;
I_strKinName: STRING;
END_VAR
VAR_OUTPUT
O_bKinGroupDone: BOOL;
O_CmdResult: ML_oCmdResult;
END_VAR
VAR
iKinState: INT;
stKinEnable: ML_KinEnableData;
stKinDisable: ML_KinDisableData;
oCmdResult: ML_oCmdResult;
ioGetCmdState: ML_GetCmdStateData;
bGroupDone: BOOL;
END_VAR

 

CASE iKinState OF

0: ;//IDLE IDLE IDLE DO NOT USE

IF (I_bKinGroup AND NOT bGroupDone) THEN
iKinState := 1;
END_IF

IF bGroupDone AND NOT I_bKinGroup THEN
iKinState := 20;
END_IF

1: ;//INIT

bGroupDone:=FALSE;
O_bKinGroupDone:=FALSE;
iKinState := 10;

10:
//ML_KinEnable
stKinEnable.In.KinName := I_strKinName;
stKinEnable.In.Source := 'Kin Resetfunction ';
IF ML_KinEnable(Data:= stKinEnable) THEN
iKinState := 15;
ioGetCmdState.In.CmdID := stKinEnable.Out.CmdID;
ioGetCmdState.In.ObjName:= stKinEnable.In.KinName;
ELSE
iKinState := 999;
END_IF
oCmdResult := stKinEnable.Out;

15: //Check Command State
ML_GetCmdState(Data:= ioGetCmdState);
IF ioGetCmdState.Out.State='DONE' THEN
bGroupDone:=TRUE;
O_bKinGroupDone:=TRUE;
END_IF
iKinState := 0;

20: //ML_KinDisable
stKinDisable.In.KinName := I_strKinName;
stKinDisable.In.Source := 'Kin Resetfunction ';
IF ML_KinDisable(Data:= stKinDisable) THEN
iKinState := 25;
ioGetCmdState.In.CmdID := stKinDisable.Out.CmdID;
ioGetCmdState.In.ObjName:= stKinDisable.In.KinName;
ELSE
iKinState := 999;
END_IF
O_CmdResult := stKinDisable.Out;

25: //Check Command State
ML_GetCmdState(Data:= ioGetCmdState);
IF ioGetCmdState.Out.State='DONE' THEN
bGroupDone:=FALSE;
O_bKinGroupDone:=FALSE;
END_IF
iKinState := 0;

999:
bGroupDone:=FALSE;
O_bKinGroupDone:=FALSE;
IF NOT I_bKinGroup THEN
iKinState :=0;
O_CmdResult.CmdID:=0;
O_CmdResult.Error:=0;
O_CmdResult.ErrorID:=0;
END_IF

END_CASE

giustola69
Long-established Member

Hello,

I solved the problem. the ML_AddAxisToKin function was missed.

Best Regards.

Giuseppe

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist