Commit f4870629 LN

20200616,修改新版IO兼容

增加新DO:设备照明开 Y08,当门禁打开时自动打开设备照明,界面上增加设备照明按钮。
增加新DI:夹爪气缸料盘检测 X31,入料时,夹爪夹料上升之后,需要检测此信号有料。
1 个父辈 3cff491d
...@@ -58,6 +58,8 @@ ...@@ -58,6 +58,8 @@
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox3 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.btnCloseDeviceLed = new System.Windows.Forms.Button();
this.btnOpenDeviceLed = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.groupBox4.SuspendLayout(); this.groupBox4.SuspendLayout();
this.groupBox3.SuspendLayout(); this.groupBox3.SuspendLayout();
...@@ -73,6 +75,8 @@ ...@@ -73,6 +75,8 @@
// //
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left))); | System.Windows.Forms.AnchorStyles.Left)));
this.groupBox1.Controls.Add(this.btnCloseDeviceLed);
this.groupBox1.Controls.Add(this.btnOpenDeviceLed);
this.groupBox1.Controls.Add(this.radioButton2); this.groupBox1.Controls.Add(this.radioButton2);
this.groupBox1.Controls.Add(this.radioButton1); this.groupBox1.Controls.Add(this.radioButton1);
this.groupBox1.Controls.Add(this.btnDisDoorClose); this.groupBox1.Controls.Add(this.btnDisDoorClose);
...@@ -110,7 +114,7 @@ ...@@ -110,7 +114,7 @@
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(542, 3); this.groupBox1.Location = new System.Drawing.Point(542, 3);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(418, 649); this.groupBox1.Size = new System.Drawing.Size(418, 715);
this.groupBox1.TabIndex = 105; this.groupBox1.TabIndex = 105;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入"; this.groupBox1.Text = "DO写入";
...@@ -493,7 +497,7 @@ ...@@ -493,7 +497,7 @@
// button1 // button1
// //
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.button1.Location = new System.Drawing.Point(761, 672); this.button1.Location = new System.Drawing.Point(761, 738);
this.button1.Name = "button1"; this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(115, 34); this.button1.Size = new System.Drawing.Size(115, 34);
this.button1.TabIndex = 254; this.button1.TabIndex = 254;
...@@ -508,7 +512,7 @@ ...@@ -508,7 +512,7 @@
this.chbAutoRead.Checked = true; this.chbAutoRead.Checked = true;
this.chbAutoRead.CheckState = System.Windows.Forms.CheckState.Checked; this.chbAutoRead.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbAutoRead.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbAutoRead.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbAutoRead.Location = new System.Drawing.Point(637, 677); this.chbAutoRead.Location = new System.Drawing.Point(637, 743);
this.chbAutoRead.Name = "chbAutoRead"; this.chbAutoRead.Name = "chbAutoRead";
this.chbAutoRead.Size = new System.Drawing.Size(75, 21); this.chbAutoRead.Size = new System.Drawing.Size(75, 21);
this.chbAutoRead.TabIndex = 244; this.chbAutoRead.TabIndex = 244;
...@@ -522,7 +526,7 @@ ...@@ -522,7 +526,7 @@
this.groupBox4.Controls.Add(this.tableLayoutPanel2); this.groupBox4.Controls.Add(this.tableLayoutPanel2);
this.groupBox4.Location = new System.Drawing.Point(274, 3); this.groupBox4.Location = new System.Drawing.Point(274, 3);
this.groupBox4.Name = "groupBox4"; this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(263, 712); this.groupBox4.Size = new System.Drawing.Size(263, 778);
this.groupBox4.TabIndex = 104; this.groupBox4.TabIndex = 104;
this.groupBox4.TabStop = false; this.groupBox4.TabStop = false;
this.groupBox4.Text = "DO列表"; this.groupBox4.Text = "DO列表";
...@@ -539,7 +543,7 @@ ...@@ -539,7 +543,7 @@
this.tableLayoutPanel2.RowCount = 2; this.tableLayoutPanel2.RowCount = 2;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F)); this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(252, 692); this.tableLayoutPanel2.Size = new System.Drawing.Size(252, 758);
this.tableLayoutPanel2.TabIndex = 103; this.tableLayoutPanel2.TabIndex = 103;
// //
// groupBox3 // groupBox3
...@@ -549,7 +553,7 @@ ...@@ -549,7 +553,7 @@
this.groupBox3.Controls.Add(this.tableLayoutPanel1); this.groupBox3.Controls.Add(this.tableLayoutPanel1);
this.groupBox3.Location = new System.Drawing.Point(12, 3); this.groupBox3.Location = new System.Drawing.Point(12, 3);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(263, 712); this.groupBox3.Size = new System.Drawing.Size(263, 778);
this.groupBox3.TabIndex = 103; this.groupBox3.TabIndex = 103;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "DI列表"; this.groupBox3.Text = "DI列表";
...@@ -566,14 +570,34 @@ ...@@ -566,14 +570,34 @@
this.tableLayoutPanel1.RowCount = 2; this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(252, 692); this.tableLayoutPanel1.Size = new System.Drawing.Size(252, 758);
this.tableLayoutPanel1.TabIndex = 102; this.tableLayoutPanel1.TabIndex = 102;
// //
// btnCloseDeviceLed
//
this.btnCloseDeviceLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseDeviceLed.Location = new System.Drawing.Point(6, 586);
this.btnCloseDeviceLed.Name = "btnCloseDeviceLed";
this.btnCloseDeviceLed.Size = new System.Drawing.Size(214, 34);
this.btnCloseDeviceLed.TabIndex = 272;
this.btnCloseDeviceLed.Text = "关闭设备照明";
this.btnCloseDeviceLed.UseVisualStyleBackColor = true;
//
// btnOpenDeviceLed
//
this.btnOpenDeviceLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenDeviceLed.Location = new System.Drawing.Point(6, 549);
this.btnOpenDeviceLed.Name = "btnOpenDeviceLed";
this.btnOpenDeviceLed.Size = new System.Drawing.Size(214, 34);
this.btnOpenDeviceLed.TabIndex = 271;
this.btnOpenDeviceLed.Text = "打开设备照明";
this.btnOpenDeviceLed.UseVisualStyleBackColor = true;
//
// FrmIOStatus // FrmIOStatus
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(967, 721); this.ClientSize = new System.Drawing.Size(967, 787);
this.Controls.Add(this.button1); this.Controls.Add(this.button1);
this.Controls.Add(this.groupBox1); this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4); this.Controls.Add(this.groupBox4);
...@@ -639,6 +663,8 @@ ...@@ -639,6 +663,8 @@
private System.Windows.Forms.Button btnDisDoorOpen; private System.Windows.Forms.Button btnDisDoorOpen;
private System.Windows.Forms.RadioButton radioButton1; private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.RadioButton radioButton2; private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.Button btnCloseDeviceLed;
private System.Windows.Forms.Button btnOpenDeviceLed;
} }
} }
...@@ -46,8 +46,8 @@ namespace OnlineStore.AutoInOutStore ...@@ -46,8 +46,8 @@ namespace OnlineStore.AutoInOutStore
{ {
int roleindex = 0; int roleindex = 0;
this.tableLayoutPanel1.RowStyles.Clear(); this.tableLayoutPanel1.RowStyles.Clear();
this.tableLayoutPanel1.RowCount = boxBean.Config.StoreDIList.Count; this.tableLayoutPanel1.RowCount = boxBean.Config.DILIst.Count;
foreach (ConfigIO ioValue in boxBean.Config.StoreDIList.Values) foreach (ConfigIO ioValue in boxBean.Config.DILIst.Values)
{ {
this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 26)); this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 26));
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ResourceCulture.GetString(ioValue.ElectricalDefinition, ioValue.Explain), ioValue.ProName,240); IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ResourceCulture.GetString(ioValue.ElectricalDefinition, ioValue.Explain), ioValue.ProName,240);
...@@ -57,9 +57,9 @@ namespace OnlineStore.AutoInOutStore ...@@ -57,9 +57,9 @@ namespace OnlineStore.AutoInOutStore
} }
tableLayoutPanel2.RowStyles.Clear(); tableLayoutPanel2.RowStyles.Clear();
this.tableLayoutPanel2.RowCount = boxBean.Config.StoreDOList.Count; this.tableLayoutPanel2.RowCount = boxBean.Config.DOList.Count;
roleindex = 0; roleindex = 0;
foreach (ConfigIO ioValue in boxBean.Config.StoreDOList.Values) foreach (ConfigIO ioValue in boxBean.Config.DOList.Values)
{ {
this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28)); this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ResourceCulture.GetString(ioValue.ElectricalDefinition, ioValue.Explain), ioValue.ProName, 240); IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ResourceCulture.GetString(ioValue.ElectricalDefinition, ioValue.Explain), ioValue.ProName, 240);
...@@ -69,7 +69,7 @@ namespace OnlineStore.AutoInOutStore ...@@ -69,7 +69,7 @@ namespace OnlineStore.AutoInOutStore
} }
this.SuspendLayout(); //此处为不闪屏,一定要有的! this.SuspendLayout(); //此处为不闪屏,一定要有的!
cmbWriteIO.DataSource = new List<ConfigIO>(boxBean.Config.StoreDOList.Values); cmbWriteIO.DataSource = new List<ConfigIO>(boxBean.Config.DOList.Values);
cmbWriteIO.ValueMember = "ProName"; cmbWriteIO.ValueMember = "ProName";
cmbWriteIO.DisplayMember = "DisplayStr"; cmbWriteIO.DisplayMember = "DisplayStr";
//cmbWriteValue.SelectedIndex = 0; //cmbWriteValue.SelectedIndex = 0;
...@@ -116,9 +116,9 @@ namespace OnlineStore.AutoInOutStore ...@@ -116,9 +116,9 @@ namespace OnlineStore.AutoInOutStore
private ConfigIO GetSelectDO() private ConfigIO GetSelectDO()
{ {
string text = cmbWriteIO.SelectedValue.ToString(); string text = cmbWriteIO.SelectedValue.ToString();
if (boxBean.Config.StoreDOList.ContainsKey(text)) if (boxBean.Config.DOList.ContainsKey(text))
{ {
ConfigIO io = boxBean.Config.StoreDOList[text]; ConfigIO io = boxBean.Config.DOList[text];
return io; return io;
} }
return null; return null;
...@@ -147,6 +147,16 @@ namespace OnlineStore.AutoInOutStore ...@@ -147,6 +147,16 @@ namespace OnlineStore.AutoInOutStore
{ {
btnDisDoorOpen.Visible = StoreManager.HasDisableDoorControl; btnDisDoorOpen.Visible = StoreManager.HasDisableDoorControl;
btnDisDoorClose.Visible = StoreManager.HasDisableDoorControl; btnDisDoorClose.Visible = StoreManager.HasDisableDoorControl;
if (StoreManager.Store.Config.DOList.ContainsKey(IO_Type.Device_Led))
{
btnCloseDeviceLed.Visible = true;
btnOpenDeviceLed.Visible = true;
}
else
{
btnCloseDeviceLed.Visible = false;
btnOpenDeviceLed.Visible = false;
}
} }
private void cmbWriteIO_DrawItem(object sender, DrawItemEventArgs e) private void cmbWriteIO_DrawItem(object sender, DrawItemEventArgs e)
...@@ -176,7 +186,7 @@ namespace OnlineStore.AutoInOutStore ...@@ -176,7 +186,7 @@ namespace OnlineStore.AutoInOutStore
foreach (string key in DIControlList.Keys) foreach (string key in DIControlList.Keys)
{ {
IOTextControl control = DIControlList[key]; IOTextControl control = DIControlList[key];
int iov = (int)IOManager.instance.GetIOValue(boxBean.Config.StoreDIList[key]); int iov = (int)IOManager.instance.GetIOValue(boxBean.Config.DILIst[key]);
if (iov != control.IOValue) if (iov != control.IOValue)
{ {
control.IOValue = iov; control.IOValue = iov;
...@@ -185,7 +195,7 @@ namespace OnlineStore.AutoInOutStore ...@@ -185,7 +195,7 @@ namespace OnlineStore.AutoInOutStore
} foreach (string key in this.DOControlList.Keys) } foreach (string key in this.DOControlList.Keys)
{ {
IOTextControl control = DOControlList[key]; IOTextControl control = DOControlList[key];
int iov = (int)IOManager.instance.GetIOValue(boxBean.Config.StoreDOList[key]); int iov = (int)IOManager.instance.GetIOValue(boxBean.Config.DOList[key]);
if (iov != control.IOValue) if (iov != control.IOValue)
{ {
control.IOValue = iov; control.IOValue = iov;
......
...@@ -238,6 +238,7 @@ ...@@ -238,6 +238,7 @@
this.清理日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.清理日志ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator12 = new System.Windows.Forms.ToolStripSeparator();
this.英文ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.英文ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator21 = new System.Windows.Forms.ToolStripSeparator();
this.contextMenuStrip1.SuspendLayout(); this.contextMenuStrip1.SuspendLayout();
this.groupAuto.SuspendLayout(); this.groupAuto.SuspendLayout();
this.groupBox6.SuspendLayout(); this.groupBox6.SuspendLayout();
...@@ -264,21 +265,22 @@ ...@@ -264,21 +265,22 @@
this.contextMenuStrip1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.contextMenuStrip1.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.显示ToolStripMenuItem, this.显示ToolStripMenuItem,
this.toolStripSeparator21,
this.toolStripMenuItem1}); this.toolStripMenuItem1});
this.contextMenuStrip1.Name = "contextMenuStrip1"; this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(107, 52); this.contextMenuStrip1.Size = new System.Drawing.Size(181, 80);
// //
// 显示ToolStripMenuItem // 显示ToolStripMenuItem
// //
this.显示ToolStripMenuItem.Name = "显示ToolStripMenuItem"; this.显示ToolStripMenuItem.Name = "显示ToolStripMenuItem";
this.显示ToolStripMenuItem.Size = new System.Drawing.Size(106, 24); this.显示ToolStripMenuItem.Size = new System.Drawing.Size(180, 24);
this.显示ToolStripMenuItem.Text = "显示"; this.显示ToolStripMenuItem.Text = "显示";
this.显示ToolStripMenuItem.Click += new System.EventHandler(this.显示ToolStripMenuItem_Click); this.显示ToolStripMenuItem.Click += new System.EventHandler(this.显示ToolStripMenuItem_Click);
// //
// toolStripMenuItem1 // toolStripMenuItem1
// //
this.toolStripMenuItem1.Name = "toolStripMenuItem1"; this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(106, 24); this.toolStripMenuItem1.Size = new System.Drawing.Size(180, 24);
this.toolStripMenuItem1.Text = "退出"; this.toolStripMenuItem1.Text = "退出";
this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click); this.toolStripMenuItem1.Click += new System.EventHandler(this.toolStripMenuItem1_Click);
// //
...@@ -2685,6 +2687,11 @@ ...@@ -2685,6 +2687,11 @@
this.英文ToolStripMenuItem.Text = "英文"; this.英文ToolStripMenuItem.Text = "英文";
this.英文ToolStripMenuItem.Click += new System.EventHandler(this.开启DEBUGToolStripMenuItem_Click); this.英文ToolStripMenuItem.Click += new System.EventHandler(this.开启DEBUGToolStripMenuItem_Click);
// //
// toolStripSeparator21
//
this.toolStripSeparator21.Name = "toolStripSeparator21";
this.toolStripSeparator21.Size = new System.Drawing.Size(177, 6);
//
// FrmStoreBox // FrmStoreBox
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
...@@ -2956,6 +2963,7 @@ ...@@ -2956,6 +2963,7 @@
private System.Windows.Forms.Button btnSaveSinglePosId; private System.Windows.Forms.Button btnSaveSinglePosId;
private System.Windows.Forms.Button btnCycleOut; private System.Windows.Forms.Button btnCycleOut;
private System.Windows.Forms.Label lblBatchMsg; private System.Windows.Forms.Label lblBatchMsg;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator21;
} }
} }
...@@ -1828,10 +1828,10 @@ namespace OnlineStore.AutoInOutStore ...@@ -1828,10 +1828,10 @@ namespace OnlineStore.AutoInOutStore
string ioIP = "192.168.200.13"; string ioIP = "192.168.200.13";
int ioIndex = 0; int ioIndex = 0;
// if (store.Config.StoreDIList.ContainsKey(IO_Type.UpdownPositionSingal)) // if (store.Config.StoreDIList.ContainsKey(IO_Type.UpdownPositionSingal))
if (store.Config.StoreDIList.ContainsKey(IO_Type.TrayCheck_Fixture)) if (store.Config.DILIst.ContainsKey(IO_Type.TrayCheck_Fixture))
{ {
ioIP = store.Config.StoreDIList[IO_Type.TrayCheck_Fixture].DeviceName; ioIP = store.Config.DILIst[IO_Type.TrayCheck_Fixture].DeviceName;
ioIndex = store.Config.StoreDIList[IO_Type.TrayCheck_Fixture].GetIOAddr(); ioIndex = store.Config.DILIst[IO_Type.TrayCheck_Fixture].GetIOAddr();
} }
FrmPositionTool frm = new FrmPositionTool(PortName, slvAddr, ioIP, ioIndex); FrmPositionTool frm = new FrmPositionTool(PortName, slvAddr, ioIP, ioIndex);
frm.ShowDialog(); frm.ShowDialog();
......
...@@ -857,7 +857,7 @@ ...@@ -857,7 +857,7 @@
<value>Camera light ON</value> <value>Camera light ON</value>
</data> </data>
<data name="Y08" xml:space="preserve"> <data name="Y08" xml:space="preserve">
<value>Grip material SOL</value> <value>Equipment lighting on</value>
</data> </data>
<data name="Y09" xml:space="preserve"> <data name="Y09" xml:space="preserve">
<value>Portal ascent SOL</value> <value>Portal ascent SOL</value>
...@@ -1411,4 +1411,16 @@ ...@@ -1411,4 +1411,16 @@
<data name="自动出库" xml:space="preserve"> <data name="自动出库" xml:space="preserve">
<value>Automated outbound</value> <value>Automated outbound</value>
</data> </data>
<data name="FrmIOStatus_btnCloseDeviceLed_Text" xml:space="preserve">
<value>Turn off equipment lighting</value>
</data>
<data name="FrmIOStatus_btnOpenDeviceLed_Text" xml:space="preserve">
<value>Turn on equipment lighting</value>
</data>
<data name="NO_Clamping_Check" xml:space="preserve">
<value>There is no signal detected on the feed plate of the gripper cylinder</value>
</data>
<data name="X31" xml:space="preserve">
<value>Clamping jaw cylinder material plate inspection</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -853,7 +853,7 @@ ...@@ -853,7 +853,7 @@
<value>相机照明开</value> <value>相机照明开</value>
</data> </data>
<data name="Y08" xml:space="preserve"> <data name="Y08" xml:space="preserve">
<value>吸盘吸料SOL</value> <value>设备照明开</value>
</data> </data>
<data name="Y09" xml:space="preserve"> <data name="Y09" xml:space="preserve">
<value>进料口门上升SOL</value> <value>进料口门上升SOL</value>
...@@ -889,7 +889,7 @@ ...@@ -889,7 +889,7 @@
<value>左侧门关闭</value> <value>左侧门关闭</value>
</data> </data>
<data name="X24" xml:space="preserve"> <data name="X24" xml:space="preserve">
<value /> <value>右侧门关闭</value>
</data> </data>
<data name="FrmStoreBox_groupBox6_Text" xml:space="preserve"> <data name="FrmStoreBox_groupBox6_Text" xml:space="preserve">
<value>批量上下料操作</value> <value>批量上下料操作</value>
...@@ -1410,4 +1410,16 @@ ...@@ -1410,4 +1410,16 @@
<data name="自动出库" xml:space="preserve"> <data name="自动出库" xml:space="preserve">
<value>自动出库</value> <value>自动出库</value>
</data> </data>
<data name="FrmIOStatus_btnCloseDeviceLed_Text" xml:space="preserve">
<value>关闭设备照明</value>
</data>
<data name="FrmIOStatus_btnOpenDeviceLed_Text" xml:space="preserve">
<value>打开设备照明</value>
</data>
<data name="NO_Clamping_Check" xml:space="preserve">
<value>夹爪气缸料盘检测无信号</value>
</data>
<data name="X31" xml:space="preserve">
<value>夹爪气缸料盘检测</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -251,4 +251,9 @@ PRO,(轴五)上料轴出料时检测到料盘需要下降的高度,BatchAxis_Dow ...@@ -251,4 +251,9 @@ PRO,(轴五)上料轴出料时检测到料盘需要下降的高度,BatchAxis_Dow
未检测到料盘时,下降高度=BatchAxis_OutDownPosition+料盘高度X系数 未检测到料盘时,下降高度=BatchAxis_OutDownPosition+料盘高度X系数
增加配置BatchAxis_DownPosition2,当出库检测到料盘时,下降的距离在原来的基础上加上BatchAxis_DownPosition2 增加配置BatchAxis_DownPosition2,当出库检测到料盘时,下降的距离在原来的基础上加上BatchAxis_DownPosition2
更新好了你试下
\ No newline at end of file \ No newline at end of file
20200616,修改新版IO兼容
增加新DO:设备照明开 Y08,当门禁打开时自动打开设备照明,界面上增加设备照明按钮。
增加新DI:夹爪气缸料盘检测 X31,入料时,夹爪夹料上升之后,需要检测此信号有料。
相关中英文已增加。
\ No newline at end of file \ No newline at end of file
...@@ -17,9 +17,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -17,9 +17,9 @@ namespace OnlineStore.DeviceLibrary
public static void IOMove(string ioType, IO_VALUE ioValue) public static void IOMove(string ioType, IO_VALUE ioValue)
{ {
if (StoreManager.Config.StoreDOList.ContainsKey(ioType)) if (StoreManager.Config.DOList.ContainsKey(ioType))
{ {
ConfigIO configIo = StoreManager.Config.StoreDOList[ioType]; ConfigIO configIo = StoreManager.Config.DOList[ioType];
//DateTime time = DateTime.Now; //DateTime time = DateTime.Now;
instance.WriteSingleDO(configIo.DeviceName, configIo.SlaveID, configIo.GetIOAddr(), ioValue); instance.WriteSingleDO(configIo.DeviceName, configIo.SlaveID, configIo.GetIOAddr(), ioValue);
//TimeSpan span = DateTime.Now - time; //TimeSpan span = DateTime.Now - time;
...@@ -38,15 +38,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -38,15 +38,15 @@ namespace OnlineStore.DeviceLibrary
public static IO_VALUE IOValue(string ioType) public static IO_VALUE IOValue(string ioType)
{ {
IO_VALUE ioValue = IO_VALUE.LOW; IO_VALUE ioValue = IO_VALUE.LOW;
if (StoreManager.Config.StoreDIList.ContainsKey(ioType)) if (StoreManager.Config.DILIst.ContainsKey(ioType))
{ {
ConfigIO configIo = StoreManager.Config.StoreDIList[ioType]; ConfigIO configIo = StoreManager.Config.DILIst[ioType];
ioValue = instance.GetDIValue(configIo.DeviceName, configIo.SlaveID, configIo.GetIOAddr()); ioValue = instance.GetDIValue(configIo.DeviceName, configIo.SlaveID, configIo.GetIOAddr());
//UpdateDoValue(ioType, ioValue); //UpdateDoValue(ioType, ioValue);
} }
else if (StoreManager.Config.StoreDOList.ContainsKey(ioType)) else if (StoreManager.Config.DOList.ContainsKey(ioType))
{ {
ConfigIO configIo = StoreManager.Config.StoreDOList[ioType]; ConfigIO configIo = StoreManager.Config.DOList[ioType];
ioValue = instance.GetDOValue(configIo.DeviceName, configIo.SlaveID, configIo.GetIOAddr()); ioValue = instance.GetDOValue(configIo.DeviceName, configIo.SlaveID, configIo.GetIOAddr());
} }
else else
...@@ -58,9 +58,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -58,9 +58,9 @@ namespace OnlineStore.DeviceLibrary
public static IO_VALUE DOValue(string ioType) public static IO_VALUE DOValue(string ioType)
{ {
IO_VALUE ioValue = IO_VALUE.LOW; IO_VALUE ioValue = IO_VALUE.LOW;
if (StoreManager.Config.StoreDOList.ContainsKey(ioType)) if (StoreManager.Config.DOList.ContainsKey(ioType))
{ {
ConfigIO configIo = StoreManager.Config.StoreDOList[ioType]; ConfigIO configIo = StoreManager.Config.DOList[ioType];
ioValue = instance.GetDOValue(configIo.DeviceName, configIo.SlaveID, configIo.GetIOAddr()); ioValue = instance.GetDOValue(configIo.DeviceName, configIo.SlaveID, configIo.GetIOAddr());
} }
else else
......
...@@ -275,6 +275,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -275,6 +275,10 @@ namespace OnlineStore.DeviceLibrary
///吸盘吸料失败 ///吸盘吸料失败
/// </summary> /// </summary>
public static string XiLiaoError = "XiLiaoError"; public static string XiLiaoError = "XiLiaoError";
/// <summary>
///夹爪气缸料盘检测无信号
/// </summary>
public static string NO_Clamping_Check = "NO_Clamping_Check";
/// <summary> /// <summary>
......
...@@ -22,7 +22,7 @@ DO,吹气SOL ON,StartOrStopBlow,3,192.168.200.11,0,吹气SOL ON,Y04,DO-04,0, ...@@ -22,7 +22,7 @@ DO,吹气SOL ON,StartOrStopBlow,3,192.168.200.11,0,吹气SOL ON,Y04,DO-04,0,
DO,料仓运转ON,Run_Sign,4,192.168.200.11,0,料仓运转ON,Y05,DO-05,0, DO,料仓运转ON,Run_Sign,4,192.168.200.11,0,料仓运转ON,Y05,DO-05,0,
DO,轴2刹车电源ON,Axis_Brake,5,192.168.200.11,0,轴2刹车电源ON,Y06,DO-06,0, DO,轴2刹车电源ON,Axis_Brake,5,192.168.200.11,0,轴2刹车电源ON,Y06,DO-06,0,
DO,相机照明开,CameraLight_Power,6,192.168.200.11,0,相机照明开,Y07,DO-07,0, DO,相机照明开,CameraLight_Power,6,192.168.200.11,0,相机照明开,Y07,DO-07,0,
,备用,,7,192.168.200.11,0,备用,Y08,DO-08,0, DO,设备照明开,Device_Led,7,192.168.200.11,0,设备照明开,Y08,DO-08,0,
DO,进料口门上升SOL,Door_Up,8,192.168.200.11,0,进料口门上升SOL,Y09,DO-09,0, DO,进料口门上升SOL,Door_Up,8,192.168.200.11,0,进料口门上升SOL,Y09,DO-09,0,
DO,进料口门下降SOL,Door_Down,9,192.168.200.11,0,进料口门下降SOL,Y10,DO-10,0, DO,进料口门下降SOL,Door_Down,9,192.168.200.11,0,进料口门下降SOL,Y10,DO-10,0,
DO,抓取气缸上升SOL,ClampingDisc_Up,10,192.168.200.11,0,抓取气缸上升SOL,Y11,DO-11,0, DO,抓取气缸上升SOL,ClampingDisc_Up,10,192.168.200.11,0,抓取气缸上升SOL,Y11,DO-11,0,
...@@ -41,7 +41,7 @@ DI,上料机构上极限,BatchAxis_Limit,6,192.168.200.12,0,上料机构上极限,X27,DI-27,0, ...@@ -41,7 +41,7 @@ DI,上料机构上极限,BatchAxis_Limit,6,192.168.200.12,0,上料机构上极限,X27,DI-27,0,
DI,入料口料盘检测,TrayCheck_Door,7,192.168.200.12,0,入料口料盘检测,X28,DI-28,0, DI,入料口料盘检测,TrayCheck_Door,7,192.168.200.12,0,入料口料盘检测,X28,DI-28,0,
DI,夹爪气缸夹紧端,Clamping_Work,8,192.168.200.12,0,夹爪气缸夹紧端,X29,DI-29,0, DI,夹爪气缸夹紧端,Clamping_Work,8,192.168.200.12,0,夹爪气缸夹紧端,X29,DI-29,0,
DI,夹爪气缸放松端,Clamping_Relax,9,192.168.200.12,0,夹爪气缸放松端,X30,DI-30,0, DI,夹爪气缸放松端,Clamping_Relax,9,192.168.200.12,0,夹爪气缸放松端,X30,DI-30,0,
,,,10,192.168.200.12,0,,X31,DI-31,0, DI,夹爪气缸料盘检测,Clamping_Check,10,192.168.200.12,0,夹爪气缸料盘检测,X31,DI-31,0,
,,,11,192.168.200.12,0,,X32,DI-32,0, ,,,11,192.168.200.12,0,,X32,DI-32,0,
,,,12,192.168.200.12,0,,X33,DI-33,0, ,,,12,192.168.200.12,0,,X33,DI-33,0,
,,,13,192.168.200.12,0,,X34,DI-34,0, ,,,13,192.168.200.12,0,,X34,DI-34,0,
......
...@@ -1039,6 +1039,37 @@ namespace OnlineStore.DeviceLibrary ...@@ -1039,6 +1039,37 @@ namespace OnlineStore.DeviceLibrary
IOManager.IOMove(IO_Type.RunSign_HddLed, IO_VALUE.LOW); IOManager.IOMove(IO_Type.RunSign_HddLed, IO_VALUE.LOW);
} }
} }
//仓门打开,打开照明
bool doorIsOpen = false;
if (Config.DILIst.ContainsKey(IO_Type.LeftDoorColse_Single) && IOManager.IOValue(IO_Type.LeftDoorColse_Single).Equals(IO_VALUE.LOW))
{
doorIsOpen = true;
}
else if (Config.DILIst.ContainsKey(IO_Type.RightDoorColse_Single) && IOManager.IOValue(IO_Type.RightDoorColse_Single).Equals(IO_VALUE.LOW))
{
doorIsOpen = true;
}
else if (!doorIsOpen)
{
doorIsOpen = true;
}
if (doorIsOpen && Config.DOList.ContainsKey(IO_Type.Device_Led))
{
if (IOManager.IOValue(IO_Type.Device_Led).Equals(IO_VALUE.LOW))
{
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH);
}
}
else
{
if (IOManager.IOValue(IO_Type.Device_Led).Equals(IO_VALUE.HIGH))
{
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.LOW);
}
}
} }
catch (Exception ex) catch (Exception ex)
{ {
......
...@@ -395,9 +395,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -395,9 +395,13 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I06_SuckingDisc_Up)) else if (StoreMove.MoveStep.Equals(StoreMoveStep.AUTO_I06_SuckingDisc_Up))
{ {
bool needCheck = StoreManager.Config.DILIst.ContainsKey(IO_Type.Clamping_Check);
if (IOManager.IOValue(IO_Type.Clamping_Work).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.Clamping_Relax).Equals(IO_VALUE.LOW)) if (IOManager.IOValue(IO_Type.Clamping_Work).Equals(IO_VALUE.HIGH) && IOManager.IOValue(IO_Type.Clamping_Relax).Equals(IO_VALUE.LOW))
// if (IOManager.IOValue(IO_Type.SuckingDisc_Air).Equals(IO_VALUE.HIGH)) // if (IOManager.IOValue(IO_Type.SuckingDisc_Air).Equals(IO_VALUE.HIGH))
{ {
if (needCheck && IOManager.IOValue(IO_Type.Clamping_Check).Equals(IO_VALUE.HIGH))
{
StoreMove.NextMoveStep(StoreMoveStep.AUTO_I07_BatchAxisUp); StoreMove.NextMoveStep(StoreMoveStep.AUTO_I07_BatchAxisUp);
LogUtil.info(Name + "入料: 批量轴匀速上升【" + StoreManager.Config.BatchAxis_SlowSpeed + "】"); LogUtil.info(Name + "入料: 批量轴匀速上升【" + StoreManager.Config.BatchAxis_SlowSpeed + "】");
ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.BatchAxis_SlowSpeed, IO_Type.TrayCheck_LoadMaterial); ACAxisSpeedMove(StoreManager.Config.Batch_Axis, StoreManager.Config.BatchAxis_SlowSpeed, IO_Type.TrayCheck_LoadMaterial);
...@@ -419,7 +423,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -419,7 +423,13 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
// WarnMsg = ResourceControl.GetString(ResourceControl.XiLiaoError, "吸盘吸料失败"); SetWarnMsg(ResourceControl.NO_Clamping_Check);
StoreManager.Store.Alarm(StoreAlarmType.BatchAlarm, WarnObj.WarnMsg, WarnObj.WarnMsg, StoreMoveType.InStore);
LogUtil.error(Name + "入料: 吸盘上升后未检测到夹爪气缸料盘信号,吸取料盘失败", 106);
}
}
else
{
SetWarnMsg(ResourceControl.XiLiaoError); SetWarnMsg(ResourceControl.XiLiaoError);
StoreManager.Store.Alarm(StoreAlarmType.BatchAlarm, WarnObj.WarnMsg, WarnObj.WarnMsg, StoreMoveType.InStore); StoreManager.Store.Alarm(StoreAlarmType.BatchAlarm, WarnObj.WarnMsg, WarnObj.WarnMsg, StoreMoveType.InStore);
LogUtil.error(Name + "入料: 吸盘上升后未检测到吸盘压力信号,吸取料盘失败", 105); LogUtil.error(Name + "入料: 吸盘上升后未检测到吸盘压力信号,吸取料盘失败", 105);
......
...@@ -31,12 +31,12 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -31,12 +31,12 @@ namespace OnlineStore.LoadCSVLibrary
/// 输入IO配置 /// 输入IO配置
/// 手动料仓输入Io列表,key=对应的坐标位置的positionNum /// 手动料仓输入Io列表,key=对应的坐标位置的positionNum
/// </summary> /// </summary>
public Dictionary<String, ConfigIO> StoreDIList { get; set; } public Dictionary<String, ConfigIO> DILIst { get; set; }
/// <summary> /// <summary>
/// 输出IO配置 /// 输出IO配置
/// 手动料仓输出Io列表,key=对应的坐标位置的positionNum /// 手动料仓输出Io列表,key=对应的坐标位置的positionNum
/// </summary> /// </summary>
public Dictionary<String, ConfigIO> StoreDOList { get; set; } public Dictionary<String, ConfigIO> DOList { get; set; }
/// <summary> /// <summary>
/// 料仓所有用到的IO卡名称 /// 料仓所有用到的IO卡名称
/// </summary> /// </summary>
...@@ -77,8 +77,8 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -77,8 +77,8 @@ namespace OnlineStore.LoadCSVLibrary
public virtual void LoadConfig(List<ConfigBase> configList) public virtual void LoadConfig(List<ConfigBase> configList)
{ {
StoreDIList = new Dictionary<string, ConfigIO>(); DILIst = new Dictionary<string, ConfigIO>();
StoreDOList = new Dictionary<string, ConfigIO>(); DOList = new Dictionary<string, ConfigIO>();
DIODeviceNameList = new List<string>(); DIODeviceNameList = new List<string>();
SMCDeviceNameList = new List<string>(); SMCDeviceNameList = new List<string>();
//取得属性集合 //取得属性集合
...@@ -128,7 +128,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -128,7 +128,7 @@ namespace OnlineStore.LoadCSVLibrary
{ {
DIODeviceNameList.Add(io.DeviceName); DIODeviceNameList.Add(io.DeviceName);
} }
this.StoreDIList.Add(con.ProName, io); this.DILIst.Add(con.ProName, io);
} }
else else
{ {
...@@ -144,7 +144,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -144,7 +144,7 @@ namespace OnlineStore.LoadCSVLibrary
{ {
DIODeviceNameList.Add(io.DeviceName); DIODeviceNameList.Add(io.DeviceName);
} }
this.StoreDOList.Add(con.ProName, io); this.DOList.Add(con.ProName, io);
} }
else else
{ {
...@@ -188,7 +188,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -188,7 +188,7 @@ namespace OnlineStore.LoadCSVLibrary
//DI检测 //DI检测
foreach (string di in MustHaveDIList) foreach (string di in MustHaveDIList)
{ {
if (!StoreDIList.ContainsKey(di)) if (!DILIst.ContainsKey(di))
{ {
throw new CVSFieldNotMatchingExection(this.ToString() + "的DI属性" + di + "必须配置值!"); throw new CVSFieldNotMatchingExection(this.ToString() + "的DI属性" + di + "必须配置值!");
} }
...@@ -197,7 +197,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -197,7 +197,7 @@ namespace OnlineStore.LoadCSVLibrary
//DO检测 //DO检测
foreach (string io in MustHaveDOList) foreach (string io in MustHaveDOList)
{ {
if (!this.StoreDOList.ContainsKey(io)) if (!this.DOList.ContainsKey(io))
{ {
throw new CVSFieldNotMatchingExection(this.ToString() + "的DO属性" + io + "必须配置值!"); throw new CVSFieldNotMatchingExection(this.ToString() + "的DO属性" + io + "必须配置值!");
} }
...@@ -208,13 +208,13 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -208,13 +208,13 @@ namespace OnlineStore.LoadCSVLibrary
public ConfigIO getWaitIO(string ioType) public ConfigIO getWaitIO(string ioType)
{ {
if (StoreDIList.ContainsKey(ioType)) if (DILIst.ContainsKey(ioType))
{ {
return StoreDIList[ioType]; return DILIst[ioType];
} }
else if (StoreDOList.ContainsKey(ioType)) else if (DOList.ContainsKey(ioType))
{ {
return StoreDOList[ioType]; return DOList[ioType];
} }
return null; return null;
} }
......
...@@ -242,5 +242,15 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -242,5 +242,15 @@ namespace OnlineStore.LoadCSVLibrary
/// 升降轴调位置的信号 /// 升降轴调位置的信号
/// </summary> /// </summary>
public static string UpdownPositionSingal = "UpdownPositionSingal"; public static string UpdownPositionSingal = "UpdownPositionSingal";
/// <summary>
/// DO 设备照明开 Device_Led 7 192.168.200.11 0 设备照明开 Y08 DO-08
/// </summary>
public static string Device_Led = "Device_Led";
/// <summary>
/// DI 夹爪气缸料盘检测 Clamping_Check 10 192.168.200.12 0 夹爪气缸料盘检测 X31 DI-31
/// </summary>
public static string Clamping_Check = "Clamping_Check";
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!