Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-VMILineClient
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 1358d0b3
由
LN
编写于
2020-01-12 13:33:44 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
6e37d6f1
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
123 行增加
和
121 行删除
dll/Client.dll
dll/RFID/Basic.dll
source/Common/util/LogUtil.cs
source/DeviceLibrary/DeviceLibrary.csproj
source/DeviceLibrary/IO/IOManager.cs
source/DeviceLibrary/LineConfig/VMILineConfig.csv
source/DeviceLibrary/RFID/RFID.cs
source/DeviceLibrary/RFID/RFIDManager.cs
source/DeviceLibrary/acVmiLine/RobotManager.cs
source/DeviceLibrary/acVmiLine/VMILineBean.cs
source/DeviceLibrary/agvClient/AgvClient.cs
source/VMILineClient/App.config
source/VMILineClient/FrmVMIClient.Designer.cs
source/VMILineClient/FrmVMIClient.cs
dll/Client.dll
查看文件 @
1358d0b
此文件类型无法预览
dll/RFID/Basic.dll
0 → 100644
查看文件 @
1358d0b
此文件类型无法预览
source/Common/util/LogUtil.cs
查看文件 @
1358d0b
...
@@ -20,7 +20,7 @@ namespace OnlineStore.Common
...
@@ -20,7 +20,7 @@ namespace OnlineStore.Common
public
static
System
.
Windows
.
Forms
.
RichTextBox
logBox
=
null
;
public
static
System
.
Windows
.
Forms
.
RichTextBox
logBox
=
null
;
public
static
int
showCount
=
1
0
;
public
static
int
showCount
=
2
0
;
public
static
bool
debug_opened
=
false
;
public
static
bool
debug_opened
=
false
;
...
@@ -32,20 +32,20 @@ namespace OnlineStore.Common
...
@@ -32,20 +32,20 @@ namespace OnlineStore.Common
return
;
return
;
}
}
log
.
Info
(
log
.
Logger
.
Name
+
" - "
+
msg
);
log
.
Info
(
" - "
+
msg
);
AddToBox
(
msg
,
Color
.
Black
);
AddToBox
(
msg
,
Color
.
Black
);
//clear();
//clear();
}
}
public
static
void
info
(
ILog
log
,
string
msg
,
Color
color
)
public
static
void
info
(
ILog
log
,
string
msg
,
Color
color
)
{
{
log
.
Info
(
log
.
Logger
.
Name
+
" - "
+
msg
);
log
.
Info
(
" - "
+
msg
);
AddToBox
(
msg
,
color
);
AddToBox
(
msg
,
color
);
}
}
public
static
void
debug
(
ILog
log
,
string
msg
,
Color
color
)
public
static
void
debug
(
ILog
log
,
string
msg
,
Color
color
)
{
{
log
.
Debug
(
log
.
Logger
.
Name
+
" - "
+
msg
);
log
.
Debug
(
" - "
+
msg
);
if
(
debug_opened
)
if
(
debug_opened
)
{
{
AddToBox
(
msg
,
color
);
AddToBox
(
msg
,
color
);
...
@@ -53,7 +53,7 @@ namespace OnlineStore.Common
...
@@ -53,7 +53,7 @@ namespace OnlineStore.Common
}
}
public
static
void
debug
(
ILog
log
,
string
msg
)
public
static
void
debug
(
ILog
log
,
string
msg
)
{
{
log
.
Debug
(
log
.
Logger
.
Name
+
" - "
+
msg
);
log
.
Debug
(
" - "
+
msg
);
if
(
debug_opened
)
if
(
debug_opened
)
{
{
AddToBox
(
msg
,
Color
.
Gray
);
AddToBox
(
msg
,
Color
.
Gray
);
...
...
source/DeviceLibrary/DeviceLibrary.csproj
查看文件 @
1358d0b
...
@@ -52,9 +52,6 @@
...
@@ -52,9 +52,6 @@
<SpecificVersion>False</SpecificVersion>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\dll\log4net.dll</HintPath>
<HintPath>..\..\dll\log4net.dll</HintPath>
</Reference>
</Reference>
<Reference Include="RFIDLibrary">
<HintPath>..\..\dll\RFID\RFIDLibrary.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Drawing" />
...
@@ -78,7 +75,9 @@
...
@@ -78,7 +75,9 @@
<Compile Include="bean\StoreStep.cs">
<Compile Include="bean\StoreStep.cs">
<SubType>Code</SubType>
<SubType>Code</SubType>
</Compile>
</Compile>
<Compile Include="RFID\RFID.cs" />
<Compile Include="RFID\RFIDManager.cs" />
<Compile Include="RFID\RFIDManager.cs" />
<Compile Include="RFID\RFIDReader.cs" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Common.csproj">
<ProjectReference Include="..\Common\Common.csproj">
...
...
source/DeviceLibrary/IO/IOManager.cs
查看文件 @
1358d0b
...
@@ -30,7 +30,13 @@ namespace OnlineStore.DeviceLibrary
...
@@ -30,7 +30,13 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
error
(
"没有DO="
+
ioType
);
LogUtil
.
error
(
"没有DO="
+
ioType
);
}
}
}
}
public
static
void
CIOMove
(
string
ioType
,
IO_VALUE
ioValue
)
{
if
(!
IOValue
(
ioType
).
Equals
(
ioValue
))
{
IOMove
(
ioType
,
ioValues
);
}
}
public
static
IO_VALUE
IOValue
(
string
ioType
)
public
static
IO_VALUE
IOValue
(
string
ioType
)
{
{
IO_VALUE
ioValue
=
IO_VALUE
.
LOW
;
IO_VALUE
ioValue
=
IO_VALUE
.
LOW
;
...
...
source/DeviceLibrary/LineConfig/VMILineConfig.csv
查看文件 @
1358d0b
...
@@ -36,7 +36,7 @@ DO,出料线阻挡2下降,OutL_OutStopDown,8,PRO_AOI_IP_1,0,出料线阻挡2下降,Y729,DO-01,
...
@@ -36,7 +36,7 @@ DO,出料线阻挡2下降,OutL_OutStopDown,8,PRO_AOI_IP_1,0,出料线阻挡2下降,Y729,DO-01,
,,,14,PRO_AOI_IP_1,0,,Y735,DO-07,0,
,,,14,PRO_AOI_IP_1,0,,Y735,DO-07,0,
,,,15,PRO_AOI_IP_1,0,,Y736,DO-08,0,
,,,15,PRO_AOI_IP_1,0,,Y736,DO-08,0,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,出空料架流水线AGV节点名称,OutL_AgvName,A
1
,,,,,,,
PRO,出空料架流水线AGV节点名称,OutL_AgvName,A
2
,,,,,,,
PRO,入料架流水线AGV节点名称,InL_AgvName,A1,,,,,,,
PRO,入料架流水线AGV节点名称,InL_AgvName,A1,,,,,,,
PRO,入料架流水线入口RFIDIP,InL_In_RFIDIP,192.168.103.107,,,,,, ,
PRO,入料架流水线入口RFIDIP,InL_In_RFIDIP,192.168.103.107,,,,,, ,
PRO,入料架流水线出口RFIDIP,InL_Out_RFIDIP,192.168.103.108,,,,,, ,
PRO,入料架流水线出口RFIDIP,InL_Out_RFIDIP,192.168.103.108,,,,,, ,
source/DeviceLibrary/RFID/RFID.cs
查看文件 @
1358d0b
using
log4net
;
using
log4net
;
using
OnlineStore.Common
;
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
...
@@ -239,7 +238,7 @@ namespace Asa.RFID
...
@@ -239,7 +238,7 @@ namespace Asa.RFID
else
if
(
ErrCode
==
14
&&
IsConnect
)
else
if
(
ErrCode
==
14
&&
IsConnect
)
{
{
LOGGER
.
Error
(
IP
+
" Receive Code: "
+
ErrCode
+
" 进行重连"
);
LOGGER
.
Error
(
IP
+
" Receive Code: "
+
ErrCode
+
" 进行重连"
);
LogUtil
.
error
(
IP
+
" Receive Code: "
+
ErrCode
+
" 进行重连"
);
//
LogUtil.error(IP + " Receive Code: " + ErrCode + " 进行重连");
StopAutoScan
();
StopAutoScan
();
StartAutoScan
(
this
.
Received
);
StartAutoScan
(
this
.
Received
);
break
;
break
;
...
@@ -293,45 +292,4 @@ namespace Asa.RFID
...
@@ -293,45 +292,4 @@ namespace Asa.RFID
return
s
;
return
s
;
}
}
}
}
public
class
RFIDData
{
/// <summary>
/// RFID类型,区分是料架还是托盘,托盘E=69,包装料料架A=65,料串=B
/// </summary>
public
char
RFType
=
'E'
;
/// <summary>
/// 托盘编号,从1-32
/// </summary>
public
int
Num
=
0
;
public
RFIDData
(
int
num
,
int
t
)
{
this
.
RFType
=
(
char
)
t
;
this
.
Num
=
num
;
}
public
RFIDData
(
byte
[]
data
)
{
try
{
if
(
data
!=
null
&&
data
.
Length
>
2
)
{
RFType
=
(
char
)
data
[
1
];
Num
=
(
int
)(
data
[
2
]);
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"RFIP 数据【"
+
data
+
"】 获取编码失败"
);
}
}
public
byte
[]
ToData
()
{
return
new
byte
[]
{
(
byte
)
RFType
,
(
byte
)
Num
};
}
public
string
NumStr
()
{
return
""
+
RFType
+
""
+
Num
.
ToString
().
PadLeft
(
2
,
'0'
)
+
""
;
}
}
}
}
source/DeviceLibrary/RFID/RFIDManager.cs
查看文件 @
1358d0b
...
@@ -14,8 +14,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -14,8 +14,14 @@ namespace OnlineStore.DeviceLibrary
public
class
RFIDManager
public
class
RFIDManager
{
{
public
static
void
Open
(
string
[]
iparray
)
public
static
void
Open
(
string
[]
iparray
)
{
{
RFIDReader
.
Open
(
null
,
iparray
);
try
{
RFIDReader
.
Open
(
null
,
iparray
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
"Open 出错:"
+
ex
.
ToString
());
}
}
}
public
static
RFIDData
ReadRFID
(
string
ip
,
bool
isClear
=
false
)
public
static
RFIDData
ReadRFID
(
string
ip
,
bool
isClear
=
false
)
...
...
source/DeviceLibrary/acVmiLine/RobotManager.cs
查看文件 @
1358d0b
...
@@ -81,40 +81,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -81,40 +81,8 @@ namespace OnlineStore.DeviceLibrary
return
VMILine
;
return
VMILine
;
}
}
private
static
string
api_communication
=
"service/store/communication"
;
//流水线状态通信接口
private
static
string
api_nextFeeder
=
"service/store/nextFeeder"
;
// 出库站位列表切换接口
public
static
string
GetPostApi
(
string
host
)
{
if
(
host
==
""
)
{
host
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
}
if
(!
host
.
StartsWith
(
"http://"
))
{
host
=
"http://"
+
host
;
}
if
(!
host
.
EndsWith
(
"/"
))
{
host
=
host
+
"/"
;
}
return
host
+
api_communication
;
}
public
static
string
GetNextFeederApi
(
string
host
)
{
if
(
host
==
""
)
{
host
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
}
if
(!
host
.
StartsWith
(
"http://"
))
{
host
=
"http://"
+
host
;
}
if
(!
host
.
EndsWith
(
"/"
))
{
host
=
host
+
"/"
;
}
return
host
+
api_nextFeeder
;
}
public
static
bool
checkWatch
(
Stopwatch
watch
,
int
targetMs
,
bool
isStop
=
true
)
public
static
bool
checkWatch
(
Stopwatch
watch
,
int
targetMs
,
bool
isStop
=
true
)
{
{
if
(!
watch
.
IsRunning
)
if
(!
watch
.
IsRunning
)
...
...
source/DeviceLibrary/acVmiLine/VMILineBean.cs
查看文件 @
1358d0b
...
@@ -270,10 +270,9 @@ namespace OnlineStore.DeviceLibrary
...
@@ -270,10 +270,9 @@ namespace OnlineStore.DeviceLibrary
else
if
(
span
.
TotalMilliseconds
>
StopDownMS
)
else
if
(
span
.
TotalMilliseconds
>
StopDownMS
)
{
{
ol_noshelfWatch
.
Stop
();
ol_noshelfWatch
.
Stop
();
if
(
IOManager
.
IOValue
(
IO_Type
.
OutL_OutStopDown
).
Equals
(
IO_VALUE
.
HIGH
))
{
IOManager
.
CIOMove
(
IO_Type
.
OutL_OutStopDown
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
IO_Type
.
OutL_OutStopDown
,
IO_VALUE
.
LOW
);
}
}
}
}
}
private
DateTime
il_lastCallAgvTime
=
DateTime
.
Now
;
private
DateTime
il_lastCallAgvTime
=
DateTime
.
Now
;
...
@@ -450,6 +449,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -450,6 +449,17 @@ namespace OnlineStore.DeviceLibrary
{
{
LedProcess
();
LedProcess
();
RFIDData
rfidData
=
RFIDManager
.
ReadRFID
(
Config
.
InL_In_RFIDIP
);
bool
result
=
SendVmiRfid
(
rfidData
.
NumStr
());
if
(
result
)
{
IOManager
.
CIOMove
(
IO_Type
.
InL_InStopDown
,
IO_VALUE
.
HIGH
);
}
else
{
IOManager
.
CIOMove
(
IO_Type
.
InL_InStopDown
,
IO_VALUE
.
LOW
);
}
}
}
catch
(
Exception
ex
)
catch
(
Exception
ex
)
{
{
...
@@ -458,6 +468,33 @@ namespace OnlineStore.DeviceLibrary
...
@@ -458,6 +468,33 @@ namespace OnlineStore.DeviceLibrary
isInProcess
=
false
;
isInProcess
=
false
;
}
}
#
endregion
private
string
http_server
=
ConfigAppSettings
.
GetValue
(
Setting_Init
.
http_server
);
private
string
api_communication
=
"service/store/qisda/vmiRfid?rfid="
;
//流水线状态通信接口
public
bool
SendVmiRfid
(
string
rfid
)
{
try
{
if
(
http_server
.
EndsWith
(
"/"
))
{
http_server
=
http_server
.
Substring
(
0
,
http_server
.
Length
-
1
);
}
string
addr
=
http_server
+
api_communication
+
rfid
;
string
resultStr
=
HttpHelper
.
Post
(
addr
,
""
);
if
(
resultStr
.
Equals
(
"move"
))
{
LogUtil
.
info
(
"vmiRfid 【"
+
addr
+
"】【"
+
resultStr
+
"】"
);
return
true
;
}
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
" "
+
ex
.
ToString
());
}
return
false
;
}
#
endregion
}
}
}
}
\ No newline at end of file
\ No newline at end of file
source/DeviceLibrary/agvClient/AgvClient.cs
查看文件 @
1358d0b
...
@@ -16,23 +16,25 @@ namespace OnlineStore.DeviceLibrary
...
@@ -16,23 +16,25 @@ namespace OnlineStore.DeviceLibrary
private
static
Asa
.
Client
agvClient
;
private
static
Asa
.
Client
agvClient
;
public
static
Dictionary
<
string
,
string
>
actionMap
=
new
Dictionary
<
string
,
string
>();
public
static
Dictionary
<
string
,
string
>
actionMap
=
new
Dictionary
<
string
,
string
>();
public
static
List
<
string
>
NodeList
=
new
List
<
string
>();
public
static
List
<
string
>
NodeList
=
new
List
<
string
>();
private
static
bool
isInit
=
false
;
public
static
void
Init
()
public
static
void
Init
()
{
{
try
try
{
{
if
(
agvClient
==
null
)
if
(
!
isInit
)
{
{
isInit
=
true
;
agvClient
=
new
Asa
.
Client
(
ServerIp
);
agvClient
=
new
Asa
.
Client
(
ServerIp
);
agvClient
.
Log
+=
AgvClient_Log
;
agvClient
.
Arrive
+=
AgvClient_Arrive
;
agvClient
.
CanEnter
+=
AgvClient_CanEnter
;
agvClient
.
Ready
+=
AgvClient_Ready
;
}
}
actionMap
=
new
Dictionary
<
string
,
string
>();
actionMap
=
new
Dictionary
<
string
,
string
>();
foreach
(
string
key
in
NodeList
)
foreach
(
string
key
in
NodeList
)
{
{
actionMap
.
Add
(
key
,
AGVAction
.
None
);
actionMap
.
Add
(
key
,
AGVAction
.
None
);
}
}
agvClient
.
Log
+=
AgvClient_Log
;
agvClient
.
Arrive
+=
AgvClient_Arrive
;
agvClient
.
CanEnter
+=
AgvClient_CanEnter
;
agvClient
.
Ready
+=
AgvClient_Ready
;
agvClient
.
Connect
();
agvClient
.
Connect
();
agvClient
.
SetNodeID
(
NodeList
.
ToArray
());
agvClient
.
SetNodeID
(
NodeList
.
ToArray
());
...
@@ -47,7 +49,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -47,7 +49,7 @@ namespace OnlineStore.DeviceLibrary
{
{
RFIDData
data
=
new
RFIDData
(
content
);
RFIDData
data
=
new
RFIDData
(
content
);
LogUtil
.
info
(
"收到 AgvClient_Ready ["
+
id
+
"] ["
+
data
.
ToData
()
+
"] 未找到对应的设备 "
);
LogUtil
.
info
(
"收到 AgvClient_Ready ["
+
id
+
"] ["
+
data
.
ToData
()
+
"] 未找到对应的设备 "
);
MayEnter
(
"C2"
);
}
}
private
static
void
AgvClient_CanEnter
(
string
id
,
byte
[]
content
)
private
static
void
AgvClient_CanEnter
(
string
id
,
byte
[]
content
)
...
@@ -104,7 +106,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -104,7 +106,11 @@ namespace OnlineStore.DeviceLibrary
}
}
public
static
void
IsEnter
(
string
NodeName
,
bool
result
)
public
static
void
IsEnter
(
string
NodeName
,
bool
result
)
{
{
agvClient
.
IsEnter
(
NodeName
,
result
);
if
(
result
)
{
agvClient
.
IsEnter
(
NodeName
);
}
}
}
private
static
void
AgvClient_Log
(
string
s
)
private
static
void
AgvClient_Log
(
string
s
)
{
{
...
...
source/VMILineClient/App.config
查看文件 @
1358d0b
...
@@ -14,10 +14,13 @@
...
@@ -14,10 +14,13 @@
<
add
key
=
"store_count"
value
=
"1"
/>
<
add
key
=
"store_count"
value
=
"1"
/>
<!--
start
one
store
config
-->
<!--
start
one
store
config
-->
<
add
key
=
"Line_Config"
value
=
"\LineConfig\VMILineConfig.csv"
/>
<
add
key
=
"Line_Config"
value
=
"\LineConfig\VMILineConfig.csv"
/>
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<
add
key
=
"Config_Pwd"
value
=
"123456"
/>
<!--
IO
配置-->
<
add
key
=
"UseAIOBOX"
value
=
"1"
/>
<
add
key
=
"UseAIOBOX"
value
=
"1"
/>
<
add
key
=
"DIMS"
value
=
"60"
/>
<
add
key
=
"DOMS"
value
=
"300"
/>
<!--
AGV
调度服务器地址-->
<!--
AGV
调度服务器地址-->
<
add
key
=
"AgvServerIp"
value
=
"
localhost
"
/>
<
add
key
=
"AgvServerIp"
value
=
"
192.168.103.12
"
/>
<!--是否调试状态-->
<!--是否调试状态-->
<
add
key
=
"IsInDebug"
value
=
"1"
/>
<
add
key
=
"IsInDebug"
value
=
"1"
/>
...
...
source/VMILineClient/FrmVMIClient.Designer.cs
查看文件 @
1358d0b
...
@@ -29,8 +29,8 @@
...
@@ -29,8 +29,8 @@
this
.
richTextBox1
=
new
System
.
Windows
.
Forms
.
RichTextBox
();
this
.
richTextBox1
=
new
System
.
Windows
.
Forms
.
RichTextBox
();
this
.
lblThisSta
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
lblThisSta
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
groupBox3
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
lblInfo
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
panel1
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
lblInfo
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
btnVmiExit
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnVmiExit
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnVmiStart
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btnVmiStart
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
chbDebug
=
new
System
.
Windows
.
Forms
.
CheckBox
();
this
.
chbDebug
=
new
System
.
Windows
.
Forms
.
CheckBox
();
...
@@ -64,6 +64,7 @@
...
@@ -64,6 +64,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
.
txtname
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
groupBox3
.
SuspendLayout
();
this
.
groupBox3
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
this
.
panel1
.
SuspendLayout
();
this
.
contextMenuStrip1
.
SuspendLayout
();
this
.
contextMenuStrip1
.
SuspendLayout
();
...
@@ -126,16 +127,6 @@
...
@@ -126,16 +127,6 @@
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
TabStop
=
false
;
this
.
groupBox3
.
Text
=
"设备状态"
;
this
.
groupBox3
.
Text
=
"设备状态"
;
//
//
// lblInfo
//
this
.
lblInfo
.
AutoSize
=
true
;
this
.
lblInfo
.
Location
=
new
System
.
Drawing
.
Point
(
593
,
14
);
this
.
lblInfo
.
Name
=
"lblInfo"
;
this
.
lblInfo
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
17
);
this
.
lblInfo
.
TabIndex
=
273
;
this
.
lblInfo
.
Text
=
"运行信息"
;
this
.
lblInfo
.
Visible
=
false
;
//
// panel1
// panel1
//
//
this
.
panel1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
this
.
panel1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
...
@@ -152,6 +143,16 @@
...
@@ -152,6 +143,16 @@
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
1121
,
45
);
this
.
panel1
.
Size
=
new
System
.
Drawing
.
Size
(
1121
,
45
);
this
.
panel1
.
TabIndex
=
273
;
this
.
panel1
.
TabIndex
=
273
;
//
//
// lblInfo
//
this
.
lblInfo
.
AutoSize
=
true
;
this
.
lblInfo
.
Location
=
new
System
.
Drawing
.
Point
(
593
,
14
);
this
.
lblInfo
.
Name
=
"lblInfo"
;
this
.
lblInfo
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
17
);
this
.
lblInfo
.
TabIndex
=
273
;
this
.
lblInfo
.
Text
=
"运行信息"
;
this
.
lblInfo
.
Visible
=
false
;
//
// btnVmiExit
// btnVmiExit
//
//
this
.
btnVmiExit
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnVmiExit
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
...
@@ -488,6 +489,7 @@
...
@@ -488,6 +489,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
.
txtname
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnNeedEntry
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnNeedEntry
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnNeedLeave
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnNeedLeave
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnDis
);
this
.
groupBox5
.
Controls
.
Add
(
this
.
btnDis
);
...
@@ -502,7 +504,7 @@
...
@@ -502,7 +504,7 @@
// 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
(
4
37
,
22
);
this
.
btnNeedEntry
.
Location
=
new
System
.
Drawing
.
Point
(
4
98
,
22
);
this
.
btnNeedEntry
.
Name
=
"btnNeedEntry"
;
this
.
btnNeedEntry
.
Name
=
"btnNeedEntry"
;
this
.
btnNeedEntry
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
39
);
this
.
btnNeedEntry
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
39
);
this
.
btnNeedEntry
.
TabIndex
=
4
;
this
.
btnNeedEntry
.
TabIndex
=
4
;
...
@@ -513,7 +515,7 @@
...
@@ -513,7 +515,7 @@
// 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
(
299
,
22
);
this
.
btnNeedLeave
.
Location
=
new
System
.
Drawing
.
Point
(
360
,
22
);
this
.
btnNeedLeave
.
Name
=
"btnNeedLeave"
;
this
.
btnNeedLeave
.
Name
=
"btnNeedLeave"
;
this
.
btnNeedLeave
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
39
);
this
.
btnNeedLeave
.
Size
=
new
System
.
Drawing
.
Size
(
132
,
39
);
this
.
btnNeedLeave
.
TabIndex
=
3
;
this
.
btnNeedLeave
.
TabIndex
=
3
;
...
@@ -543,6 +545,16 @@
...
@@ -543,6 +545,16 @@
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
);
//
//
// txtname
//
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
(
299
,
29
);
this
.
txtname
.
MaxLength
=
4
;
this
.
txtname
.
Name
=
"txtname"
;
this
.
txtname
.
Size
=
new
System
.
Drawing
.
Size
(
53
,
26
);
this
.
txtname
.
TabIndex
=
5
;
this
.
txtname
.
Text
=
"C2"
;
//
// FrmVMIClient
// FrmVMIClient
//
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
96F
,
96F
);
...
@@ -571,6 +583,7 @@
...
@@ -571,6 +583,7 @@
this
.
groupBox2
.
PerformLayout
();
this
.
groupBox2
.
PerformLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
numericUpDown1
)).
EndInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
numericUpDown1
)).
EndInit
();
this
.
groupBox5
.
ResumeLayout
(
false
);
this
.
groupBox5
.
ResumeLayout
(
false
);
this
.
groupBox5
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
}
...
@@ -617,6 +630,7 @@
...
@@ -617,6 +630,7 @@
private
System
.
Windows
.
Forms
.
NumericUpDown
numericUpDown1
;
private
System
.
Windows
.
Forms
.
NumericUpDown
numericUpDown1
;
private
System
.
Windows
.
Forms
.
Button
btnStopTDown
;
private
System
.
Windows
.
Forms
.
Button
btnStopTDown
;
private
System
.
Windows
.
Forms
.
ComboBox
cmbStopList
;
private
System
.
Windows
.
Forms
.
ComboBox
cmbStopList
;
private
System
.
Windows
.
Forms
.
TextBox
txtname
;
}
}
}
}
source/VMILineClient/FrmVMIClient.cs
查看文件 @
1358d0b
...
@@ -120,7 +120,7 @@ namespace OnlineStore.ACSingleStore
...
@@ -120,7 +120,7 @@ namespace OnlineStore.ACSingleStore
if
(!
this
.
Visible
)
if
(!
this
.
Visible
)
{
{
return
;
return
;
}
}
ReadIOList
();
ReadIOList
();
lblWarnMsg
.
Text
=
vmiLine
.
WarnMsg
;
lblWarnMsg
.
Text
=
vmiLine
.
WarnMsg
;
lblThisSta
.
Text
=
LineManager
.
GetRunStr
(
vmiLine
.
runStatus
);
lblThisSta
.
Text
=
LineManager
.
GetRunStr
(
vmiLine
.
runStatus
);
...
@@ -359,20 +359,25 @@ namespace OnlineStore.ACSingleStore
...
@@ -359,20 +359,25 @@ namespace OnlineStore.ACSingleStore
{
{
vmiLine
.
StopMove
();
vmiLine
.
StopMove
();
}
}
string
agvName
=
"C2"
;
private
void
btnNeedLeave_Click
(
object
sender
,
EventArgs
e
)
private
void
btnNeedLeave_Click
(
object
sender
,
EventArgs
e
)
{
{
AgvClient
.
NeedLeave
(
vmiLine
.
Config
.
InL_A
gvName
);
AgvClient
.
NeedLeave
(
a
gvName
);
}
}
private
void
btnNeedEntry_Click
(
object
sender
,
EventArgs
e
)
private
void
btnNeedEntry_Click
(
object
sender
,
EventArgs
e
)
{
{
AgvClient
.
NeedEnter
(
vmiLine
.
Config
.
OutL_A
gvName
);
AgvClient
.
NeedEnter
(
a
gvName
);
}
}
private
void
btnInit_Click
(
object
sender
,
EventArgs
e
)
private
void
btnInit_Click
(
object
sender
,
EventArgs
e
)
{
{
agvName
=
txtname
.
Text
.
Trim
();
if
(
AgvClient
.
NodeList
.
Contains
(
agvName
).
Equals
(
false
))
{
AgvClient
.
NodeList
.
Add
(
agvName
);
}
AgvClient
.
Init
();
AgvClient
.
Init
();
}
}
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论