Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-VMILineClient
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 0ca7cebf
由
LN
编写于
2020-02-13 14:24:51 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
agv修改
1 个父辈
3c4a37e1
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
40 行增加
和
31 行删除
source/DeviceLibrary/acVmiLine/VMILineBean.cs
source/DeviceLibrary/agvClient/AgvClient.cs
source/LoadCVSLibrary/Config/bean/VMLLineConfig.cs
source/VMILineClient/FrmVMIClient.Designer.cs
source/VMILineClient/FrmVMIClient.cs
source/DeviceLibrary/acVmiLine/VMILineBean.cs
查看文件 @
0ca7ceb
...
@@ -280,13 +280,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -280,13 +280,13 @@ namespace OnlineStore.DeviceLibrary
//如果入口无料架即可进入
//如果入口无料架即可进入
if
(
IOManager
.
IOValue
(
IO_Type
.
OutL_InCheck
).
Equals
(
IO_VALUE
.
LOW
))
if
(
IOManager
.
IOValue
(
IO_Type
.
OutL_InCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
{
AgvClient
.
NeedEnter
(
Config
.
In
L_AgvName
,
""
);
AgvClient
.
NeedEnter
(
Config
.
Out
L_AgvName
,
""
);
}
else
}
else
{
{
AgvClient
.
ConnotEnter
(
Config
.
In
L_AgvName
,
""
);
AgvClient
.
ConnotEnter
(
Config
.
Out
L_AgvName
,
""
);
}
}
}
}
private
DateTime
il_lastCallAgvTime
=
DateTime
.
Now
;
private
DateTime
il_lastCallAgvTime
=
DateTime
.
Now
.
AddMinutes
(-
5
)
;
private
Stopwatch
il_outstopCheckWarch
=
new
Stopwatch
();
private
Stopwatch
il_outstopCheckWarch
=
new
Stopwatch
();
/// <summary>
/// <summary>
/// 入料线体定时处理
/// 入料线体定时处理
...
...
source/DeviceLibrary/agvClient/AgvClient.cs
查看文件 @
0ca7ceb
...
@@ -50,22 +50,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -50,22 +50,16 @@ namespace OnlineStore.DeviceLibrary
{
{
LogUtil
.
error
(
"初始化agvClient "
+
ServerIp
+
" 出错:"
,
ex
);
LogUtil
.
error
(
"初始化agvClient "
+
ServerIp
+
" 出错:"
,
ex
);
}
}
}
}
//private static void AgvClient_GetRFID(string name, byte[] content)
//{
// RFIDData data = new RFIDData(content);
// LogUtil.info("收到 AgvClient_GetRFID [" + name + "] [" + data.ToData() + "] ");
//}
public
static
void
SetStatus
(
string
id
,
string
shelfId
=
""
,
ClientAction
action
=
ClientAction
.
None
,
ClientLevel
level
=
ClientLevel
.
Low
)
public
static
void
SetStatus
(
string
id
,
string
shelfId
=
""
,
ClientAction
action
=
ClientAction
.
None
,
ClientLevel
level
=
ClientLevel
.
Low
)
{
{
ClientAction
currA
=
GetAction
(
id
);
ClientAction
currA
=
GetAction
(
id
);
//相同状态就设置一次
//
//
相同状态就设置一次
if
(
currA
.
Equals
(
action
))
//
if (currA.Equals(action))
{
//
{
return
;
//
return;
}
//
}
agvClient
.
SetStatus
(
id
,
""
,
shelfId
,
action
,
level
);
agvClient
.
SetStatus
(
id
,
""
,
shelfId
,
action
,
level
);
UpdateAction
(
id
,
action
);
UpdateAction
(
id
,
action
);
}
}
...
@@ -128,7 +122,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -128,7 +122,7 @@ namespace OnlineStore.DeviceLibrary
public
static
bool
ConnotEnter
(
string
id
,
string
shelfId
)
public
static
bool
ConnotEnter
(
string
id
,
string
shelfId
)
{
{
ClientAction
currA
=
GetAction
(
id
);
ClientAction
currA
=
GetAction
(
id
);
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
FinishLeave
)
||
currA
.
Equals
(
ClientAction
.
FinishEnter
))
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
FinishLeave
)
||
currA
.
Equals
(
ClientAction
.
FinishEnter
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
)
)
{
{
SetStatus
(
id
,
shelfId
,
ClientAction
.
None
);
SetStatus
(
id
,
shelfId
,
ClientAction
.
None
);
return
true
;
return
true
;
...
@@ -138,7 +132,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -138,7 +132,7 @@ namespace OnlineStore.DeviceLibrary
public
static
bool
NeedEnter
(
string
id
,
string
shelfId
)
public
static
bool
NeedEnter
(
string
id
,
string
shelfId
)
{
{
ClientAction
currA
=
GetAction
(
id
);
ClientAction
currA
=
GetAction
(
id
);
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
FinishLeave
)
||
currA
.
Equals
(
ClientAction
.
FinishEnter
))
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
FinishLeave
)
||
currA
.
Equals
(
ClientAction
.
FinishEnter
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
)
)
{
{
SetStatus
(
id
,
shelfId
,
ClientAction
.
NeedEnter
);
SetStatus
(
id
,
shelfId
,
ClientAction
.
NeedEnter
);
return
true
;
return
true
;
...
@@ -149,7 +143,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -149,7 +143,7 @@ namespace OnlineStore.DeviceLibrary
{
{
ClientAction
currA
=
GetAction
(
id
);
ClientAction
currA
=
GetAction
(
id
);
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
FinishLeave
)
||
currA
.
Equals
(
ClientAction
.
FinishEnter
))
if
(
currA
.
Equals
(
ClientAction
.
None
)
||
currA
.
Equals
(
ClientAction
.
FinishLeave
)
||
currA
.
Equals
(
ClientAction
.
FinishEnter
)
||
currA
.
Equals
(
ClientAction
.
NeedLeave
)
||
currA
.
Equals
(
ClientAction
.
NeedEnter
)
)
{
{
SetStatus
(
id
,
shelfId
,
ClientAction
.
NeedLeave
);
SetStatus
(
id
,
shelfId
,
ClientAction
.
NeedLeave
);
return
true
;
return
true
;
...
...
source/LoadCVSLibrary/Config/bean/VMLLineConfig.cs
查看文件 @
0ca7ceb
...
@@ -34,7 +34,7 @@ namespace OnlineStore.LoadCSVLibrary
...
@@ -34,7 +34,7 @@ namespace OnlineStore.LoadCSVLibrary
[
ConfigProAttribute
(
"IO_DOLength"
)]
[
ConfigProAttribute
(
"IO_DOLength"
)]
public
string
IO_DOLength
{
get
;
set
;
}
public
string
IO_DOLength
{
get
;
set
;
}
/// <summary>
/// <summary>
/// PRO,出空料架流水线AGV节点名称,OutL_AgvName,A
1
,,,,,,,
/// PRO,出空料架流水线AGV节点名称,OutL_AgvName,A
2
,,,,,,,
/// </summary>
/// </summary>
[
ConfigProAttribute
(
"OutL_AgvName"
)]
[
ConfigProAttribute
(
"OutL_AgvName"
)]
public
string
OutL_AgvName
{
get
;
set
;
}
public
string
OutL_AgvName
{
get
;
set
;
}
...
...
source/VMILineClient/FrmVMIClient.Designer.cs
查看文件 @
0ca7ceb
...
@@ -66,6 +66,7 @@
...
@@ -66,6 +66,7 @@
this
.
btnNeedLeave
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnNeedLeave
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnDis
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnDis
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnInit
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnInit
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
button1
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
groupBox3
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
this
.
contextMenuStrip1
.
SuspendLayout
();
this
.
contextMenuStrip1
.
SuspendLayout
();
...
@@ -489,6 +490,7 @@
...
@@ -489,6 +490,7 @@
//
//
this
.
groupBox5
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
this
.
groupBox5
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox5
.
Controls
.
Add
(
this
.
button1
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtShelfId
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtShelfId
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtname
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
txtname
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnNeedEntry
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnNeedEntry
);
...
@@ -505,7 +507,7 @@
...
@@ -505,7 +507,7 @@
// txtShelfId
// txtShelfId
//
//
this
.
txtShelfId
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtShelfId
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtShelfId
.
Location
=
new
System
.
Drawing
.
Point
(
3
54
,
31
);
this
.
txtShelfId
.
Location
=
new
System
.
Drawing
.
Point
(
3
00
,
31
);
this
.
txtShelfId
.
MaxLength
=
4
;
this
.
txtShelfId
.
MaxLength
=
4
;
this
.
txtShelfId
.
Name
=
"txtShelfId"
;
this
.
txtShelfId
.
Name
=
"txtShelfId"
;
this
.
txtShelfId
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
26
);
this
.
txtShelfId
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
26
);
...
@@ -515,7 +517,7 @@
...
@@ -515,7 +517,7 @@
// txtname
// txtname
//
//
this
.
txtname
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtname
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
txtname
.
Location
=
new
System
.
Drawing
.
Point
(
2
9
9
,
31
);
this
.
txtname
.
Location
=
new
System
.
Drawing
.
Point
(
2
3
9
,
31
);
this
.
txtname
.
MaxLength
=
4
;
this
.
txtname
.
MaxLength
=
4
;
this
.
txtname
.
Name
=
"txtname"
;
this
.
txtname
.
Name
=
"txtname"
;
this
.
txtname
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
26
);
this
.
txtname
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
26
);
...
@@ -525,9 +527,9 @@
...
@@ -525,9 +527,9 @@
// btnNeedEntry
// btnNeedEntry
//
//
this
.
btnNeedEntry
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnNeedEntry
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnNeedEntry
.
Location
=
new
System
.
Drawing
.
Point
(
548
,
24
);
this
.
btnNeedEntry
.
Location
=
new
System
.
Drawing
.
Point
(
469
,
24
);
this
.
btnNeedEntry
.
Name
=
"btnNeedEntry"
;
this
.
btnNeedEntry
.
Name
=
"btnNeedEntry"
;
this
.
btnNeedEntry
.
Size
=
new
System
.
Drawing
.
Size
(
1
32
,
39
);
this
.
btnNeedEntry
.
Size
=
new
System
.
Drawing
.
Size
(
1
00
,
39
);
this
.
btnNeedEntry
.
TabIndex
=
4
;
this
.
btnNeedEntry
.
TabIndex
=
4
;
this
.
btnNeedEntry
.
Text
=
"NeedEntry"
;
this
.
btnNeedEntry
.
Text
=
"NeedEntry"
;
this
.
btnNeedEntry
.
UseVisualStyleBackColor
=
true
;
this
.
btnNeedEntry
.
UseVisualStyleBackColor
=
true
;
...
@@ -536,9 +538,9 @@
...
@@ -536,9 +538,9 @@
// btnNeedLeave
// btnNeedLeave
//
//
this
.
btnNeedLeave
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnNeedLeave
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnNeedLeave
.
Location
=
new
System
.
Drawing
.
Point
(
410
,
24
);
this
.
btnNeedLeave
.
Location
=
new
System
.
Drawing
.
Point
(
361
,
24
);
this
.
btnNeedLeave
.
Name
=
"btnNeedLeave"
;
this
.
btnNeedLeave
.
Name
=
"btnNeedLeave"
;
this
.
btnNeedLeave
.
Size
=
new
System
.
Drawing
.
Size
(
1
32
,
39
);
this
.
btnNeedLeave
.
Size
=
new
System
.
Drawing
.
Size
(
1
00
,
39
);
this
.
btnNeedLeave
.
TabIndex
=
3
;
this
.
btnNeedLeave
.
TabIndex
=
3
;
this
.
btnNeedLeave
.
Text
=
"NeedLeave"
;
this
.
btnNeedLeave
.
Text
=
"NeedLeave"
;
this
.
btnNeedLeave
.
UseVisualStyleBackColor
=
true
;
this
.
btnNeedLeave
.
UseVisualStyleBackColor
=
true
;
...
@@ -547,9 +549,9 @@
...
@@ -547,9 +549,9 @@
// btnDis
// btnDis
//
//
this
.
btnDis
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnDis
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnDis
.
Location
=
new
System
.
Drawing
.
Point
(
1
6
1
,
24
);
this
.
btnDis
.
Location
=
new
System
.
Drawing
.
Point
(
1
3
1
,
24
);
this
.
btnDis
.
Name
=
"btnDis"
;
this
.
btnDis
.
Name
=
"btnDis"
;
this
.
btnDis
.
Size
=
new
System
.
Drawing
.
Size
(
1
32
,
39
);
this
.
btnDis
.
Size
=
new
System
.
Drawing
.
Size
(
1
00
,
39
);
this
.
btnDis
.
TabIndex
=
2
;
this
.
btnDis
.
TabIndex
=
2
;
this
.
btnDis
.
Text
=
"断开"
;
this
.
btnDis
.
Text
=
"断开"
;
this
.
btnDis
.
UseVisualStyleBackColor
=
true
;
this
.
btnDis
.
UseVisualStyleBackColor
=
true
;
...
@@ -560,12 +562,22 @@
...
@@ -560,12 +562,22 @@
this
.
btnInit
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnInit
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnInit
.
Location
=
new
System
.
Drawing
.
Point
(
23
,
24
);
this
.
btnInit
.
Location
=
new
System
.
Drawing
.
Point
(
23
,
24
);
this
.
btnInit
.
Name
=
"btnInit"
;
this
.
btnInit
.
Name
=
"btnInit"
;
this
.
btnInit
.
Size
=
new
System
.
Drawing
.
Size
(
1
32
,
39
);
this
.
btnInit
.
Size
=
new
System
.
Drawing
.
Size
(
1
00
,
39
);
this
.
btnInit
.
TabIndex
=
1
;
this
.
btnInit
.
TabIndex
=
1
;
this
.
btnInit
.
Text
=
"连接"
;
this
.
btnInit
.
Text
=
"连接"
;
this
.
btnInit
.
UseVisualStyleBackColor
=
true
;
this
.
btnInit
.
UseVisualStyleBackColor
=
true
;
this
.
btnInit
.
Click
+=
new
System
.
EventHandler
(
this
.
btnInit_Click
);
this
.
btnInit
.
Click
+=
new
System
.
EventHandler
(
this
.
btnInit_Click
);
//
//
// button1
//
this
.
button1
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
button1
.
Location
=
new
System
.
Drawing
.
Point
(
577
,
24
);
this
.
button1
.
Name
=
"button1"
;
this
.
button1
.
Size
=
new
System
.
Drawing
.
Size
(
100
,
39
);
this
.
button1
.
TabIndex
=
7
;
this
.
button1
.
Text
=
"NeedEntry"
;
this
.
button1
.
UseVisualStyleBackColor
=
true
;
//
// FrmVMIClient
// FrmVMIClient
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
@@ -644,6 +656,7 @@
...
@@ -644,6 +656,7 @@
private
System
.
Windows
.
Forms
.
ComboBox
cmbStopList
;
private
System
.
Windows
.
Forms
.
ComboBox
cmbStopList
;
private
System
.
Windows
.
Forms
.
TextBox
txtname
;
private
System
.
Windows
.
Forms
.
TextBox
txtname
;
private
System
.
Windows
.
Forms
.
TextBox
txtShelfId
;
private
System
.
Windows
.
Forms
.
TextBox
txtShelfId
;
private
System
.
Windows
.
Forms
.
Button
button1
;
}
}
}
}
source/VMILineClient/FrmVMIClient.cs
查看文件 @
0ca7ceb
...
@@ -367,12 +367,14 @@ namespace OnlineStore.VMILineClient
...
@@ -367,12 +367,14 @@ namespace OnlineStore.VMILineClient
string
agvName
=
"C2"
;
string
agvName
=
"C2"
;
private
void
btnNeedLeave_Click
(
object
sender
,
EventArgs
e
)
private
void
btnNeedLeave_Click
(
object
sender
,
EventArgs
e
)
{
{
AgvClient
.
SetStatus
(
txtname
.
Text
,
txtShelfId
.
Text
,
Asa
.
ClientAction
.
NeedLeave
);
AgvClient
.
NeedLeave
(
txtname
.
Text
,
txtShelfId
.
Text
);
// AgvClient.SetStatus(txtname.Text, txtShelfId.Text,Asa.ClientAction.NeedLeave);
}
}
private
void
btnNeedEntry_Click
(
object
sender
,
EventArgs
e
)
private
void
btnNeedEntry_Click
(
object
sender
,
EventArgs
e
)
{
{
AgvClient
.
SetStatus
(
txtname
.
Text
,
txtShelfId
.
Text
,
Asa
.
ClientAction
.
NeedEnter
);
AgvClient
.
NeedEnter
(
txtname
.
Text
,
txtShelfId
.
Text
);
// AgvClient.SetStatus(txtname.Text, txtShelfId.Text,Asa.ClientAction.NeedEnter);
}
}
private
void
btnInit_Click
(
object
sender
,
EventArgs
e
)
private
void
btnInit_Click
(
object
sender
,
EventArgs
e
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论