Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 4f9a19c2
由
LN
编写于
2019-12-12 11:29:36 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
增加托盘编辑功能
1 个父辈
003634a7
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
86 行增加
和
29 行删除
source/AssemblyLineClient/FrmLineStore.Designer.cs
source/AssemblyLineClient/FrmLineStore.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblymanager/TrayManager.cs
source/DeviceLibrary/model/TrayInfo.cs
source/AssemblyLineClient/FrmLineStore.Designer.cs
查看文件 @
4f9a19c
此文件的差异被折叠,
点击展开。
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
4f9a19c
...
...
@@ -118,9 +118,17 @@ namespace OnlineStore.AssemblyLine
LoadListView
();
托盘初始化
ToolStripMenuItem
.
Visible
=
ConfigAppSettings
.
GetIntValue
(
Setting_Init
.
OpenRFIDWrite
).
Equals
(
1
);
cmbTray
.
Items
.
Clear
();
for
(
int
i
=
1
;
i
<=
30
;
i
++)
{
cmbTray
.
Items
.
Add
(
i
.
ToString
());
}
cmbTrayType
.
SelectedIndex
=
0
;
cmbTray
.
SelectedIndex
=
0
;
LoadOk
=
true
;
HideForm
();
timer1
.
Start
();
}
private
void
LoadListView
()
...
...
@@ -248,21 +256,35 @@ namespace OnlineStore.AssemblyLine
DialogResult
result
=
MessageBox
.
Show
(
"是否确定退出流水线客户端?"
,
"提示"
,
MessageBoxButtons
.
YesNo
);
if
(
result
.
Equals
(
DialogResult
.
Yes
))
{
//如果料仓还在运行状态,先关闭料仓
if
(!
lineBean
.
runStatus
.
Equals
(
LineRunStatus
.
Wait
))
try
{
LogUtil
.
info
(
LOGGER
,
"退出程序之前先停止运行 "
);
lineBean
.
StopRun
();
//如果料仓还在运行状态,先关闭料仓
if
(!
lineBean
.
runStatus
.
Equals
(
LineRunStatus
.
Wait
))
{
LogUtil
.
info
(
LOGGER
,
"即将退出程序,停止"
+
lineBean
.
Name
+
"运行 "
);
lineBean
.
StopRun
();
}
foreach
(
EquipBase
equip
in
lineBean
.
AllEquipMap
.
Values
)
{
if
(
equip
.
runStatus
>
LineRunStatus
.
Wait
)
{
LogUtil
.
info
(
LOGGER
,
"即将退出程序,停止"
+
equip
.
Name
+
"运行 "
);
equip
.
StopRun
();
}
}
// IOManager.instance.CloseAllDO();
IOManager
.
instance
.
CloseAllConnection
();
//AIManager.CloseConnect();
ACServerManager
.
CloseAllPort
();
// CodeManager.CloseAllCamera();
RFIDManager
.
RfidReader
.
Close
();
System
.
Environment
.
Exit
(
System
.
Environment
.
ExitCode
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"退出出错:"
+
ex
.
ToString
());
}
// IOManager.instance.CloseAllDO();
IOManager
.
instance
.
CloseAllConnection
();
//AIManager.CloseConnect();
ACServerManager
.
CloseAllPort
();
// CodeManager.CloseAllCamera();
RFIDManager
.
RfidReader
.
Close
();
//this.Close();
System
.
Environment
.
Exit
(
System
.
Environment
.
ExitCode
);
}
}
private
void
显示
ToolStripMenuItem_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -734,14 +756,48 @@ namespace OnlineStore.AssemblyLine
private
void
btnClearTray_Click
(
object
sender
,
EventArgs
e
)
{
List
<
TrayInfo
>
tray
=
TrayManager
.
getTrayList
();
LogUtil
.
info
(
"-------------------点击:清空托盘。清空前打印托盘信息:"
);
foreach
(
TrayInfo
t
in
tray
)
DialogResult
resut
=
MessageBox
.
Show
(
"确定手动清空所有托盘信息?"
,
"提示"
,
MessageBoxButtons
.
YesNo
);
if
(
resut
.
Equals
(
DialogResult
.
Yes
))
{
LogUtil
.
info
(
t
.
ToStr
());
List
<
TrayInfo
>
tray
=
TrayManager
.
getTrayList
();
LogUtil
.
info
(
"-------------------点击:清空托盘。清空前打印托盘信息:"
);
foreach
(
TrayInfo
t
in
tray
)
{
LogUtil
.
info
(
t
.
ToStr
());
}
TrayManager
.
ClearTrayInfo
();
LogUtil
.
info
(
"-------------------点击:清空托盘。托盘内容已清空"
);
}
}
private
void
btnUpdateTray_Click
(
object
sender
,
EventArgs
e
)
{
int
num
=
cmbTray
.
SelectedIndex
+
1
;
DialogResult
resut
=
MessageBox
.
Show
(
"确定手动更新托盘【"
+
num
+
"】的信息?"
,
"提示"
,
MessageBoxButtons
.
YesNo
);
if
(
resut
.
Equals
(
DialogResult
.
Yes
))
{
int
trayType
=
cmbTrayType
.
SelectedIndex
;
string
posId
=
txtTrayPosid
.
Text
;
int
ph
=
FormUtil
.
GetIntValue
(
txtTrayH
);
int
pw
=
FormUtil
.
GetIntValue
(
txtTrayW
);
bool
hasTray
=
trayType
>
0
;
bool
inNg
=
chbInStoNG
.
Checked
;
if
(
hasTray
)
{
TrayManager
.
UpdateTrayInfo
(
num
,
hasTray
,
trayType
,
"CodeTest"
,
posId
,
ph
,
pw
);
}
else
{
TrayManager
.
UpdateTrayInfo
(
num
,
hasTray
);
}
if
(
trayType
.
Equals
(
1
)
&&
inNg
)
{
TrayManager
.
UpdateInStoreNG
(
num
,
inNg
,
"InStoreNG "
);
}
TrayInfo
info
=
TrayManager
.
GetTrayInfo
(
num
);
MessageBox
.
Show
(
"更新成功:\r"
+
info
.
ToStr
());
LogUtil
.
info
(
"手动更新托盘信息:"
+
info
.
ToStr
());
}
TrayManager
.
ClearTrayInfo
();
LogUtil
.
info
(
"-------------------点击:清空托盘。托盘内容已清空"
);
}
}
}
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
4f9a19c
...
...
@@ -969,15 +969,16 @@ namespace OnlineStore.DeviceLibrary
//是出料的模块
if
(
Config
.
IsCanOut
.
Equals
(
1
))
{
//此托盘是紧急出料盘,需要通过料架出库
bool
debugNeed
=
(
runStatus
>=
LineRunStatus
.
Runing
)&&
info
.
IsFull
&&
info
.
InOrOutStore
.
Equals
(
2
);
//此托盘是紧急出料盘,需要通过料架出库
bool
debugNeed
=
(
runStatus
>=
LineRunStatus
.
Runing
)
&&
info
.
IsFull
&&
info
.
InOrOutStore
.
Equals
(
2
);
if
(
info
.
PosId
.
Equals
(
""
))
{
param
=
new
InOutParam
(
trayNum
,
"紧急出料测试"
,
"1#AC1_3_2"
,
12
,
7
);
}
bool
isJinji
=
info
.
EmergencyOut
&&
info
.
IsFull
&&
runStatus
>=
LineRunStatus
.
Runing
;
if
(
debugNeed
||
isJinji
)
//入料失败的盘也从此处出库
bool
instoeEnd
=
(
runStatus
>=
LineRunStatus
.
Runing
)
&&
info
.
IsFull
&&
info
.
InStoreNG
;
if
(
debugNeed
||
isJinji
||
instoeEnd
)
{
//判断是否有料架,是否可以出库
...
...
source/DeviceLibrary/assemblymanager/TrayManager.cs
查看文件 @
4f9a19c
...
...
@@ -67,7 +67,7 @@ namespace OnlineStore.DeviceLibrary
return
false
;
}
internal
static
TrayInfo
GetTrayInfo
(
int
trayNum
)
public
static
TrayInfo
GetTrayInfo
(
int
trayNum
)
{
if
(
TrayInfoMap
.
ContainsKey
(
trayNum
))
{
...
...
@@ -79,7 +79,7 @@ namespace OnlineStore.DeviceLibrary
}
internal
static
void
UpdateTrayInfo
(
int
trayNum
,
bool
isFull
=
false
,
int
inOrOut
=
0
,
string
wareCode
=
""
,
string
posId
=
""
,
int
plateH
=
0
,
int
plateW
=
0
)
public
static
void
UpdateTrayInfo
(
int
trayNum
,
bool
isFull
=
false
,
int
inOrOut
=
0
,
string
wareCode
=
""
,
string
posId
=
""
,
int
plateH
=
0
,
int
plateW
=
0
)
{
if
(
TrayInfoMap
.
ContainsKey
(
trayNum
))
{
...
...
@@ -98,7 +98,7 @@ namespace OnlineStore.DeviceLibrary
}
}
internal
static
void
UpdateInStoreNG
(
int
trayNum
,
bool
isNg
,
string
msg
)
public
static
void
UpdateInStoreNG
(
int
trayNum
,
bool
isNg
,
string
msg
)
{
LogUtil
.
info
(
"更新托盘【"
+
trayNum
+
"】InStoreNG=【"
+
isNg
+
"】NgMsg=【"
+
msg
+
"】"
);
if
(
TrayInfoMap
.
ContainsKey
(
trayNum
))
...
...
source/DeviceLibrary/model/TrayInfo.cs
查看文件 @
4f9a19c
...
...
@@ -41,10 +41,10 @@ namespace OnlineStore.DeviceLibrary
{
type
=
"出库"
;
}
string
err
=
InStoreNG
?
"
入库失败:"
+
NgMsg
:
""
;
string
jinji
=
EmergencyOut
?
"
紧急出料
"
:
""
;
return
"托盘
["
+
TrayCode
+
"]["
+
(
IsFull
?
"有料,"
:
"空,"
)
+
"]
["
+
type
+
"]二维码["
+
WareCode
+
"]库位号["
+
PosId
+
"]
盘高["
+
PlateH
+
"]盘宽["
+
PlateW
+
"] ["
+
err
+
"] ["
+
jinji
+
"]
"
;
string
err
=
InStoreNG
?
"
[入库失败:"
+
NgMsg
+
"]"
:
""
;
string
jinji
=
EmergencyOut
?
"
[紧急出料]
"
:
""
;
return
"托盘
["
+
TrayCode
+
"] ["
+
(
IsFull
?
"有料"
:
"空"
)
+
"]
["
+
type
+
"]二维码["
+
WareCode
+
"]库位号["
+
PosId
+
"]
["
+
PlateW
+
"X"
+
PlateH
+
"] "
+
err
+
" "
+
jinji
+
"
"
;
}
/// <summary>
/// 夹具编码值(1-32?)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论