Commit e77d9cb0 LN

环形线横移修改

1 个父辈 bf67a9ce
...@@ -86,6 +86,12 @@ ...@@ -86,6 +86,12 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="FrmIOMsg.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmIOMsg.Designer.cs">
<DependentUpon>FrmIOMsg.cs</DependentUpon>
</Compile>
<Compile Include="useControl\AxisMoveControl.cs"> <Compile Include="useControl\AxisMoveControl.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
...@@ -161,6 +167,9 @@ ...@@ -161,6 +167,9 @@
<Compile Include="ManagerUtil.cs" /> <Compile Include="ManagerUtil.cs" />
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="FrmIOMsg.resx">
<DependentUpon>FrmIOMsg.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="useControl\AxisMoveControl.resx"> <EmbeddedResource Include="useControl\AxisMoveControl.resx">
<DependentUpon>AxisMoveControl.cs</DependentUpon> <DependentUpon>AxisMoveControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
namespace OnlineStore.AssemblyLine
{
partial class FrmIOMsg
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.lblConInfo = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.SuspendLayout();
//
// lblConInfo
//
this.lblConInfo.AutoSize = true;
this.lblConInfo.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblConInfo.Location = new System.Drawing.Point(63, 37);
this.lblConInfo.Name = "lblConInfo";
this.lblConInfo.Size = new System.Drawing.Size(80, 20);
this.lblConInfo.TabIndex = 0;
this.lblConInfo.Text = "lblConInfo";
//
// timer1
//
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// FrmIOMsg
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(602, 708);
this.Controls.Add(this.lblConInfo);
this.Name = "FrmIOMsg";
this.Text = "IO连接状态";
this.Load += new System.EventHandler(this.FrmIOMsg_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label lblConInfo;
private System.Windows.Forms.Timer timer1;
}
}
\ No newline at end of file \ No newline at end of file
using OnlineStore.DeviceLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace OnlineStore.AssemblyLine
{
internal partial class FrmIOMsg : FrmBase
{
public FrmIOMsg()
{
InitializeComponent();
}
private void timer1_Tick(object sender, EventArgs e)
{
lblConInfo.Text = "IO连接信息:\r\n";
string msg = "";
List<string> tList = new List<string>(LineManager.Line.cioList);
foreach (string ip in tList)
{
string con = (IOManager.instance.IsConnect(ip)) ? "✔" : "✘";
msg += ("IO模块[" + ip + "]").PadLeft(26, ' ') + con + "\n";
}
lblConInfo.Text += msg;
}
private void FrmIOMsg_Load(object sender, EventArgs e)
{
timer1.Start();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file \ No newline at end of file
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
this.groupBox2 = new System.Windows.Forms.GroupBox(); this.groupBox2 = new System.Windows.Forms.GroupBox();
this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel3 = new System.Windows.Forms.TableLayoutPanel();
this.groupBox5 = new System.Windows.Forms.GroupBox(); this.groupBox5 = new System.Windows.Forms.GroupBox();
this.btnsw2StopDown = new System.Windows.Forms.Button();
this.btnSw3Location = new System.Windows.Forms.Button(); this.btnSw3Location = new System.Windows.Forms.Button();
this.btnSw3Top = new System.Windows.Forms.Button(); this.btnSw3Top = new System.Windows.Forms.Button();
this.btnSw2Location = new System.Windows.Forms.Button(); this.btnSw2Location = new System.Windows.Forms.Button();
...@@ -83,7 +84,7 @@ ...@@ -83,7 +84,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(984, 5); this.groupBox1.Location = new System.Drawing.Point(984, 5);
this.groupBox1.Name = "groupBox1"; this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(343, 154); this.groupBox1.Size = new System.Drawing.Size(343, 136);
this.groupBox1.TabIndex = 105; this.groupBox1.TabIndex = 105;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入"; this.groupBox1.Text = "DO写入";
...@@ -201,7 +202,7 @@ ...@@ -201,7 +202,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(22, 457); this.chbAutoRead.Location = new System.Drawing.Point(22, 409);
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;
...@@ -216,7 +217,7 @@ ...@@ -216,7 +217,7 @@
this.groupBox4.Controls.Add(this.tableLayoutPanel2); this.groupBox4.Controls.Add(this.tableLayoutPanel2);
this.groupBox4.Location = new System.Drawing.Point(492, 5); this.groupBox4.Location = new System.Drawing.Point(492, 5);
this.groupBox4.Name = "groupBox4"; this.groupBox4.Name = "groupBox4";
this.groupBox4.Size = new System.Drawing.Size(240, 644); this.groupBox4.Size = new System.Drawing.Size(240, 589);
this.groupBox4.TabIndex = 104; this.groupBox4.TabIndex = 104;
this.groupBox4.TabStop = false; this.groupBox4.TabStop = false;
this.groupBox4.Text = "DO列表"; this.groupBox4.Text = "DO列表";
...@@ -234,7 +235,7 @@ ...@@ -234,7 +235,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(229, 624); this.tableLayoutPanel2.Size = new System.Drawing.Size(229, 569);
this.tableLayoutPanel2.TabIndex = 103; this.tableLayoutPanel2.TabIndex = 103;
// //
// groupBox3 // groupBox3
...@@ -244,7 +245,7 @@ ...@@ -244,7 +245,7 @@
this.groupBox3.Controls.Add(this.tableLayoutPanel1); this.groupBox3.Controls.Add(this.tableLayoutPanel1);
this.groupBox3.Location = new System.Drawing.Point(6, 5); this.groupBox3.Location = new System.Drawing.Point(6, 5);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(240, 644); this.groupBox3.Size = new System.Drawing.Size(240, 589);
this.groupBox3.TabIndex = 103; this.groupBox3.TabIndex = 103;
this.groupBox3.TabStop = false; this.groupBox3.TabStop = false;
this.groupBox3.Text = "DI列表"; this.groupBox3.Text = "DI列表";
...@@ -262,7 +263,7 @@ ...@@ -262,7 +263,7 @@
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(229, 624); this.tableLayoutPanel1.Size = new System.Drawing.Size(229, 569);
this.tableLayoutPanel1.TabIndex = 102; this.tableLayoutPanel1.TabIndex = 102;
// //
// groupBox2 // groupBox2
...@@ -272,7 +273,7 @@ ...@@ -272,7 +273,7 @@
this.groupBox2.Controls.Add(this.tableLayoutPanel3); this.groupBox2.Controls.Add(this.tableLayoutPanel3);
this.groupBox2.Location = new System.Drawing.Point(249, 5); this.groupBox2.Location = new System.Drawing.Point(249, 5);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(240, 644); this.groupBox2.Size = new System.Drawing.Size(240, 589);
this.groupBox2.TabIndex = 245; this.groupBox2.TabIndex = 245;
this.groupBox2.TabStop = false; this.groupBox2.TabStop = false;
this.groupBox2.Text = "DI列表"; this.groupBox2.Text = "DI列表";
...@@ -289,13 +290,14 @@ ...@@ -289,13 +290,14 @@
this.tableLayoutPanel3.RowCount = 2; this.tableLayoutPanel3.RowCount = 2;
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F)); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F)); this.tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel3.Size = new System.Drawing.Size(229, 624); this.tableLayoutPanel3.Size = new System.Drawing.Size(229, 569);
this.tableLayoutPanel3.TabIndex = 102; this.tableLayoutPanel3.TabIndex = 102;
// //
// groupBox5 // groupBox5
// //
this.groupBox5.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.groupBox5.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.groupBox5.Controls.Add(this.btnsw2StopDown);
this.groupBox5.Controls.Add(this.chbAutoRead); this.groupBox5.Controls.Add(this.chbAutoRead);
this.groupBox5.Controls.Add(this.btnSw3Location); this.groupBox5.Controls.Add(this.btnSw3Location);
this.groupBox5.Controls.Add(this.btnSw3Top); this.groupBox5.Controls.Add(this.btnSw3Top);
...@@ -313,18 +315,30 @@ ...@@ -313,18 +315,30 @@
this.groupBox5.Controls.Add(this.btnNGCylinder); this.groupBox5.Controls.Add(this.btnNGCylinder);
this.groupBox5.Controls.Add(this.btnSW4Run); this.groupBox5.Controls.Add(this.btnSW4Run);
this.groupBox5.Controls.Add(this.btnDriveMotor_Run); this.groupBox5.Controls.Add(this.btnDriveMotor_Run);
this.groupBox5.Location = new System.Drawing.Point(984, 165); this.groupBox5.Location = new System.Drawing.Point(984, 145);
this.groupBox5.Name = "groupBox5"; this.groupBox5.Name = "groupBox5";
this.groupBox5.Size = new System.Drawing.Size(343, 484); this.groupBox5.Size = new System.Drawing.Size(343, 449);
this.groupBox5.TabIndex = 246; this.groupBox5.TabIndex = 246;
this.groupBox5.TabStop = false; this.groupBox5.TabStop = false;
this.groupBox5.Text = "IO操作测试"; this.groupBox5.Text = "IO操作测试";
// //
// btnsw2StopDown
//
this.btnsw2StopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnsw2StopDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnsw2StopDown.Location = new System.Drawing.Point(185, 60);
this.btnsw2StopDown.Name = "btnsw2StopDown";
this.btnsw2StopDown.Size = new System.Drawing.Size(140, 34);
this.btnsw2StopDown.TabIndex = 286;
this.btnsw2StopDown.Text = "环形线横移2阻挡下降";
this.btnsw2StopDown.UseVisualStyleBackColor = true;
this.btnsw2StopDown.Click += new System.EventHandler(this.btnsw2StopDown_Click);
//
// btnSw3Location // btnSw3Location
// //
this.btnSw3Location.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSw3Location.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSw3Location.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSw3Location.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSw3Location.Location = new System.Drawing.Point(22, 270); this.btnSw3Location.Location = new System.Drawing.Point(22, 273);
this.btnSw3Location.Name = "btnSw3Location"; this.btnSw3Location.Name = "btnSw3Location";
this.btnSw3Location.Size = new System.Drawing.Size(140, 34); this.btnSw3Location.Size = new System.Drawing.Size(140, 34);
this.btnSw3Location.TabIndex = 285; this.btnSw3Location.TabIndex = 285;
...@@ -336,7 +350,7 @@ ...@@ -336,7 +350,7 @@
// //
this.btnSw3Top.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSw3Top.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSw3Top.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSw3Top.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSw3Top.Location = new System.Drawing.Point(22, 312); this.btnSw3Top.Location = new System.Drawing.Point(22, 311);
this.btnSw3Top.Name = "btnSw3Top"; this.btnSw3Top.Name = "btnSw3Top";
this.btnSw3Top.Size = new System.Drawing.Size(140, 34); this.btnSw3Top.Size = new System.Drawing.Size(140, 34);
this.btnSw3Top.TabIndex = 284; this.btnSw3Top.TabIndex = 284;
...@@ -348,7 +362,7 @@ ...@@ -348,7 +362,7 @@
// //
this.btnSw2Location.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSw2Location.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSw2Location.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSw2Location.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSw2Location.Location = new System.Drawing.Point(185, 176); this.btnSw2Location.Location = new System.Drawing.Point(185, 191);
this.btnSw2Location.Name = "btnSw2Location"; this.btnSw2Location.Name = "btnSw2Location";
this.btnSw2Location.Size = new System.Drawing.Size(140, 34); this.btnSw2Location.Size = new System.Drawing.Size(140, 34);
this.btnSw2Location.TabIndex = 283; this.btnSw2Location.TabIndex = 283;
...@@ -360,7 +374,7 @@ ...@@ -360,7 +374,7 @@
// //
this.btnSw2Top.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSw2Top.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSw2Top.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSw2Top.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSw2Top.Location = new System.Drawing.Point(185, 218); this.btnSw2Top.Location = new System.Drawing.Point(185, 228);
this.btnSw2Top.Name = "btnSw2Top"; this.btnSw2Top.Name = "btnSw2Top";
this.btnSw2Top.Size = new System.Drawing.Size(140, 34); this.btnSw2Top.Size = new System.Drawing.Size(140, 34);
this.btnSw2Top.TabIndex = 282; this.btnSw2Top.TabIndex = 282;
...@@ -372,7 +386,7 @@ ...@@ -372,7 +386,7 @@
// //
this.btnSw1Location.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSw1Location.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSw1Location.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSw1Location.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSw1Location.Location = new System.Drawing.Point(22, 176); this.btnSw1Location.Location = new System.Drawing.Point(22, 191);
this.btnSw1Location.Name = "btnSw1Location"; this.btnSw1Location.Name = "btnSw1Location";
this.btnSw1Location.Size = new System.Drawing.Size(140, 34); this.btnSw1Location.Size = new System.Drawing.Size(140, 34);
this.btnSw1Location.TabIndex = 281; this.btnSw1Location.TabIndex = 281;
...@@ -384,7 +398,7 @@ ...@@ -384,7 +398,7 @@
// //
this.btnSw4Location.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSw4Location.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSw4Location.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSw4Location.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSw4Location.Location = new System.Drawing.Point(185, 270); this.btnSw4Location.Location = new System.Drawing.Point(185, 273);
this.btnSw4Location.Name = "btnSw4Location"; this.btnSw4Location.Name = "btnSw4Location";
this.btnSw4Location.Size = new System.Drawing.Size(140, 34); this.btnSw4Location.Size = new System.Drawing.Size(140, 34);
this.btnSw4Location.TabIndex = 276; this.btnSw4Location.TabIndex = 276;
...@@ -396,7 +410,7 @@ ...@@ -396,7 +410,7 @@
// //
this.btnSw4Top.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSw4Top.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSw4Top.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSw4Top.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSw4Top.Location = new System.Drawing.Point(185, 312); this.btnSw4Top.Location = new System.Drawing.Point(185, 311);
this.btnSw4Top.Name = "btnSw4Top"; this.btnSw4Top.Name = "btnSw4Top";
this.btnSw4Top.Size = new System.Drawing.Size(140, 34); this.btnSw4Top.Size = new System.Drawing.Size(140, 34);
this.btnSw4Top.TabIndex = 269; this.btnSw4Top.TabIndex = 269;
...@@ -408,7 +422,7 @@ ...@@ -408,7 +422,7 @@
// //
this.btnSw1Top.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSw1Top.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSw1Top.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSw1Top.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSw1Top.Location = new System.Drawing.Point(22, 218); this.btnSw1Top.Location = new System.Drawing.Point(22, 228);
this.btnSw1Top.Name = "btnSw1Top"; this.btnSw1Top.Name = "btnSw1Top";
this.btnSw1Top.Size = new System.Drawing.Size(140, 34); this.btnSw1Top.Size = new System.Drawing.Size(140, 34);
this.btnSw1Top.TabIndex = 280; this.btnSw1Top.TabIndex = 280;
...@@ -420,7 +434,7 @@ ...@@ -420,7 +434,7 @@
// //
this.btnSw3Run.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSw3Run.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSw3Run.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSw3Run.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSw3Run.Location = new System.Drawing.Point(22, 124); this.btnSw3Run.Location = new System.Drawing.Point(22, 146);
this.btnSw3Run.Name = "btnSw3Run"; this.btnSw3Run.Name = "btnSw3Run";
this.btnSw3Run.Size = new System.Drawing.Size(140, 34); this.btnSw3Run.Size = new System.Drawing.Size(140, 34);
this.btnSw3Run.TabIndex = 279; this.btnSw3Run.TabIndex = 279;
...@@ -432,7 +446,7 @@ ...@@ -432,7 +446,7 @@
// //
this.btnSw2Run.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSw2Run.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSw2Run.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSw2Run.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSw2Run.Location = new System.Drawing.Point(185, 82); this.btnSw2Run.Location = new System.Drawing.Point(185, 109);
this.btnSw2Run.Name = "btnSw2Run"; this.btnSw2Run.Name = "btnSw2Run";
this.btnSw2Run.Size = new System.Drawing.Size(140, 34); this.btnSw2Run.Size = new System.Drawing.Size(140, 34);
this.btnSw2Run.TabIndex = 278; this.btnSw2Run.TabIndex = 278;
...@@ -444,7 +458,7 @@ ...@@ -444,7 +458,7 @@
// //
this.btnSw1Run.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSw1Run.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSw1Run.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSw1Run.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSw1Run.Location = new System.Drawing.Point(22, 82); this.btnSw1Run.Location = new System.Drawing.Point(22, 109);
this.btnSw1Run.Name = "btnSw1Run"; this.btnSw1Run.Name = "btnSw1Run";
this.btnSw1Run.Size = new System.Drawing.Size(140, 34); this.btnSw1Run.Size = new System.Drawing.Size(140, 34);
this.btnSw1Run.TabIndex = 277; this.btnSw1Run.TabIndex = 277;
...@@ -457,7 +471,7 @@ ...@@ -457,7 +471,7 @@
this.lblTrayNum.AutoSize = true; this.lblTrayNum.AutoSize = true;
this.lblTrayNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblTrayNum.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTrayNum.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblTrayNum.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblTrayNum.Location = new System.Drawing.Point(182, 392); this.lblTrayNum.Location = new System.Drawing.Point(191, 367);
this.lblTrayNum.Name = "lblTrayNum"; this.lblTrayNum.Name = "lblTrayNum";
this.lblTrayNum.Size = new System.Drawing.Size(68, 17); this.lblTrayNum.Size = new System.Drawing.Size(68, 17);
this.lblTrayNum.TabIndex = 275; this.lblTrayNum.TabIndex = 275;
...@@ -470,7 +484,7 @@ ...@@ -470,7 +484,7 @@
this.btnCloseAll.BackColor = System.Drawing.Color.White; this.btnCloseAll.BackColor = System.Drawing.Color.White;
this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnCloseAll.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnCloseAll.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseAll.Location = new System.Drawing.Point(22, 383); this.btnCloseAll.Location = new System.Drawing.Point(22, 358);
this.btnCloseAll.Name = "btnCloseAll"; this.btnCloseAll.Name = "btnCloseAll";
this.btnCloseAll.Size = new System.Drawing.Size(140, 34); this.btnCloseAll.Size = new System.Drawing.Size(140, 34);
this.btnCloseAll.TabIndex = 274; this.btnCloseAll.TabIndex = 274;
...@@ -482,7 +496,7 @@ ...@@ -482,7 +496,7 @@
// //
this.btnNGCylinder.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnNGCylinder.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNGCylinder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnNGCylinder.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNGCylinder.Location = new System.Drawing.Point(185, 31); this.btnNGCylinder.Location = new System.Drawing.Point(185, 20);
this.btnNGCylinder.Name = "btnNGCylinder"; this.btnNGCylinder.Name = "btnNGCylinder";
this.btnNGCylinder.Size = new System.Drawing.Size(140, 34); this.btnNGCylinder.Size = new System.Drawing.Size(140, 34);
this.btnNGCylinder.TabIndex = 268; this.btnNGCylinder.TabIndex = 268;
...@@ -494,7 +508,7 @@ ...@@ -494,7 +508,7 @@
// //
this.btnSW4Run.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnSW4Run.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSW4Run.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSW4Run.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSW4Run.Location = new System.Drawing.Point(185, 124); this.btnSW4Run.Location = new System.Drawing.Point(185, 146);
this.btnSW4Run.Name = "btnSW4Run"; this.btnSW4Run.Name = "btnSW4Run";
this.btnSW4Run.Size = new System.Drawing.Size(140, 34); this.btnSW4Run.Size = new System.Drawing.Size(140, 34);
this.btnSW4Run.TabIndex = 262; this.btnSW4Run.TabIndex = 262;
...@@ -506,7 +520,7 @@ ...@@ -506,7 +520,7 @@
// //
this.btnDriveMotor_Run.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnDriveMotor_Run.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDriveMotor_Run.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnDriveMotor_Run.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDriveMotor_Run.Location = new System.Drawing.Point(22, 31); this.btnDriveMotor_Run.Location = new System.Drawing.Point(22, 20);
this.btnDriveMotor_Run.Name = "btnDriveMotor_Run"; this.btnDriveMotor_Run.Name = "btnDriveMotor_Run";
this.btnDriveMotor_Run.Size = new System.Drawing.Size(140, 34); this.btnDriveMotor_Run.Size = new System.Drawing.Size(140, 34);
this.btnDriveMotor_Run.TabIndex = 260; this.btnDriveMotor_Run.TabIndex = 260;
...@@ -526,7 +540,7 @@ ...@@ -526,7 +540,7 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1342, 657); this.panel1.Size = new System.Drawing.Size(1342, 606);
this.panel1.TabIndex = 248; this.panel1.TabIndex = 248;
// //
// groupBox6 // groupBox6
...@@ -536,7 +550,7 @@ ...@@ -536,7 +550,7 @@
this.groupBox6.Controls.Add(this.tableLayoutPanel4); this.groupBox6.Controls.Add(this.tableLayoutPanel4);
this.groupBox6.Location = new System.Drawing.Point(735, 5); this.groupBox6.Location = new System.Drawing.Point(735, 5);
this.groupBox6.Name = "groupBox6"; this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(240, 644); this.groupBox6.Size = new System.Drawing.Size(240, 589);
this.groupBox6.TabIndex = 105; this.groupBox6.TabIndex = 105;
this.groupBox6.TabStop = false; this.groupBox6.TabStop = false;
this.groupBox6.Text = "DO列表"; this.groupBox6.Text = "DO列表";
...@@ -554,14 +568,14 @@ ...@@ -554,14 +568,14 @@
this.tableLayoutPanel4.RowCount = 2; this.tableLayoutPanel4.RowCount = 2;
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F)); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F)); this.tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 17F));
this.tableLayoutPanel4.Size = new System.Drawing.Size(229, 624); this.tableLayoutPanel4.Size = new System.Drawing.Size(229, 569);
this.tableLayoutPanel4.TabIndex = 103; this.tableLayoutPanel4.TabIndex = 103;
// //
// 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(1342, 657); this.ClientSize = new System.Drawing.Size(1342, 606);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false; this.MaximizeBox = false;
...@@ -624,6 +638,7 @@ ...@@ -624,6 +638,7 @@
private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button1;
private System.Windows.Forms.GroupBox groupBox6; private System.Windows.Forms.GroupBox groupBox6;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel4;
private System.Windows.Forms.Button btnsw2StopDown;
} }
} }
...@@ -343,6 +343,10 @@ namespace OnlineStore.AssemblyLine ...@@ -343,6 +343,10 @@ namespace OnlineStore.AssemblyLine
BtnMove(btnSw4Top, "环形线横移4顶升上升", "环形线横移4顶升下降", IO_Type.SW4_TopCylinder_Down, IO_Type.SW4_TopCylinder_Up); BtnMove(btnSw4Top, "环形线横移4顶升上升", "环形线横移4顶升下降", IO_Type.SW4_TopCylinder_Down, IO_Type.SW4_TopCylinder_Up);
} }
private void btnsw2StopDown_Click(object sender, EventArgs e)
{
BtnMove(btnSw4Top, "环形线横移2阻挡下降", "环形线横移2阻挡上升", IO_Type.SW2_StopDown);
}
} }
} }
...@@ -75,6 +75,8 @@ ...@@ -75,6 +75,8 @@
this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.iO模块状态ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator9 = new System.Windows.Forms.ToolStripSeparator();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabPage1.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
...@@ -418,7 +420,9 @@ ...@@ -418,7 +420,9 @@
this.toolStripSeparator6, this.toolStripSeparator6,
this.二维码学习ToolStripMenuItem, this.二维码学习ToolStripMenuItem,
this.toolStripSeparator7, this.toolStripSeparator7,
this.托盘初始化ToolStripMenuItem}); this.托盘初始化ToolStripMenuItem,
this.toolStripSeparator9,
this.iO模块状态ToolStripMenuItem});
this.设置TToolStripMenuItem.Name = "设置TToolStripMenuItem"; this.设置TToolStripMenuItem.Name = "设置TToolStripMenuItem";
this.设置TToolStripMenuItem.Size = new System.Drawing.Size(91, 25); this.设置TToolStripMenuItem.Size = new System.Drawing.Size(91, 25);
this.设置TToolStripMenuItem.Text = "设备调试 "; this.设置TToolStripMenuItem.Text = "设备调试 ";
...@@ -426,7 +430,7 @@ ...@@ -426,7 +430,7 @@
// 扫码测试ToolStripMenuItem // 扫码测试ToolStripMenuItem
// //
this.扫码测试ToolStripMenuItem.Name = "扫码测试ToolStripMenuItem"; this.扫码测试ToolStripMenuItem.Name = "扫码测试ToolStripMenuItem";
this.扫码测试ToolStripMenuItem.Size = new System.Drawing.Size(160, 26); this.扫码测试ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.扫码测试ToolStripMenuItem.Text = "扫码测试"; this.扫码测试ToolStripMenuItem.Text = "扫码测试";
this.扫码测试ToolStripMenuItem.Visible = false; this.扫码测试ToolStripMenuItem.Visible = false;
this.扫码测试ToolStripMenuItem.Click += new System.EventHandler(this.扫码测试ToolStripMenuItem_Click); this.扫码测试ToolStripMenuItem.Click += new System.EventHandler(this.扫码测试ToolStripMenuItem_Click);
...@@ -434,25 +438,25 @@ ...@@ -434,25 +438,25 @@
// toolStripSeparator6 // toolStripSeparator6
// //
this.toolStripSeparator6.Name = "toolStripSeparator6"; this.toolStripSeparator6.Name = "toolStripSeparator6";
this.toolStripSeparator6.Size = new System.Drawing.Size(157, 6); this.toolStripSeparator6.Size = new System.Drawing.Size(177, 6);
this.toolStripSeparator6.Visible = false; this.toolStripSeparator6.Visible = false;
// //
// 二维码学习ToolStripMenuItem // 二维码学习ToolStripMenuItem
// //
this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem"; this.二维码学习ToolStripMenuItem.Name = "二维码学习ToolStripMenuItem";
this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(160, 26); this.二维码学习ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.二维码学习ToolStripMenuItem.Text = "二维码学习"; this.二维码学习ToolStripMenuItem.Text = "二维码学习";
this.二维码学习ToolStripMenuItem.Click += new System.EventHandler(this.二维码学习ToolStripMenuItem_Click); this.二维码学习ToolStripMenuItem.Click += new System.EventHandler(this.二维码学习ToolStripMenuItem_Click);
// //
// toolStripSeparator7 // toolStripSeparator7
// //
this.toolStripSeparator7.Name = "toolStripSeparator7"; this.toolStripSeparator7.Name = "toolStripSeparator7";
this.toolStripSeparator7.Size = new System.Drawing.Size(157, 6); this.toolStripSeparator7.Size = new System.Drawing.Size(177, 6);
// //
// 托盘初始化ToolStripMenuItem // 托盘初始化ToolStripMenuItem
// //
this.托盘初始化ToolStripMenuItem.Name = "托盘初始化ToolStripMenuItem"; this.托盘初始化ToolStripMenuItem.Name = "托盘初始化ToolStripMenuItem";
this.托盘初始化ToolStripMenuItem.Size = new System.Drawing.Size(160, 26); this.托盘初始化ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.托盘初始化ToolStripMenuItem.Text = "托盘编码"; this.托盘初始化ToolStripMenuItem.Text = "托盘编码";
this.托盘初始化ToolStripMenuItem.Click += new System.EventHandler(this.托盘初始化ToolStripMenuItem_Click); this.托盘初始化ToolStripMenuItem.Click += new System.EventHandler(this.托盘初始化ToolStripMenuItem_Click);
// //
...@@ -513,6 +517,18 @@ ...@@ -513,6 +517,18 @@
this.timer1.Interval = 1000; this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick); this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
// //
// iO模块状态ToolStripMenuItem
//
this.iO模块状态ToolStripMenuItem.Name = "iO模块状态ToolStripMenuItem";
this.iO模块状态ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.iO模块状态ToolStripMenuItem.Text = "IO模块状态";
this.iO模块状态ToolStripMenuItem.Click += new System.EventHandler(this.iO模块状态ToolStripMenuItem_Click);
//
// toolStripSeparator9
//
this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(177, 6);
//
// FrmLineStore // FrmLineStore
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
...@@ -594,6 +610,8 @@ ...@@ -594,6 +610,8 @@
private System.Windows.Forms.ToolStripMenuItem 托盘初始化ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 托盘初始化ToolStripMenuItem;
private System.Windows.Forms.Button btnUpdateStatus; private System.Windows.Forms.Button btnUpdateStatus;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator8; private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator9;
private System.Windows.Forms.ToolStripMenuItem iO模块状态ToolStripMenuItem;
} }
} }
...@@ -710,5 +710,11 @@ namespace OnlineStore.AssemblyLine ...@@ -710,5 +710,11 @@ namespace OnlineStore.AssemblyLine
FrmRFIPEdit FRM = new FrmRFIPEdit(); FrmRFIPEdit FRM = new FrmRFIPEdit();
FRM.ShowDialog(); FRM.ShowDialog();
} }
private void iO模块状态ToolStripMenuItem_Click(object sender, EventArgs e)
{
FrmIOMsg frm = new FrmIOMsg();
frm.ShowDialog();
}
} }
} }
...@@ -45,8 +45,11 @@ D2(上料模块出口) ...@@ -45,8 +45,11 @@ D2(上料模块出口)
X403 环形线横移2阻挡检测
环形线横移四没有上升
......
...@@ -102,3 +102,6 @@ DO,0,SL3出料线体运转,SL_OutLine_Run,12,PRO_AOI_IP_16,0,SL3出料线体运转,Y213,Y213 ...@@ -102,3 +102,6 @@ DO,0,SL3出料线体运转,SL_OutLine_Run,12,PRO_AOI_IP_16,0,SL3出料线体运转,Y213,Y213
,,,,13,PRO_AOI_IP_16,0,,Y214,Y214 ,,,,13,PRO_AOI_IP_16,0,,Y214,Y214
,,,,14,PRO_AOI_IP_16,0,,Y215,Y215 ,,,,14,PRO_AOI_IP_16,0,,Y215,Y215
,,,,15,PRO_AOI_IP_16,0,,Y216,Y216 ,,,,15,PRO_AOI_IP_16,0,,Y216,Y216
DI,1000,环形线横移2阻挡检测,SW2_StopCheck,2,PRO_AOI_IP_28,0,环形线横移2阻挡检测,X403,X403
DO,1000,环形线横移2阻挡下降SOL,SW2_StopDown,4,PRO_AOI_IP_28,0,环形线横移2阻挡下降SOL,Y405,Y405
\ No newline at end of file \ No newline at end of file
...@@ -80,8 +80,8 @@ DO,1,进仓1升降上升SOL,UpDownCylinder_Up,12,PRO_AOI_IP_36,,进仓1升降上升SOL,Y563, ...@@ -80,8 +80,8 @@ DO,1,进仓1升降上升SOL,UpDownCylinder_Up,12,PRO_AOI_IP_36,,进仓1升降上升SOL,Y563,
DO,1,进仓1升降下降SOL,UpDownCylinder_Down,13,PRO_AOI_IP_36,,进仓1升降下降SOL,Y564,Y564 DO,1,进仓1升降下降SOL,UpDownCylinder_Down,13,PRO_AOI_IP_36,,进仓1升降下降SOL,Y564,Y564
,,,,14,PRO_AOI_IP_36,,,Y565,Y565 ,,,,14,PRO_AOI_IP_36,,,Y565,Y565
,,,,,,,,, ,,,,,,,,,
DI,1000,环形线横移4托盘检测,SW4_SideWay_TrayCheck,5,PRO_AOI_IP_36,0,环形线横移4托盘检测,X556,X556 DI,1000,环形线横移4托盘检测,SW4_TrayCheck,5,PRO_AOI_IP_36,0,环形线横移4托盘检测,X556,X556
DI,1000,环形线横移4料盘检测1,SW4_SideWay_ReelCheck,6,PRO_AOI_IP_36,0,环形线横移4料盘检测1,X557,X557 DI,1000,环形线横移4料盘检测1,SW4_ReelCheck,6,PRO_AOI_IP_36,0,环形线横移4料盘检测1,X557,X557
DI,1000,环形线横移4顶升上升端,SW4_TopCylinder_Up,7,PRO_AOI_IP_36,0,环形线横移4顶升上升端,X558,X558 DI,1000,环形线横移4顶升上升端,SW4_TopCylinder_Up,7,PRO_AOI_IP_36,0,环形线横移4顶升上升端,X558,X558
DI,1000,环形线横移4顶升下降端,SW4_TopCylinder_Down,8,PRO_AOI_IP_36,0,环形线横移4顶升下降端,X559,X559 DI,1000,环形线横移4顶升下降端,SW4_TopCylinder_Down,8,PRO_AOI_IP_36,0,环形线横移4顶升下降端,X559,X559
,,,,,,,,, ,,,,,,,,,
......
...@@ -220,7 +220,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -220,7 +220,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
} }
/// <summary> /// <summary>
/// 下降所有阻挡气缸 /// 下降所有阻挡气缸
/// </summary> /// </summary>
...@@ -228,31 +228,55 @@ namespace OnlineStore.DeviceLibrary ...@@ -228,31 +228,55 @@ namespace OnlineStore.DeviceLibrary
{ {
if (baseConfig.DType.Equals(DeviceType.MoveEquip) || baseConfig.DType.Equals(DeviceType.ProvidingEquip)) if (baseConfig.DType.Equals(DeviceType.MoveEquip) || baseConfig.DType.Equals(DeviceType.ProvidingEquip))
{ {
LogInfo("下降阻挡气缸,上下气缸上升,顶升气缸下降"); LogInfo("OpenStopCylinder: 下降阻挡气缸,上下气缸上升,顶升气缸下降");
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH); IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH);
IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.HIGH); IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.HIGH);
//上下气缸上升 //上下气缸上升
if (UseAxis.Equals(false)) if (!UseAxis)
{ {
CylinderMove(null, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Down); CylinderMove(null, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
} }
//顶升气缸下降 //顶升气缸下降
CylinderMove(null, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(null, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down);
Thread.Sleep(30);
}
else if (baseConfig.DType.Equals(DeviceType.FeedingEquip))
{
FeedingEquip equip = (FeedingEquip)this;
if (equip.Config.SidesWayNum <= 0)
{
CylinderMove(null, IO_Type.FL_TopCylinder_Up, IO_Type.FL_TopCylinder_Down);
}
} }
} }
internal virtual void CloseCylinderStop() internal virtual void CloseCylinderStop()
{ {
if (baseConfig.DType.Equals(DeviceType.MoveEquip) || baseConfig.DType.Equals(DeviceType.ProvidingEquip)) if (baseConfig.DType.Equals(DeviceType.MoveEquip) || baseConfig.DType.Equals(DeviceType.ProvidingEquip))
{ {
LogInfo("上升阻挡气缸,关闭上下气缸,顶升气缸IO"); LogInfo("CloseCylinderStop: 上升阻挡气缸,关闭上下气缸,顶升气缸IO");
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW); IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.LOW); IOMove(IO_Type.StopCylinder_Down2, IO_VALUE.LOW);
//上下气缸上升 //上下气缸上升
IOMove(IO_Type.UpDownCylinder_Down, IO_VALUE.LOW); if (!UseAxis)
IOMove(IO_Type.UpDownCylinder_Up, IO_VALUE.LOW); {
IOMove(IO_Type.UpDownCylinder_Down, IO_VALUE.LOW);
IOMove(IO_Type.UpDownCylinder_Up, IO_VALUE.LOW);
}
//顶升气缸下降 //顶升气缸下降
IOMove(IO_Type.TopCylinder_UP, IO_VALUE.LOW); IOMove(IO_Type.TopCylinder_UP, IO_VALUE.LOW);
IOMove(IO_Type.TopCylinder_Down, IO_VALUE.LOW); IOMove(IO_Type.TopCylinder_Down, IO_VALUE.LOW);
Thread.Sleep(30);
}
else if (baseConfig.DType.Equals(DeviceType.FeedingEquip))
{
FeedingEquip equip = (FeedingEquip)this;
if (equip.Config.SidesWayNum <= 0)
{
IOMove(IO_Type.FL_TopCylinder_Up, IO_VALUE.LOW);
IOMove(IO_Type.FL_TopCylinder_Down, IO_VALUE.LOW);
}
} }
} }
......
...@@ -46,8 +46,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -46,8 +46,9 @@ namespace OnlineStore.DeviceLibrary
public Line_Config Config { get; set; } public Line_Config Config { get; set; }
#region 初始化 #region 初始化
public List<string> cioList = new List<string>( );
private bool canStart = false; private bool canStart = false;
public LineBean(Line_Config lineConfig, Dictionary<int, MoveEquip_Config> configList, Dictionary<int, FeedingEquip_Config> feedMap, public LineBean(Line_Config lineConfig, Dictionary<int, MoveEquip_Config> configList, Dictionary<int, FeedingEquip_Config> feedMap,
Dictionary<int, ProvidingEquip_Config> providMap, Dictionary<int, DischargeLine_Config> disLineMap) Dictionary<int, ProvidingEquip_Config> providMap, Dictionary<int, DischargeLine_Config> disLineMap)
{ {
...@@ -116,7 +117,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -116,7 +117,7 @@ namespace OnlineStore.DeviceLibrary
//初始化摄像机配置 //初始化摄像机配置
CodeManager.LoadConfig(); CodeManager.LoadConfig();
List<string> cioList = new List<string>(ioList); cioList = new List<string>(ioList);
string ids = ConfigAppSettings.GetValue(Setting_Init.DebugDeviceId); string ids = ConfigAppSettings.GetValue(Setting_Init.DebugDeviceId);
if (IsDebug) if (IsDebug)
{ {
...@@ -257,9 +258,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -257,9 +258,14 @@ namespace OnlineStore.DeviceLibrary
SetWarnMsg(result); SetWarnMsg(result);
return false; return false;
} }
else if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW))
{
SetWarnMsg("启动失败:急停未开");
return false;
}
else else
{ {
LogUtil.info( Name + "开始启动,启动时间:" + StartTime.ToString()); LogUtil.info(Name + "开始启动,启动时间:" + StartTime.ToString());
//连接AGV调度 //连接AGV调度
if (!AgvClient.ISConnected()) if (!AgvClient.ISConnected())
...@@ -277,7 +283,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -277,7 +283,7 @@ namespace OnlineStore.DeviceLibrary
{ {
EquipStartRun(moveEquip); EquipStartRun(moveEquip);
} }
ledProcessTimer.Enabled = true; ledProcessTimer.Enabled = true;
IoCheckTimer.Enabled = true; IoCheckTimer.Enabled = true;
mainTimer.Enabled = true; mainTimer.Enabled = true;
...@@ -327,6 +333,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -327,6 +333,8 @@ namespace OnlineStore.DeviceLibrary
//横移轨道下降 //横移轨道下降
SideWayStop(); SideWayStop();
IOMove(IO_Type.SW2_StopDown, IO_VALUE.LOW);
//定位下降 //定位下降
CylinderMove(MoveInfo, IO_Type.SW1_LocationCylinder_Up, IO_Type.SW1_LocationCylinder_Down); CylinderMove(MoveInfo, IO_Type.SW1_LocationCylinder_Up, IO_Type.SW1_LocationCylinder_Down);
CylinderMove(MoveInfo, IO_Type.SW4_LocationCylinder_Up, IO_Type.SW4_LocationCylinder_Down); CylinderMove(MoveInfo, IO_Type.SW4_LocationCylinder_Up, IO_Type.SW4_LocationCylinder_Down);
...@@ -895,10 +903,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -895,10 +903,7 @@ namespace OnlineStore.DeviceLibrary
} }
} }
} }
//if (!ResetSingleISOk())
//{
// isOk = false;
//}
if (isOk) if (isOk)
{ {
PreIsHasProcess = false; PreIsHasProcess = false;
...@@ -911,23 +916,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -911,23 +916,6 @@ namespace OnlineStore.DeviceLibrary
} }
} }
} }
//private bool ResetSingleISOk()
//{
// //气缸需要到位
// if (IOValue(IO_Type.SW4_TopCylinder_Down).Equals(IO_VALUE.HIGH) &&
// IOValue(IO_Type.NGCylinder_After).Equals(IO_VALUE.HIGH) &&
// IOValue(IO_Type.SW4_TopCylinder_Up).Equals(IO_VALUE.LOW) &&
// IOValue(IO_Type.NGCylinder_Before).Equals(IO_VALUE.LOW)
// )
// {
// return true;
// }
// else
// {
// return false;
// }
//}
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -489,6 +489,30 @@ namespace OnlineStore.DeviceLibrary ...@@ -489,6 +489,30 @@ namespace OnlineStore.DeviceLibrary
SideWay23Ntime = DateTime.Now; SideWay23Ntime = DateTime.Now;
} }
} }
else if (IOValue(IO_Type.SW2_StopCheck).Equals(IO_VALUE.HIGH) &&
IOValue(IO_Type.SW2_TrayCheck).Equals(IO_VALUE.LOW) &&
IOValue(IO_Type.SW3_TrayCheck).Equals(IO_VALUE.LOW) &&
TrayManager.CanMoveSidesWay(2) && TrayManager.CanMoveSidesWay(3))
{
TimeSpan span34 = DateTime.Now - SideWay23Ntime;
if (SideWay23IsWait && span34.TotalSeconds > 1)
{
// TrayManager.UpdateSWState(2, 2);
//TrayManager.UpdateSWState(3, 2);
SW23_MoveInfo.NewMove(LineMoveType.InStore);
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW01_SW2_StopDown);
SWLog("横移轨道23:检测到SW2_StopCheck, 等待1000,定位气缸下降 ");
IOMove(IO_Type.SW2_StopDown, IO_VALUE.HIGH);
// SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH));
CylinderMove(SW23_MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down);
CylinderMove(SW23_MoveInfo, IO_Type.SW2_LocationCylinder_Up, IO_Type.SW3_LocationCylinder_Down);
}
else if (!SideWay23IsWait)
{
SideWay23IsWait = true;
SideWay23Ntime = DateTime.Now;
}
}
else else
{ {
SideWay23IsWait = false; SideWay23IsWait = false;
...@@ -518,7 +542,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -518,7 +542,7 @@ namespace OnlineStore.DeviceLibrary
{ {
return; return;
} }
if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW01_LocationCylinderDown)) if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW01_SW2_StopDown))
{ {
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitFixtureCheck); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitFixtureCheck);
SWLog("横移轨道41: 等待横移4托盘检测信号 "); SWLog("横移轨道41: 等待横移4托盘检测信号 ");
...@@ -529,8 +553,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -529,8 +553,8 @@ namespace OnlineStore.DeviceLibrary
SW41_MoveInfo.NextMoveStep(LineMoveStep.SW03_TopCylinderUp); SW41_MoveInfo.NextMoveStep(LineMoveStep.SW03_TopCylinderUp);
SWLog("横移轨道41:顶升气缸上升 ,至少等待1000 "); SWLog("横移轨道41:顶升气缸上升 ,至少等待1000 ");
SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
CylinderMove(SW23_MoveInfo, IO_Type.SW4_TopCylinder_Down, IO_Type.SW4_TopCylinder_Up); CylinderMove(SW41_MoveInfo, IO_Type.SW4_TopCylinder_Down, IO_Type.SW4_TopCylinder_Up);
CylinderMove(SW23_MoveInfo, IO_Type.SW1_TopCylinder_Down, IO_Type.SW1_TopCylinder_Up); CylinderMove(SW41_MoveInfo, IO_Type.SW1_TopCylinder_Down, IO_Type.SW1_TopCylinder_Up);
} }
else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW03_TopCylinderUp)) else if (SW41_MoveInfo.MoveStep.Equals(LineMoveStep.SW03_TopCylinderUp))
...@@ -629,10 +653,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -629,10 +653,11 @@ namespace OnlineStore.DeviceLibrary
{ {
return; return;
} }
if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW01_LocationCylinderDown)) if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW01_SW2_StopDown))
{ {
SW23_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitFixtureCheck); SW23_MoveInfo.NextMoveStep(LineMoveStep.SW02_WaitFixtureCheck);
SWLog("横移轨道23: 等待横移4托盘检测信号 "); SWLog("横移轨道23:SW2阻挡上升 等待横移3托盘检测信号 ");
IOMove(IO_Type.SW2_StopDown, IO_VALUE.LOW);
SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH)); SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW2_TrayCheck, IO_VALUE.HIGH));
} }
else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW02_WaitFixtureCheck)) else if (SW23_MoveInfo.MoveStep.Equals(LineMoveStep.SW02_WaitFixtureCheck))
......
...@@ -145,7 +145,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -145,7 +145,7 @@ namespace OnlineStore.DeviceLibrary
aioBox.DO_Changed_Event += AioBox_DO_Changed_Event; aioBox.DO_Changed_Event += AioBox_DO_Changed_Event;
// aioBox.Log_Out_Event += AioBox_Log_Out_Event; // aioBox.Log_Out_Event += AioBox_Log_Out_Event;
//aioBox.Log_RxTx_Event += AioBox_Log_RxTx_Event; //aioBox.Log_RxTx_Event += AioBox_Log_RxTx_Event;
AIOMap.Add(ioIp, aioBox);
LogUtil.debug("开始连接" + logName + ",尝试重连3次"); LogUtil.debug("开始连接" + logName + ",尝试重连3次");
for (int i = 1; i <= conCount; i++) for (int i = 1; i <= conCount; i++)
...@@ -158,10 +158,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -158,10 +158,10 @@ namespace OnlineStore.DeviceLibrary
{ {
IoIPLIst.Remove(ioIp); IoIPLIst.Remove(ioIp);
} }
AIOMap.Add(ioIp, aioBox);
Thread.Sleep(10); Thread.Sleep(10);
//读取所有的DO //读取所有的DO
ReadAllDI(ioIp, 0); ReadAllDI(ioIp, 0);
break; break;
} }
else else
...@@ -552,5 +552,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -552,5 +552,13 @@ namespace OnlineStore.DeviceLibrary
} }
return aioBox; return aioBox;
} }
public override bool IsConnect(string ip)
{
if (AIOMap.ContainsKey(ip))
{
return true;
}return false;
}
} }
} }
...@@ -24,7 +24,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -24,7 +24,7 @@ namespace OnlineStore.DeviceLibrary
{ {
instance.WriteSingleDO(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr(), ioValue); instance.WriteSingleDO(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr(), ioValue);
Thread.Sleep(10); Thread.Sleep(30);
} }
else else
{ {
...@@ -177,5 +177,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -177,5 +177,7 @@ namespace OnlineStore.DeviceLibrary
public abstract void CloseAllConnection(); public abstract void CloseAllConnection();
public abstract bool IsConnect(string ip);
} }
} }
...@@ -98,34 +98,34 @@ namespace OnlineStore.DeviceLibrary ...@@ -98,34 +98,34 @@ namespace OnlineStore.DeviceLibrary
{ {
ReadMultipleDO(ioIp, (byte)slaveId, (ushort)DoStartAddress, 16); ReadMultipleDO(ioIp, (byte)slaveId, (ushort)DoStartAddress, 16);
} }
/// <summary> ///// <summary>
/// 判断Io模块是否连接 ///// 判断Io模块是否连接
/// </summary> ///// </summary>
public static bool IsConnection(string ip) //public static bool IsConnection(string ip)
{ //{
try // try
{ // {
List<string> list = new List<string>(mastMap.Keys); // List<string> list = new List<string>(mastMap.Keys);
foreach (string io in list) // foreach (string io in list)
{ // {
if (io.Equals(ip)) // if (io.Equals(ip))
{ // {
//判断是否连接,如果没有连接自动重连 // //判断是否连接,如果没有连接自动重连
MasterTcpClient clinet = mastMap[io]; // MasterTcpClient clinet = mastMap[io];
if (clinet.ISConnection()) // if (clinet.ISConnection())
{ // {
return true; // return true;
} // }
} // }
} // }
} // }
catch (Exception ex) // catch (Exception ex)
{ // {
LogUtil.error(LOGGER, "出错啦:" + ex.ToString()); // LogUtil.error(LOGGER, "出错啦:" + ex.ToString());
} // }
return false; // return false;
} //}
private static void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) private static void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{ {
try try
...@@ -583,6 +583,32 @@ namespace OnlineStore.DeviceLibrary ...@@ -583,6 +583,32 @@ namespace OnlineStore.DeviceLibrary
LOGGER.Error("接收数据出错:" + exc); LOGGER.Error("接收数据出错:" + exc);
//MessageBox.Show(exc, "Modbus slave exception"); //MessageBox.Show(exc, "Modbus slave exception");
} }
public override bool IsConnect(string ip)
{
try
{
List<string> list = new List<string>(mastMap.Keys);
foreach (string io in list)
{
if (io.Equals(ip))
{
//判断是否连接,如果没有连接自动重连
MasterTcpClient clinet = mastMap[io];
if (clinet.ISConnection())
{
return true;
}
}
}
}
catch (Exception ex)
{
LogUtil.error(LOGGER, "出错啦:" + ex.ToString());
}
return false;
}
} }
public class KNDIO public class KNDIO
......
...@@ -429,7 +429,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -429,7 +429,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 定位气缸下降 /// 定位气缸下降
/// </summary> /// </summary>
SW01_LocationCylinderDown=5001, SW01_SW2_StopDown=5001,
/// <summary> /// <summary>
/// 等待轨道1夹具检测信号 /// 等待轨道1夹具检测信号
......
...@@ -155,78 +155,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -155,78 +155,7 @@ namespace OnlineStore.LoadCSVLibrary
/// DO 0 阻挡气缸0-2下降SOL StopCylinder_Down2 17 阻挡气缸0-2下降SOL Y12 DO-12 /// DO 0 阻挡气缸0-2下降SOL StopCylinder_Down2 17 阻挡气缸0-2下降SOL Y12 DO-12
/// </summary> /// </summary>
public static string StopCylinder_Down2 = "StopCylinder_Down2"; public static string StopCylinder_Down2 = "StopCylinder_Down2";
///// <summary>
///// DO 0 横移轨道1阻挡下降SOL SidesWay1_StopCylinderDown DO-13
///// </summary>
//public static string SidesWay1_StopCylinderDown = "SidesWay1_StopCylinderDown";
///// <summary>
///// DO 0 上料工位顶升气缸上升SOL InStore_TopCylinder_Up DO-16
///// </summary>
//public static string InStore_TopCylinder_Up = "InStore_TopCylinder_Up";
///// <summary>
///// DO 0 上料工位顶升气缸下降SOL InStore_TopCylinder_Down DO-17
///// </summary>
//public static string InStore_TopCylinder_Down = "InStore_TopCylinder_Down";
///// <summary>
///// DO 0 横移轨道3阻挡下降SOL SidesWay3_StopCylinderDown DO-33
///// </summary>
//public static string SidesWay3_StopCylinderDown = "SidesWay3_StopCylinderDown";
///// <summary>
///// DO 0 横移轨道3.4顶升气缸上升SOL SidesWay34_TopCylinder_Up DO-44
///// </summary>
//public static string SidesWay34_TopCylinder_Up = "SidesWay34_TopCylinder_Up";
///// <summary>
///// DO 0 横移轨道3.4顶升气缸下降SOL SidesWay34_TopCylinder_Down DO-45
///// </summary>
//public static string SidesWay34_TopCylinder_Down = "SidesWay34_TopCylinder_Down";
///// <summary>
///// DI 0 横移轨道3阻挡夹具检测 SidesWay3_StopFixtureCheck DI-84
///// </summary>
//public static string SidesWay3_StopFixtureCheck = "SidesWay3_StopFixtureCheck";
///// <summary>
///// DI 0 横移轨道3夹具检测 SidesWay3_FixtureCheck DI-85
///// </summary>
//public static string SidesWay3_FixtureCheck = "SidesWay3_FixtureCheck";
///// <summary>
///// DI 0 横移轨道3顶升气缸上升端 SidesWay3_TopCylinder_Up DI-86
///// </summary>
//public static string SidesWay3_TopCylinder_Up = "SidesWay3_TopCylinder_Up";
///// <summary>
///// DI 0 横移轨道3顶升气缸下降端 SidesWay3_TopCylinder_Down DI-87
///// </summary>
//public static string SidesWay3_TopCylinder_Down = "SidesWay3_TopCylinder_Down";
///// <summary>
///// DI 0 横移轨道4夹具检测 SidesWay4_FixtureCheck DI-88
///// </summary>
//public static string SidesWay4_FixtureCheck = "SidesWay4_FixtureCheck";
///// <summary>
///// DI 0 横移轨道4顶升气缸上升端 SidesWay4_TopCylinder_Up DI-89
///// </summary>
//public static string SidesWay4_TopCylinder_Up = "SidesWay4_TopCylinder_Up";
///// <summary>
///// DI 0 横移轨道4顶升气缸下降端 SidesWay4_TopCylinder_Down DI-90
///// </summary>
//public static string SidesWay4_TopCylinder_Down = "SidesWay4_TopCylinder_Down";
///// <summary>
///// DI 0 出料工位夹具检测 OutStore_FixtureCheck DI-102
///// </summary>
//public static string OutStore_FixtureCheck = "OutStore_FixtureCheck";
///// <summary>
///// DI 0 出料工位料盘检测 OutStore_TrayCheck DI-103
///// </summary>
//public static string OutStore_TrayCheck = "OutStore_TrayCheck";
///// <summary>
///// DO 0 横移轨道1.2顶升气缸上升SOL SidesWay12_TopCylinder_Up DO-67
///// </summary>
//public static string SidesWay12_TopCylinder_Up = "SidesWay12_TopCylinder_Up";
///// <summary>
///// DO 0 横移轨道1.2顶升气缸下降SOL SidesWay12_TopCylinder_Down DO-68
///// </summary>
//public static string SidesWay12_TopCylinder_Down = "SidesWay12_TopCylinder_Down";
/// <summary> /// <summary>
...@@ -774,6 +703,27 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -774,6 +703,27 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
public static string SW4_MotorRun = "SW4_MotorRun"; public static string SW4_MotorRun = "SW4_MotorRun";
/// <summary>
/// DI,0,环形线横移2阻挡检测,SW2_StopCheck,2,PRO_AOI_IP_28,0,环形线横移2阻挡检测,X403,X403
/// </summary>
public static string SW2_StopCheck = "SW2_StopCheck";
/// <summary>
/// DO,0, 环形线横移2阻挡下降SOL, SW2_StopDown,4, PRO_AOI_IP_28,0, 环形线横移2阻挡下降SOL, Y405, Y405
/// </summary>
public static string SW2_StopDown = "SW2_StopDown";
/// <summary>
/// DI,0,环形线横移2阻挡检测,SW2_StopCheck,2,PRO_AOI_IP_28,0,环形线横移2阻挡检测,X403,X403
/// </summary>
public static string SW_StopCheck = "SW_StopCheck";
/// <summary>
/// DO,0, 环形线横移2阻挡下降SOL, SW2_StopDown,4, PRO_AOI_IP_28,0, 环形线横移2阻挡下降SOL, Y405, Y405
/// </summary>
public static string SW_StopDown = "SW_StopDown";
#endregion #endregion
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!