Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit f311f7e0
由
LN
编写于
2020-03-07 18:13:02 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
出料托盘修改
1 个父辈
5ad2883a
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
52 行增加
和
24 行删除
source/AssemblyLineClient/FrmIOMsg.Designer.cs
source/AssemblyLineClient/FrmIOMsg.cs
source/AssemblyLineClient/FrmLineStore.cs
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
source/DeviceLibrary/model/KTK_Store.cs
source/DeviceLibrary/server/LineServer.cs
source/AssemblyLineClient/FrmIOMsg.Designer.cs
查看文件 @
f311f7e
...
@@ -46,30 +46,30 @@
...
@@ -46,30 +46,30 @@
// lblConInfo
// lblConInfo
//
//
this
.
lblConInfo
.
AutoSize
=
true
;
this
.
lblConInfo
.
AutoSize
=
true
;
this
.
lblConInfo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5
F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblConInfo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9
F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblConInfo
.
Location
=
new
System
.
Drawing
.
Point
(
63
,
62
);
this
.
lblConInfo
.
Location
=
new
System
.
Drawing
.
Point
(
63
,
62
);
this
.
lblConInfo
.
Name
=
"lblConInfo"
;
this
.
lblConInfo
.
Name
=
"lblConInfo"
;
this
.
lblConInfo
.
Size
=
new
System
.
Drawing
.
Size
(
80
,
20
);
this
.
lblConInfo
.
Size
=
new
System
.
Drawing
.
Size
(
70
,
17
);
this
.
lblConInfo
.
TabIndex
=
0
;
this
.
lblConInfo
.
TabIndex
=
0
;
this
.
lblConInfo
.
Text
=
"IO连接信息"
;
this
.
lblConInfo
.
Text
=
"IO连接信息"
;
//
//
// lblRFID
// lblRFID
//
//
this
.
lblRFID
.
AutoSize
=
true
;
this
.
lblRFID
.
AutoSize
=
true
;
this
.
lblRFID
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5
F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblRFID
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9
F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblRFID
.
Location
=
new
System
.
Drawing
.
Point
(
321
,
62
);
this
.
lblRFID
.
Location
=
new
System
.
Drawing
.
Point
(
321
,
62
);
this
.
lblRFID
.
Name
=
"lblRFID"
;
this
.
lblRFID
.
Name
=
"lblRFID"
;
this
.
lblRFID
.
Size
=
new
System
.
Drawing
.
Size
(
82
,
20
);
this
.
lblRFID
.
Size
=
new
System
.
Drawing
.
Size
(
71
,
17
);
this
.
lblRFID
.
TabIndex
=
1
;
this
.
lblRFID
.
TabIndex
=
1
;
this
.
lblRFID
.
Text
=
"RFID信息:"
;
this
.
lblRFID
.
Text
=
"RFID信息:"
;
//
//
// lblBox
// lblBox
//
//
this
.
lblBox
.
AutoSize
=
true
;
this
.
lblBox
.
AutoSize
=
true
;
this
.
lblBox
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5
F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblBox
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9
F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblBox
.
Location
=
new
System
.
Drawing
.
Point
(
627
,
62
);
this
.
lblBox
.
Location
=
new
System
.
Drawing
.
Point
(
570
,
62
);
this
.
lblBox
.
Name
=
"lblBox"
;
this
.
lblBox
.
Name
=
"lblBox"
;
this
.
lblBox
.
Size
=
new
System
.
Drawing
.
Size
(
93
,
20
);
this
.
lblBox
.
Size
=
new
System
.
Drawing
.
Size
(
80
,
17
);
this
.
lblBox
.
TabIndex
=
2
;
this
.
lblBox
.
TabIndex
=
2
;
this
.
lblBox
.
Text
=
"料仓连接信息"
;
this
.
lblBox
.
Text
=
"料仓连接信息"
;
//
//
...
@@ -79,9 +79,9 @@
...
@@ -79,9 +79,9 @@
this
.
lblMsg
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblMsg
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
lblMsg
.
Location
=
new
System
.
Drawing
.
Point
(
56
,
26
);
this
.
lblMsg
.
Location
=
new
System
.
Drawing
.
Point
(
56
,
26
);
this
.
lblMsg
.
Name
=
"lblMsg"
;
this
.
lblMsg
.
Name
=
"lblMsg"
;
this
.
lblMsg
.
Size
=
new
System
.
Drawing
.
Size
(
87
,
17
);
this
.
lblMsg
.
Size
=
new
System
.
Drawing
.
Size
(
94
,
17
);
this
.
lblMsg
.
TabIndex
=
3
;
this
.
lblMsg
.
TabIndex
=
3
;
this
.
lblMsg
.
Text
=
"
3
秒钟刷新一次"
;
this
.
lblMsg
.
Text
=
"
10
秒钟刷新一次"
;
//
//
// btnUpdate
// btnUpdate
//
//
...
@@ -107,7 +107,7 @@
...
@@ -107,7 +107,7 @@
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
9
8
0
,
708
);
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
9
9
0
,
708
);
this
.
Controls
.
Add
(
this
.
btnExit
);
this
.
Controls
.
Add
(
this
.
btnExit
);
this
.
Controls
.
Add
(
this
.
btnUpdate
);
this
.
Controls
.
Add
(
this
.
btnUpdate
);
this
.
Controls
.
Add
(
this
.
lblMsg
);
this
.
Controls
.
Add
(
this
.
lblMsg
);
...
@@ -116,6 +116,7 @@
...
@@ -116,6 +116,7 @@
this
.
Controls
.
Add
(
this
.
lblConInfo
);
this
.
Controls
.
Add
(
this
.
lblConInfo
);
this
.
Name
=
"FrmIOMsg"
;
this
.
Name
=
"FrmIOMsg"
;
this
.
Text
=
"IO连接状态"
;
this
.
Text
=
"IO连接状态"
;
this
.
FormClosed
+=
new
System
.
Windows
.
Forms
.
FormClosedEventHandler
(
this
.
FrmIOMsg_FormClosed
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmIOMsg_Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
FrmIOMsg_Load
);
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
this
.
PerformLayout
();
...
...
source/AssemblyLineClient/FrmIOMsg.cs
查看文件 @
f311f7e
...
@@ -21,7 +21,10 @@ namespace OnlineStore.AssemblyLine
...
@@ -21,7 +21,10 @@ namespace OnlineStore.AssemblyLine
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
private
void
timer1_Tick
(
object
sender
,
EventArgs
e
)
{
{
UpdateData
();
if
(
this
.
Visible
)
{
UpdateData
();
}
}
}
private
void
UpdateData
()
private
void
UpdateData
()
...
@@ -89,6 +92,7 @@ namespace OnlineStore.AssemblyLine
...
@@ -89,6 +92,7 @@ namespace OnlineStore.AssemblyLine
private
void
btnExit_Click
(
object
sender
,
EventArgs
e
)
private
void
btnExit_Click
(
object
sender
,
EventArgs
e
)
{
{
timer1
.
Stop
();
this
.
Close
();
this
.
Close
();
}
}
...
@@ -96,5 +100,10 @@ namespace OnlineStore.AssemblyLine
...
@@ -96,5 +100,10 @@ namespace OnlineStore.AssemblyLine
{
{
UpdateData
();
UpdateData
();
}
}
private
void
FrmIOMsg_FormClosed
(
object
sender
,
FormClosedEventArgs
e
)
{
timer1
.
Stop
();
}
}
}
}
}
source/AssemblyLineClient/FrmLineStore.cs
查看文件 @
f311f7e
...
@@ -135,14 +135,14 @@ namespace OnlineStore.AssemblyLine
...
@@ -135,14 +135,14 @@ namespace OnlineStore.AssemblyLine
private
void
LoadListView
()
private
void
LoadListView
()
{
{
this
.
listView1
.
Columns
.
Clear
();
this
.
listView1
.
Columns
.
Clear
();
AddHealder
(
"设备名称"
,
10
0
);
AddHealder
(
"设备名称"
,
9
0
);
AddHealder
(
"启用"
,
40
);
AddHealder
(
"启用"
,
40
);
AddHealder
(
"报警"
,
1
0
0
);
AddHealder
(
"报警"
,
1
1
0
);
AddHealder
(
"状态"
,
1
0
0
);
AddHealder
(
"状态"
,
1
1
0
);
AddHealder
(
"BOX_CID"
,
80
);
AddHealder
(
"BOX_CID"
,
80
);
AddHealder
(
"
BOX报警"
,
10
0
);
AddHealder
(
"
在线"
,
4
0
);
AddHealder
(
"
更新时间"
,
8
0
);
AddHealder
(
"
BOX_报警"
,
11
0
);
AddHealder
(
"BOX状态"
,
1
0
0
);
AddHealder
(
"BOX状态"
,
1
1
0
);
//AddHealder("BOX状态", listView1.Size.Width - 100 - 80 - 80 - 100 - 100 - 100 -40- 8);
//AddHealder("BOX状态", listView1.Size.Width - 100 - 80 - 80 - 100 - 100 - 100 -40- 8);
foreach
(
MoveEquip
move
in
lineBean
.
MoveEquipMap
.
Values
)
foreach
(
MoveEquip
move
in
lineBean
.
MoveEquipMap
.
Values
)
{
{
...
@@ -155,9 +155,15 @@ namespace OnlineStore.AssemblyLine
...
@@ -155,9 +155,15 @@ namespace OnlineStore.AssemblyLine
BoxInfo
box
=
LineServer
.
GetBoxInfo
(
move
.
DeviceID
);
BoxInfo
box
=
LineServer
.
GetBoxInfo
(
move
.
DeviceID
);
if
(
box
!=
null
)
if
(
box
!=
null
)
{
{
string
online
=
"✘"
;
lvi
.
SubItems
.
Add
(
box
.
CId
.
ToString
());
lvi
.
SubItems
.
Add
(
box
.
CId
.
ToString
());
if
((
DateTime
.
Now
-
box
.
LastMsgTime
).
TotalSeconds
<
LineServer
.
ClientKeepSecond
)
{
online
=
"✔"
;
}
lvi
.
SubItems
.
Add
(
online
);
lvi
.
SubItems
.
Add
(
box
.
SAlarmType
.
ToString
());
lvi
.
SubItems
.
Add
(
box
.
SAlarmType
.
ToString
());
lvi
.
SubItems
.
Add
(
box
.
LastMsgTime
.
ToLongTimeString
());
lvi
.
SubItems
.
Add
(
box
.
ToShowStr
());
lvi
.
SubItems
.
Add
(
box
.
ToShowStr
());
}
}
else
else
...
@@ -506,8 +512,8 @@ namespace OnlineStore.AssemblyLine
...
@@ -506,8 +512,8 @@ namespace OnlineStore.AssemblyLine
int
item_alarm_index
=
2
;
int
item_alarm_index
=
2
;
int
item_runStr_index
=
3
;
int
item_runStr_index
=
3
;
int
item_cid_index
=
4
;
int
item_cid_index
=
4
;
int
item_SAlarmType_index
=
5
;
int
item_SAlarmType_index
=
6
;
int
item_LastMsgTime_index
=
6
;
int
item_LastMsgTime_index
=
5
;
int
item_BoxStr_index
=
7
;
int
item_BoxStr_index
=
7
;
foreach
(
MoveEquip
move
in
lineBean
.
MoveEquipMap
.
Values
)
foreach
(
MoveEquip
move
in
lineBean
.
MoveEquipMap
.
Values
)
{
{
...
@@ -520,10 +526,22 @@ namespace OnlineStore.AssemblyLine
...
@@ -520,10 +526,22 @@ namespace OnlineStore.AssemblyLine
if
(
box
!=
null
)
if
(
box
!=
null
)
{
{
SetItemText
(
i
,
item_cid_index
,
box
.
CId
.
ToString
());
SetItemText
(
i
,
item_cid_index
,
box
.
CId
.
ToString
());
string
online
=
"✘"
;
if
((
DateTime
.
Now
-
box
.
LastMsgTime
).
TotalSeconds
<
LineServer
.
ClientKeepSecond
)
{
online
=
"✔"
;
}
SetItemText
(
i
,
item_LastMsgTime_index
,
online
);
SetItemText
(
i
,
item_SAlarmType_index
,
box
.
SAlarmType
.
ToString
());
SetItemText
(
i
,
item_SAlarmType_index
,
box
.
SAlarmType
.
ToString
());
SetItemText
(
i
,
item_LastMsgTime_index
,
box
.
LastMsgTime
.
ToLongTimeString
());
SetItemText
(
i
,
item_BoxStr_index
,
box
.
ToShowStr
());
SetItemText
(
i
,
item_BoxStr_index
,
box
.
ToShowStr
());
}
}
else
{
SetItemText
(
i
,
item_cid_index
,
""
);
SetItemText
(
i
,
item_LastMsgTime_index
,
""
);
SetItemText
(
i
,
item_SAlarmType_index
,
""
);
SetItemText
(
i
,
item_BoxStr_index
,
""
);
}
SetItemColor
(
i
,
move
.
runStatus
);
SetItemColor
(
i
,
move
.
runStatus
);
i
++;
i
++;
}
}
...
...
source/DeviceLibrary/assemblyLine/ProvidingEquip_Partial.cs
查看文件 @
f311f7e
...
@@ -74,7 +74,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -74,7 +74,7 @@ namespace OnlineStore.DeviceLibrary
//托盘在第一个阻挡处
//托盘在第一个阻挡处
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NewMove
(
LineMoveType
.
CheckFixture
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_00_Stop1Down
);
SecondMoveInfo
.
NextMoveStep
(
LineMoveStep
.
MIO_00_Stop1Down
);
SecondMoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
200
));
//
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
LogUtil
.
debug
(
Name
+
" ["
+
trayCount
+
"] 托盘检测:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸1-1下降 ,等待 StopCylinder_Check1=0"
);
LogUtil
.
debug
(
Name
+
" ["
+
trayCount
+
"] 托盘检测:"
+
SecondMoveInfo
.
SLog
+
"阻挡气缸1-1下降 ,等待 StopCylinder_Check1=0"
);
//CheckLog(" 托盘检测:" + SecondMoveInfo.SLog + "阻挡气缸1-1下降 ,等待 StopCylinder_Check1=0" );
//CheckLog(" 托盘检测:" + SecondMoveInfo.SLog + "阻挡气缸1-1下降 ,等待 StopCylinder_Check1=0" );
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
,
1200
);
IOMove
(
IO_Type
.
StopCylinder_Down1
,
IO_VALUE
.
HIGH
,
1200
);
...
...
source/DeviceLibrary/model/KTK_Store.cs
查看文件 @
f311f7e
...
@@ -441,7 +441,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -441,7 +441,7 @@ namespace OnlineStore.DeviceLibrary
IO_VALUE
tValue
=
value
.
Equals
(
IO_VALUE
.
HIGH
)
?
IO_VALUE
.
LOW
:
IO_VALUE
.
HIGH
;
IO_VALUE
tValue
=
value
.
Equals
(
IO_VALUE
.
HIGH
)
?
IO_VALUE
.
LOW
:
IO_VALUE
.
HIGH
;
if
(
IOValue
(
IoType
).
Equals
(
tValue
).
Equals
(
false
))
if
(
IOValue
(
IoType
).
Equals
(
tValue
).
Equals
(
false
))
{
{
if
(
IoType
.
Equals
(
IO_Type
.
StopCylinder_Down1
).
Equals
(
false
))
if
(
IoType
.
Equals
(
IO_Type
.
StopCylinder_Down1
).
Equals
(
false
)
&&
IoType
.
Equals
(
IO_Type
.
SW_StopDown
).
Equals
(
false
)
)
{
{
LogUtil
.
info
(
Name
+
"定时回写IO: ["
+
IoType
+
"]=["
+
value
+
"],["
+
baseConfig
.
Id
+
"],msTime="
+
msTime
);
LogUtil
.
info
(
Name
+
"定时回写IO: ["
+
IoType
+
"]=["
+
value
+
"],["
+
baseConfig
.
Id
+
"],msTime="
+
msTime
);
}
}
...
...
source/DeviceLibrary/server/LineServer.cs
查看文件 @
f311f7e
...
@@ -15,7 +15,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -15,7 +15,7 @@ namespace OnlineStore.DeviceLibrary
private
static
TcpServer
tcpserver
=
null
;
private
static
TcpServer
tcpserver
=
null
;
public
static
bool
IsStart
=
false
;
public
static
bool
IsStart
=
false
;
p
rivate
static
int
ClientKeepSecond
=
10
;
p
ublic
static
int
ClientKeepSecond
=
10
;
public
static
Dictionary
<
int
,
BoxInfo
>
BoxMap
=
new
Dictionary
<
int
,
BoxInfo
>();
public
static
Dictionary
<
int
,
BoxInfo
>
BoxMap
=
new
Dictionary
<
int
,
BoxInfo
>();
public
static
Dictionary
<
int
,
TcpClientBean
>
ClientMap
=
new
Dictionary
<
int
,
TcpClientBean
>();
public
static
Dictionary
<
int
,
TcpClientBean
>
ClientMap
=
new
Dictionary
<
int
,
TcpClientBean
>();
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论