Commit fd7a2d7a LN

搅拌轴增加转速显示,配置的速度单位改为转速。

1 个父辈 42b30212
此文件类型无法预览
......@@ -697,12 +697,12 @@ namespace OnlineStore.TinPasteStore
private void btnStirP1_Click(object sender, EventArgs e)
{
AxisABSMove(store.Config.Stir_Axis, txtStirP1, store.Config.StirAxis_P1_Speed);
AxisABSMove(store.Config.Stir_Axis, txtStirP1, store.Config.GetStirAxis_P1_Speed());
}
private void btnStirP2_Click(object sender, EventArgs e)
{
AxisABSMove(store.Config.Stir_Axis, txtStirP2, store.Config.StirAxis_P2_Speed);
AxisABSMove(store.Config.Stir_Axis, txtStirP2, store.Config.GetStirAxis_P2_Speed());
}
#endregion
......
......@@ -29,6 +29,12 @@
private void InitializeComponent()
{
this.groupAxis = new System.Windows.Forms.GroupBox();
this.lblSpeed = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.txtS = new System.Windows.Forms.TextBox();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.btnMovej = new System.Windows.Forms.Button();
this.btnMove = new System.Windows.Forms.Button();
this.label7 = new System.Windows.Forms.Label();
this.txtServoStatue = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
......@@ -90,9 +96,6 @@
this.label5 = new System.Windows.Forms.Label();
this.label43 = new System.Windows.Forms.Label();
this.label42 = new System.Windows.Forms.Label();
this.btnMovej = new System.Windows.Forms.Button();
this.btnMove = new System.Windows.Forms.Button();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.groupAxis.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
......@@ -101,6 +104,9 @@
//
this.groupAxis.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupAxis.Controls.Add(this.lblSpeed);
this.groupAxis.Controls.Add(this.label9);
this.groupAxis.Controls.Add(this.txtS);
this.groupAxis.Controls.Add(this.linkLabel1);
this.groupAxis.Controls.Add(this.btnMovej);
this.groupAxis.Controls.Add(this.btnMove);
......@@ -149,10 +155,76 @@
this.groupAxis.Text = "伺服运动";
this.groupAxis.Enter += new System.EventHandler(this.groupAxis_Enter);
//
// lblSpeed
//
this.lblSpeed.AutoSize = true;
this.lblSpeed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblSpeed.Location = new System.Drawing.Point(310, 152);
this.lblSpeed.Name = "lblSpeed";
this.lblSpeed.Size = new System.Drawing.Size(0, 17);
this.lblSpeed.TabIndex = 334;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label9.Location = new System.Drawing.Point(142, 151);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(59, 17);
this.label9.TabIndex = 333;
this.label9.Text = "实时速度:";
//
// txtS
//
this.txtS.Location = new System.Drawing.Point(206, 149);
this.txtS.Name = "txtS";
this.txtS.ReadOnly = true;
this.txtS.Size = new System.Drawing.Size(87, 23);
this.txtS.TabIndex = 332;
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new System.Drawing.Point(313, 183);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(56, 17);
this.linkLabel1.TabIndex = 331;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "复制位置";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// btnMovej
//
this.btnMovej.BackColor = System.Drawing.SystemColors.Control;
this.btnMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMovej.Location = new System.Drawing.Point(260, 331);
this.btnMovej.Name = "btnMovej";
this.btnMovej.Size = new System.Drawing.Size(140, 45);
this.btnMovej.TabIndex = 330;
this.btnMovej.Text = " 轴点动- ";
this.btnMovej.UseVisualStyleBackColor = false;
this.btnMovej.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnMovej_MouseDown);
this.btnMovej.MouseUp += new System.Windows.Forms.MouseEventHandler(this.btnMovej_MouseUp);
//
// btnMove
//
this.btnMove.BackColor = System.Drawing.SystemColors.Control;
this.btnMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMove.Location = new System.Drawing.Point(114, 331);
this.btnMove.Name = "btnMove";
this.btnMove.Size = new System.Drawing.Size(140, 45);
this.btnMove.TabIndex = 329;
this.btnMove.Text = "轴点动+ ";
this.btnMove.UseVisualStyleBackColor = false;
this.btnMove.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnMove_MouseDown);
this.btnMove.MouseUp += new System.Windows.Forms.MouseEventHandler(this.btnMove_MouseUp);
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(51, 172);
this.label7.Location = new System.Drawing.Point(51, 183);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(59, 17);
this.label7.TabIndex = 328;
......@@ -161,7 +233,7 @@
// txtServoStatue
//
this.txtServoStatue.Enabled = false;
this.txtServoStatue.Location = new System.Drawing.Point(112, 169);
this.txtServoStatue.Location = new System.Drawing.Point(112, 180);
this.txtServoStatue.Name = "txtServoStatue";
this.txtServoStatue.Size = new System.Drawing.Size(25, 23);
this.txtServoStatue.TabIndex = 327;
......@@ -169,7 +241,7 @@
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(174, 272);
this.label17.Location = new System.Drawing.Point(174, 283);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(71, 17);
this.label17.TabIndex = 316;
......@@ -179,7 +251,7 @@
// txtLimit2
//
this.txtLimit2.Enabled = false;
this.txtLimit2.Location = new System.Drawing.Point(250, 269);
this.txtLimit2.Location = new System.Drawing.Point(250, 280);
this.txtLimit2.Name = "txtLimit2";
this.txtLimit2.Size = new System.Drawing.Size(25, 23);
this.txtLimit2.TabIndex = 313;
......@@ -187,7 +259,7 @@
// label19
//
this.label19.AutoSize = true;
this.label19.Location = new System.Drawing.Point(174, 238);
this.label19.Location = new System.Drawing.Point(174, 249);
this.label19.Name = "label19";
this.label19.Size = new System.Drawing.Size(71, 17);
this.label19.TabIndex = 312;
......@@ -197,7 +269,7 @@
// txtLimit1
//
this.txtLimit1.Enabled = false;
this.txtLimit1.Location = new System.Drawing.Point(250, 235);
this.txtLimit1.Location = new System.Drawing.Point(250, 246);
this.txtLimit1.Name = "txtLimit1";
this.txtLimit1.Size = new System.Drawing.Size(25, 23);
this.txtLimit1.TabIndex = 309;
......@@ -205,7 +277,7 @@
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(186, 204);
this.label6.Location = new System.Drawing.Point(186, 215);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(59, 17);
this.label6.TabIndex = 300;
......@@ -214,7 +286,7 @@
// txtHomeSingle
//
this.txtHomeSingle.Enabled = false;
this.txtHomeSingle.Location = new System.Drawing.Point(250, 201);
this.txtHomeSingle.Location = new System.Drawing.Point(250, 212);
this.txtHomeSingle.Name = "txtHomeSingle";
this.txtHomeSingle.Size = new System.Drawing.Size(25, 23);
this.txtHomeSingle.TabIndex = 297;
......@@ -222,7 +294,7 @@
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(5, 272);
this.label11.Location = new System.Drawing.Point(5, 283);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(105, 17);
this.label11.TabIndex = 292;
......@@ -231,7 +303,7 @@
// txtHomeStatus
//
this.txtHomeStatus.Enabled = false;
this.txtHomeStatus.Location = new System.Drawing.Point(112, 269);
this.txtHomeStatus.Location = new System.Drawing.Point(112, 280);
this.txtHomeStatus.Name = "txtHomeStatus";
this.txtHomeStatus.Size = new System.Drawing.Size(25, 23);
this.txtHomeStatus.TabIndex = 291;
......@@ -239,7 +311,7 @@
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(44, 238);
this.label10.Location = new System.Drawing.Point(44, 249);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(66, 17);
this.label10.TabIndex = 289;
......@@ -248,7 +320,7 @@
// txtBusyStatus
//
this.txtBusyStatus.Enabled = false;
this.txtBusyStatus.Location = new System.Drawing.Point(112, 235);
this.txtBusyStatus.Location = new System.Drawing.Point(112, 246);
this.txtBusyStatus.Name = "txtBusyStatus";
this.txtBusyStatus.Size = new System.Drawing.Size(25, 23);
this.txtBusyStatus.TabIndex = 288;
......@@ -256,7 +328,7 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(51, 204);
this.label2.Location = new System.Drawing.Point(51, 215);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(59, 17);
this.label2.TabIndex = 286;
......@@ -265,7 +337,7 @@
// txtAlarmStatus
//
this.txtAlarmStatus.Enabled = false;
this.txtAlarmStatus.Location = new System.Drawing.Point(112, 201);
this.txtAlarmStatus.Location = new System.Drawing.Point(112, 212);
this.txtAlarmStatus.Name = "txtAlarmStatus";
this.txtAlarmStatus.Size = new System.Drawing.Size(25, 23);
this.txtAlarmStatus.TabIndex = 285;
......@@ -274,7 +346,7 @@
//
this.btnGetAlarm.BackColor = System.Drawing.SystemColors.Control;
this.btnGetAlarm.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnGetAlarm.Location = new System.Drawing.Point(308, 205);
this.btnGetAlarm.Location = new System.Drawing.Point(308, 216);
this.btnGetAlarm.Name = "btnGetAlarm";
this.btnGetAlarm.Size = new System.Drawing.Size(105, 33);
this.btnGetAlarm.TabIndex = 284;
......@@ -289,7 +361,7 @@
this.btnReadPosition.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnReadPosition.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReadPosition.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnReadPosition.Location = new System.Drawing.Point(423, 244);
this.btnReadPosition.Location = new System.Drawing.Point(423, 255);
this.btnReadPosition.Name = "btnReadPosition";
this.btnReadPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnReadPosition.Size = new System.Drawing.Size(105, 33);
......@@ -302,7 +374,7 @@
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label8.Location = new System.Drawing.Point(143, 171);
this.label8.Location = new System.Drawing.Point(143, 182);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(59, 17);
this.label8.TabIndex = 255;
......@@ -342,7 +414,7 @@
//
// txtP
//
this.txtP.Location = new System.Drawing.Point(207, 169);
this.txtP.Location = new System.Drawing.Point(207, 180);
this.txtP.Name = "txtP";
this.txtP.ReadOnly = true;
this.txtP.Size = new System.Drawing.Size(87, 23);
......@@ -416,7 +488,7 @@
this.btnAxisReturnHome.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisReturnHome.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisReturnHome.ForeColor = System.Drawing.SystemColors.ControlText;
this.btnAxisReturnHome.Location = new System.Drawing.Point(423, 205);
this.btnAxisReturnHome.Location = new System.Drawing.Point(423, 216);
this.btnAxisReturnHome.Name = "btnAxisReturnHome";
this.btnAxisReturnHome.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnAxisReturnHome.Size = new System.Drawing.Size(105, 33);
......@@ -445,7 +517,7 @@
//
this.btnComAlarmClear.BackColor = System.Drawing.SystemColors.Control;
this.btnComAlarmClear.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnComAlarmClear.Location = new System.Drawing.Point(308, 244);
this.btnComAlarmClear.Location = new System.Drawing.Point(308, 255);
this.btnComAlarmClear.Name = "btnComAlarmClear";
this.btnComAlarmClear.Size = new System.Drawing.Size(105, 33);
this.btnComAlarmClear.TabIndex = 50;
......@@ -820,45 +892,6 @@
this.label42.TabIndex = 24;
this.label42.Text = "编码器计数:";
//
// btnMovej
//
this.btnMovej.BackColor = System.Drawing.SystemColors.Control;
this.btnMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMovej.Location = new System.Drawing.Point(260, 326);
this.btnMovej.Name = "btnMovej";
this.btnMovej.Size = new System.Drawing.Size(140, 45);
this.btnMovej.TabIndex = 330;
this.btnMovej.Text = " 轴点动- ";
this.btnMovej.UseVisualStyleBackColor = false;
this.btnMovej.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnMovej_MouseDown);
this.btnMovej.MouseUp += new System.Windows.Forms.MouseEventHandler(this.btnMovej_MouseUp);
//
// btnMove
//
this.btnMove.BackColor = System.Drawing.SystemColors.Control;
this.btnMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMove.Location = new System.Drawing.Point(114, 326);
this.btnMove.Name = "btnMove";
this.btnMove.Size = new System.Drawing.Size(140, 45);
this.btnMove.TabIndex = 329;
this.btnMove.Text = "轴点动+ ";
this.btnMove.UseVisualStyleBackColor = false;
this.btnMove.MouseDown += new System.Windows.Forms.MouseEventHandler(this.btnMove_MouseDown);
this.btnMove.MouseUp += new System.Windows.Forms.MouseEventHandler(this.btnMove_MouseUp);
//
// linkLabel1
//
this.linkLabel1.AutoSize = true;
this.linkLabel1.Location = new System.Drawing.Point(313, 172);
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.Size = new System.Drawing.Size(56, 17);
this.linkLabel1.TabIndex = 331;
this.linkLabel1.TabStop = true;
this.linkLabel1.Text = "复制位置";
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
//
// AxisMoveControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -941,5 +974,8 @@
private System.Windows.Forms.Button btnMovej;
private System.Windows.Forms.Button btnMove;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox txtS;
private System.Windows.Forms.Label lblSpeed;
}
}
......@@ -161,11 +161,26 @@ namespace OnlineStore.ACPackingStore
this.txtHomeSingle.Text = ACServerManager.GetHomeSingle(PortName, SlvAddr).ToString();
this.txtLimit1.Text = ACServerManager.GetLimitPositiveSingle(PortName, SlvAddr).ToString();
this.txtLimit2.Text = ACServerManager.GetLimitNegativeSingle(PortName, SlvAddr).ToString();
int speed = ACServerManager.GetActualSpeed(PortName, SlvAddr);
this.txtS.Text = speed.ToString();
if (axis != null && axis.SpeedChangeV != 1)
{
int r =(int) Math.Round(speed / axis.SpeedChangeV);
lblSpeed.Text = "转速:" + r;
}
else
{
lblSpeed.Text = "";
}
UpdatePosition();
}
private void btnReadPosition_Click(object sender, EventArgs e)
{
ReadPosistion();
UpdatePosition();
}
private void ReadPosistion()
......@@ -203,11 +218,12 @@ namespace OnlineStore.ACPackingStore
}
}
}
private ConfigMoveAxis axis = null;
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedIndex >= 0)
{
ConfigMoveAxis axis = axisList[comboBox1.SelectedIndex];
axis = axisList[comboBox1.SelectedIndex];
PortName = axis.DeviceName;
SlvAddr = axis.GetAxisValue();
txtAxisDeviceName.Text = PortName;
......
......@@ -124,8 +124,9 @@ PRO,回温区旋转轴(轴4)P1速度,WarmingAxis_P1_Speed,500,,,,,,,,,,,,,,
PRO,回温区旋转轴(轴4)P2速度,WarmingAxis_P2_Speed,500,,,,,,,,,,,,,,
PRO,冷藏区旋转轴(轴5)P1速度(匀速运动速度),ColdingAxis_P1_Speed,500,,,,,,,,,,,,,,
PRO,冷藏区旋转轴(轴5)P2速度,ColdingAxis_P2_Speed,500,,,,,,,,,,,,,,
PRO,搅拌区旋转轴(轴6)P1速度(匀速运动速度),StirAxis_P1_Speed,400,,,,,,,,,,,,,,
PRO,搅拌区旋转轴(轴6)P2速度,StirAxis_P2_Speed,100,,,,,,,,,,,,,,
PRO,搅拌区旋转轴(轴6)P1速度_转速需要X系数(匀速运动速度),StirAxis_P1_Speed,400,,,,,,,,,,,,,,
PRO,搅拌区旋转轴(轴6)P2速度_转速需要X系数,StirAxis_P2_Speed,100,,,,,,,,,,,,,,
PRO,搅拌区旋转轴(轴6)速度和转速系数,StirAxis_Speed_Change,3.2,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,
PRO,伺服停止时可误差的脉冲数的最小值,Axis_ErrorCountMin,10,,,,,,,,,,,,,,
PRO,伺服停止时可误差的脉冲数的最大值,Axis_ErrorCountMax,1000,,,,,,,,,,,,,,
......
......@@ -231,7 +231,7 @@ namespace OnlineStore.DeviceLibrary
ResetLog("复位:旋转轴,升降轴,搅拌轴到待机点");
ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_OL_P1, Config.UpDownAxis_P1_Speed);
ACAxisMove(Config.Stir_Axis, Config.Stir_Axis_P1, Config.StirAxis_P1_Speed);
ACAxisMove(Config.Stir_Axis, Config.Stir_Axis_P1, Config.GetStirAxis_P1_Speed());
break;
case StoreMoveStep.R04_AxisToP1:
MoveInfo.NextMoveStep(StoreMoveStep.R05_StartWork);
......@@ -267,7 +267,7 @@ namespace OnlineStore.DeviceLibrary
if (CurrStirInfo.StopTime > DateTime.Now)
{
LogUtil.info(Name + "搅拌区【" + CurrStirInfo.StirParam.LogName + "】状态【" + CurrStirInfo.MoveStatus + "】结束时间【" + CurrStirInfo.StopTime.ToLongTimeString() + "】开始继续搅拌 ");
ACServerManager.SpeedMove(Config.Stir_Axis.DeviceName, Config.Stir_Axis.GetAxisValue(), Config.StirAxis_P1_Speed);
ACServerManager.SpeedMove(Config.Stir_Axis.DeviceName, Config.Stir_Axis.GetAxisValue(), Config.GetStirAxis_P1_Speed());
}
}
break;
......@@ -291,6 +291,8 @@ namespace OnlineStore.DeviceLibrary
{
TieStoreConfig.ConfigAxis(Config);
Config.Stir_Axis.SpeedChangeV = Config.StirAxis_Speed_Change;
moveAxisList = new List<ConfigMoveAxis>();
moveAxisList.Add(Config.Middle_Axis);
moveAxisList.Add(Config.UpDown_Axis);
......
......@@ -379,7 +379,7 @@ namespace OnlineStore.DeviceLibrary
OutStoreLog(" 送料1搅拌:移动到搅拌位置,升降轴到搅拌区高点P101 [" + Config.UpDownAxis_StirH_P101 + "],旋转轴到P101 [" + Config.UpDownAxis_StirH_P101 + "], 搅拌轴到P1[" + Config.Stir_Axis_P1 + "]");
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_StirH_P101, Config.UpDownAxis_P101_Speed);
ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_Stir_P101, Config.MiddleAxis_P101_Speed);
ACAxisMove(Config.Stir_Axis, Config.Stir_Axis_P1, Config.StirAxis_P1_Speed);
ACAxisMove(Config.Stir_Axis, Config.Stir_Axis_P1, Config.GetStirAxis_P1_Speed());
}
else if (MoveInfo.IsStep(StoreMoveStep.ST_09_MoveToStir))
{
......@@ -497,7 +497,7 @@ namespace OnlineStore.DeviceLibrary
OutStoreLog(" 送料2搅拌:移动到搅拌位置,升降轴到搅拌区高点P101["+ Config.MiddleAxis_Stir_P101 + "],旋转轴到P101 ["+ Config.UpDownAxis_StirH_P101 + "], 搅拌轴到P2["+ Config.Stir_Axis_P2 + "]");
ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_Stir_P101, Config.MiddleAxis_P101_Speed);
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_StirH_P101, Config.UpDownAxis_P101_Speed);
ACAxisMove(Config.Stir_Axis, Config.Stir_Axis_P2, Config.StirAxis_P2_Speed);
ACAxisMove(Config.Stir_Axis, Config.Stir_Axis_P2, Config.GetStirAxis_P2_Speed());
}
else if (MoveInfo.IsStep(StoreMoveStep.ST_29_MoveToStir))
{
......@@ -541,7 +541,7 @@ namespace OnlineStore.DeviceLibrary
{
MoveInfo.NextMoveStep(StoreMoveStep.ST_41_StartStir);
OutStoreLog(" 搅拌:开始搅拌,回温轴,搅拌轴,开始匀速旋转");
ACServerManager.SpeedMove(Config.Stir_Axis.DeviceName, Config.Stir_Axis.GetAxisValue(), Config.StirAxis_P1_Speed);
ACServerManager.SpeedMove(Config.Stir_Axis.DeviceName, Config.Stir_Axis.GetAxisValue(), Config.GetStirAxis_P1_Speed());
StartWork(2);
UpdateCurrStirState(3,MoveInfo.MoveParam.StirSecsond );
if (MoveInfo.MoveParam.TarPosition.PosType >= 100)
......@@ -578,7 +578,7 @@ namespace OnlineStore.DeviceLibrary
OutStoreLog(" 搅拌1回库:移动到搅拌位置,升降轴到搅拌区低点P102 ["+ Config.UpDownAxis_StirL_P102 + "],旋转轴到P101 ["+ Config.MiddleAxis_Stir_P101 + "], 搅拌轴到P1["+ Config.Stir_Axis_P1 + "]");
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_StirL_P102, Config.UpDownAxis_P102_Speed);
ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_Stir_P101, Config.MiddleAxis_P101_Speed);
ACAxisMove(Config.Stir_Axis, Config.Stir_Axis_P1, Config.StirAxis_P1_Speed);
ACAxisMove(Config.Stir_Axis, Config.Stir_Axis_P1, Config.GetStirAxis_P1_Speed());
}
else if (MoveInfo.IsStep(StoreMoveStep.SR_52_MoveToStir))
{
......@@ -667,7 +667,7 @@ namespace OnlineStore.DeviceLibrary
OutStoreLog(" 搅拌2回库:移动到搅拌位置,升降轴到搅拌区低点P102 ["+ Config.UpDownAxis_StirL_P102 + "],旋转轴到P101 ["+ Config.MiddleAxis_Stir_P101 + "], 搅拌轴到P2 ["+ Config.Stir_Axis_P2 + "]");
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_StirL_P102, Config.UpDownAxis_P102_Speed);
ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_Stir_P101, Config.MiddleAxis_P101_Speed);
ACAxisMove(Config.Stir_Axis, Config.Stir_Axis_P2, Config.StirAxis_P2_Speed);
ACAxisMove(Config.Stir_Axis, Config.Stir_Axis_P2, Config.GetStirAxis_P2_Speed());
UpdateLastStatus(StoreStatus.Mix_Putting, MoveInfo.MoveParam.TarPosId);
}
else if (MoveInfo.IsStep(StoreMoveStep.SR_72_MoveToStir))
......
......@@ -136,6 +136,12 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary>
[CSVAttribute("脉冲最大限位")]
public int PositionMax { get; set; }
/// <summary>
/// 速度转换系数,只有搅拌轴使用
/// </summary>
public float SpeedChangeV { get; set; } = 1;
public string GetNameStr()
{
return DeviceName + "_" + GetAxisValue();
......
......@@ -313,15 +313,30 @@ namespace OnlineStore.LoadCSVLibrary
[ConfigProAttribute("ColdingAxis_P2_Speed")]
public int ColdingAxis_P2_Speed { get; set; }
/// <summary>
/// PRO,搅拌区旋转轴(轴6)P1速度,StirAxis_P1_Speed,120,,,,,,,
/// PRO,搅拌区旋转轴(轴6)P1速度_转速需要X系数,StirAxis_P1_Speed,120,,,,,,,
/// </summary>
[ConfigProAttribute("StirAxis_P1_Speed")]
public int StirAxis_P1_Speed { get; set; }
public int StirAxis_P1_Speed { get ; set; }
/// <summary>
/// PRO,搅拌区旋转轴(轴6)P2速度,StirAxis_P2_Speed,120,,,,,,,
/// PRO,搅拌区旋转轴(轴6)P2速度_转速需要X系数,StirAxis_P2_Speed,120,,,,,,,
/// </summary>
[ConfigProAttribute("StirAxis_P2_Speed")]
public int StirAxis_P2_Speed { get; set; }
public int GetStirAxis_P1_Speed()
{
return (int)(StirAxis_P1_Speed * StirAxis_Speed_Change);
}
public int GetStirAxis_P2_Speed()
{
return (int)(StirAxis_P2_Speed * StirAxis_Speed_Change);
}
/// <summary>
/// PRO,搅拌区旋转轴(轴6)速度和转速系数,StirAxis_Speed_Change,100,,,,,,,,,,,,,,
/// </summary>
[ConfigProAttribute("StirAxis_Speed_Change")]
public float StirAxis_Speed_Change { get; set; } = 1;
/// <summary>
/// PRO,伺服停止时可误差的脉冲数的最小值,Axis_ErrorCountMin,10,,,,,,,
/// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!