KTKMoveParam.cs
4.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
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; }
}
}