KTKMoveParam.cs 4.2 KB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 

namespace OnlineStore.DeviceLibrary
{
    /// <summary>
    /// 康泰克轴运动需要的参数
    /// </summary>
    public class KTKMoveParam
    {

        public KTKMoveParam(string DeviceName, short AxisNo, short MotionType, short StartDir, short bCoordinate, short targetPosition, double ResolveSpeed, double StartSpeed, double TargetSpeed, short AccelTime, short DecelTime, double SSpeed)
        {
            this.DeviceName = DeviceName;
            this.AxisNo = AxisNo;
            this.MotionType = MotionType;
            this.StartDir = StartDir;
            this.BCoordinate = bCoordinate;
            this.TargetPosition = targetPosition;
            this.ResolveSpeed = ResolveSpeed;
            this.StartSpeed = StartSpeed;
            this.TargetSpeed = TargetSpeed;
            this.AccelTime = AccelTime;
            this.DecelTime = DecelTime;
            this.SSpeed = SSpeed;
        }
        public KTKMoveParam(string DeviceName, short AxisNo, short MotionType, short StartDir, short bCoordinate, short targetPosition, double ResolveSpeed, double StartSpeed, double TargetSpeed, double AccelTime, double DecelTime, double SSpeed)
        {
            this.DeviceName = DeviceName;
            this.AxisNo = AxisNo;
            this.MotionType = MotionType;
            this.StartDir = StartDir;
            this.BCoordinate = bCoordinate;
            this.TargetPosition = targetPosition;
            this.ResolveSpeed = ResolveSpeed;
            this.StartSpeed = StartSpeed;
            this.TargetSpeed = TargetSpeed;
            this.AccelTime = (short)AccelTime;
            this.DecelTime = (short)DecelTime;
            this.SSpeed = SSpeed;
        }
        public KTKMoveParam(string DeviceName, short AxisNo, short MotionType, short StartDir, short bCoordinate, short targetPosition)
        {
            this.DeviceName = DeviceName;
            this.AxisNo = AxisNo;
            this.MotionType = MotionType;
            this.StartDir = StartDir;
            this.BCoordinate = bCoordinate;
            this.TargetPosition = targetPosition;
            this.ResolveSpeed = KTKSMCManager.Move_ResolveSpeed;
            this.StartSpeed = KTKSMCManager.Move_StartSpeed;
            this.TargetSpeed = KTKSMCManager.Move_TargetSpeed;
            this.AccelTime = KTKSMCManager.Move_AccelTime;
            this.DecelTime = KTKSMCManager.Move_lDecelTime;
            this.SSpeed = KTKSMCManager.Move_SSpeed;
        }

        public KTKMoveParam()
        {
        
        }

        /// <summary>
        /// 设备名称
        /// </summary>
        public string DeviceName { get; set; }
        /// <summary>
        /// 轴
        /// </summary>
        public short AxisNo { get; set; }
        /// <summary>
        /// 运动类型
        ///   (short)CSmcConst.CSMC_PTP;  点对点运动(绝对运动,相对运动)
        ///  (short)CSmcConst.CSMC_JOG;匀速运动
        ///    (short)CSmcConst.CSMC_ORG; 原点运动
        /// </summary>
        public short MotionType { get; set; }
        /// <summary>
        /// 方向
        /// CSmcConst.CSMC_CW
        /// CSmcConst.CSMC_CCW
        /// </summary>
        public short StartDir { get; set; }
        /// <summary>
        ///    (short)CSmcConst.CSMC_ABS;
        ///     (short)CSmcConst.CSMC_INC;
        /// </summary>
        public short BCoordinate { get; set; }
        /// <summary>
        /// 目标位置
        /// </summary>
        public short TargetPosition { get; set; }
        /// <summary>
        /// 速度倍率
        /// </summary>
        public double ResolveSpeed { get; set; }
        /// <summary>
        /// 开始速度
        /// </summary>
        public double StartSpeed { get; set; }
        /// <summary>
        /// 目标速度
        /// </summary>
        public double TargetSpeed { get; set; }
        /// <summary>
        /// 加速时间
        /// </summary>
        public short AccelTime { get; set; }
        /// <summary>
        /// 减速时间
        /// </summary>
        public short DecelTime { get; set; }
        /// <summary>
        /// SSpeed
        /// </summary>
        public double SSpeed { get; set; }
    }
}