Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

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

Kinematic different blending behavior using ML_KinBlendP or ML_KinPolyTransP ( no blending )

Kinematic different blending behavior using ML_KinBlendP or ML_KinPolyTransP ( no blending )

giustola69
Long-established Member

Hello,

I'm tryning to use the 2 blending functions with a Delta Kinematic and I noticed that using the ML_KinBlendP the blending settings in the D1 an D2 transitions paramenter are performed properly while usind the same D1 and D2 transitions paramenter with the function ML_KinPolyTransP  o blending is performed. ( see attached screenshots )

 

2024-05-20_16h00_47.png

2024-05-20_16h04_13.png

2024-05-20_16h02_24.png

2024-05-20_16h07_50.png

Maybe I'm missing something in my code ( attached in this ticket )

Could you please help me to understand why using the Poly funzione the blening is not ececuted ?

Many Thanks

Giuseppe

6 REPLIES 6

CodeShepherd
Community Moderator
Community Moderator

You can find the official online documentation "Command options for kinematics - Path rounding with polynomial" for general information.

Please consider that two commands needs to be present at the same time in the motion kernel while preparation of the first one to be able to blend. So they should be sent in the same cycle. On both of your screenshot sometimes blending seems to be used and sometimes not, as path velocity is unequal zero between two commands.

Just for the record in the if condition switching between epsilon an radii I would also set epsilon to 0 if not used and radii vise versa.

giustola69
Long-established Member

Hello,

Yes you're right some command are not blended because it is a pick & place cycle with 4 points: uppick,pick,upplace,place and inthe pick and place command the blending is set off.

However it seems that the beavior using the "normal" blend function and "poly" function is different since the cycle and the commands timing in my program is exactly the same in both cases, but with the "normal" blend function the blending is working with the "poly" not. Actually the point commands are issued with 1-2 plc cycle delay.

Should I use the function ML_Countor together with the Poly blending or it is essential that the 2 blending command should be send to the system exactly in the same plc cycle ?

Many Thanks

Giuseppe

As standard blending is a quite simple starting of second movement command while first is active, not much processing is needed. While a poly trans is "cutting" the path in the edge and is calculating a polynomial for that piece. So these two are quite not compatible system internal.

Sending in one cycle is one possible way of getting motion commands in the kernel to be able to be blended.

The KinContour command is designed for making sure that commands will be processed properly without stopping the movement. 

giustola69
Long-established Member

Hello,

I tested the ML_KinPolyTransP together with the ML_KinContMotionP and the result is exactly what we were looking for

giustola69_0-1716380236641.png

But to reach this result I must take always active both blending functions. However in a pick and place cycle lie the one I'm performing above I need to stop at the end the pick position and place position and get the"Done" feedback in that point.

If I let both blending functions active I never get the "Done" signal from the ML_GetCmdState fuction but I always get the "INBUFFER" signal.

To avoid that I tried to disable both blending functions in before programming the down to pick and down to place positions and enable again the blending functions in the other commanded points but the result was that not blending at all was performed. 

So How can I do a pick & place cycle right using these blending function ?

Here my PLC Code:

// Declaration
{attribute 'symbol' := 'readwrite'}
PROGRAM PLC_PRG_1
VAR
bEnPlcOpen: BOOL;
bEnCXA_Motion: BOOL :=TRUE;
/// ############################## Motion Library CXA_Motion ####################################################
fbAx1_Power: FB_Power;
fbAx2_Power: FB_Power;
fbAx3_Power: FB_Power;
fbKinGroup: FB_KinGroup;
bKinGroup: BOOL;
fbKinMoveLinAbsP1: FB_KinMoveLinAbs;
bExkinMoveLinAbsP1: BOOL;
arPosKinMoveLinAbsP1: ARRAY[0..15] OF LREAL;
rVelKinMoveLinAbsP1: LREAL := 5000;
rAccKinMoveLinAbsP1: LREAL := 10000;
rDecKinMoveLinAbsP1: LREAL := 10000;
rJerkKinMoveLinAbsP1: LREAL := 100000;
enCoordSystemP1: STRING(15) := 'WCS';
///I_BufferMode: MC_BUFFER_MODE;
rTransitionParameterP1: ARRAY[0..1] OF LREAL;
fbKinMoveLinAbsP2: FB_KinMoveLinAbs;
bExkinMoveLinAbsP2: BOOL;
arPosKinMoveLinAbsP2: ARRAY[0..15] OF LREAL;
rVelKinMoveLinAbsP2: LREAL := 5000;
rAccKinMoveLinAbsP2: LREAL := 10000;
rDecKinMoveLinAbsP2: LREAL := 10000;
rJerkKinMoveLinAbsP2: LREAL := 100000;
enCoordSystemP2: STRING(15) := 'WCS';
///I_BufferMode: MC_BUFFER_MODE;
rTransitionParameterP2: ARRAY[0..1] OF LREAL;
fbKinMoveLinAbsP3: FB_KinMoveLinAbs;
bExkinMoveLinAbsP3: BOOL;
arPosKinMoveLinAbsP3: ARRAY[0..15] OF LREAL;
rVelKinMoveLinAbsP3: LREAL := 5000;
rAccKinMoveLinAbsP3: LREAL := 10000;
rDecKinMoveLinAbsP3: LREAL := 10000;
rJerkKinMoveLinAbsP3: LREAL := 100000;
enCoordSystemP3: STRING(15) := 'WCS';
///I_BufferMode: MC_BUFFER_MODE;
rTransitionParameterP3: ARRAY[0..1] OF LREAL;
fbKinMoveLinAbsP4: FB_KinMoveLinAbs;
bExkinMoveLinAbsP4: BOOL;
arPosKinMoveLinAbsP4: ARRAY[0..15] OF LREAL;
rVelKinMoveLinAbsP4: LREAL := 5000;
rAccKinMoveLinAbsP4: LREAL := 10000;
rDecKinMoveLinAbsP4: LREAL := 10000;
rJerkKinMoveLinAbsP4: LREAL := 100000;
enCoordSystemP4: STRING(15) := 'WCS';
///I_BufferMode: MC_BUFFER_MODE;
rTransitionParameterP4: ARRAY[0..1] OF LREAL;
iAxsState: INT;
oCmdResult: ML_oCmdResult;
ioGetCmdState: ML_GetCmdStateData;
bExPowerOnAx1: BOOL;
stDataPowerOnAx1: ML_AxsPowerData;
stDataMoveAx1: ML_AxsPosData;
rTargetPosAx1: REAL := 100;
rTargetVel: REAL := 10;
rTargetAcc: REAL := 10;
stOverrideData: ML_SetOverrideData;
bML_SetOverride: BOOL;
/// ############################## PlcOpen Library CXA_PlcOpen ####################################################
fbMC_PowerAx1: MC_Power;
bEnPowerOnAx1: BOOL;
Axis_1: AXIS_REF;
fbMC_PowerAx2: MC_Power;
bEnPowerOnAx2: BOOL;
Axis_2: AXIS_REF;
fbMC_PowerAx3: MC_Power;
bEnPowerOnAx3: BOOL;
Axis_3: AXIS_REF;
fbAddAxisToGroup_Ax1: MC_AddAxisToGroup;
fbAddAxisToGroup_Ax2: MC_AddAxisToGroup;
fbAddAxisToGroup_Ax3: MC_AddAxisToGroup;
bAddAxisToGroup: BOOL;
fbMC_GroupEnable: MC_GroupEnable;
bExGroupEnable: BOOL;
stKinGroup: AXES_GROUP_REF;
fbMC_GroupDisable: MC_GroupDisable;
fbMB_GroupJog: MB_GroupJog;
bEnableKinJog: BOOL;
arDirection: ARRAY[0..15] OF LREAL;
rJogVel: REAL := 200;
rJogAcc: REAL := 1000;
rJogJerk: REAL := 0;
enJogCoordSys: MC_COORD_SYSTEM;
fbMC_MoveLinearAbsoluteP1: MC_MoveLinearAbsolute;
bExMoveLinAbsKinP1: BOOL;
arPosMoveLinAbsP1: ARRAY[0..15] OF LREAL;
rVelMoveLinAbsP1: REAL := 200;
rAccMoveLinAbsP1: REAL := 1000;
rJerkMoveLinAbsP1: REAL := 100000;
enMoveLinAbsCoordSysP1: MC_COORD_SYSTEM;
enBufferModeP1: MC_BUFFER_MODE;
arTranstionParameterP1: ARRAY[0..1] OF LREAL;
fbMC_MoveLinearAbsoluteP2: MC_MoveLinearAbsolute;
bExMoveLinAbsKinP2: BOOL;
arPosMoveLinAbsP2: ARRAY[0..15] OF LREAL;
rVelMoveLinAbsP2: REAL := 200;
rAccMoveLinAbsP2: REAL := 1000;
rJerkMoveLinAbsP2: REAL := 100000;
enMoveLinAbsCoordSysP2: MC_COORD_SYSTEM;
enBufferModeP2: MC_BUFFER_MODE;
arTranstionParameterP2: ARRAY[0..1] OF LREAL;
fbMC_MoveLinearAbsoluteP3: MC_MoveLinearAbsolute;
bExMoveLinAbsKinP3: BOOL;
arPosMoveLinAbsP3: ARRAY[0..15] OF LREAL;
rVelMoveLinAbsP3: REAL := 200;
rAccMoveLinAbsP3: REAL := 1000;
rJerkMoveLinAbsP3: REAL := 100000;
enMoveLinAbsCoordSysP3: MC_COORD_SYSTEM;
enBufferModeP3: MC_BUFFER_MODE;
arTranstionParameterP3: ARRAY[0..1] OF LREAL;
fbMC_MoveLinearAbsoluteP4: MC_MoveLinearAbsolute;
bExMoveLinAbsKinP4: BOOL;
arPosMoveLinAbsP4: ARRAY[0..15] OF LREAL;
rVelMoveLinAbsP4: REAL := 200;
rAccMoveLinAbsP4: REAL := 1000;
rJerkMoveLinAbsP4: REAL := 100000;
enMoveLinAbsCoordSysP4: MC_COORD_SYSTEM;
enBufferModeP4: MC_BUFFER_MODE;
arTranstionParameterP4: ARRAY[0..1] OF LREAL;
iCycle: INT;
bStartCycle: BOOL;
rBlendingRadius: REAL := 20;
fbMC_GroupReadStatus: MC_GroupReadStatus;
bEnReadKinStatus: BOOL;
fbMC_GroupReadActualPosition: MC_GroupReadActualPosition;
bEnReadKinPos: BOOL;
fbMC_MoveAbsolute: MC_MoveAbsolute;
bExMovePlcOpenAbsAx1: BOOL;
arActualKinPos: ARRAY[0..15] OF LREAL;
i: UINT;
fbMC_GroupReadActualVelocity: MC_GroupReadActualVelocity;
fbMC_GroupReadActualAcceleration: MC_GroupReadActualAcceleration;
rPathVel: LREAL;
rPathAcc: LREAL;
bSetAllData: BOOL;
rSetVelAll: REAL := 5000;
rSetAccAll: REAL := 5000;
 
pluto: BOOL;
pippo_count: INT;
enSlopeSetting: EN_SlopeType;
 
// KinInterface FB Call NO TEMPLATE
fbKinInterfaceInit:MB_KinematicsInit;
fbKinInterfaceBase:MB_KinematicsInterfaceBase ;
 
bExKinInterfaceInit: BOOL;
uiKinIndex: UINT;
stKinAdmin: CXA_MotionInterface.MB_KINEMATICS_ADMINISTRATION;
stKinStatus: CXA_MotionInterface.MB_KINEMATICS_ADMIN_STATUS;
stKinDataStatus: CXA_MotionInterface.MB_KINEMATICS_DATA;
stKinDiagStatus: CXA_MotionInterface.MB_KINEMATICS_DIAGNOSIS;
stCoordCtrl: CXA_MotionInterface.MB_KINEMATICS_COORDINATED;
bEnKinInterface: BOOL;
stDataMoveAbsTest: CXA_Motion.ML_KinMoveLinData;
bResultMoveAbsTest: BOOL;
bEnMoveAbsTest: BOOL;
bResultKinMCS: BOOL;
stML_KinMCSP: CXA_Motion.ML_KinMCSPData;
bEnML_KinMCSP: BOOL;
bBypassSetMoveAbs: BOOL;
fbAddToKinAxis1: FB_AddAxisToKin;
fbAddToKinAxis2: FB_AddAxisToKin;
fbAddToKinAxis3: FB_AddAxisToKin;
bAddAxisToKin: BOOL;
fbRemFromKinAxis1: FB_RemAxisFromKin;
fbRemFromKinAxis2: FB_RemAxisFromKin;
fbRemFromKinAxis3: FB_RemAxisFromKin;
bRemAxisToKin: BOOL;
rTargetPosX: LREAL := 0;
rTargetPosY: LREAL := 0;
rTargetPosZ: LREAL := -700;
_speed: LREAL;
 
rVelAxisX: LREAL;
rPosOld_AxisX: LREAL;
rTaskClock: LREAL := 200;
rVelAxisY: LREAL;
rPosOld_AxisY: LREAL;
rVelAxisZ: LREAL;
rPosOld_AxisZ: LREAL;
copy1: ARRAY [0..1] OF LREAL;
fbTON: TON;
bSetDynamicMoveData: BOOL;
rCmdPathVel: LREAL := 5000;  // mm/min.
rCmdPathAcc: LREAL := 500; // m/s2
rCmdPathJerk: LREAL := 5000; // m/s3
fbMoveCircular: FB_KinMoveCircAbs;
bExMoveCircular: BOOL;
arEndPosCirc: ARRAY [0..15] OF LREAL;
arIntermPosCirc: ARRAY [0..15] OF LREAL;
enCoordSystemCirc: ML_CoordSys := MCS;
bManualCycle: BOOL;
stTestML_KinPolyTransP: CXA_Motion.ML_KinPolyTransPData;
bTestML_KinPolyTransP: BOOL;
bEnablestTestML_KinPolyTransP: BOOL;
rD1Poly: LREAL := 20;
bTestML_KinPolyTransPDone: BOOL;
bDisablestTestML_KinPolyTransP: BOOL;
bCycleTestML_KinPolyTransP: BOOL;
stDataMoveAbsTest1: CXA_Motion.ML_KinMoveLinData;
bResultMoveAbsTest1: BOOL;
stDataMoveAbsTest2: CXA_Motion.ML_KinMoveLinData;
stDataMoveAbsTest3: CXA_Motion.ML_KinMoveLinData;
stDataMoveAbsTest4: CXA_Motion.ML_KinMoveLinData;
bResultMoveAbsTest2: BOOL;
bResultMoveAbsTest3: BOOL;
bResultMoveAbsTest4: BOOL;
stDataMoveAbsTest5: CXA_Motion.ML_KinMoveLinData;
stDataMoveAbsTest6: CXA_Motion.ML_KinMoveLinData;
bResultMoveAbsTest5: BOOL;
bResultMoveAbsTest6: BOOL;
bTestMLML_KinPolyTransP_ML_ContSlope: BOOL;
stTestML_KinPolyTransP_MLContSlope: CXA_Motion.ML_KinContMotionPData;
stKinPathStatus: ST_KIN_PATH_STATUS;
rBlendingRadiusDone: LREAL := 10;
syGetCmdState: CXA_Motion.ML_GetCmdStateData;
bKinMoveLinAbsBuffered: BOOL;
O_bKinMoveLinAbsBuffered: BOOL;
stGetCmdState: CXA_Motion.ML_GetCmdStateData;
bKinMoveLinAbsDone: BOOL;
O_bKinMoveLinAbsDone: BOOL;
idxCyclePoly: INT;
bBypassStepPolyTest: BOOL;
idxCyclePolyNextStep: INT;
bBlendSettingOk: BOOL;
bBlendingOn: BOOL;
bBlendAlways: BOOL;
END_VAR

 

 
 
// Implementation
CASE idxCyclePoly OF
 
0:
bResultMoveAbsTest1:=FALSE;
bResultMoveAbsTest2:=FALSE;
bResultMoveAbsTest3:=FALSE;
bResultMoveAbsTest4:=FALSE;
bResultMoveAbsTest5:=FALSE;
bResultMoveAbsTest6:=FALSE;
bBlendSettingOk:=FALSE;
 
IF bCycleTestML_KinPolyTransP OR bBypassStepPolyTest THEN 
IF bBlendAlways AND NOT bBlendingOn THEN
// Enable Blending
idxCyclePoly:=50;
idxCyclePolyNextStep:=11;
ELSE 
idxCyclePoly:=1;
END_IF
END_IF
11:
IF bBlendSettingOk THEN
bResultMoveAbsTest1:=ML_KinMoveLinAbs(Data:= stDataMoveAbsTest1);
stGetCmdState.In.CmdID := stDataMoveAbsTest1.Out.CmdID;
stGetCmdState.In.ObjName:= stDataMoveAbsTest1.In.KinName;
IF bResultMoveAbsTest1 THEN
idxCyclePoly:=99;
idxCyclePolyNextStep:=1;
bBypassStepPolyTest:=FALSE;
END_IF
END_IF
 
1:
IF bKinMoveLinAbsDone OR bKinMoveLinAbsBuffered OR bBypassStepPolyTest THEN
// Disable Blend for move Done
IF NOT bBlendAlways THEN
idxCyclePoly:=60;
idxCyclePolyNextStep:=22;
ELSE
bResultMoveAbsTest2:=ML_KinMoveLinAbs(Data:= stDataMoveAbsTest2);
stGetCmdState.In.CmdID := stDataMoveAbsTest2.Out.CmdID;
stGetCmdState.In.ObjName:= stDataMoveAbsTest2.In.KinName;
IF bResultMoveAbsTest2 THEN
idxCyclePoly:=99;
idxCyclePolyNextStep:=2;
bBypassStepPolyTest:=FALSE;
END_IF
END_IF
END_IF
 
22:
IF bBlendSettingOk THEN
bResultMoveAbsTest2:=ML_KinMoveLinAbs(Data:= stDataMoveAbsTest2);
stGetCmdState.In.CmdID := stDataMoveAbsTest2.Out.CmdID;
stGetCmdState.In.ObjName:= stDataMoveAbsTest2.In.KinName;
IF bResultMoveAbsTest2 THEN
idxCyclePoly:=99;
idxCyclePolyNextStep:=2;
bBypassStepPolyTest:=FALSE;
END_IF
END_IF
 
2:
IF bKinMoveLinAbsDone OR ( bKinMoveLinAbsBuffered AND bBlendAlways ) OR bBypassStepPolyTest THEN
//bEnablestTestML_KinPolyTransP:=TRUE;
//IF bTestML_KinPolyTransPDone THEN
// Enable Blending
IF NOT bBlendAlways THEN 
idxCyclePoly:=50;
idxCyclePolyNextStep:=33;
ELSE
bResultMoveAbsTest3:=ML_KinMoveLinAbs(Data:= stDataMoveAbsTest1);
stGetCmdState.In.CmdID := stDataMoveAbsTest1.Out.CmdID;
stGetCmdState.In.ObjName:= stDataMoveAbsTest1.In.KinName;
IF bResultMoveAbsTest3 THEN
idxCyclePoly:=99;
idxCyclePolyNextStep:=3;
bBypassStepPolyTest:=FALSE;
END_IF
END_IF
 
END_IF
33:
IF bBlendSettingOk THEN
bResultMoveAbsTest3:=ML_KinMoveLinAbs(Data:= stDataMoveAbsTest1);
stGetCmdState.In.CmdID := stDataMoveAbsTest1.Out.CmdID;
stGetCmdState.In.ObjName:= stDataMoveAbsTest1.In.KinName;
IF bResultMoveAbsTest3 THEN
idxCyclePoly:=99;
idxCyclePolyNextStep:=3;
bBypassStepPolyTest:=FALSE;
END_IF
END_IF
//END_IF
3:
IF bKinMoveLinAbsDone OR bKinMoveLinAbsBuffered OR bBypassStepPolyTest THEN
bResultMoveAbsTest4:=ML_KinMoveLinAbs(Data:= stDataMoveAbsTest3);
stGetCmdState.In.CmdID := stDataMoveAbsTest3.Out.CmdID;
stGetCmdState.In.ObjName:= stDataMoveAbsTest3.In.KinName;
IF bResultMoveAbsTest4 THEN
idxCyclePoly:=99;
idxCyclePolyNextStep:=4;
bBypassStepPolyTest:=FALSE;
END_IF
END_IF
4:
IF bKinMoveLinAbsDone OR bKinMoveLinAbsBuffered OR bBypassStepPolyTest THEN
// Disable Blend for move Done
IF NOT bBlendAlways THEN 
idxCyclePoly:=60;
idxCyclePolyNextStep:=44;
ELSE
bResultMoveAbsTest5:=ML_KinMoveLinAbs(Data:= stDataMoveAbsTest4);
stGetCmdState.In.CmdID := stDataMoveAbsTest4.Out.CmdID;
stGetCmdState.In.ObjName:= stDataMoveAbsTest4.In.KinName;
IF bResultMoveAbsTest5 THEN
idxCyclePoly:=99;
idxCyclePolyNextStep:=5;
bBypassStepPolyTest:=FALSE;
END_IF
END_IF
END_IF
44:
IF bBlendSettingOk THEN
bResultMoveAbsTest5:=ML_KinMoveLinAbs(Data:= stDataMoveAbsTest4);
stGetCmdState.In.CmdID := stDataMoveAbsTest4.Out.CmdID;
stGetCmdState.In.ObjName:= stDataMoveAbsTest4.In.KinName;
IF bResultMoveAbsTest5 THEN
idxCyclePoly:=99;
idxCyclePolyNextStep:=5;
bBypassStepPolyTest:=FALSE;
END_IF
END_IF
//END_IF
5:
IF bKinMoveLinAbsDone OR ( bKinMoveLinAbsBuffered AND bBlendAlways ) OR bBypassStepPolyTest THEN
// Enable Blending
IF NOT bBlendAlways THEN 
idxCyclePoly:=50;
idxCyclePolyNextStep:=55;
ELSE
bResultMoveAbsTest6:=ML_KinMoveLinAbs(Data:= stDataMoveAbsTest3);
stGetCmdState.In.CmdID := stDataMoveAbsTest3.Out.CmdID;
stGetCmdState.In.ObjName:= stDataMoveAbsTest3.In.KinName;
IF bResultMoveAbsTest6 THEN
idxCyclePoly:=99;
idxCyclePolyNextStep:=6;
bBypassStepPolyTest:=FALSE;
END_IF
END_IF
END_IF
55:
IF bBlendSettingOk THEN
bResultMoveAbsTest6:=ML_KinMoveLinAbs(Data:= stDataMoveAbsTest3);
stGetCmdState.In.CmdID := stDataMoveAbsTest3.Out.CmdID;
stGetCmdState.In.ObjName:= stDataMoveAbsTest3.In.KinName;
IF bResultMoveAbsTest6 THEN
idxCyclePoly:=99;
idxCyclePolyNextStep:=6;
bBypassStepPolyTest:=FALSE;
END_IF
END_IF
//END_IF
6:
IF bKinMoveLinAbsDone OR bKinMoveLinAbsBuffered OR bBypassStepPolyTest THEN
bResultMoveAbsTest1:=ML_KinMoveLinAbs(Data:= stDataMoveAbsTest1);
stGetCmdState.In.CmdID := stDataMoveAbsTest3.Out.CmdID;
stGetCmdState.In.ObjName:= stDataMoveAbsTest3.In.KinName;
IF bResultMoveAbsTest1 THEN
idxCyclePoly:=99;
idxCyclePolyNextStep:=0;
bBypassStepPolyTest:=FALSE;
END_IF
//END_IF
END_IF
 
50:
bBlendSettingOk:=FALSE;
// Enable Blending for Move Via
stTestML_KinPolyTransP.In.D1:=rD1Poly;
stTestML_KinPolyTransP.In.D2:=rD1Poly;
stTestML_KinPolyTransP.In.KinName:='Delta';
stTestML_KinPolyTransP.In.SwitchOff:=FALSE;
bTestML_KinPolyTransP:=ML_KinPolyTransP(Data:= stTestML_KinPolyTransP);
stTestML_KinPolyTransP_MLContSlope.In.KinName:='Delta';
stTestML_KinPolyTransP_MLContSlope.In.SwitchOff:=FALSE;
bTestMLML_KinPolyTransP_ML_ContSlope:=ML_KinContMotionP(Data:= stTestML_KinPolyTransP_MLContSlope);
IF bTestML_KinPolyTransP AND bTestMLML_KinPolyTransP_ML_ContSlope THEN
idxCyclePoly:=idxCyclePolyNextStep;
bBlendSettingOk:=TRUE;
bBlendingOn:=TRUE;
END_IF
60:
bBlendSettingOk:=FALSE;
// Disable Blend for move Done
stTestML_KinPolyTransP.In.D1:=0;
stTestML_KinPolyTransP.In.D2:=0;
stTestML_KinPolyTransP.In.KinName:='Delta';
stTestML_KinPolyTransP.In.SwitchOff:=TRUE;
bTestML_KinPolyTransP:=ML_KinPolyTransP(Data:= stTestML_KinPolyTransP);
stTestML_KinPolyTransP_MLContSlope.In.KinName:='Delta';
stTestML_KinPolyTransP_MLContSlope.In.SwitchOff:=TRUE;
bTestMLML_KinPolyTransP_ML_ContSlope:=ML_KinContMotionP(Data:= stTestML_KinPolyTransP_MLContSlope);
IF bTestML_KinPolyTransP AND bTestMLML_KinPolyTransP_ML_ContSlope THEN
idxCyclePoly:=idxCyclePolyNextStep;
bBlendSettingOk:=TRUE;
bBlendingOn:=FALSE;
END_IF
99:
//Check Command State
bKinMoveLinAbsBuffered:=FALSE;
bKinMoveLinAbsDone:=FALSE;
ML_GetCmdState(Data:= stGetCmdState);
IF ( stGetCmdState.Out.State='INBUFFER' OR stGetCmdState.Out.State='ACTIVE'  ) THEN
bKinMoveLinAbsBuffered:=TRUE;
ELSE
bKinMoveLinAbsBuffered:=FALSE;
END_IF
IF stGetCmdState.Out.State='DONE'  THEN
bKinMoveLinAbsDone:=TRUE;
ELSE
bKinMoveLinAbsDone:=FALSE;
END_IF
IF (bKinMoveLinAbsBuffered AND bBlendingOn ) OR bKinMoveLinAbsDone THEN
idxCyclePoly:=idxCyclePolyNextStep;
END_IF
END_CASE

 

 

giustola69
Long-established Member

Hello,

I did some more test and what I saw is that to perform the complete blending path I had to issue the 3 position command in the same plc cycle

as follow:

IF bBlendSettingOk THEN
bResultMoveAbsTest3:=ML_KinMoveLinAbs(Data:= stDataMoveAbsTest1);
stGetCmdState.In.CmdID := stDataMoveAbsTest1.Out.CmdID;
stGetCmdState.In.ObjName:= stDataMoveAbsTest1.In.KinName;
bResultMoveAbsTest4:=ML_KinMoveLinAbs(Data:= stDataMoveAbsTest3);// eseguito al 3 normalemnte : eliminare da qui
stGetCmdState.In.CmdID := stDataMoveAbsTest3.Out.CmdID;// eseguito al 3 normalemnte : eliminare da qui
stGetCmdState.In.ObjName:= stDataMoveAbsTest3.In.KinName;// eseguito al 3 normalemnte : eliminare da qui
bResultMoveAbsTest5:=ML_KinMoveLinAbs(Data:= stDataMoveAbsTest4);// eseguito al 3 normalemnte : eliminare da qui
stGetCmdState.In.CmdID := stDataMoveAbsTest4.Out.CmdID;// eseguito al 4 normalemnte : eliminare da qui
stGetCmdState.In.ObjName:= stDataMoveAbsTest4.In.KinName;// eseguito al 4 normalemnte : eliminare da qui
IF bResultMoveAbsTest3 AND bResultMoveAbsTest4 AND bResultMoveAbsTest5 THEN // eseguito al 3 normalemnte : eliminare da qui AND bResultMoveAbsTest4
idxCyclePoly:=4; // 99 eseguito normalmente 4
idxCyclePolyNextStep:=4 ; //3 salto al 3 normalemnte 4
bBypassStepPolyTest:=FALSE;
END_IF
END_IF

This is the result:

giustola69_0-1716537229397.png

giustola69_1-1716537278087.png

If I just delay one plc cycle one of the 3 function calls the blengind is interrupt.

This is the result:

giustola69_2-1716537328384.png

Since on a real machine is not alway possible to have the complete path at the start of the sequence ( from pick to place ) but maybe we have just 2 of the 3 needed point ( upPick and UnPlace ) executable and maybe the last point ( downPlace ) will become possible while the robot is moving througt the first 2 point, my question is: Is it possible in some way to delay at least one of the point that describe the complite path keeping the Poly Bledning working ?

Many Thanks

Giuseppe

Attached the complete plc code

You will have to use the command option KinContour to make sure all movement commands are considered. See also post "ML_KinPolyTransP and ST_CONTINUOUS_SLOPE".

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