01-05-2022 10:46 AM
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.
Solved! Go to Solution.
01-26-2022 09:53 AM
Sorry for the late reply. It was vacation time here.
We are investigating this issue and I will add more information in this thread.
01-26-2022 11:15 AM - edited 01-26-2022 11:15 AM
First for clarification:
With the ML_KinPolyTransP we encountered an motion internal issue, that prevents blending from working. We are further investigating this.
02-02-2022 12:06 PM
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
IF I_SlopeMode = CONT_SLOPE THEN
// Set Block Slope OFF
stKinBlendData.In.KinName := I_strKinName;
stKinBlendData.In.Source := 'Kin MoveLinAbs function Block Slope ';
IF NOT ML_KinBlendP(Data:= stKinBlendData) THEN
iKinState := 999;
O_CmdOptResult := stKinBlendData.Out;
// Set Poly C2 OFF
stKinBlendPolySlopeData.In.KinName := I_strKinName;
stKinBlendPolySlopeData.In.Source := 'Kin MoveLinAbs function Poly C2 Slope ';
IF NOT ML_KinPolyTransP(Data:= stKinBlendPolySlopeData) THEN
iKinState := 999;
O_CmdOptResult := stKinBlendPolySlopeData.Out;
IF NOT stKinMoveLin.Out.Error THEN
stKinBlendContSlopeData.In.KinName := I_strKinName;
stKinBlendContSlopeData.In.Source := 'Kin MoveLinAbs function Continous Slope';
IF ML_KinContMotionP(Data:= stKinBlendContSlopeData) THEN
iKinState := 5;
iKinState := 999;
O_CmdOptResult := stKinBlendContSlopeData.Out;
02-09-2022 04:22 PM
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.