Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 620506d7
由
LN
编写于
2020-01-06 19:55:10 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
ng料修改
1 个父辈
7d3db7a1
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
64 行增加
和
57 行删除
source/AssemblyLineClient/FrmDischargeLine.Designer.cs
source/AssemblyLineClient/FrmLineStore.cs
source/AssemblyLineClient/FrmMoveEquip.Designer.cs
source/AssemblyLineClient/FrmProvidingEquip.Designer.cs
source/Common/util/LogUtil.cs
source/DeviceLibrary/assemblyLine/OutTrayLineBean.cs
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
source/DeviceLibrary/assemblymanager/SServerManager.cs
source/AssemblyLineClient/FrmDischargeLine.Designer.cs
查看文件 @
620506d
...
...
@@ -36,10 +36,10 @@
this
.
cmbLineType
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
btnLine1Test
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox6
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lblThisSta
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblMoveInfo
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblTrayNum
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblInstoreList
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblThisSta
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
tableLayoutPanel1
=
new
System
.
Windows
.
Forms
.
TableLayoutPanel
();
this
.
groupBox4
=
new
System
.
Windows
.
Forms
.
GroupBox
();
...
...
@@ -316,6 +316,21 @@
this
.
groupBox6
.
TabStop
=
false
;
this
.
groupBox6
.
Text
=
"消息"
;
//
// lblThisSta
//
this
.
lblThisSta
.
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
.
lblThisSta
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblThisSta
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblThisSta
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblThisSta
.
Location
=
new
System
.
Drawing
.
Point
(
271
,
19
);
this
.
lblThisSta
.
Name
=
"lblThisSta"
;
this
.
lblThisSta
.
Size
=
new
System
.
Drawing
.
Size
(
520
,
234
);
this
.
lblThisSta
.
TabIndex
=
246
;
this
.
lblThisSta
.
Text
=
"等待启动"
;
this
.
lblThisSta
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// lblMoveInfo
//
this
.
lblMoveInfo
.
AutoSize
=
true
;
...
...
@@ -350,21 +365,6 @@
this
.
lblInstoreList
.
Size
=
new
System
.
Drawing
.
Size
(
524
,
53
);
this
.
lblInstoreList
.
TabIndex
=
277
;
//
// lblThisSta
//
this
.
lblThisSta
.
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
.
lblThisSta
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblThisSta
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblThisSta
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblThisSta
.
Location
=
new
System
.
Drawing
.
Point
(
263
,
29
);
this
.
lblThisSta
.
Name
=
"lblThisSta"
;
this
.
lblThisSta
.
Size
=
new
System
.
Drawing
.
Size
(
528
,
224
);
this
.
lblThisSta
.
TabIndex
=
246
;
this
.
lblThisSta
.
Text
=
"等待启动"
;
this
.
lblThisSta
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// groupBox3
//
this
.
groupBox3
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
...
...
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
620506d
...
...
@@ -128,7 +128,6 @@ namespace OnlineStore.AssemblyLine
LoadOk
=
true
;
HideForm
();
timer1
.
Start
();
}
private
void
LoadListView
()
...
...
@@ -174,6 +173,7 @@ namespace OnlineStore.AssemblyLine
{
ListViewItem
lvi
=
new
ListViewItem
();
lvi
.
Text
=
equip
.
Name
;
lvi
.
SubItems
.
Add
(
equip
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
lvi
.
SubItems
.
Add
(
equip
.
alarmType
.
ToString
());
lvi
.
SubItems
.
Add
(
KTK_Store
.
GetRunStr
(
equip
.
lineStatus
,
equip
.
runStatus
));
this
.
listView1
.
Items
.
Add
(
lvi
);
...
...
@@ -184,6 +184,7 @@ namespace OnlineStore.AssemblyLine
{
ListViewItem
lvi
=
new
ListViewItem
();
lvi
.
Text
=
equip
.
Name
;
lvi
.
SubItems
.
Add
(
equip
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
lvi
.
SubItems
.
Add
(
equip
.
alarmType
.
ToString
());
lvi
.
SubItems
.
Add
(
KTK_Store
.
GetRunStr
(
equip
.
lineStatus
,
equip
.
runStatus
));
this
.
listView1
.
Items
.
Add
(
lvi
);
...
...
@@ -193,6 +194,7 @@ namespace OnlineStore.AssemblyLine
{
ListViewItem
lvi
=
new
ListViewItem
();
lvi
.
Text
=
equip
.
Name
;
lvi
.
SubItems
.
Add
(
equip
.
Config
.
IsDebug
.
Equals
(
1
)
?
"✘"
:
"✔"
);
lvi
.
SubItems
.
Add
(
equip
.
alarmType
.
ToString
());
lvi
.
SubItems
.
Add
(
KTK_Store
.
GetRunStr
(
equip
.
lineStatus
,
equip
.
runStatus
));
this
.
listView1
.
Items
.
Add
(
lvi
);
...
...
@@ -430,32 +432,27 @@ namespace OnlineStore.AssemblyLine
return
;
}
string
canScanCode
=
""
;
if
(
lineBean
.
lineStatus
.
Equals
(
LineStatus
.
StoreOnline
)
&&
lineBean
.
runStatus
.
Equals
(
LineRunStatus
.
Runing
))
{
//canScanCode = lineBean.CanScanCode() ? "(可扫码入库)" : "(出库未完成,不可扫码入库)";
}
lblStatus
.
Text
=
KTK_Store
.
GetRunStr
(
lineBean
.
lineStatus
,
lineBean
.
runStatus
)+
canScanCode
;
string
warnMsg
=
LineManager
.
Line
.
WarnMsg
.
Equals
(
""
)?
""
:
LineManager
.
Line
.
WarnMsg
+
"\r\n"
;
//if (lineBean.isNotScanCode && lblWarnMsg.Text.Equals(""))
//if (lineBean.lineStatus.Equals(LineStatus.StoreOnline) && lineBean.runStatus.Equals(LineRunStatus.Runing))
//{
//
lblWarnMsg.Text = "未扫到二维码,请重新放入料盘
";
//
//canScanCode = lineBean.CanScanCode() ? "(可扫码入库)" : "(出库未完成,不可扫码入库)
";
//}
lblStatus
.
Text
=
KTK_Store
.
GetRunStr
(
lineBean
.
lineStatus
,
lineBean
.
runStatus
)+
canScanCode
;
string
warnMsg
=
LineManager
.
Line
.
WarnMsg
.
Equals
(
""
)?
""
:
LineManager
.
Line
.
WarnMsg
+
"\r\n"
;
lblMoveInfo
.
Text
=
LineManager
.
Line
.
GetMoveStr
();
if
(
lblWarnMsg
.
Text
.
Equals
(
""
))
if
(
TrayManager
.
TrayErrorMsg
.
Equals
(
""
).
Equals
(
false
))
{
lblWarnMsg
.
Text
=
TrayManager
.
TrayErrorMsg
;
warnMsg
+=
TrayManager
.
TrayErrorMsg
+
"\r\n"
;
}
if
(
lblWarnMsg
.
Text
.
Equals
(
""
))
foreach
(
EquipBase
move
in
lineBean
.
AllEquipMap
.
Values
)
{
foreach
(
EquipBase
move
in
lineBean
.
AllEquipMap
.
Values
)
if
(
move
.
WarnMsg
.
Equals
(
""
).
Equals
(
false
)
)
{
if
(
move
.
WarnMsg
.
Equals
(
""
).
Equals
(
false
))
{
warnMsg
+=
move
.
WarnMsg
+
"\r\n"
;
break
;
}
warnMsg
+=
move
.
WarnMsg
+
"\r\n"
;
}
}
lblWarnMsg
.
Text
=
warnMsg
;
int
i
=
0
;
...
...
@@ -533,7 +530,7 @@ namespace OnlineStore.AssemblyLine
SetMenuS
(
启动
AToolStripMenuItem
,
true
);
SetMenuS
(
复位
RToolStripMenuItem
,
false
);
SetMenuS
(
停止
TToolStripMenuItem
,
false
);
}
}
}
private
void
SetItemColor
(
int
i
,
LineRunStatus
runStatus
)
...
...
source/AssemblyLineClient/FrmMoveEquip.Designer.cs
查看文件 @
620506d
...
...
@@ -410,9 +410,9 @@
this
.
lblThisSta
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblThisSta
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblThisSta
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblThisSta
.
Location
=
new
System
.
Drawing
.
Point
(
274
,
2
9
);
this
.
lblThisSta
.
Location
=
new
System
.
Drawing
.
Point
(
274
,
1
9
);
this
.
lblThisSta
.
Name
=
"lblThisSta"
;
this
.
lblThisSta
.
Size
=
new
System
.
Drawing
.
Size
(
528
,
120
);
this
.
lblThisSta
.
Size
=
new
System
.
Drawing
.
Size
(
528
,
243
);
this
.
lblThisSta
.
TabIndex
=
246
;
this
.
lblThisSta
.
Text
=
"等待启动"
;
this
.
lblThisSta
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
...
...
source/AssemblyLineClient/FrmProvidingEquip.Designer.cs
查看文件 @
620506d
...
...
@@ -409,9 +409,9 @@
this
.
lblThisSta
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblThisSta
.
ForeColor
=
System
.
Drawing
.
Color
.
Red
;
this
.
lblThisSta
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblThisSta
.
Location
=
new
System
.
Drawing
.
Point
(
255
,
29
);
this
.
lblThisSta
.
Location
=
new
System
.
Drawing
.
Point
(
255
,
13
);
this
.
lblThisSta
.
Name
=
"lblThisSta"
;
this
.
lblThisSta
.
Size
=
new
System
.
Drawing
.
Size
(
531
,
1
20
);
this
.
lblThisSta
.
Size
=
new
System
.
Drawing
.
Size
(
531
,
1
97
);
this
.
lblThisSta
.
TabIndex
=
246
;
this
.
lblThisSta
.
Text
=
"等待启动"
;
this
.
lblThisSta
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
...
...
source/Common/util/LogUtil.cs
查看文件 @
620506d
...
...
@@ -140,7 +140,7 @@ namespace OnlineStore.Common
logBox
.
AppendText
(
now
.
ToLongTimeString
()
+
" "
+
msg
+
Environment
.
NewLine
);
//增加文本
TimeSpan
span
=
DateTime
.
Now
-
lastTime
;
if
(
span
.
TotalSeconds
>
1
0
)
if
(
span
.
TotalSeconds
>
3000
0
)
{
lastTime
=
DateTime
.
Now
;
logBox
.
Select
(
logBox
.
Text
.
Length
,
0
);
//设置光标的位置到文本尾
...
...
@@ -160,8 +160,13 @@ namespace OnlineStore.Common
{
logBox
.
Text
=
LastText
;
logBox
.
Select
(
logBox
.
Text
.
Length
,
0
);
//设置光标的位置到文本尾
logBox
.
ScrollToCaret
();
//滚动到控件光标处
TimeSpan
span
=
DateTime
.
Now
-
lastTime
;
if
(
span
.
TotalSeconds
>
30000
)
{
lastTime
=
DateTime
.
Now
;
logBox
.
Select
(
logBox
.
Text
.
Length
,
0
);
//设置光标的位置到文本尾
logBox
.
ScrollToCaret
();
//滚动到控件光标处
}
}
}
public
static
void
ClearLog
()
...
...
source/DeviceLibrary/assemblyLine/OutTrayLineBean.cs
查看文件 @
620506d
...
...
@@ -60,7 +60,7 @@ namespace OnlineStore.DeviceLibrary
private
string
posId
=
""
;
public
bool
StartOut
(
InOutParam
moveParam
)
{
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)
&&
equipBean
.
runStatus
>
LineRunStatus
.
HomeMoving
)
if
(
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)
&&
(
equipBean
.
runStatus
.
Equals
(
LineRunStatus
.
Runing
)||
equipBean
.
runStatus
.
Equals
(
LineRunStatus
.
Busy
))
)
{
MoveInfo
.
MoveParam
=
moveParam
;
MoveInfo
.
NewMove
(
LineMoveType
.
OutStore
);
...
...
@@ -76,7 +76,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
LogUtil
.
error
(
Name
+
" 启动出料【"
+
moveParam
.
PosId
+
"】 失败"
);
LogUtil
.
error
(
Name
+
" 启动出料【"
+
moveParam
.
ToStr
()
+
"】 失败"
);
return
false
;
}
}
...
...
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
查看文件 @
620506d
...
...
@@ -373,10 +373,10 @@ namespace OnlineStore.DeviceLibrary
{
CheckWait
(
MoveInfo
);
}
if
(
SecondMoveInfo
.
IsInWait
)
{
CheckWait
(
SecondMoveInfo
);
}
//
if (SecondMoveInfo.IsInWait)
//
{
//
CheckWait(SecondMoveInfo);
//
}
if
(
MoveInfo
.
IsInWait
)
{
return
;
...
...
@@ -448,6 +448,16 @@ namespace OnlineStore.DeviceLibrary
// CylinderMove(MoveInfo, IO_Type.UpDownCylinder_Up, IO_Type.UpDownCylinder_Down);
UpdownDownP3Move
(
MoveInfo
.
MoveParam
.
PlateH
);
}
else
{
TimeSpan
span
=
DateTime
.
Now
-
MoveInfo
.
LastSetpTime
;
if
(
span
.
TotalSeconds
>
60
)
{
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveType
+
"]["
+
MoveInfo
.
MoveStep
+
"]等待 皮带线可放料 "
+
"超时["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
DeviceID
+
20
);
Alarm
(
LineAlarmType
.
IoSingleTimeOut
);
}
}
}
else
if
(
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
PO_07_UpDownCylinderDown
))
{
...
...
@@ -537,11 +547,11 @@ namespace OnlineStore.DeviceLibrary
{
return
true
;
}
if
(
outline
.
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
DLO_04_CanReviceTray
))
else
if
(
outline
.
MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
DLO_04_CanReviceTray
))
{
return
true
;
}
else
if
(
outline
.
MoveInfo
.
Equals
(
LineMoveType
.
None
))
else
if
(
outline
.
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
))
{
outline
.
StartOut
(
MoveInfo
.
MoveParam
);
}
...
...
source/DeviceLibrary/assemblymanager/SServerManager.cs
查看文件 @
620506d
...
...
@@ -69,11 +69,6 @@ namespace OnlineStore.DeviceLibrary
{
return
msg
=
deviceName
+
"未扫到条码"
;
}
//if (LineManager.Line.runStatus.Equals(LineRunStatus.Wait))
//{
// return msg = deviceName + "托盘【" + trayNum + "】 收到条码<< " + codeStr + ",暂未开启,不需要发送服务器";
//}
//http://localhost/myproject/service/store/emptyPosForPutin
// 参数:cids: 多个 cid
//code: 条码内容
...
...
@@ -116,8 +111,8 @@ namespace OnlineStore.DeviceLibrary
InOutParam
param
=
new
InOutParam
(
trayNum
,
wareNum
,
posId
,
plateH
,
plateW
);
if
(
LineManager
.
Line
.
IsReviceInPosId
(
moveEquip
,
posId
))
{
LineManager
.
Line
.
SetWarnMsg
(
"入库库位重复: "
+
param
.
ToStr
()
+
" ,入库失败!"
);
moveEquip
.
SetWarnMsg
(
"入库库位重复: "
+
param
.
ToStr
()
+
" ,入库失败!
"
);
//
LineManager.Line.SetWarnMsg("入库库位重复: " + param.ToStr() + " ,入库失败!");
//moveEquip.SetWarnMsg("入库库位重复: " + param.ToStr() + "
");
return
msg
=
(
"收到服务器入库命令 "
+
"入库库位重复: "
+
param
.
ToStr
()
+
" ,入库失败!"
);
}
LogUtil
.
info
(
"收到入库命令: "
+
param
.
ToStr
()
+
" ,更新盘空满信息,托盘号【"
+
trayNum
+
"】,有料,"
+
ReelType
.
InStore
+
""
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论