Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 5ad2883a
由
LN
编写于
2020-03-07 16:51:20 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
界面调整
1 个父辈
3eaba33a
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
42 行增加
和
21 行删除
source/AssemblyLineClient/FrmDischargeLine.Designer.cs
source/AssemblyLineClient/FrmIOMsg.cs
source/AssemblyLineClient/FrmLineStore.Designer.cs
source/AssemblyLineClient/FrmLineStore.cs
source/DeviceLibrary/assemblyLine/DischargeLine.cs
source/DeviceLibrary/assemblyLine/EquipBase.cs
source/DeviceLibrary/assemblyLine/LineBean.cs
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
source/AssemblyLineClient/FrmDischargeLine.Designer.cs
查看文件 @
5ad2883
...
...
@@ -37,8 +37,8 @@
this
.
cmbLineType
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
btnLine1Test
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox6
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lblMoveInfo
=
new
System
.
Windows
.
Forms
.
Label
();
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
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
...
...
@@ -321,10 +321,10 @@
this
.
groupBox6
.
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
.
groupBox6
.
Controls
.
Add
(
this
.
lblMoveInfo
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblThisSta
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblTrayNum
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblInstoreList
);
this
.
groupBox6
.
Controls
.
Add
(
this
.
lblMoveInfo
);
this
.
groupBox6
.
Location
=
new
System
.
Drawing
.
Point
(
495
,
227
);
this
.
groupBox6
.
Name
=
"groupBox6"
;
this
.
groupBox6
.
Size
=
new
System
.
Drawing
.
Size
(
797
,
256
);
...
...
@@ -332,17 +332,6 @@
this
.
groupBox6
.
TabStop
=
false
;
this
.
groupBox6
.
Text
=
"消息"
;
//
// lblMoveInfo
//
this
.
lblMoveInfo
.
AutoSize
=
true
;
this
.
lblMoveInfo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblMoveInfo
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblMoveInfo
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
22
);
this
.
lblMoveInfo
.
Name
=
"lblMoveInfo"
;
this
.
lblMoveInfo
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
17
);
this
.
lblMoveInfo
.
TabIndex
=
279
;
this
.
lblMoveInfo
.
Text
=
"运动信息:"
;
//
// lblThisSta
//
this
.
lblThisSta
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
...
...
@@ -358,6 +347,17 @@
this
.
lblThisSta
.
Text
=
"等待启动"
;
this
.
lblThisSta
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// lblMoveInfo
//
this
.
lblMoveInfo
.
AutoSize
=
true
;
this
.
lblMoveInfo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblMoveInfo
.
ImageAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleRight
;
this
.
lblMoveInfo
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
22
);
this
.
lblMoveInfo
.
Name
=
"lblMoveInfo"
;
this
.
lblMoveInfo
.
Size
=
new
System
.
Drawing
.
Size
(
68
,
17
);
this
.
lblMoveInfo
.
TabIndex
=
279
;
this
.
lblMoveInfo
.
Text
=
"运动信息:"
;
//
// lblTrayNum
//
this
.
lblTrayNum
.
AutoSize
=
true
;
...
...
source/AssemblyLineClient/FrmIOMsg.cs
查看文件 @
5ad2883
...
...
@@ -55,9 +55,23 @@ namespace OnlineStore.AssemblyLine
foreach
(
int
storeId
in
list
)
{
if
(
LineServer
.
ClientMap
.
ContainsKey
(
storeId
))
if
(
LineServer
.
BoxConnected
(
storeId
))
{
msg
+=
(
"BOX["
+
storeId
+
"]"
).
PadLeft
(
16
,
' '
)
+
" ✔ "
+
LineServer
.
ClientMap
[
storeId
].
AddStr
+
"\n"
;
string
doorTray
=
"仓门口:未知"
;
BoxInfo
box
=
LineServer
.
GetBoxInfo
(
storeId
);
if
(
box
!=
null
)
{
if
(
box
.
HasTray
.
Equals
(
1
))
{
doorTray
=
"仓门口:有料"
;
}
else
{
doorTray
=
"仓门口:无料"
;
}
}
msg
+=
(
"BOX["
+
storeId
+
"]"
).
PadLeft
(
16
,
' '
)
+
" ✔ "
+
LineServer
.
ClientMap
[
storeId
].
AddStr
+
" "
+
doorTray
+
"\n"
;
}
else
{
...
...
source/AssemblyLineClient/FrmLineStore.Designer.cs
查看文件 @
5ad2883
此文件的差异被折叠,
点击展开。
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
5ad2883
...
...
@@ -460,7 +460,7 @@ namespace OnlineStore.AssemblyLine
{
LogUtil
.
error
(
"LogM Error: "
,
ex
);
}
}
}
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
{
LogM
();
...
...
@@ -799,13 +799,18 @@ namespace OnlineStore.AssemblyLine
private
void
btnTrayInfo_Click
(
object
sender
,
EventArgs
e
)
{
string
msg
=
""
;
List
<
TrayInfo
>
tray
=
TrayManager
.
getTrayList
();
LogUtil
.
info
(
"-------------------开始打印托盘信息:"
);
msg
+=
"-------------------开始打印托盘信息:\r\n"
;
foreach
(
TrayInfo
t
in
tray
)
{
LogUtil
.
info
(
t
.
ToStr
());
msg
+=
t
.
ToStr
()+
"\r\n"
;
}
LogUtil
.
info
(
"-------------------结束打印托盘信息"
);
msg
+=
"-------------------结束打印托盘信息"
;
MessageBox
.
Show
(
msg
,
"托盘信息列表"
);
}
private
void
btnClearTray_Click
(
object
sender
,
EventArgs
e
)
...
...
source/DeviceLibrary/assemblyLine/DischargeLine.cs
查看文件 @
5ad2883
...
...
@@ -264,7 +264,7 @@ namespace OnlineStore.DeviceLibrary
IOTimeOutProcess
();
//判断流水线打开了才可以运行
if
(
runStatus
.
Equals
(
LineRunStatus
.
Runing
)
&&
NoAlarm
()
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)
&&
Line3TurnIsStop
()
&&
IOValue
(
IO_Type
.
SeparateDevice_Check
).
Equals
(
IO_VALUE
.
LOW
))
if
(
runStatus
.
Equals
(
LineRunStatus
.
Runing
)
&&
No
Error
Alarm
()
&&
MoveInfo
.
MoveType
.
Equals
(
LineMoveType
.
None
)
&&
Line3TurnIsStop
()
&&
IOValue
(
IO_Type
.
SeparateDevice_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(
IsNewType
)
{
...
...
source/DeviceLibrary/assemblyLine/EquipBase.cs
查看文件 @
5ad2883
...
...
@@ -317,7 +317,7 @@ namespace OnlineStore.DeviceLibrary
//此处先对托盘号进行验证
preTrayNum
=
currTrayNum
;
currTrayNum
=
RFIDManager
.
GetTrayNum
(
DeviceID
,
true
);
Log
Info
(
" ["
+
trayCount
+
"] IP ["
+
RFIDManager
.
GetRFIP
(
DeviceID
)
+
"] ["
+
preTrayNum
+
"] 当前托盘 ["
+
currTrayNum
+
"]"
);
Log
Util
.
LOGGER
.
Info
(
Name
+
" ["
+
trayCount
+
"] IP ["
+
RFIDManager
.
GetRFIP
(
DeviceID
)
+
"] ["
+
preTrayNum
+
"] 当前托盘 ["
+
currTrayNum
+
"]"
);
if
(
preTrayNum
.
Equals
(
currTrayNum
)
&&
currTrayNum
>
0
)
{
TrayManager
.
TrayErrorMsg
=
DateTime
.
Now
.
ToLongTimeString
()
+
" "
+
Name
+
"托盘号出现错乱:上一个托盘["
+
preTrayNum
+
"] 当前托盘 ["
+
currTrayNum
+
"],连续两个托盘号一样"
;
...
...
@@ -453,7 +453,7 @@ namespace OnlineStore.DeviceLibrary
else
if
(
rwSpan
.
TotalSeconds
>
5
&&
span
.
TotalSeconds
>
6
&&
span
.
TotalSeconds
<
LineManager
.
Config
.
IOSingle_TimerOut
*
2
)
{
preRWTime
=
DateTime
.
Now
;
string
msg
=
moveInfo
.
Name
+
" "
+
NotOkMsg
+
"已等待 "
+
Math
.
Abs
(
span
.
TotalSeconds
)
+
"秒,重写DO:"
;
string
msg
=
moveInfo
.
Name
+
"
["
+
moveInfo
.
MoveType
+
"]["
+
moveInfo
.
MoveStep
+
"]
"
+
NotOkMsg
+
"已等待 "
+
Math
.
Abs
(
span
.
TotalSeconds
)
+
"秒,重写DO:"
;
bool
isLog
=
false
;
foreach
(
WaitResultInfo
ww
in
list
)
{
...
...
source/DeviceLibrary/assemblyLine/LineBean.cs
查看文件 @
5ad2883
...
...
@@ -910,7 +910,7 @@ namespace OnlineStore.DeviceLibrary
// int tLength = 20;
msg
+=
"横移41托盘: "
+
Sw41TrayNum
+
"\n"
;
msg
+=
"横移23托盘:"
+
Sw23TrayNum
+
"\n"
;
msg
+=
"runS: "
+
runStatus
+
"
\n
"
;
msg
+=
"runS: "
+
runStatus
+
"
"
;
msg
+=
"lineS: "
+
lineStatus
+
"\n"
;
msg
+=
"alarm: "
+
alarmType
+
"\n"
;
msg
+=
"Move:"
+
MoveInfo
.
MoveType
+
" "
+
MoveInfo
.
SLog
+
"\n"
;
...
...
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
查看文件 @
5ad2883
...
...
@@ -78,8 +78,10 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
debug
(
Name
+
" ["
+
trayCount
+
"] 托盘检测:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸1-1下降 ,等待 StopCylinder_Check1=0"
);
//CheckLog(" 托盘检测:" + SecondMoveInfo.SLog + "阻挡气缸1-1下降 ,等待 StopCylinder_Check1=0" );
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
,
1200
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
));
SecondMoveInfo
.
OneWaitCanEndStep
=
true
;
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Check1
,
IO_VALUE
.
LOW
));
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
StopCylinder_Check2
,
IO_VALUE
.
HIGH
));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论