Coordinated Motion and Single axis motion

Moderators: TomKerekes, dynomotion

Post Reply
david.b.taylor
Posts: 15
Joined: Fri Mar 22, 2019 7:37 pm

Coordinated Motion and Single axis motion

Post by david.b.taylor » Wed Nov 11, 2020 2:17 am

I am having trouble going between Coordinatied Motion and Single axis motion. It seems I am not setting Accel and Decel with results.
I have listed the code I used in DYN_AxisGroup.cs to init(...).

I have changed the following with no effect:
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.MaxAccelX = 3000;
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.MaxAccelY = 600;
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.MaxAccelZ = 600;
and
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.MaxVelX = axes[0].MaxVel;
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.MaxVelY = axes[1].MaxVel;
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.MaxVelZ = axes[2].MaxVel;

Thank you,
David Taylor



//******************************************************************************************************************
public void Init(List<AxisNodeContainer> axes, int devicenumber, string name,
double vvel, double vacc, double vdec, double v_Jerk)
{

axisNum = 0;
foreach (AxisNodeContainer axis in _Axes)
{
if (axis.Node.Inverted)
invert = -1D;
else
invert = 1D;

_CPU[axisNum] = axis.Node.CountsPerUnit * invert;
_AxisNums[axisNum] = axis.Node.AxisData.NodeId;
_MaxAccel[axisNum] = axis.Node.MaxAccel;
_MaxDecel[axisNum] = axis.Node.MaxDecel;
_MaxJerk[axisNum] = axis.Node.JerkPercentage;
axisNum++;
}

_AccelCounts = AxisUtil.AccelToCounts(_MaxAccel, _CPU);
_DecelCounts = AxisUtil.AccelToCounts(_MaxDecel, _CPU);
_Jerk = _MaxJerk;

_VectorVelocity = vvel;
_VectorAccel = vacc;
_VectorDecel = vdec;
_VectorJerk = v_Jerk;

var axislist = from a in _Axes select a.GetDevice() as KM_Axis;
_AxisGroupObject = new KM_AxisGroup(DYN_Controller.Instance.Controller, axislist.ToArray());
DYN_Controller.Instance.Controller.CoordMotion.Abort();
DYN_Controller.Instance.Controller.CoordMotion.ClearAbort();
DYN_Controller.Instance.Controller.WriteLine(String.Format("DefineCS = {0} {1} {2} {3} {4} {5}", 0, 1, 2, -1, -1, -1));
DYN_Controller.Instance.Controller.WriteLine(String.Format("EnableAxis{0}", 0));
DYN_Controller.Instance.Controller.WriteLine(String.Format("EnableAxis{0}", 1));
DYN_Controller.Instance.Controller.WriteLine(String.Format("EnableAxis{0}", 2));
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.BreakAngle = 30;
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.RadiusA = 5;
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.RadiusB = 5;
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.RadiusC = 5;
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.MaxAccelX = 3000;
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.MaxAccelY = 600;
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.MaxAccelZ = 600;
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.MaxAccelA = 3000;
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.MaxAccelB = 3000;
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.MaxAccelC = 3000;
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.MaxVelA = 100;
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.MaxVelB = 100;
DYN_Controller.Instance.Controller.CoordMotion.MotionParams.MaxVelC = 100;
....

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: Coordinated Motion and Single axis motion

Post by TomKerekes » Wed Nov 11, 2020 6:05 pm

Hi David,

I don't see how you are commanding Single Axis Motions or from where, but Independent Axis Motions use the Velocity, Acceleration, and Jerk settings within KFLOP. I prefer to set those with an initialization C Program. But they can also be set from .NET with KM_Axis.Velocity, KM_Axis.Acceleration, and KM_Axis.KM_Axis_TuningParams.Jerk. You might also see this.

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

david.b.taylor
Posts: 15
Joined: Fri Mar 22, 2019 7:37 pm

Re: Coordinated Motion and Single axis motion

Post by david.b.taylor » Wed Nov 11, 2020 7:08 pm

The behavior i am getting is no acel or decel when I am in the coordinated moves. When I am single axis motion it is fine.

What sets the acel and decel for each axis when in coordination moves?

Thanks,
David.

User avatar
TomKerekes
Posts: 2676
Joined: Mon Dec 04, 2017 1:49 am

Re: Coordinated Motion and Single axis motion

Post by TomKerekes » Wed Nov 11, 2020 7:22 pm

Hi David,

Ah. I think you are setting the right parameters (MotionParams), but the wrong units. KFLOP units are in motor counts and seconds. The MotionParams are in inches and seconds. See here. So 3000 inches/sec^2 would be crazy high acceleration ~8Gs. Normally the value would be something like 30 in/s^2 or 0.08G.

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply