Commit 804cc3ce ke.sun

1

1 个父辈 8f33a974
......@@ -27,6 +27,7 @@
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.lblWarnMsg = new System.Windows.Forms.Label();
this.groupBox5 = new System.Windows.Forms.GroupBox();
this.btnReadPosition = new System.Windows.Forms.Button();
this.lblServerOn = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
......@@ -52,27 +53,6 @@
this.cmbAxisList = new System.Windows.Forms.ComboBox();
this.label49 = new System.Windows.Forms.Label();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.btnRelMove = new System.Windows.Forms.Button();
this.txtAddr = new System.Windows.Forms.TextBox();
this.label18 = new System.Windows.Forms.Label();
this.btnGetPosition = new System.Windows.Forms.Button();
this.cmbHomeType = new System.Windows.Forms.ComboBox();
this.label10 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.txtSpeed = new System.Windows.Forms.TextBox();
this.btnVolMove = new System.Windows.Forms.Button();
this.btnClose = new System.Windows.Forms.Button();
this.btnOpen = new System.Windows.Forms.Button();
this.btnStatusSearch = new System.Windows.Forms.Button();
this.label11 = new System.Windows.Forms.Label();
this.txtLinePosition = new System.Windows.Forms.TextBox();
this.btnHomeMove = new System.Windows.Forms.Button();
this.btnClearPosition = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button();
this.btnLineAbsMove = new System.Windows.Forms.Button();
this.label25 = new System.Windows.Forms.Label();
this.comboBoxPortName = new System.Windows.Forms.ComboBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.axis_3_Alarm = new UserFromControl.IOStatusControl();
this.axis_2_Alarm = new UserFromControl.IOStatusControl();
......@@ -169,9 +149,7 @@
this.txtPosition3 = new System.Windows.Forms.TextBox();
this.txtPosition2 = new System.Windows.Forms.TextBox();
this.txtPosition1 = new System.Windows.Forms.TextBox();
this.btnReadPosition = new System.Windows.Forms.Button();
this.groupBox5.SuspendLayout();
this.groupBox3.SuspendLayout();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.menuStrip1.SuspendLayout();
......@@ -230,6 +208,21 @@
this.groupBox5.TabStop = false;
this.groupBox5.Text = "伺服运动";
//
// btnReadPosition
//
this.btnReadPosition.BackColor = System.Drawing.SystemColors.Control;
this.btnReadPosition.Cursor = System.Windows.Forms.Cursors.Default;
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(458, 162);
this.btnReadPosition.Name = "btnReadPosition";
this.btnReadPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnReadPosition.Size = new System.Drawing.Size(105, 30);
this.btnReadPosition.TabIndex = 278;
this.btnReadPosition.Text = "读取位置";
this.btnReadPosition.UseVisualStyleBackColor = true;
this.btnReadPosition.Click += new System.EventHandler(this.btnReadPosition_Click);
//
// lblServerOn
//
this.lblServerOn.AutoSize = true;
......@@ -543,231 +536,6 @@
this.richTextBox1.TabIndex = 256;
this.richTextBox1.Text = "";
//
// groupBox3
//
this.groupBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox3.Controls.Add(this.btnRelMove);
this.groupBox3.Controls.Add(this.txtAddr);
this.groupBox3.Controls.Add(this.label18);
this.groupBox3.Controls.Add(this.btnGetPosition);
this.groupBox3.Controls.Add(this.cmbHomeType);
this.groupBox3.Controls.Add(this.label10);
this.groupBox3.Controls.Add(this.label13);
this.groupBox3.Controls.Add(this.txtSpeed);
this.groupBox3.Controls.Add(this.btnVolMove);
this.groupBox3.Controls.Add(this.btnClose);
this.groupBox3.Controls.Add(this.btnOpen);
this.groupBox3.Controls.Add(this.btnStatusSearch);
this.groupBox3.Controls.Add(this.label11);
this.groupBox3.Controls.Add(this.txtLinePosition);
this.groupBox3.Controls.Add(this.btnHomeMove);
this.groupBox3.Controls.Add(this.btnClearPosition);
this.groupBox3.Controls.Add(this.btnStop);
this.groupBox3.Controls.Add(this.btnLineAbsMove);
this.groupBox3.Controls.Add(this.label25);
this.groupBox3.Controls.Add(this.comboBoxPortName);
this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox3.Location = new System.Drawing.Point(621, 477);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(643, 166);
this.groupBox3.TabIndex = 255;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "硕科步进电机驱动器";
//
// btnRelMove
//
this.btnRelMove.Location = new System.Drawing.Point(308, 50);
this.btnRelMove.Name = "btnRelMove";
this.btnRelMove.Size = new System.Drawing.Size(105, 30);
this.btnRelMove.TabIndex = 96;
this.btnRelMove.Text = "相对运动";
this.btnRelMove.UseVisualStyleBackColor = true;
this.btnRelMove.Click += new System.EventHandler(this.btnRelMove_Click);
//
// txtAddr
//
this.txtAddr.Enabled = false;
this.txtAddr.Location = new System.Drawing.Point(243, 22);
this.txtAddr.Name = "txtAddr";
this.txtAddr.Size = new System.Drawing.Size(48, 23);
this.txtAddr.TabIndex = 95;
this.txtAddr.Text = "1";
//
// label18
//
this.label18.AutoSize = true;
this.label18.Location = new System.Drawing.Point(190, 26);
this.label18.Name = "label18";
this.label18.Size = new System.Drawing.Size(44, 17);
this.label18.TabIndex = 94;
this.label18.Text = "地址:";
//
// btnGetPosition
//
this.btnGetPosition.Location = new System.Drawing.Point(426, 50);
this.btnGetPosition.Name = "btnGetPosition";
this.btnGetPosition.Size = new System.Drawing.Size(105, 30);
this.btnGetPosition.TabIndex = 93;
this.btnGetPosition.Text = "查询位置";
this.btnGetPosition.UseVisualStyleBackColor = true;
this.btnGetPosition.Click += new System.EventHandler(this.btnGetPosition_Click);
//
// cmbHomeType
//
this.cmbHomeType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbHomeType.FormattingEnabled = true;
this.cmbHomeType.Items.AddRange(new object[] {
"0=反方向",
"1=正方向"});
this.cmbHomeType.Location = new System.Drawing.Point(73, 114);
this.cmbHomeType.Name = "cmbHomeType";
this.cmbHomeType.Size = new System.Drawing.Size(103, 25);
this.cmbHomeType.TabIndex = 92;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(11, 119);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(68, 17);
this.label10.TabIndex = 91;
this.label10.Text = "原点方向:";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(11, 88);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(44, 17);
this.label13.TabIndex = 90;
this.label13.Text = "速度:";
//
// txtSpeed
//
this.txtSpeed.Location = new System.Drawing.Point(73, 83);
this.txtSpeed.MaxLength = 15;
this.txtSpeed.Name = "txtSpeed";
this.txtSpeed.Size = new System.Drawing.Size(105, 23);
this.txtSpeed.TabIndex = 89;
this.txtSpeed.Text = "10000";
//
// btnVolMove
//
this.btnVolMove.Location = new System.Drawing.Point(191, 80);
this.btnVolMove.Name = "btnVolMove";
this.btnVolMove.Size = new System.Drawing.Size(105, 30);
this.btnVolMove.TabIndex = 88;
this.btnVolMove.Text = "匀速运动";
this.btnVolMove.UseVisualStyleBackColor = true;
this.btnVolMove.Click += new System.EventHandler(this.btnVolMove_Click);
//
// btnClose
//
this.btnClose.Location = new System.Drawing.Point(426, 18);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(105, 30);
this.btnClose.TabIndex = 87;
this.btnClose.Text = "关闭串口";
this.btnClose.UseVisualStyleBackColor = true;
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// btnOpen
//
this.btnOpen.Location = new System.Drawing.Point(308, 19);
this.btnOpen.Name = "btnOpen";
this.btnOpen.Size = new System.Drawing.Size(105, 30);
this.btnOpen.TabIndex = 86;
this.btnOpen.Text = "打开串口";
this.btnOpen.UseVisualStyleBackColor = true;
this.btnOpen.Click += new System.EventHandler(this.btnOpen_Click);
//
// btnStatusSearch
//
this.btnStatusSearch.Location = new System.Drawing.Point(309, 80);
this.btnStatusSearch.Name = "btnStatusSearch";
this.btnStatusSearch.Size = new System.Drawing.Size(105, 30);
this.btnStatusSearch.TabIndex = 85;
this.btnStatusSearch.Text = "查询运动状态";
this.btnStatusSearch.UseVisualStyleBackColor = true;
this.btnStatusSearch.Click += new System.EventHandler(this.btnStatusSearch_Click);
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(11, 57);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(44, 17);
this.label11.TabIndex = 84;
this.label11.Text = "位置:";
//
// txtLinePosition
//
this.txtLinePosition.Location = new System.Drawing.Point(73, 52);
this.txtLinePosition.MaxLength = 15;
this.txtLinePosition.Name = "txtLinePosition";
this.txtLinePosition.Size = new System.Drawing.Size(105, 23);
this.txtLinePosition.TabIndex = 83;
this.txtLinePosition.Text = "10000";
//
// btnHomeMove
//
this.btnHomeMove.Location = new System.Drawing.Point(192, 112);
this.btnHomeMove.Name = "btnHomeMove";
this.btnHomeMove.Size = new System.Drawing.Size(105, 30);
this.btnHomeMove.TabIndex = 12;
this.btnHomeMove.Text = "原点返回";
this.btnHomeMove.UseVisualStyleBackColor = true;
this.btnHomeMove.Click += new System.EventHandler(this.btnHomeMove_Click);
//
// btnClearPosition
//
this.btnClearPosition.Location = new System.Drawing.Point(426, 82);
this.btnClearPosition.Name = "btnClearPosition";
this.btnClearPosition.Size = new System.Drawing.Size(105, 30);
this.btnClearPosition.TabIndex = 11;
this.btnClearPosition.Text = "清理位置";
this.btnClearPosition.UseVisualStyleBackColor = true;
this.btnClearPosition.Click += new System.EventHandler(this.btnClearPosition_Click);
//
// btnStop
//
this.btnStop.Location = new System.Drawing.Point(308, 112);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(105, 29);
this.btnStop.TabIndex = 10;
this.btnStop.Text = "紧急停止";
this.btnStop.UseVisualStyleBackColor = true;
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
//
// btnLineAbsMove
//
this.btnLineAbsMove.Location = new System.Drawing.Point(192, 50);
this.btnLineAbsMove.Name = "btnLineAbsMove";
this.btnLineAbsMove.Size = new System.Drawing.Size(105, 30);
this.btnLineAbsMove.TabIndex = 9;
this.btnLineAbsMove.Text = "绝对运动";
this.btnLineAbsMove.UseVisualStyleBackColor = true;
this.btnLineAbsMove.Click += new System.EventHandler(this.btnLineAbsMove_Click);
//
// label25
//
this.label25.AutoSize = true;
this.label25.Location = new System.Drawing.Point(9, 26);
this.label25.Name = "label25";
this.label25.Size = new System.Drawing.Size(56, 17);
this.label25.TabIndex = 1;
this.label25.Text = "端口号:";
//
// comboBoxPortName
//
this.comboBoxPortName.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBoxPortName.FormattingEnabled = true;
this.comboBoxPortName.Location = new System.Drawing.Point(73, 22);
this.comboBoxPortName.Name = "comboBoxPortName";
this.comboBoxPortName.Size = new System.Drawing.Size(103, 25);
this.comboBoxPortName.TabIndex = 0;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
......@@ -1786,35 +1554,35 @@
// 查看IOToolStripMenuItem
//
this.查看IOToolStripMenuItem.Name = "查看IOToolStripMenuItem";
this.查看IOToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
this.查看IOToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.查看IOToolStripMenuItem.Text = "查看IO";
this.查看IOToolStripMenuItem.Click += new System.EventHandler(this.查看IOToolStripMenuItem_Click);
//
// 料仓运转ONToolStripMenuItem
//
this.料仓运转ONToolStripMenuItem.Name = "料仓运转ONToolStripMenuItem";
this.料仓运转ONToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
this.料仓运转ONToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.料仓运转ONToolStripMenuItem.Text = "料仓运转ON";
this.料仓运转ONToolStripMenuItem.Click += new System.EventHandler(this.料仓运转ONToolStripMenuItem_Click);
//
// 料仓运转OFFToolStripMenuItem
//
this.料仓运转OFFToolStripMenuItem.Name = "料仓运转OFFToolStripMenuItem";
this.料仓运转OFFToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
this.料仓运转OFFToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.料仓运转OFFToolStripMenuItem.Text = "料仓运转OFF";
this.料仓运转OFFToolStripMenuItem.Click += new System.EventHandler(this.料仓运转OFFToolStripMenuItem_Click);
//
// 打开舱门ToolStripMenuItem
//
this.打开舱门ToolStripMenuItem.Name = "打开舱门ToolStripMenuItem";
this.打开舱门ToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
this.打开舱门ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.打开舱门ToolStripMenuItem.Text = "打开仓门";
this.打开舱门ToolStripMenuItem.Click += new System.EventHandler(this.打开舱门ToolStripMenuItem_Click);
//
// 关闭仓门ToolStripMenuItem
//
this.关闭仓门ToolStripMenuItem.Name = "关闭仓门ToolStripMenuItem";
this.关闭仓门ToolStripMenuItem.Size = new System.Drawing.Size(146, 22);
this.关闭仓门ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.关闭仓门ToolStripMenuItem.Text = "关闭仓门";
this.关闭仓门ToolStripMenuItem.Click += new System.EventHandler(this.关闭仓门ToolStripMenuItem_Click);
//
......@@ -1969,21 +1737,6 @@
this.txtPosition1.Size = new System.Drawing.Size(87, 23);
this.txtPosition1.TabIndex = 265;
//
// btnReadPosition
//
this.btnReadPosition.BackColor = System.Drawing.SystemColors.Control;
this.btnReadPosition.Cursor = System.Windows.Forms.Cursors.Default;
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(458, 162);
this.btnReadPosition.Name = "btnReadPosition";
this.btnReadPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.btnReadPosition.Size = new System.Drawing.Size(105, 30);
this.btnReadPosition.TabIndex = 278;
this.btnReadPosition.Text = "读取位置";
this.btnReadPosition.UseVisualStyleBackColor = true;
this.btnReadPosition.Click += new System.EventHandler(this.btnReadPosition_Click);
//
// FrmStoreBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
......@@ -1993,7 +1746,6 @@
this.Controls.Add(this.lblWarnMsg);
this.Controls.Add(this.groupBox5);
this.Controls.Add(this.richTextBox1);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.menuStrip1);
......@@ -2008,8 +1760,6 @@
this.Shown += new System.EventHandler(this.FrmStoreBox_Shown);
this.groupBox5.ResumeLayout(false);
this.groupBox5.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
......@@ -2113,26 +1863,6 @@
private System.Windows.Forms.TextBox txtInoutTarget;
private System.Windows.Forms.TextBox txtUpdownTarget;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.TextBox txtAddr;
private System.Windows.Forms.Label label18;
private System.Windows.Forms.Button btnGetPosition;
private System.Windows.Forms.ComboBox cmbHomeType;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtSpeed;
private System.Windows.Forms.Button btnVolMove;
private System.Windows.Forms.Button btnClose;
private System.Windows.Forms.Button btnOpen;
private System.Windows.Forms.Button btnStatusSearch;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox txtLinePosition;
private System.Windows.Forms.Button btnHomeMove;
private System.Windows.Forms.Button btnClearPosition;
private System.Windows.Forms.Button btnStop;
private System.Windows.Forms.Button btnLineAbsMove;
private System.Windows.Forms.Label label25;
private System.Windows.Forms.ComboBox comboBoxPortName;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem 料仓操作ToolStripMenuItem;
......@@ -2154,7 +1884,6 @@
private System.Windows.Forms.Label label38;
private System.Windows.Forms.Label lblWarnMsg;
private System.Windows.Forms.Button btnClearLog;
private System.Windows.Forms.Button btnRelMove;
private System.Windows.Forms.ToolStripMenuItem 料仓运转ONToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 扫码测试ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 料仓运转OFFToolStripMenuItem;
......
......@@ -86,29 +86,7 @@ namespace OnlineStore.ACSingleStore
txtInOutP2.Text = ktkPosition.InOutAxis_DoorPosition_P2.ToString();
//txtUpDownP1.Text = ktkPosition.UpDownAxis_DoorOPosition_P1.ToString();
}
cmbHomeType.SelectedIndex = 0;
List<string> port = new List<string>(SerialPort.GetPortNames());
comboBoxPortName.DataSource = port;
//if (port.IndexOf(store.Config.CompressAxis_PortName) >= 0)
//{
// comboBoxPortName.SelectedIndex = port.IndexOf(store.Config.CompressAxis_PortName);
//}
//List<int> boteList = new List<int>();
//boteList.Add(300);
//boteList.Add(600);
//boteList.Add(1200);
//boteList.Add(4800);
//boteList.Add(9600);
//boteList.Add(19200);
//boteList.Add(38400);
//boteList.Add(57600);
//boteList.Add(115200);
//boteList.Add(230400);
//txtAddr.Text = this.store.Config.CompressAxis_Slv.ToString();
timer1.Enabled = true;
}
#endregion
......@@ -768,61 +746,7 @@ namespace OnlineStore.ACSingleStore
{
FormManager.ShowAxisConfig(store);
}
private void btnOpen_Click(object sender, EventArgs e)
{
if (ACStoreManager.OpenShuoKe(store))
{
FormComStatus(true);
}
}
private void btnClose_Click(object sender, EventArgs e)
{
ShuoKeControls.ClosePort();
FormComStatus(false);
}
private void btnVolMove_Click(object sender, EventArgs e)
{
//int speed = FormUtil.GetIntValue(txtSpeed);
//ShuoKeControls.VolMove(store.Config.CompressAxis_Slv, speed);
}
private void btnGetPosition_Click(object sender, EventArgs e)
{
//ShuoKeControls.GetABSPosition(store.Config.CompressAxis_Slv);
}
private void btnStop_Click(object sender, EventArgs e)
{
//ShuoKeControls.SuddownStop(this.store.Config.CompressAxis_Slv);
}
private void btnClearPosition_Click(object sender, EventArgs e)
{
//ShuoKeControls.PositionClear(this.store.Config.CompressAxis_Slv, ShuoKeCMD.AbsPositionClear);
//ShuoKeControls.PositionClear(this.store.Config.CompressAxis_Slv, ShuoKeCMD.RelPositionClear);
}
private void btnHomeMove_Click(object sender, EventArgs e)
{
//ShuoKeControls.HomeMove(this.store.Config.CompressAxis_Slv, byte.Parse(cmbHomeType.SelectedIndex.ToString()));
}
private void btnLineAbsMove_Click(object sender, EventArgs e)
{
//int posi = FormUtil.GetIntValue(txtLinePosition);
//ShuoKeControls.AbsMove(this.store.Config.CompressAxis_Slv, posi);
}
private void btnStatusSearch_Click(object sender, EventArgs e)
{
//ShuoKeControls.GetStatus(store.Config.CompressAxis_Slv);
}
private void FormComStatus(bool isOpen)
{
btnOpen.Enabled = !isOpen;
btnClose.Enabled = isOpen;
btnClearPosition.Enabled = isOpen;
btnVolMove.Enabled = isOpen;
btnGetPosition.Enabled = isOpen;
btnHomeMove.Enabled = isOpen;
btnLineAbsMove.Enabled = isOpen;
btnStatusSearch.Enabled = isOpen;
// Bt_ClearCounter.Enabled = isOpen;
}
private void 轴卡点动ToolStripMenuItem_Click(object sender, EventArgs e)
{
......@@ -888,25 +812,10 @@ namespace OnlineStore.ACSingleStore
private void 料仓运转ONToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Enabled = false;
store.RunAxis();
//store.KNDIOMove(IO_Type.Run_Sign, IO_VALUE.HIGH);
//Thread.Sleep(1000);
////打开三个轴
//foreach (ConfigMoveAxis SlvAddr in store.moveAxisList)
//{
// string portName = SlvAddr.DeviceName;
// short slvAddr = SlvAddr.GetAxisValue();
// ACServerManager.OpenPort(portName);
// //初始化串口
// ACServerManager.InitSlvAddr(portName, slvAddr);
// Thread.Sleep(100);
// ACServerManager.AlarmClear(portName, slvAddr);
// Thread.Sleep(100);
// //打开伺服
// ACServerManager.ServoOn(portName, slvAddr);
//}
//Thread.Sleep(100);
//store.KNDIOMove(IO_Type.Axis_Brake, IO_VALUE.HIGH);
this.Enabled = true;
LogUtil.info("料仓运转ON完成");
}
private void 扫码测试ToolStripMenuItem_Click(object sender, EventArgs e)
......@@ -922,13 +831,7 @@ namespace OnlineStore.ACSingleStore
private void 料仓运转OFFToolStripMenuItem_Click(object sender, EventArgs e)
{
store.CloseAllAxis();
//store.KNDIOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
//foreach (ConfigMoveAxis SlvAddr in store.moveAxisList)
//{
// ACServerManager.ServoOff(SlvAddr.DeviceName, SlvAddr.GetAxisValue());
//}
//store.KNDIOMove(IO_Type.Run_Sign, IO_VALUE.LOW);
LogUtil.info("料仓运转OFF完成");
}
private void 关闭仓门ToolStripMenuItem_Click(object sender, EventArgs e)
......
......@@ -253,13 +253,13 @@ namespace OnlineStore.DeviceLibrary
Thread.Sleep(100);
//if (speed > 0)
//{
byte[] data = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteRegisters, ACCMDManager.BlockNo, ACCMDManager.Block_HomeMove0, 2);
SendData(portName, data);
//byte[] data = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteRegisters, ACCMDManager.BlockNo, ACCMDManager.Block_HomeMove0, 2);
//SendData(portName, data);
//}
//else
//{
//byte[] data = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteRegisters, ACCMDManager.BlockNo, ACCMDManager.Block_HomeMove1, 2);
// SendData(portName, data);
byte[] data = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_WriteRegisters, ACCMDManager.BlockNo, ACCMDManager.Block_HomeMove1, 2);
SendData(portName, data);
//}
Thread.Sleep(100);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!