Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit e77d9cb0
由
LN
编写于
2019-12-04 11:58:32 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
环形线横移修改
1 个父辈
bf67a9ce
全部展开
显示空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
443 行增加
和
144 行删除
source/AssemblyLineClient/AssemblyLineClient.csproj
source/AssemblyLineClient/FrmIOMsg.Designer.cs
source/AssemblyLineClient/FrmIOMsg.cs
source/AssemblyLineClient/FrmIOMsg.resx
source/AssemblyLineClient/FrmIOStatus.Designer.cs
source/AssemblyLineClient/FrmIOStatus.cs
source/AssemblyLineClient/FrmLineStore.Designer.cs
source/AssemblyLineClient/FrmLineStore.cs
source/AssemblyLineClient/记录.txt
source/DeviceLibrary/LineConfig/Config_FeedingEquip_3.csv
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_17.csv
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/deviceLibrary/IO/AIOBOX/AIOBOXManager.cs
source/DeviceLibrary/deviceLibrary/IO/IOManager.cs
source/DeviceLibrary/deviceLibrary/IO/KangNaiDe/KNDManager.cs
source/DeviceLibrary/model/StoreStep.cs
source/LoadCVSLibrary/storeConfig/config/IO_Type.cs
source/AssemblyLineClient/AssemblyLineClient.csproj
查看文件 @
e77d9cb
...
@@ -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>
...
...
source/AssemblyLineClient/FrmIOMsg.Designer.cs
0 → 100644
查看文件 @
e77d9cb
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
source/AssemblyLineClient/FrmIOMsg.cs
0 → 100644
查看文件 @
e77d9cb
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
();
}
}
}
source/AssemblyLineClient/FrmIOMsg.resx
0 → 100644
查看文件 @
e77d9cb
<?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
source/AssemblyLineClient/FrmIOStatus.Designer.cs
查看文件 @
e77d9cb
此文件的差异被折叠,
点击展开。
source/AssemblyLineClient/FrmIOStatus.cs
查看文件 @
e77d9cb
...
@@ -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
);
}
}
}
}
}
source/AssemblyLineClient/FrmLineStore.Designer.cs
查看文件 @
e77d9cb
...
@@ -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
(
1
6
0
,
26
);
this
.
扫码测试
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
8
0
,
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
(
1
5
7
,
6
);
this
.
toolStripSeparator6
.
Size
=
new
System
.
Drawing
.
Size
(
1
7
7
,
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
(
1
6
0
,
26
);
this
.
二维码学习
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
8
0
,
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
(
1
5
7
,
6
);
this
.
toolStripSeparator7
.
Size
=
new
System
.
Drawing
.
Size
(
1
7
7
,
6
);
//
//
// 托盘初始化ToolStripMenuItem
// 托盘初始化ToolStripMenuItem
//
//
this
.
托盘初始化
ToolStripMenuItem
.
Name
=
"托盘初始化ToolStripMenuItem"
;
this
.
托盘初始化
ToolStripMenuItem
.
Name
=
"托盘初始化ToolStripMenuItem"
;
this
.
托盘初始化
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
6
0
,
26
);
this
.
托盘初始化
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
8
0
,
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
;
}
}
}
}
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
e77d9cb
...
@@ -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
();
}
}
}
}
}
source/AssemblyLineClient/记录.txt
查看文件 @
e77d9cb
...
@@ -45,8 +45,11 @@ D2(上料模块出口)
...
@@ -45,8 +45,11 @@ D2(上料模块出口)
X403 环形线横移2阻挡检测
环形线横移四没有上升
...
...
source/DeviceLibrary/LineConfig/Config_FeedingEquip_3.csv
查看文件 @
e77d9cb
...
@@ -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
source/DeviceLibrary/LineConfig/MoveEquip/Config_MoveEquip_17.csv
查看文件 @
e77d9cb
...
@@ -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
,,,,,,,,,
,,,,,,,,,
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
e77d9cb
...
@@ -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
);
//上下气缸上升
//上下气缸上升
if
(!
UseAxis
)
{
IOMove
(
IO_Type
.
UpDownCylinder_Down
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
UpDownCylinder_Down
,
IO_VALUE
.
LOW
);
IOMove
(
IO_Type
.
UpDownCylinder_Up
,
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
);
}
}
}
}
}
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
e77d9cb
...
@@ -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
())
...
@@ -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
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
e77d9cb
...
@@ -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_
LocationCylinder
Down
))
if
(
SW41_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW01_
SW2_Stop
Down
))
{
{
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
(
SW
23
_MoveInfo
,
IO_Type
.
SW4_TopCylinder_Down
,
IO_Type
.
SW4_TopCylinder_Up
);
CylinderMove
(
SW
41
_MoveInfo
,
IO_Type
.
SW4_TopCylinder_Down
,
IO_Type
.
SW4_TopCylinder_Up
);
CylinderMove
(
SW
23
_MoveInfo
,
IO_Type
.
SW1_TopCylinder_Down
,
IO_Type
.
SW1_TopCylinder_Up
);
CylinderMove
(
SW
41
_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_
LocationCylinder
Down
))
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW01_
SW2_Stop
Down
))
{
{
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
))
...
...
source/DeviceLibrary/deviceLibrary/IO/AIOBOX/AIOBOXManager.cs
查看文件 @
e77d9cb
...
@@ -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
;
}
}
}
}
}
source/DeviceLibrary/deviceLibrary/IO/IOManager.cs
查看文件 @
e77d9cb
...
@@ -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
(
1
0
);
Thread
.
Sleep
(
3
0
);
}
}
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
);
}
}
}
}
source/DeviceLibrary/deviceLibrary/IO/KangNaiDe/KNDManager.cs
查看文件 @
e77d9cb
...
@@ -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
...
...
source/DeviceLibrary/model/StoreStep.cs
查看文件 @
e77d9cb
...
@@ -429,7 +429,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -429,7 +429,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary>
/// <summary>
/// 定位气缸下降
/// 定位气缸下降
/// </summary>
/// </summary>
SW01_
LocationCylinder
Down
=
5001
,
SW01_
SW2_Stop
Down
=
5001
,
/// <summary>
/// <summary>
/// 等待轨道1夹具检测信号
/// 等待轨道1夹具检测信号
...
...
source/LoadCVSLibrary/storeConfig/config/IO_Type.cs
查看文件 @
e77d9cb
...
@@ -155,79 +155,8 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -155,79 +155,8 @@ 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>
/// 移栽DI/DO 阻挡3-1夹具检测 TrayCheck 0
/// 移栽DI/DO 阻挡3-1夹具检测 TrayCheck 0
...
@@ -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!
Cancel
请
注册
或
登录
后发表评论