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

New robot blending functions Poly C2 and Continuos blending do not work

New robot blending functions Poly C2 and Continuos blending do not work

giustola69
Long-established Member

Hello,

I'm trying to use the new robot blending function ( see below ) but the only one I was able to run was the oldone ML_KinBlend. The other 2 new functions ( ML_KinContMotionP and ML_KinPolyTransP) are not performing any blend but maybe I'm using them in the wrong wait.

Please can you give me some advice about where I could be wrong using these 2 functions ??

I Attached some screen shot related to the trace and some tips about how to use my code just in case you want to test it.

Please let me know if you find something wrong in my code.

Many Thanks

Giuseppe

 

4 REPLIES 4

CodeShepherd
Community Moderator
Community Moderator

Sorry for the late reply. It was vacation time here.

We are investigating this issue and I will add more information in this thread.

First for clarification:

  • like mentioned in the library description: ML_KinContMotionP command option is not compatible with blending (see ML_KinBlendP). Therefore, the transition velocity is set to zero (full stop), whenever blending is active. Additionally, the blending lengths should be set to significant smaller values than the length of the commanded motion, when this option is active.
    CodeShepherd_2-1643191928541.png

  • ML_KinPolyTransP "only" adds a sort of spline into the blending area instead of only starting the second command like ML_KinBlendP does. That implies higher calculation effort of the kernel.
    CodeShepherd_1-1643191907875.png

  • To get a smooth continuous movement with a stable velocity (in MLC known as CONT_SLOPE) you will need to use ML_KinPolyTransP in combination with ML_KinContMotionP. So both options have to be active at the same time for a command.

With the ML_KinPolyTransP we encountered an motion internal issue, that prevents blending from working. We are further investigating this.

 

giustola69
Long-established Member

Hello,

I Treid to use the function ML_KinContMotionP but I could not see any blend. Below you have the code I used. It seems that with the code below the normal blending function shoul be Off. Regarding this point related to what is written in the help and in your comment  I have a question: If the blend is off what does it mean "Additionally, the blending lengths should be set to significant smaller values than the length of the commanded motion, when this option is active." ? What blending lenghts should be smaller than the lenght of the commanded motion ???

Please let me know if you find something wrong in the code below and if you have any advce about the right way to set this functione

Many Thanks

Giuseppe

CODE:

 

IF I_SlopeMode = CONT_SLOPE THEN
// Set Block Slope OFF
stKinBlendData.In.KinName := I_strKinName;
stKinBlendData.In.Source := 'Kin MoveLinAbs function Block Slope ';
stKinBlendData.In.D1 :=I_TransitionParameter[0];
stKinBlendData.In.D2 :=I_TransitionParameter[1];
stKinBlendData.In.SwitchOff :=TRUE;
IF NOT ML_KinBlendP(Data:= stKinBlendData) THEN
iKinState := 999;
END_IF
O_CmdOptResult := stKinBlendData.Out;
// Set Poly C2 OFF
stKinBlendPolySlopeData.In.KinName := I_strKinName;
stKinBlendPolySlopeData.In.Source := 'Kin MoveLinAbs function Poly C2 Slope ';
stKinBlendPolySlopeData.In.D1 :=I_TransitionParameter[0];
stKinBlendPolySlopeData.In.D2 :=I_TransitionParameter[1];
stKinBlendPolySlopeData.In.SwitchOff:=TRUE;
IF NOT ML_KinPolyTransP(Data:= stKinBlendPolySlopeData) THEN
iKinState := 999;
END_IF
O_CmdOptResult := stKinBlendPolySlopeData.Out;
IF NOT stKinMoveLin.Out.Error THEN
stKinBlendContSlopeData.In.KinName := I_strKinName;
stKinBlendContSlopeData.In.Source := 'Kin MoveLinAbs function Continous Slope';
stKinBlendContSlopeData.In.SwitchOff:=FALSE;
IF ML_KinContMotionP(Data:= stKinBlendContSlopeData) THEN
iKinState := 5;
ELSE
iKinState := 999;
END_IF
O_CmdOptResult := stKinBlendContSlopeData.Out;
END_IF
END_IF

Hello,

there is nothing wrong with your code. Currently there is a feature missing to get the command option PolyTrans working how it is supposed to do. When you switch on PolyTrans and it gets added to the following movement commands it searches in the preparation for the same entry in the following command. Since the first command gets prepared too fast for you to command the next command it never finds the next command to blend over. This will get solved in the future with a replaning feature.

For now i can give you a workaround (in python):

…
…
# signal_Id : free choice from 00 – 99
# auto_reset = True -> Signal gets reseted to false automatically
motion.kin_cmd_wait_for_signal(kin, signal_id = 99, auto_reset=True)
motion.kin_cmd_wait_prepare( kin,buffered=True)
motion.kin_cmd_opt_poly_trans_p( kin,  eps=100.0)
…
…
#Kin-commands
motion.kin_cmd_move_lin_abs( kin, (   227.2658 ,88.2926 ,Zdown))
…
…
# url to set the signal over the Data Layer perhaps possible via set_signal
uri = 'motion/state/functions/somo/signals/99'
datalayer.write(uri, True)
…
…

This stops the preparation of the motion commands and thus can correctly plan the PolyTrans.

The above logic also works with the PLC. The function blocks should be in the misc folder.

Hint: In most cases, the "PolyTrans" function should be used in combination with the "ContMotion" command option so that a continuous velocity profile is generated without braking to a standstill at command transitions.

Best regards

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