Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 757ca089
由
LN
编写于
2023-01-03 16:08:18 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加异常列表。托盘禁用修改。
1 个父辈
0c4269a3
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
17 个修改的文件
包含
498 行增加
和
10 行删除
source/AssemblyLineClient/AssemblyLineClient.csproj
source/AssemblyLineClient/FrmExceptionMsg.Designer.cs
source/AssemblyLineClient/FrmExceptionMsg.cs
source/AssemblyLineClient/FrmExceptionMsg.resx
source/AssemblyLineClient/FrmLineStore.Designer.cs
source/AssemblyLineClient/FrmLineStore.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
source/DeviceLibrary/assemblymanager/ExceptionMsgManager.cs
source/DeviceLibrary/assemblymanager/RFIDManagercs.cs
source/DeviceLibrary/assemblymanager/TrayDisableManager.cs
source/DeviceLibrary/baan/AxisBean.cs
source/DeviceLibrary/deviceLibrary/IO/AIOBOX/AIOBOXManager.cs
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
source/DeviceLibrary/deviceLibrary/reelCheck/ReelCheckUtil.cs
source/DeviceLibrary/model/KTK_Store.cs
source/DeviceLibrary/model/TrayInfo.cs
source/AssemblyLineClient/AssemblyLineClient.csproj
查看文件 @
757ca08
...
...
@@ -97,6 +97,12 @@
<Compile Include="FrmDisableTray.Designer.cs">
<DependentUpon>FrmDisableTray.cs</DependentUpon>
</Compile>
<Compile Include="FrmExceptionMsg.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmExceptionMsg.Designer.cs">
<DependentUpon>FrmExceptionMsg.cs</DependentUpon>
</Compile>
<Compile Include="FrmTrayInfo.cs">
<SubType>Form</SubType>
</Compile>
...
...
@@ -191,6 +197,9 @@
<DependentUpon>FrmDisableTray.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="FrmExceptionMsg.resx">
<DependentUpon>FrmExceptionMsg.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmTrayInfo.resx">
<DependentUpon>FrmTrayInfo.cs</DependentUpon>
</EmbeddedResource>
...
...
source/AssemblyLineClient/FrmExceptionMsg.Designer.cs
0 → 100644
查看文件 @
757ca08
namespace
OnlineStore.AssemblyLine
{
partial
class
FrmExceptionMsg
{
/// <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
.
btnUpdate
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnExit
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
dataGridView1
=
new
System
.
Windows
.
Forms
.
DataGridView
();
this
.
Column_Module
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Time
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Name
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column_Msg
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dataGridView1
)).
BeginInit
();
this
.
SuspendLayout
();
//
// btnUpdate
//
this
.
btnUpdate
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnUpdate
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnUpdate
.
Location
=
new
System
.
Drawing
.
Point
(
936
,
623
);
this
.
btnUpdate
.
Name
=
"btnUpdate"
;
this
.
btnUpdate
.
Size
=
new
System
.
Drawing
.
Size
(
115
,
33
);
this
.
btnUpdate
.
TabIndex
=
4
;
this
.
btnUpdate
.
Text
=
"刷新"
;
this
.
btnUpdate
.
UseVisualStyleBackColor
=
true
;
this
.
btnUpdate
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUpdate_Click
);
//
// btnExit
//
this
.
btnExit
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnExit
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnExit
.
Location
=
new
System
.
Drawing
.
Point
(
1057
,
623
);
this
.
btnExit
.
Name
=
"btnExit"
;
this
.
btnExit
.
Size
=
new
System
.
Drawing
.
Size
(
115
,
33
);
this
.
btnExit
.
TabIndex
=
5
;
this
.
btnExit
.
Text
=
"确定"
;
this
.
btnExit
.
UseVisualStyleBackColor
=
true
;
this
.
btnExit
.
Click
+=
new
System
.
EventHandler
(
this
.
btnExit_Click
);
//
// dataGridView1
//
this
.
dataGridView1
.
AllowUserToAddRows
=
false
;
this
.
dataGridView1
.
AllowUserToDeleteRows
=
false
;
this
.
dataGridView1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
dataGridView1
.
ColumnHeadersHeightSizeMode
=
System
.
Windows
.
Forms
.
DataGridViewColumnHeadersHeightSizeMode
.
AutoSize
;
this
.
dataGridView1
.
Columns
.
AddRange
(
new
System
.
Windows
.
Forms
.
DataGridViewColumn
[]
{
this
.
Column_Module
,
this
.
Column_Time
,
this
.
Column_Name
,
this
.
Column_Msg
});
this
.
dataGridView1
.
Location
=
new
System
.
Drawing
.
Point
(
13
,
13
);
this
.
dataGridView1
.
Name
=
"dataGridView1"
;
this
.
dataGridView1
.
RowTemplate
.
Height
=
23
;
this
.
dataGridView1
.
Size
=
new
System
.
Drawing
.
Size
(
1159
,
589
);
this
.
dataGridView1
.
TabIndex
=
6
;
//
// Column_Module
//
this
.
Column_Module
.
HeaderText
=
"模块"
;
this
.
Column_Module
.
Name
=
"Column_Module"
;
this
.
Column_Module
.
Width
=
140
;
//
// Column_Time
//
this
.
Column_Time
.
HeaderText
=
"时间"
;
this
.
Column_Time
.
Name
=
"Column_Time"
;
this
.
Column_Time
.
Width
=
140
;
//
// Column_Name
//
this
.
Column_Name
.
HeaderText
=
"名称"
;
this
.
Column_Name
.
Name
=
"Column_Name"
;
this
.
Column_Name
.
Width
=
150
;
//
// Column_Msg
//
this
.
Column_Msg
.
HeaderText
=
"消息"
;
this
.
Column_Msg
.
Name
=
"Column_Msg"
;
this
.
Column_Msg
.
Width
=
650
;
//
// FrmExceptionMsg
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoSize
=
true
;
this
.
AutoSizeMode
=
System
.
Windows
.
Forms
.
AutoSizeMode
.
GrowAndShrink
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
1191
,
666
);
this
.
Controls
.
Add
(
this
.
dataGridView1
);
this
.
Controls
.
Add
(
this
.
btnExit
);
this
.
Controls
.
Add
(
this
.
btnUpdate
);
this
.
Name
=
"FrmExceptionMsg"
;
this
.
Text
=
"异常信息列表"
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmTrayInfo_Load
);
this
.
SizeChanged
+=
new
System
.
EventHandler
(
this
.
FrmTrayInfo_SizeChanged
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dataGridView1
)).
EndInit
();
this
.
ResumeLayout
(
false
);
}
#
endregion
private
System
.
Windows
.
Forms
.
Button
btnUpdate
;
private
System
.
Windows
.
Forms
.
Button
btnExit
;
private
System
.
Windows
.
Forms
.
DataGridView
dataGridView1
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_Module
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_Time
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_Name
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column_Msg
;
}
}
\ No newline at end of file
source/AssemblyLineClient/FrmExceptionMsg.cs
0 → 100644
查看文件 @
757ca08
using
OnlineStore.Common
;
using
OnlineStore.DeviceLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Windows.Forms
;
namespace
OnlineStore.AssemblyLine
{
internal
partial
class
FrmExceptionMsg
:
FrmBase
{
public
FrmExceptionMsg
()
{
InitializeComponent
();
}
private
void
FrmTrayInfo_Load
(
object
sender
,
EventArgs
e
)
{
loadMsg
();
}
private
void
loadMsg
()
{
try
{
List
<
ExceptionMsg
>
msgList
=
ExceptionMsgManager
.
getList
();
dataGridView1
.
Rows
.
Clear
();
foreach
(
ExceptionMsg
msg
in
msgList
)
{
try
{
if
(
msg
==
null
)
{
continue
;
}
DataGridViewRow
row
=
new
DataGridViewRow
();
row
.
CreateCells
(
dataGridView1
);
row
.
Cells
[
Column_Module
.
Index
].
Value
=
msg
.
module
;
row
.
Cells
[
Column_Name
.
Index
].
Value
=
msg
.
name
;
row
.
Cells
[
Column_Time
.
Index
].
Value
=
msg
.
updateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
row
.
Cells
[
Column_Msg
.
Index
].
Value
=
msg
.
message
;
dataGridView1
.
Rows
.
Add
(
row
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"FrmExceptionMsg loadMsg error:"
+
ex
.
ToString
());
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"FrmExceptionMsg loadMsg error:"
+
ex
.
ToString
());
}
}
private
void
btnUpdate_Click
(
object
sender
,
EventArgs
e
)
{
loadMsg
();
}
private
void
btnExit_Click
(
object
sender
,
EventArgs
e
)
{
this
.
Close
();
}
private
void
FrmTrayInfo_SizeChanged
(
object
sender
,
EventArgs
e
)
{
this
.
Left
=
Screen
.
PrimaryScreen
.
Bounds
.
Width
/
2
-
this
.
Width
/
2
;
//桌面的宽度的一半减去自身宽的的一半
this
.
Top
=
Screen
.
PrimaryScreen
.
Bounds
.
Height
/
2
-
this
.
Height
/
2
;
//桌面的高度的一半减去自身高度的一半
}
}
}
source/AssemblyLineClient/FrmExceptionMsg.resx
0 → 100644
查看文件 @
757ca08
<?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="Column_Module.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Time.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column_Msg.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
\ No newline at end of file
source/AssemblyLineClient/FrmLineStore.Designer.cs
查看文件 @
757ca08
此文件的差异被折叠,
点击展开。
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
757ca08
...
...
@@ -1462,5 +1462,11 @@ namespace OnlineStore.AssemblyLine
}
LogUtil
.
info
(
Name
+
" 点击:"
+
新托盘检测逻辑
ToolStripMenuItem
.
Text
);
}
private
void
toolStripMenuItem2_Click_1
(
object
sender
,
EventArgs
e
)
{
FrmExceptionMsg
frm
=
new
FrmExceptionMsg
();
frm
.
ShowDialog
();
}
}
}
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
757ca08
...
...
@@ -84,6 +84,7 @@
<Compile Include="assemblyLine\FeedingEquip_InStore.cs" />
<Compile Include="assemblyLine\ProvidingEquip.cs" />
<Compile Include="assemblyLine\FeedingEquip.cs" />
<Compile Include="assemblymanager\ExceptionMsgManager.cs" />
<Compile Include="assemblymanager\RFIDManagercs.cs" />
<Compile Include="assemblymanager\SServerManager.cs" />
<Compile Include="assemblymanager\TrayManager.cs" />
...
...
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
查看文件 @
757ca08
...
...
@@ -181,7 +181,7 @@ namespace OnlineStore.DeviceLibrary
if
(
resCode
==-
1
)
{
TrayDisableManager
.
AddDisableTray
(
trayNum
);
TrayDisableManager
.
AddDisableTray
(
trayNum
,
Name
,
"【屏蔽料盘二次判断】【-1】"
);
LogUtil
.
info
(
$
"【屏蔽料盘二次判断】【-1】【需要禁用该托盘】【{tray.ToStr()}】"
);
}
else
if
(
resCode
==
100
)
...
...
@@ -239,7 +239,7 @@ namespace OnlineStore.DeviceLibrary
(
int
resCode
,
taskInfo
task
)
=
SServerManager
.
getTaskInfo
(
barcode
);
if
(
resCode
==
-
1
)
{
TrayDisableManager
.
AddDisableTray
(
trayNum
);
TrayDisableManager
.
AddDisableTray
(
trayNum
,
Name
,
"【屏蔽料盘二次判断】【-1】【初次无料,第二次有料】"
);
LogUtil
.
info
(
$
"【屏蔽料盘二次判断】【-1】【初次无料,第二次有料】 【禁用该托盘】【{tray.ToStr()}】"
);
}
else
if
(
resCode
==
100
)
...
...
source/DeviceLibrary/assemblymanager/ExceptionMsgManager.cs
0 → 100644
查看文件 @
757ca08
using
OnlineStore.Common
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
OnlineStore.DeviceLibrary
{
/// <summary>
/// 异常信息管理
/// </summary>
public
class
ExceptionMsgManager
{
public
static
Dictionary
<
string
,
ExceptionMsg
>
msgMap
=
new
Dictionary
<
string
,
ExceptionMsg
>();
public
static
void
updateMsg
(
string
module
,
string
name
,
string
msg
=
""
)
{
try
{
string
key
=
module
+
"-"
+
name
;
if
(
msgMap
.
ContainsKey
(
key
))
{
if
(!
string
.
IsNullOrEmpty
(
msg
))
{
ExceptionMsg
obj
=
new
ExceptionMsg
(
module
,
name
,
msg
);
msgMap
[
key
]
=
obj
;
}
else
{
msgMap
.
Remove
(
key
);
}
}
else
{
if
(!
string
.
IsNullOrEmpty
(
msg
))
{
ExceptionMsg
obj
=
new
ExceptionMsg
(
module
,
name
,
msg
);
msgMap
.
Add
(
key
,
obj
);
}
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
$
"updateMsg[{module}][{name}][{msg}] error :"
+
ex
.
ToString
());
}
}
public
static
List
<
ExceptionMsg
>
getList
()
{
return
new
List
<
ExceptionMsg
>(
msgMap
.
Values
);
}
}
public
class
ExceptionMsg
{
public
ExceptionMsg
()
{
updateTime
=
DateTime
.
Now
;
}
public
ExceptionMsg
(
string
module
,
string
name
,
string
msg
)
{
this
.
module
=
module
;
this
.
name
=
name
;
this
.
message
=
msg
;
updateTime
=
DateTime
.
Now
;
}
public
string
module
{
get
;
set
;
}
public
string
name
{
get
;
set
;
}
public
DateTime
updateTime
{
get
;
set
;
}
public
string
message
{
get
;
set
;
}
}
}
source/DeviceLibrary/assemblymanager/RFIDManagercs.cs
查看文件 @
757ca08
...
...
@@ -153,6 +153,7 @@ namespace OnlineStore.DeviceLibrary
string
ip
=
GetRFIP
(
subType
);
//获取盘号
RFIDData
data
=
ReadRFID
(
ip
,
isClear
);
string
rfidT
=
DeviceConfig
.
RFIP_Str
+
"_"
+
subType
.
ToString
().
PadLeft
(
3
,
'0'
);
if
(
data
!=
null
)
{
if
(
data
.
RFType
.
Equals
(
'E'
))
...
...
@@ -162,10 +163,12 @@ namespace OnlineStore.DeviceLibrary
if
(!
result
)
{
LogUtil
.
error
(
"RFID [ "
+
ip
+
" ] 读到数据 "
+
data
.
NumStr
()
+
" 缓存验证失败,返回盘号 0"
);
ExceptionMsgManager
.
updateMsg
(
rfidT
,
ip
,
"读到数据 "
+
data
.
NumStr
()
+
" 缓存验证失败,返回盘号 0"
);
return
0
;
}
else
{
{
ExceptionMsgManager
.
updateMsg
(
rfidT
,
ip
);
return
data
.
Num
;
}
}
...
...
@@ -177,9 +180,14 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil
.
debug
(
"RFID [ "
+
ip
+
" ] 读到数据 "
+
data
.
NumStr
()
+
" 返回盘号 0"
);
}
ExceptionMsgManager
.
updateMsg
(
rfidT
,
ip
,
"读到数据 "
+
data
.
NumStr
()
+
" 返回盘号 0"
);
return
0
;
}
else
{
ExceptionMsgManager
.
updateMsg
(
rfidT
,
ip
,
"读到数据为空,返回盘号 0"
);
}
return
0
;
}
...
...
source/DeviceLibrary/assemblymanager/TrayDisableManager.cs
查看文件 @
757ca08
...
...
@@ -108,10 +108,12 @@ namespace OnlineStore.DeviceLibrary
}
}
public
static
void
AddDisableTray
(
int
trayNum
)
public
static
void
AddDisableTray
(
int
trayNum
,
string
deviceName
,
string
describe
)
{
TrayDisableInfo
t
=
new
TrayDisableInfo
();
t
.
TrayCode
=
trayNum
;
t
.
DDescribe
=
describe
;
t
.
DDeviceName
=
deviceName
;
if
(
TrayDisableMap
.
ContainsKey
(
trayNum
))
{
TrayDisableMap
[
trayNum
]
=
t
;
...
...
source/DeviceLibrary/baan/AxisBean.cs
查看文件 @
757ca08
...
...
@@ -67,6 +67,7 @@ namespace OnlineStore.DeviceLibrary
//判断轴是否正常
string
portName
=
Config
.
DeviceName
;
int
slvAddr
=
Config
.
GetAxisValue
();
ExceptionMsgManager
.
updateMsg
(
AxisName
,
portName
+
"_"
+
slvAddr
);
if
(
ACServerManager
.
ServerOnStatus
(
portName
,
slvAddr
))
{
LogUtil
.
info
(
AxisName
+
"成功打开"
);
...
...
@@ -88,6 +89,8 @@ namespace OnlineStore.DeviceLibrary
ACServerManager
.
ServoOff
(
portName
,
slvAddr
);
msg
=
"打开轴"
+
Config
.
Explain
+
"失败 "
;
LogUtil
.
info
(
AxisName
+
msg
);
ExceptionMsgManager
.
updateMsg
(
AxisName
,
portName
+
"_"
+
slvAddr
,
msg
);
return
false
;
}
}
...
...
source/DeviceLibrary/deviceLibrary/IO/AIOBOX/AIOBOXManager.cs
查看文件 @
757ca08
...
...
@@ -49,6 +49,11 @@ namespace OnlineStore.DeviceLibrary
if
(!
aio
.
IsConn
)
{
msg
+=
$
"[{aio.IP}]"
;
ExceptionMsgManager
.
updateMsg
(
"IO模块"
,
aio
.
IP
,
"IO模块"
+
aio
.
IP
+
"未连接"
);
}
else
{
ExceptionMsgManager
.
updateMsg
(
"IO模块"
,
aio
.
IP
);
}
}
if
(!
String
.
IsNullOrEmpty
(
msg
))
...
...
source/DeviceLibrary/deviceLibrary/halcon/CodeManager.cs
查看文件 @
757ca08
...
...
@@ -134,9 +134,14 @@ namespace OnlineStore.DeviceLibrary
if
(
ho_Image
==
null
)
{
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
ExceptionMsgManager
.
updateMsg
(
deviceName
,
cameraName
,
"取图片失败,关闭相机"
);
CloseCamera
(
cameraName
);
continue
;
}
else
{
ExceptionMsgManager
.
updateMsg
(
deviceName
,
cameraName
,
""
);
}
LogUtil
.
debug
(
deviceName
+
" 【"
+
cameraName
+
"】取图片完成,开始扫码"
);
...
...
@@ -166,6 +171,11 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】eyem扫码超时"
);
eyemNoCode
=
true
;
ExceptionMsgManager
.
updateMsg
(
deviceName
,
cameraName
,
"eyem扫码超时"
);
}
else
{
ExceptionMsgManager
.
updateMsg
(
deviceName
,
cameraName
);
}
if
(!
isPreScan
)
{
...
...
@@ -293,8 +303,13 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
CloseCamera
(
cameraName
);
ExceptionMsgManager
.
updateMsg
(
deviceName
,
cameraName
,
"取图片失败,关闭相机"
);
continue
;
}
else
{
ExceptionMsgManager
.
updateMsg
(
deviceName
,
cameraName
,
""
);
}
LogUtil
.
debug
(
deviceName
+
" 【"
+
cameraName
+
"】取图片完成,开始扫码"
);
...
...
@@ -321,8 +336,13 @@ namespace OnlineStore.DeviceLibrary
if
(!
taskResult
)
{
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】eyem扫码超时"
);
ExceptionMsgManager
.
updateMsg
(
deviceName
,
cameraName
,
"eyem扫码超时"
);
//eyemNoCode = true;
}
else
{
ExceptionMsgManager
.
updateMsg
(
deviceName
,
cameraName
);
}
code
=
ProcessCode
(
codeList
);
findCode
=
string
.
IsNullOrEmpty
(
code
)
?
false
:
true
;
...
...
@@ -585,8 +605,13 @@ namespace OnlineStore.DeviceLibrary
{
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】取图片失败["
+
Camera
.
_cam
.
ErrInfo
+
"],关闭相机"
);
CloseCamera
(
cameraName
);
ExceptionMsgManager
.
updateMsg
(
deviceName
,
cameraName
,
"取图片失败,关闭相机"
);
continue
;
}
}
else
{
ExceptionMsgManager
.
updateMsg
(
deviceName
,
cameraName
);
}
//取照片完成,先检测是否有料,有料才需要扫码,否则直接返回
hasReel
=
EyemManager
.
ReelCheck
(
bmp
);
...
...
@@ -621,8 +646,13 @@ namespace OnlineStore.DeviceLibrary
if
(!
taskResult
)
{
LogUtil
.
error
(
deviceName
+
" 【"
+
cameraName
+
"】eyem扫码超时"
);
ExceptionMsgManager
.
updateMsg
(
deviceName
,
cameraName
,
"eyem扫码超时"
);
eyemNoCode
=
true
;
}
else
{
ExceptionMsgManager
.
updateMsg
(
deviceName
,
cameraName
);
}
if
(!
findRightCode
)
{
...
...
source/DeviceLibrary/deviceLibrary/reelCheck/ReelCheckUtil.cs
查看文件 @
757ca08
...
...
@@ -71,7 +71,7 @@ dMinorStep 步进,默认1.0。
///////////////////使用///////////////////
public
static
int
[]
ReelCheck
(
int
deviceID
,
string
cameraName
,
out
string
imgName
)
public
static
int
[]
ReelCheck
(
int
deviceID
,
string
cameraName
,
out
string
imgName
)
{
imgName
=
""
;
if
(
String
.
IsNullOrEmpty
(
cameraName
))
...
...
@@ -81,7 +81,7 @@ dMinorStep 步进,默认1.0。
Bitmap
bitmap
=
MyCamera
.
AcqImage
(
cameraName
);
if
(
bitmap
==
null
)
{
string
file
=
ConfigAppSettings
.
GetValue
(
"TESTFILE"
,
@"D:\皮带线料盘识别\128\r-camera-1-20220128-13134651.bmp"
);
string
file
=
ConfigAppSettings
.
GetValue
(
"TESTFILE"
,
@"D:\皮带线料盘识别\128\r-camera-1-20220128-13134651.bmp"
);
if
(
File
.
Exists
(
file
))
{
bitmap
=
new
Bitmap
(
file
);
...
...
@@ -89,9 +89,14 @@ dMinorStep 步进,默认1.0。
}
if
(
bitmap
==
null
)
{
LogUtil
.
error
(
"ReelCheckUtil :ReelCheck ["
+
cameraName
+
"] 获取图片失败 "
);
LogUtil
.
error
(
"ReelCheckUtil :ReelCheck ["
+
cameraName
+
"] 获取图片失败 "
);
ExceptionMsgManager
.
updateMsg
(
"ReelCheck"
,
cameraName
,
"ReelCheck ["
+
cameraName
+
"] 获取图片失败"
);
return
null
;
}
else
{
ExceptionMsgManager
.
updateMsg
(
"ReelCheck"
,
cameraName
);
}
//if (SaveImage)
//{
// string path = "D:\\image\\"+ cameraName + "\\SourceImg\\";
...
...
source/DeviceLibrary/model/KTK_Store.cs
查看文件 @
757ca08
...
...
@@ -612,6 +612,11 @@ namespace OnlineStore.DeviceLibrary
}
}
ExceptionMsgManager
.
updateMsg
(
Name
,
""
,
msg
);
}
else
{
ExceptionMsgManager
.
updateMsg
(
Name
,
""
);
}
if
(!
warnParam
.
AlarmType
.
Equals
(
alarmType
))
...
...
source/DeviceLibrary/model/TrayInfo.cs
查看文件 @
757ca08
...
...
@@ -105,7 +105,8 @@ namespace OnlineStore.DeviceLibrary
public
class
TrayDisableInfo
{
public
TrayDisableInfo
()
{
{
DisableTime
=
DateTime
.
Now
;
}
public
TrayDisableInfo
(
int
trayNum
,
string
deviceName
,
string
describle
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论