Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
SO20242OutBound
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 9c7f139d
由
LN
编写于
2023-04-04 14:53:26 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
1
1 个父辈
3768325d
显示空白字符变更
内嵌
并排
正在显示
24 个修改的文件
包含
1436 行增加
和
391 行删除
Common/util/SMF.cs
DeviceLibrary/DeviceLibrary/HttpServer.cs
DeviceLibrary/DeviceLibrary/ReelParam.cs
DeviceLibrary/theMachine/InReelBean.cs
DeviceLibrary/theMachine/MainMachine _AutoInOutTest.cs
DeviceLibrary/theMachine/MainMachine _BtnProcess.cs
DeviceLibrary/theMachine/MainMachine _Common.cs
DeviceLibrary/theMachine/MainMachine _IOMonitor.cs
DeviceLibrary/theMachine/MainMachine.cs
DeviceLibrary/theMachine/MainMachine_PutReel.cs
DeviceLibrary/theMachine/MoveInfo.cs
DeviceLibrary/theMachine/OutShelfBean.cs
DeviceLibrary/theMachine/RobotManage.cs
DeviceLibrary/theMachine/WorkStation.cs
LoadCVSLibrary/Config/Magzine.csv
LoadCVSLibrary/Config/Orther.csv
LoadCVSLibrary/position/StorePostionBase.cs
TheMachine/Form1.Designer.cs → TheMachine/FormMain.Designer.cs
TheMachine/Form1.cs → TheMachine/FormMain.cs
TheMachine/Form1.resx → TheMachine/FormMain.resx
TheMachine/Program.cs
TheMachine/TheMachine.csproj
TheMachine/UC/uc_boxdebug.cs
TheMachine/UC/uc_boxdebug.designer.cs
Common/util/SMF.cs
查看文件 @
9c7f139
...
...
@@ -10,7 +10,7 @@ namespace OnlineStore.Common
{
public
class
SMF
{
public
static
string
DeviceType
=
"
SBSH
"
;
public
static
string
DeviceType
=
"
OUT
"
;
static
string
_server
=
Setting_Init
.
Device_Server_Address
;
static
string
server
{
...
...
DeviceLibrary/DeviceLibrary/HttpServer.cs
查看文件 @
9c7f139
...
...
@@ -124,8 +124,26 @@ namespace DeviceLibrary
path
=
path
.
Substring
(
0
,
path
.
Length
-
1
);
return
path
;
}
private
static
string
getData
(
Dictionary
<
string
,
Object
>
data
,
string
key
)
{
if
(
data
.
ContainsKey
(
key
))
{
return
data
[
key
].
ToString
();
}
return
""
;
}
private
static
int
getIntData
(
Dictionary
<
string
,
Object
>
data
,
string
key
)
{
try
{
return
Int32
.
Parse
(
getData
(
data
,
key
));
}
catch
(
Exception
ex
)
{
}
return
-
1
;
}
public
static
ShelfTaskInfo
ShelfFinish
(
string
rfid
,
string
barcode
=
""
,
string
rfidLoc
=
""
,
string
robotIndex
=
"1"
)
{
...
...
@@ -145,44 +163,28 @@ namespace DeviceLibrary
string
url
=
GetAddr
(
api
,
paramMap
);
LogUtil
.
debug
(
"http :URL:"
+
url
);
string
json
=
HttpHelper
.
Post
(
url
,
""
,
10000
);
string
resultStr
=
HttpHelper
.
Post
(
url
,
""
,
10000
);
if
(
barcode
!=
""
)
{
LogUtil
.
info
(
"http :URL:"
+
url
+
" :Response:"
+
json
+
" 耗时["
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
"]"
);
LogUtil
.
info
(
"http :URL:"
+
url
+
" :Response:"
+
resultStr
+
" 耗时["
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
"]"
);
}
else
{
LogUtil
.
debug
(
"http :URL:"
+
url
+
" :Response:"
+
json
);
LogUtil
.
debug
(
"http :URL:"
+
url
+
" :Response:"
+
resultStr
);
}
if
(
string
.
IsNullOrWhiteSpace
(
json
))
return
task
;
//行 2234: [2021 - 04 - 07 15:09:31,412][9]INFO - http :URL:
//http://192.168.100.14/myproject/rest/api/qisda/device/putShelfFinished?barcode=640253A*34005600000309*QG00006*5000*23C4&rfid=F103&rfidLoc=8&robotIndex=1 :
//Response:{"code":0,"msg":"ok","data":{"smallTask":"0","cutPackageTask":"0","packageTask":"0","bigTask":"0","smallEmpty":"0","bigEmpty":"5","packageEmpty":"0","rfid":"F103","usedRfidList":"F106,F105,F103","barcode":"640253A*34005600000309*QG00006*5000*23C4","cutTask":"0"}} 耗时[00:00:00.1]
ResultData
data
=
JsonHelper
.
DeserializeJsonToObject
<
ResultData
>(
resultStr
);
JavaScriptSerializer
serializer
=
new
JavaScriptSerializer
();
Dictionary
<
string
,
object
>
obj
=
(
Dictionary
<
string
,
object
>)
serializer
.
DeserializeObject
(
json
);
if
(!
obj
.
TryGetValue
(
"code"
,
out
object
value
))
return
task
;
if
(
value
.
ToString
()
!=
"0"
)
if
(
data
==
null
||
data
.
code
!=
0
)
{
if
(
obj
.
TryGetValue
(
"msg"
,
out
value
))
LogUtil
.
error
(
"http"
+
api
+
": "
+
value
.
ToString
());
return
task
;
return
null
;
}
if
(!
obj
.
TryGetValue
(
"data"
,
out
value
))
return
task
;
Dictionary
<
string
,
object
>
dict
=
(
Dictionary
<
string
,
object
>)
value
;
if
(
dict
==
null
)
else
{
LogUtil
.
info
(
"http"
+
api
+
": data=null"
);
return
task
;
task
.
bigEmpty
=
getIntData
(
data
.
data
,
"bigEmpty"
);
task
.
smallEmpty
=
getIntData
(
data
.
data
,
"smallEmpty"
);
task
.
usedRfidList
=
getData
(
data
.
data
,
"usedRfidList"
);
}
if
(
dict
.
TryGetValue
(
"bigEmpty"
,
out
value
))
int
.
TryParse
(
value
.
ToString
(),
out
task
.
bigEmpty
);
if
(
dict
.
TryGetValue
(
"smallEmpty"
,
out
value
))
int
.
TryParse
(
value
.
ToString
(),
out
task
.
smallEmpty
);
if
(
dict
.
TryGetValue
(
"usedRfidList"
,
out
value
))
task
.
usedRfidList
=
value
.
ToString
();
}
catch
(
Exception
ex
)
{
...
...
DeviceLibrary/DeviceLibrary/ReelParam.cs
查看文件 @
9c7f139
...
...
@@ -10,23 +10,6 @@ using System.Threading.Tasks;
[Serializable]
public
class
ReelParam
{
///// <summary>
///// 创建新出入库信息
///// </summary>
///// <param name="wareNo">二维码内容</param>
///// <param name="platew">宽度</param>
///// <param name="plateh">高度</param>
///// <param name="IsNg">是否是入库NG料</param>
///// <param name="ngMsg">NG消息</param>
//public ReelParam(string wareNo = "", int platew = 0, int plateh = 0, bool _IsNg = false, string ngMsg = "")
//{
// WareCode = wareNo;
// PlateW = platew;
// PlateH = plateh;
// IsNg = _IsNg;
// NgMsg = ngMsg;
// codeInfos = new List<CodeInfo>();
//}
public
ReelParam
(
string
wareNo
=
""
,
int
platew
=
0
,
int
plateh
=
0
,
string
startPos
=
""
,
string
pos
=
""
,
bool
_IsNg
=
false
,
string
ngMsg
=
""
)
{
WareCode
=
wareNo
;
...
...
@@ -35,8 +18,17 @@ public class ReelParam
IsNg
=
_IsNg
;
NgMsg
=
ngMsg
;
this
.
StartPos
=
startPos
;
this
.
TargetPos
=
TargetP
os
;
this
.
TargetPos
=
p
os
;
codeInfos
=
new
List
<
CodeInfo
>();
string
[]
posArray
=
TargetPos
.
Split
(
'_'
);
if
(
posArray
.
Length
>=
2
)
{
TargetOutShelf
=
posArray
[
0
];
if
(
TargetOutShelf
!=
"NG"
)
{
TargetLoc
=
posArray
[
1
];
}
}
}
/// <summary>
/// 物品二维码信息
...
...
@@ -50,6 +42,16 @@ public class ReelParam
/// 库位号
/// </summary>
public
string
TargetPos
{
get
;
set
;
}
/// <summary>
/// 放料的目标料架
/// </summary>
public
string
TargetOutShelf
{
get
;
set
;
}
/// <summary>
/// 放料的目标位置(服务器通信)
/// </summary>
public
string
TargetLoc
{
get
;
set
;
}
public
string
bitmapfilename
=
""
;
public
List
<
CodeInfo
>
codeInfos
{
get
;
set
;
}
/// <summary>
...
...
DeviceLibrary/theMachine/InReelBean.cs
查看文件 @
9c7f139
...
...
@@ -18,12 +18,12 @@ namespace DeviceLibrary
//料盘检测信号
public
string
Reel_Check
=
"Reel_Check"
;
MoveInfo
MoveInfo
;
public
string
ErrMsgTxt
=
""
;
public
string
WarnMsg
=
""
;
//private string LastCode;
private
List
<
CodeLibrary
.
CodeInfo
>
LastCode
;
public
TrayInfo
CurrTray
=
n
ull
;
public
TrayInfo
CurrTray
=
n
ew
TrayInfo
()
;
public
string
PosName
;
...
...
@@ -31,7 +31,7 @@ namespace DeviceLibrary
{
this
.
Name
=
name
;
this
.
PosName
=
name
;
MoveInfo
=
new
MoveInfo
(
name
,
false
);
MoveInfo
=
new
MoveInfo
(
name
);
#
region
初始化
IO
string
ioStr
=
name
+
"_"
;
...
...
@@ -45,7 +45,7 @@ namespace DeviceLibrary
MoveInfo
.
NewMove
(
MoveStep
.
Wait
);
MoveInfo
.
log
(
"执行重置,清理当前条码:"
+
LastCode
);
LastCode
=
new
List
<
CodeLibrary
.
CodeInfo
>();
ErrMsgTxt
=
""
;
WarnMsg
=
""
;
}
public
bool
ReelReady
()
...
...
@@ -61,7 +61,7 @@ namespace DeviceLibrary
MoveInfo
.
NewMove
(
MoveStep
.
Wait
);
MoveInfo
.
log
(
"料盘已离开:执行重置,清理当前条码:"
+
LastCode
);
LastCode
=
new
List
<
CodeLibrary
.
CodeInfo
>
();
ErrMsgTxt
=
""
;
WarnMsg
=
""
;
}
bool
pause
=
false
;
...
...
@@ -96,7 +96,7 @@ namespace DeviceLibrary
MoveInfo
.
NewMove
(
MoveStep
.
IN01_WaitCheck
);
MoveInfo
.
log
(
"检测到料盘信号"
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Reel_Check
,
IO_VALUE
.
HIGH
));
ErrMsgTxt
=
""
;
WarnMsg
=
""
;
}
}
else
...
...
@@ -115,7 +115,7 @@ namespace DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
(
60
))
{
ErrMsgTxt
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] 扫码执行结束超时 ["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] 扫码执行结束超时 ["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
}
break
;
case
MoveStep
.
IN03_GetPos
:
...
...
@@ -126,7 +126,7 @@ namespace DeviceLibrary
}
else
if
(
MoveInfo
.
IsTimeOut
(
60
))
{
ErrMsgTxt
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] 获取库位号超时 ["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
WarnMsg
=
MoveInfo
.
Name
+
"["
+
MoveInfo
.
MoveStep
+
"] 获取库位号超时 ["
+
Math
.
Round
(
MoveInfo
.
StepSpan
().
TotalSeconds
,
1
)
+
"]秒"
;
}
break
;
case
MoveStep
.
IN05_ReelReady
:
...
...
@@ -186,8 +186,8 @@ namespace DeviceLibrary
if
(
String
.
IsNullOrEmpty
(
shelfRfid
))
{
//无可用料架
ErrMsgTxt
=
$
"{Name}:{codestr}暂无可用料架"
;
MoveInfo
.
errlog
(
"获取库位号: "
+
ErrMsgTxt
+
",等待3秒后重新获取"
);
WarnMsg
=
$
"{Name}:{codestr}暂无可用料架"
;
MoveInfo
.
errlog
(
"获取库位号: "
+
WarnMsg
+
",等待3秒后重新获取"
);
Thread
.
Sleep
(
3000
);
}
else
...
...
@@ -204,7 +204,7 @@ namespace DeviceLibrary
}
else
{
ErrMsgTxt
=
" getLocation "
+
outMsg
;
WarnMsg
=
" getLocation "
+
outMsg
;
}
break
;
}
...
...
@@ -220,9 +220,9 @@ namespace DeviceLibrary
private
void
ClearWarnMsg
(
string
v
)
{
if
(
ErrMsgTxt
.
Contains
(
v
))
if
(
WarnMsg
.
Contains
(
v
))
{
ErrMsgTxt
=
""
;
WarnMsg
=
""
;
}
}
...
...
DeviceLibrary/theMachine/MainMachine _AutoInOutTest.cs
查看文件 @
9c7f139
using
CodeLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
DeviceLibrary
{
...
...
@@ -27,38 +20,7 @@ namespace DeviceLibrary
AIOTMoveInfo
.
NewMove
(
MoveStep
.
StoreIn01
);
return
true
;
}
public
bool
ManualOut
(
int
posindex
,
out
string
errmsg
)
{
errmsg
=
""
;
if
(
boxTransport
.
IsComplateOrFree
)
{
if
(!
boxTransport
.
IgnoreX09
&&
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
if
(!
boxTransport
.
IgnoreX09
&&
IOMonitor
.
IODebound
(
IO_Type
.
TrayCheck_Fixture
,
Config
,
IO_VALUE
.
HIGH
,
5000
))
{
errmsg
=
crc
.
GetString
(
"Res0152"
,
"收到出库任务,但料叉上有料,无法启动,请检查"
);
}
else
errmsg
=
crc
.
GetString
(
"Res0152"
,
"收到出库任务,但料叉上有料,无法启动,请检查"
);
return
false
;
}
else
boxTransport
.
IgnoreX09
=
false
;
CurrentPosIndex
=
posindex
+
1
;
AIOTMoveInfo
.
NewMove
(
MoveStep
.
StoreOut14
);
AIOTMoveInfo
.
log
(
$
"开始出库任务:"
+
RobotManage
.
allPositionMap
.
Values
.
ToArray
()[
posindex
].
PositionNum
);
}
else
{
errmsg
=
crc
.
GetString
(
"Res0153"
,
"料仓正在出入库中,无法出库"
);
}
return
true
;
}
public
bool
ManualIn
(
int
posindex
,
out
string
errmsg
)
public
bool
ManualIn
(
string
startPos
,
int
posindex
,
out
string
errmsg
)
{
errmsg
=
""
;
if
(
boxTransport
.
IsComplateOrFree
)
...
...
@@ -78,6 +40,7 @@ namespace DeviceLibrary
boxTransport
.
IgnoreX09
=
false
;
CurrentPosIndex
=
posindex
;
CurrStartPos
=
startPos
;
StopAutoInOut
=
true
;
AIOTMoveInfo
.
NewMove
(
MoveStep
.
StoreIn01
);
AIOTMoveInfo
.
log
(
$
"开始入库任务:"
+
RobotManage
.
allPositionMap
.
Values
.
ToArray
()[
posindex
].
PositionNum
);
...
...
@@ -100,6 +63,7 @@ namespace DeviceLibrary
/// </summary>
public
bool
AutoInOutTest
{
get
;
set
;
}
=
false
;
bool
StopAutoInOut
=
false
;
string
CurrStartPos
=
"IN_1"
;
void
AutoInOutTestProcess
()
{
if
(
CheckWait
(
AIOTMoveInfo
))
...
...
DeviceLibrary/theMachine/MainMachine _BtnProcess.cs
查看文件 @
9c7f139
...
...
@@ -2,13 +2,6 @@
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
DeviceLibrary
{
...
...
DeviceLibrary/theMachine/MainMachine _Common.cs
查看文件 @
9c7f139
...
...
@@ -2,9 +2,6 @@
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
...
...
DeviceLibrary/theMachine/MainMachine _IOMonitor.cs
查看文件 @
9c7f139
using
CodeLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
DeviceLibrary
{
...
...
DeviceLibrary/theMachine/MainMachine.cs
查看文件 @
9c7f139
...
...
@@ -14,6 +14,7 @@ namespace DeviceLibrary
{
public
partial
class
MainMachine
:
IRobot
{
public
bool
LoadOk
=
false
;
public
string
Name
{
get
;
set
;
}
=
"OutBound"
;
private
bool
_canRunning
=
true
;
public
bool
canRunning
...
...
@@ -113,20 +114,38 @@ namespace DeviceLibrary
IOMonitor
.
RegisterIO
(
IO_Type
.
Left_NGDoor_Close_Check
,
Config
,
IO_VALUE
.
LOW
,
LeftNgDoorOpen
,
2500
,
500
);
IOMonitor
.
RegisterIO
(
IO_Type
.
Right_NGDoor_Close_Check
,
Config
,
IO_VALUE
.
LOW
,
RightNgDoorOpen
,
2500
,
500
);
for
(
int
i
=
0
;
i
<
2
;
i
++)
for
(
int
i
=
1
;
i
<=
2
;
i
++)
{
InReelBean
inReel
=
new
InReelBean
(
"IN_"
+
i
);
inReelBeans
.
Add
(
inReel
);
}
for
(
int
i
=
0
;
i
<
5
;
i
++)
for
(
int
i
=
1
;
i
<
5
;
i
++)
{
OutShelfBean
outShelf
=
new
OutShelfBean
(
"U"
+
i
);
outShelfBeans
.
Add
(
outShelf
.
Name
,
outShelf
);
}
LedProcessInit
();
LoadOk
=
true
;
}
public
OutShelfBean
getOutShelf
(
string
name
)
{
OutShelfBean
result
=
null
;
outShelfBeans
.
TryGetValue
(
name
,
out
result
);
return
result
;
}
public
InReelBean
getInReelBean
(
string
name
)
{
foreach
(
InReelBean
inReel
in
inReelBeans
)
{
if
(
inReel
.
Name
.
Equals
(
name
))
{
return
inReel
;
}
}
return
null
;
}
//private void ServerCM_OutStoreEvent(JobInfo jobInfo)
//{
// AddOutStoreTask(jobInfo.WareNum, jobInfo.PosId, jobInfo.plateW, jobInfo.plateH);
...
...
@@ -202,6 +221,8 @@ namespace DeviceLibrary
{
bean
.
Process
();
}
ShelfEmptyProcess
();
}
else
if
(
runStatus
==
RunStatus
.
HomeReset
)
{
...
...
@@ -610,7 +631,7 @@ namespace DeviceLibrary
{
if
(
bean
.
ShelfValid
())
{
rfid
+=
bean
.
currShelfRfid
;
rfid
+=
bean
.
CurrShelf
.
realRFID
;
}
}
return
rfid
;
...
...
@@ -637,23 +658,24 @@ namespace DeviceLibrary
//需要取放料,且料架已准备好
if
(
emptyMap
!=
null
)
{
//List<int> keys = new List<int>(StationMap.Keys);
//foreach (int key in keys)
//{
// ShelfInfo shelf = StationMap[key].CurrShelf;
// if (StationMap[key].IsReady())
// {
// string realRfid = StationMap[key].CurrShelf.RealShelf;
// if (emptyMap.TryGetValue(realRfid, out int emptyP))
// {
// StationMap[key].CurrShelf.EmptyPos = emptyP;
// if (emptyP <= 0)
// {
// StationMap[key].CheckNeedLeave(true);
// }
// }
// }
//}
List
<
string
>
keys
=
new
List
<
string
>(
outShelfBeans
.
Keys
);
foreach
(
string
key
in
keys
)
{
ShelfInfo
shelf
=
outShelfBeans
[
key
].
CurrShelf
;
if
(
outShelfBeans
[
key
].
ShelfValid
())
{
string
realRfid
=
outShelfBeans
[
key
].
CurrShelf
.
rfid
;
if
(
emptyMap
.
TryGetValue
(
realRfid
,
out
int
emptyP
))
{
outShelfBeans
[
key
].
CurrShelf
.
EmptyPos
=
emptyP
;
if
(
emptyP
<=
0
)
{
outShelfBeans
[
key
].
CurrShelf
.
IsNeedLeave
=
true
;
LogUtil
.
error
(
outShelfBeans
[
key
]
+
"的料架 【"
+
realRfid
+
"】剩余空位【"
+
emptyP
+
"】更改料架状态为需要离开"
);
}
}
}
}
}
}
...
...
@@ -665,21 +687,31 @@ namespace DeviceLibrary
internal
string
GetShelfPosId
(
TrayInfo
tray
)
{
string
str
=
""
;
string
targetPosName
=
""
;
if
(
tray
!=
null
)
{
foreach
(
OutShelfBean
obj
in
outShelfBeans
.
Values
)
{
if
(
obj
.
IsRightShelf
(
tray
,
out
str
))
if
(
obj
.
IsRightShelf
(
tray
,
out
targetPosName
))
{
//判断库位号是否存在
ACStorePosition
position
=
CSVPositionReader
<
ACStorePosition
>.
GetPositon
(
targetPosName
);
if
(
position
==
null
)
{
LogUtil
.
error
(
Name
+
" "
+
tray
.
ToStr
()
+
" 找到匹配料架,但未找到库位号:"
+
position
)
;
WarnMsg
=
tray
.
barcode
+
"未找到库位号:"
+
position
;
targetPosName
=
""
;
break
;
}
obj
.
StartPutReel
();
LogUtil
.
info
(
Name
+
" "
+
tray
.
ToStr
()
+
" 使用料架:"
+
str
+
",更改料架为忙碌状态
"
);
LogUtil
.
info
(
Name
+
" "
+
tray
.
ToStr
()
+
" 使用料架:"
+
targetPosName
+
",更改料架为忙碌状态,开始放料
"
);
break
;
}
}
}
return
str
;
return
targetPosName
;
}
}
}
\ No newline at end of file
DeviceLibrary/theMachine/MainMachine_PutReel.cs
查看文件 @
9c7f139
...
...
@@ -56,7 +56,7 @@ namespace DeviceLibrary
//送料到NG
StoreMoveInfo
.
NewMove
(
MoveStep
.
PutReel01_Ready
);
StoreMoveInfo
.
MoveParam
=
new
ReelParam
(
tray
.
barcode
,
tray
.
plateW
,
tray
.
plageH
,
inReel
.
PosName
,
ngPos
,
tray
.
ngReel
,
tray
.
ngMsg
);
StoreMoveInfo
.
log
(
"准备放料:"
+
StoreMoveInfo
.
MoveParam
.
ToStr
());
StoreMoveInfo
.
log
(
"
NG料
准备放料:"
+
StoreMoveInfo
.
MoveParam
.
ToStr
());
break
;
}
}
...
...
@@ -65,13 +65,17 @@ namespace DeviceLibrary
{
//获取料架
string
pos
=
GetShelfPosId
(
tray
);
if
(
pos
!=
""
)
{
//送料到料架
StoreMoveInfo
.
NewMove
(
MoveStep
.
PutReel01_Ready
);
StoreMoveInfo
.
MoveParam
=
new
ReelParam
(
tray
.
barcode
,
tray
.
plateW
,
tray
.
plageH
,
inReel
.
PosName
,
pos
,
tray
.
ngReel
,
tray
.
ngMsg
);
StoreMoveInfo
.
log
(
"出库料准备放料:"
+
StoreMoveInfo
.
MoveParam
.
ToStr
());
break
;
}
}
}
}
break
;
// //放料,准备放料
...
...
@@ -99,15 +103,36 @@ namespace DeviceLibrary
{
StoreMoveInfo
.
NewMove
(
MoveStep
.
PutReel03_GetReelEnd
);
StoreMoveInfo
.
log
(
"取料完成:"
+
StoreMoveInfo
.
MoveParam
.
ToStr
());
//入口状态处理
foreach
(
InReelBean
inReelBean
in
inReelBeans
)
{
if
(
inReelBean
.
Name
.
Equals
(
StoreMoveInfo
.
MoveParam
.
StartPos
)){
inReelBean
.
ReelLeave
();
}
}
}
break
;
case
MoveStep
.
PutReel03_GetReelEnd
:
if
(
boxTransport
.
IsPutOnOut
||
boxTransport
.
IsComplateOrFree
)
if
(
boxTransport
.
IsPutOnOut
||
boxTransport
.
IsComplateOrFree
)
{
StoreMoveInfo
.
NewMove
(
MoveStep
.
PutReel04_PutReelEnd
);
StoreMoveInfo
.
log
(
"放料完成:"
+
StoreMoveInfo
.
MoveParam
.
ToStr
());
//TODO 通知服务器
if
(
StoreMoveInfo
.
MoveParam
.
IsNg
)
{
//更新NG库位缓存状态
UpdateNgPos
(
StoreMoveInfo
.
MoveParam
.
TargetPos
,
StoreMoveInfo
.
MoveParam
);
}
else
{
OutShelfBean
bean
=
getOutShelf
(
StoreMoveInfo
.
MoveParam
.
TargetOutShelf
);
//通知服务器放料完成
ShelfTaskInfo
taskInfo
=
HttpServer
.
ShelfFinish
(
bean
.
CurrShelf
.
realRFID
,
StoreMoveInfo
.
MoveParam
.
WareCode
,
StoreMoveInfo
.
MoveParam
.
TargetLoc
);
bean
.
PutReelOk
(
taskInfo
);
}
}
break
;
case
MoveStep
.
PutReel04_PutReelEnd
:
...
...
@@ -128,17 +153,18 @@ namespace DeviceLibrary
string
StoreState
()
{
string
state
=
crc
.
GetString
(
"Res0162"
,
"空闲中"
);
string
moveInfo
=
StoreMoveInfo
.
MoveParam
.
WareCode
+
": ["
+
StoreMoveInfo
.
MoveParam
.
StartPos
+
"]->["
+
StoreMoveInfo
.
MoveParam
.
TargetPos
+
"]"
;
if
(
StoreMoveInfo
.
MoveStep
==
MoveStep
.
PutReel01_Ready
)
{
state
=
crc
.
GetString
(
"Res0072"
,
"准备放料"
)
+
":[]->["
+
StoreMoveInfo
.
MoveParam
.
TargetPos
+
"]"
;
state
=
crc
.
GetString
(
"Res0072"
,
"准备放料"
)
+
":"
+
moveInfo
;
}
else
if
(
StoreMoveInfo
.
MoveStep
>=
MoveStep
.
PutReel03_GetReelEnd
)
{
state
=
crc
.
GetString
(
"Res0163"
,
"取料中"
)
+
":"
+
StoreMoveInfo
.
MoveParam
.
TargetPos
;
state
=
crc
.
GetString
(
"Res0163"
,
"取料中"
)
+
":"
+
moveInfo
;
}
else
if
(
StoreMoveInfo
.
MoveStep
>=
MoveStep
.
PutReel05_End
)
{
state
=
crc
.
GetString
(
"Res0164"
,
"放料中"
)
+
":"
+
StoreMoveInfo
.
MoveParam
.
TargetPos
;
state
=
crc
.
GetString
(
"Res0164"
,
"放料中"
)
+
":"
+
moveInfo
;
}
return
state
;
...
...
DeviceLibrary/theMachine/MoveInfo.cs
查看文件 @
9c7f139
...
...
@@ -3,9 +3,6 @@ using OnlineStore.Common;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
DeviceLibrary
{
...
...
@@ -19,9 +16,11 @@ namespace DeviceLibrary
this
.
moveStep
=
MoveStep
.
Wait
;
IsInWait
=
false
;
this
.
Name
=
name
;
if
(
addtolist
)
if
(
addtolist
)
{
List
.
Add
(
this
);
}
}
public
MoveInfo
(
object
p
,
string
v
)
{
...
...
DeviceLibrary/theMachine/OutShelfBean.cs
查看文件 @
9c7f139
...
...
@@ -13,44 +13,27 @@ namespace DeviceLibrary
public
class
OutShelfBean
{
public
string
Name
;
//agv小车检测
public
string
Agv_Detect
=
"Agv_Detect"
;
//出料口前端料格检测
public
string
Shelf_Front_Check
=
"Shelf_Front_Check"
;
//出料口后端料格检测
public
string
Shelf_Back_Check
=
"Shelf_Back_Check"
;
//出料口定位上升端
public
string
Location_Up
=
"Location_Up"
;
//出料口定位下降端,
public
string
Location_Down
=
"Location_Down"
;
//电机正传
public
static
string
Moto_Fwd
=
"Moto_Fwd"
;
//电机反转
public
static
string
Moto_Rwd
=
"Moto_Rwd"
;
MoveInfo
MoveInfo
;
public
string
ErrMsgTxt
=
""
;
private
MainMachine
mainMachine
;
public
string
WarnMsg
=
""
;
/// <summary>
/// 出料口定位气缸,high=up,low=down
/// </summary>
private
CylinderManger
locationCylinder
;
public
string
currShelfRfid
;
//
public string currShelfRfid;
public
TrayInfo
CurrShelf
;
public
ShelfInfo
CurrShelf
;
public
string
rfidIp
;
public
OutShelfBean
(
string
name
)
{
this
.
Name
=
name
;
MoveInfo
=
new
MoveInfo
(
name
,
false
);
MoveInfo
=
new
MoveInfo
(
name
);
#
region
初始化
IO
string
ioStr
=
name
+
"_"
;
...
...
@@ -70,20 +53,70 @@ namespace DeviceLibrary
MoveInfo
.
NewMove
(
MoveStep
.
SR01_LocationDown
);
MoveInfo
.
log
(
"执行重置,定位气缸下降"
);
locationCylinder
.
ToLow
(
MoveInfo
);
ErrMsgTxt
=
""
;
WarnMsg
=
""
;
pause
=
false
;
}
private
StoreMoveType
storeMoveType
=
StoreMoveType
.
None
;
bool
PreMove
=
false
;
#
region
料架状态判断
public
bool
IsRightShelf
(
TrayInfo
CurrTray
,
out
string
ShelfPosId
)
{
ShelfPosId
=
""
;
if
(
IsDis
())
{
return
false
;
}
if
(
ShelfValid
())
{
if
(
CurrShelf
.
realRFID
.
Equals
(
CurrTray
.
realRFID
))
{
if
(
String
.
IsNullOrEmpty
(
CurrShelf
.
rfid
))
{
CurrShelf
.
rfid
=
CurrTray
.
rfid
;
LogUtil
.
info
(
Name
+
"增加虚拟料架号绑定:"
+
CurrShelf
.
ToStr
());
}
ShelfPosId
=
Name
+
"_"
+
+
CurrTray
.
shelfP
;
return
true
;
}
else
if
(
String
.
IsNullOrEmpty
(
CurrTray
.
realRFID
))
{
if
((!
CurrShelf
.
rfid
.
Equals
(
""
))
&&
CurrShelf
.
rfid
.
Equals
(
CurrTray
.
rfid
))
{
CurrTray
.
realRFID
=
CurrShelf
.
realRFID
;
ShelfPosId
=
Name
+
"_"
+
+
CurrTray
.
shelfP
;
return
true
;
}
if
(!
String
.
IsNullOrEmpty
(
CurrTray
.
usedRfidList
))
{
string
[]
array
=
CurrTray
.
usedRfidList
.
Split
(
','
);
//若料架已使用过,直接返回false
if
(
array
.
Contains
(
CurrShelf
.
realRFID
))
{
return
false
;
}
}
if
(
CurrShelf
.
rfid
.
Equals
(
""
))
{
CurrShelf
.
rfid
=
CurrTray
.
rfid
;
CurrTray
.
realRFID
=
CurrShelf
.
realRFID
;
LogUtil
.
info
(
Name
+
"增加虚拟料架号绑定:"
+
CurrShelf
.
ToStr
());
ShelfPosId
=
Name
+
"_"
+
CurrTray
.
shelfP
;
return
true
;
}
}
}
return
false
;
}
public
bool
ShelfValid
()
{
//料架是否有效可放料
if
(
currShelfRfid
!=
""
)
if
(
CurrShelf
.
realRFID
!=
""
&&
CurrShelf
.
IsNeedLeave
==
false
)
{
if
(
MoveInfo
.
MoveStep
.
Equals
(
MoveStep
.
S10_ShelfReady
)
||
MoveInfo
.
MoveStep
.
Equals
(
MoveStep
.
S11_PutReel
))
if
(
MoveInfo
.
MoveStep
.
Equals
(
MoveStep
.
S10_ShelfReady
)
||
MoveInfo
.
MoveStep
.
Equals
(
MoveStep
.
S11_PutReel
))
{
return
true
;
}
...
...
@@ -92,10 +125,18 @@ namespace DeviceLibrary
}
public
bool
ShelfReady
()
{
if
(
MoveInfo
.
MoveStep
.
Equals
(
MoveStep
.
S10_ShelfReady
))
if
(
MoveInfo
.
MoveStep
.
Equals
(
MoveStep
.
S10_ShelfReady
)
&&
CurrShelf
.
IsNeedLeave
==
false
)
{
if
(
locationCylinder
.
IsHigh
())
{
return
true
;
}
else
{
locationCylinder
.
ToHigh
(
null
);
WarnMsg
=
"定位气缸不到位"
;
}
}
return
false
;
}
public
bool
StartPutReel
()
...
...
@@ -108,42 +149,41 @@ namespace DeviceLibrary
}
return
false
;
}
bool
pause
=
false
;
public
void
P
ause
(
)
public
void
P
utReelOk
(
ShelfTaskInfo
taskInfo
)
{
pause
=
true
;
}
public
void
Resume
()
if
(
ShelfReady
())
{
pause
=
false
;
}
private
void
LineFRun
(
MoveInfo
move
=
null
)
if
(
MoveInfo
.
MoveStep
.
Equals
(
MoveStep
.
S11_PutReel
))
{
lineMove
(
IO_VALUE
.
LOW
,
IO_VALUE
.
HIGH
,
move
);
}
private
void
LineRRun
(
MoveInfo
move
=
null
)
if
(
taskInfo
.
IsValid
())
{
lineMove
(
IO_VALUE
.
HIGH
,
IO_VALUE
.
LOW
,
move
);
}
private
void
LineStopRun
(
MoveInfo
move
=
null
)
if
(
taskInfo
.
smallEmpty
==
0
&&
taskInfo
.
bigEmpty
==
0
)
{
lineMove
(
IO_VALUE
.
LOW
,
IO_VALUE
.
LOW
,
move
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
S10_ShelfReady
);
//当前工单任务已完成,直接送料架离开
MoveInfo
.
log
(
"放料完成,当前工单任务已完成,更改料架为需要离开状态:"
+
taskInfo
.
ToStr
());
CurrShelf
.
IsNeedLeave
=
true
;
}
private
void
lineMove
(
IO_VALUE
rValue
,
IO_VALUE
fValue
,
MoveInfo
move
)
{
IOManager
.
IOMove
(
Moto_Rwd
,
rValue
);
IOManager
.
IOMove
(
Moto_Fwd
,
fValue
);
if
(
move
!=
null
)
else
{
move
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Moto_Fwd
,
fValue
));
move
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Moto_Rwd
,
rValue
));
MoveInfo
.
NextMoveStep
(
MoveStep
.
S10_ShelfReady
);
MoveInfo
.
log
(
"放料完成,料架还有空位,准备放料完成"
);
}
}
}
}
}
#
endregion
public
bool
Process
()
{
if
(
pause
)
return
false
;
if
(
mainMachine
.
CheckWait
(
MoveInfo
))
if
(
RobotManage
.
mainMachine
.
CheckWait
(
MoveInfo
))
return
false
;
switch
(
MoveInfo
.
MoveStep
)
...
...
@@ -152,7 +192,12 @@ namespace DeviceLibrary
//判断定位气缸是否下降到位
if
(
locationCylinder
.
IsLow
())
{
if
(
IOManager
.
IOValue
(
Shelf_Front_Check
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOManager
.
IOValue
(
Shelf_Back_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
CheckShelf
(
IO_VALUE
.
HIGH
))
{
//料架已到位
MoveInfo
.
NewMove
(
MoveStep
.
S04_WaitTime
);
}
else
if
(
IOManager
.
IOValue
(
Shelf_Front_Check
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOManager
.
IOValue
(
Shelf_Back_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
//默认是进来的料架
MoveInfo
.
NewMove
(
MoveStep
.
S02_LineFRun
);
...
...
@@ -171,6 +216,10 @@ namespace DeviceLibrary
//等待后端料格检测
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Shelf_Front_Check
,
IO_VALUE
.
HIGH
));
}
else
{
//TODO 暂无料架,呼叫小车
}
}
break
;
case
MoveStep
.
SR01_LocationDown
:
...
...
@@ -186,39 +235,75 @@ namespace DeviceLibrary
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
break
;
case
MoveStep
.
S04_WaitTime
:
//如果料架需要离开,直接离开
if
(
CurrShelf
.
IsNeedLeave
)
{
S21_ShelfNeedLeave
(
"料架已经是离开状态"
);
}
else
{
MoveInfo
.
NewMove
(
MoveStep
.
S05_LocationUp
);
MoveInfo
.
log
(
"电机停止,定位气缸上升"
);
LineStopRun
();
locationCylinder
.
ToHigh
(
MoveInfo
);
}
break
;
case
MoveStep
.
S05_LocationUp
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
S06_ReadRFID
);
MoveInfo
.
log
(
"读取RFID"
);
ReadShelfId
();
if
(
CurrShelf
.
rfid
==
""
)
{
S21_ShelfNeedLeave
(
"未读取到RFID"
);
}
else
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
S10_ShelfReady
);
MoveInfo
.
log
(
"料架已准备完成"
);
}
break
;
case
MoveStep
.
S10_ShelfReady
:
if
(
CurrShelf
.
IsNeedLeave
)
{
S21_ShelfNeedLeave
(
"料架已经是离开状态"
);
}
else
{
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3000
));
}
break
;
case
MoveStep
.
S11_PutReel
:
break
;
case
MoveStep
.
S21_ShelfNeedLeave
:
//呼叫AGV小车
MoveInfo
.
NextMoveStep
(
MoveStep
.
S22_WaitAGV
);
MoveInfo
.
log
(
"呼叫AGV小车"
);
break
;
case
MoveStep
.
S22_WaitAGV
:
//呼叫agv拉料
MoveInfo
.
NextMoveStep
(
MoveStep
.
S23_AgvDetect
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Agv_Detect
,
IO_VALUE
.
HIGH
));
MoveInfo
.
log
(
"等待AGV到达"
);
break
;
case
MoveStep
.
S23_AgvDetect
:
if
(!
locationCylinder
.
IsLow
())
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
S24_LocationDown
);
MoveInfo
.
log
(
"定位气缸下降"
);
locationCylinder
.
ToLow
(
MoveInfo
);
}
else
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
S25_LineRRun
);
MoveInfo
.
log
(
"电机反转"
);
LineRRun
();
}
break
;
case
MoveStep
.
S24_LocationDown
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
S25_LineRRun
);
...
...
@@ -246,7 +331,8 @@ namespace DeviceLibrary
break
;
case
MoveStep
.
S28_WaitTime
:
MoveInfo
.
NextMoveStep
(
MoveStep
.
Wait
);
MoveInfo
.
log
(
"料架已离开"
);
MoveInfo
.
log
(
"料架已离开,清空料架:"
+
CurrShelf
.
ToStr
());
CurrShelf
=
new
ShelfInfo
();
LineStopRun
();
break
;
default
:
...
...
@@ -257,70 +343,130 @@ namespace DeviceLibrary
return
false
;
}
bool
movelock
=
false
;
internal
void
Lock
()
private
void
S21_ShelfNeedLeave
(
string
leaveMsg
)
{
movelock
=
true
;
MoveInfo
.
NewMove
(
MoveStep
.
S21_ShelfNeedLeave
);
locationCylinder
.
ToLow
(
MoveInfo
);
MoveInfo
.
log
(
"料架["
+
CurrShelf
.
ToStr
()
+
"]需要离开:"
+
leaveMsg
+
",定位气缸下降"
);
}
internal
void
Unlock
()
private
string
ReadShelfId
()
{
movelock
=
false
;
string
rfid
=
RFIDManager
.
ReadRFID
(
rfidIp
).
NumStr
();
CurrShelf
=
new
ShelfInfo
(
rfid
);
LogUtil
.
info
(
Name
+
"读取料架号:"
+
CurrShelf
.
ToStr
());
return
CurrShelf
.
realRFID
;
}
public
bool
IsDis
()
{
return
false
;
}
internal
bool
IsRightShelf
(
TrayInfo
CurrTray
,
out
string
ShelfPosId
)
#
region
IO
操作
//agv小车检测
private
string
Agv_Detect
=
"Agv_Detect"
;
//出料口前端料格检测
private
string
Shelf_Front_Check
=
"Shelf_Front_Check"
;
//出料口后端料格检测
private
string
Shelf_Back_Check
=
"Shelf_Back_Check"
;
//出料口定位上升端
private
string
Location_Up
=
"Location_Up"
;
//出料口定位下降端,
private
string
Location_Down
=
"Location_Down"
;
//电机正传
private
static
string
Moto_Fwd
=
"Moto_Fwd"
;
//电机反转
private
static
string
Moto_Rwd
=
"Moto_Rwd"
;
private
void
LineFRun
(
MoveInfo
move
=
null
)
{
ShelfPosId
=
""
;
if
(
IsDis
())
lineMove
(
IO_VALUE
.
LOW
,
IO_VALUE
.
HIGH
,
move
);
}
private
void
LineRRun
(
MoveInfo
move
=
null
)
{
return
false
;
lineMove
(
IO_VALUE
.
HIGH
,
IO_VALUE
.
LOW
,
move
)
;
}
if
(
ShelfValid
()
)
private
void
LineStopRun
(
MoveInfo
move
=
null
)
{
if
(
CurrShelf
.
realRFID
.
Equals
(
CurrTray
.
realRFID
))
lineMove
(
IO_VALUE
.
LOW
,
IO_VALUE
.
LOW
,
move
);
}
private
void
lineMove
(
IO_VALUE
rValue
,
IO_VALUE
fValue
,
MoveInfo
move
)
{
if
(
String
.
IsNullOrEmpty
(
CurrShelf
.
rfid
))
IOManager
.
IOMove
(
Moto_Rwd
,
rValue
);
IOManager
.
IOMove
(
Moto_Fwd
,
fValue
);
if
(
move
!=
null
)
{
CurrShelf
.
rfid
=
CurrTray
.
rfid
;
LogUtil
.
info
(
Name
+
"增加虚拟料架号绑定:"
+
CurrShelf
.
ToStr
(
));
move
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Moto_Fwd
,
fValue
))
;
move
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Moto_Rwd
,
rValue
));
}
ShelfPosId
=
Name
+
CurrTray
.
shelfP
;
return
true
;
}
else
if
(
String
.
IsNullOrEmpty
(
CurrTray
.
realRFID
)
)
private
bool
CheckShelf
(
IO_VALUE
value
)
{
if
((!
CurrShelf
.
rfid
.
Equals
(
""
))
&&
CurrShelf
.
rfid
.
Equals
(
CurrTray
.
rfid
))
if
(
IOManager
.
IOValue
(
Shelf_Front_Check
).
Equals
(
value
)
&&
IOManager
.
IOValue
(
Shelf_Back_Check
).
Equals
(
value
))
{
CurrTray
.
realRFID
=
CurrShelf
.
realRFID
;
ShelfPosId
=
Name
+
CurrTray
.
shelfP
;
return
true
;
}
if
(!
String
.
IsNullOrEmpty
(
CurrTray
.
usedRfidList
))
return
false
;
}
#
endregion
bool
pause
=
false
;
public
void
Pause
()
{
string
[]
array
=
CurrTray
.
usedRfidList
.
Split
(
','
)
;
//若料架已使用过,直接返回false
if
(
array
.
Contains
(
CurrShelf
.
realRFID
)
)
pause
=
true
;
}
public
void
Resume
(
)
{
return
false
;
pause
=
false
;
}
bool
movelock
=
false
;
internal
void
Lock
()
{
movelock
=
true
;
}
if
(
CurrShelf
.
rfid
.
Equals
(
""
)
)
internal
void
Unlock
(
)
{
CurrShelf
.
rfid
=
CurrTray
.
rfid
;
CurrTray
.
realRFID
=
CurrShelf
.
realRFID
;
LogUtil
.
info
(
Name
+
"增加虚拟料架号绑定:"
+
CurrShelf
.
ToStr
());
ShelfPosId
=
Name
+
CurrTray
.
shelfP
;
return
true
;
movelock
=
false
;
}
public
bool
IsDis
()
{
return
false
;
}
}
public
class
ShelfInfo
{
//public ShelfTaskInfo TaskInfo = null;
public
string
realRFID
=
""
;
public
string
rfid
=
""
;
public
bool
IsNeedLeave
=
false
;
public
bool
IsBusy
=
false
;
public
int
EmptyPos
=
100
;
return
false
;
public
ShelfInfo
(
string
shelfId
=
""
,
string
xnId
=
""
,
bool
needLeave
=
false
,
bool
busy
=
false
)
{
this
.
realRFID
=
shelfId
;
this
.
rfid
=
xnId
;
this
.
IsNeedLeave
=
needLeave
;
this
.
IsBusy
=
busy
;
EmptyPos
=
100
;
}
public
string
ToStr
()
{
string
result
=
"["
+
realRFID
+
"_"
+
rfid
+
"]"
;
result
+=
"[空位 "
+
EmptyPos
+
"]"
;
if
(
IsNeedLeave
)
{
result
+=
"[需离开]"
;
}
else
if
(
IsBusy
)
{
result
+=
"[放料中]"
;
}
return
result
;
}
}
}
DeviceLibrary/theMachine/RobotManage.cs
查看文件 @
9c7f139
...
...
@@ -31,9 +31,15 @@ namespace DeviceLibrary
public
static
Dictionary
<
string
,
ACStorePosition
>
allPositionMap
{
get
=>
CSVPositionReader
<
ACStorePosition
>.
allPositionMap
;
}
static
List
<
string
>
_positionNumList
=
null
;
public
static
List
<
string
>
PositionNumList
{
get
{
public
static
List
<
string
>
PositionNumList
{
get
{
if
(
_positionNumList
==
null
)
_positionNumList
=
CSVPositionReader
<
ACStorePosition
>.
allPositionMap
.
Keys
.
ToList
();
{
List
<
ACStorePosition
>
allPosList
=
new
List
<
ACStorePosition
>(
CSVPositionReader
<
ACStorePosition
>.
allPositionMap
.
Values
);
_positionNumList
=
(
from
m
in
allPosList
where
m
.
PosType
.
Equals
(
0
)
select
m
.
PositionNum
).
ToList
();
}
return
_positionNumList
;
}
}
...
...
DeviceLibrary/theMachine/WorkStation.cs
0 → 100644
查看文件 @
9c7f139
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
DeviceLibrary
{
public
class
WorkStation
{
internal
MoveInfo
MoveInfo
=
null
;
public
string
Name
=
""
;
internal
string
AgvName
=
""
;
private
string
rfidIp
=
""
;
public
ShelfInfo
CurrShelf
=
new
ShelfInfo
();
public
int
StationId
=
0
;
public
string
WarnMsg
=
""
;
public
AlarmType
alarmType
=
AlarmType
.
None
;
public
WorkStation
(
int
id
,
string
name
,
string
agvName
,
string
rfidip
)
{
this
.
rfidIp
=
rfidip
;
MoveInfo
=
new
MoveInfo
(
1
);
this
.
Name
=
""
+
name
;
this
.
AgvName
=
agvName
;
this
.
StationId
=
id
;
Shelf_Back_Check
=
name
+
Shelf_Back_Check
;
Shelf_Front_Check
=
name
+
Shelf_Front_Check
;
Moto_Fwd
=
name
+
Moto_Fwd
;
Moto_Rwd
=
name
+
Moto_Rwd
;
Location_Up
=
name
+
Location_Up
;
Location_Down
=
name
+
Location_Down
;
}
internal
bool
IsReady
()
{
if
(
IsDis
())
{
return
false
;
}
if
(!
alarmType
.
Equals
(
AlarmType
.
None
))
{
return
false
;
}
if
(
CheckShelf
(
IO_VALUE
.
HIGH
))
{
if
(!
CurrShelf
.
IsNeedLeave
&&
(!
String
.
IsNullOrEmpty
(
CurrShelf
.
rfid
)))
{
if
(
LocationIsUp
())
{
if
(
WarnMsg
.
Contains
(
"定位气缸上升不到位"
))
{
WarnMsg
=
""
;
}
return
true
;
}
else
{
WarnMsg
=
Name
+
"定位气缸上升不到位"
;
}
}
}
//料架准备好可以放料
return
false
;
}
internal
bool
CheckNeedLeave
(
bool
IsReset
=
true
)
{
if
(
IsDis
())
{
return
false
;
}
if
(
CurrShelf
.
EmptyPos
<=
0
)
{
CurrShelf
.
IsNeedLeave
=
true
;
LogUtil
.
info
(
Name
+
" "
+
CurrShelf
.
ToStr
()
+
" 没有空位需要离开 "
);
if
(
IsReset
)
{
Reset
();
}
return
true
;
}
return
false
;
}
private
string
ReadShelfId
()
{
string
rfid
=
RFIDManager
.
ReadRFID
(
rfidIp
).
NumStr
();
CurrShelf
=
new
ShelfInfo
(
rfid
);
LogUtil
.
info
(
Name
+
"读取料架号:"
+
CurrShelf
.
ToStr
());
return
CurrShelf
.
rfid
;
}
public
void
Reset
()
{
if
(
IsDis
())
{
alarmType
=
AlarmType
.
None
;
WarnMsg
=
""
;
MoveInfo
.
EndMove
();
return
;
}
if
(
CurrShelf
.
IsBusy
)
{
LogUtil
.
error
(
Name
+
"复位失败,料架忙碌中"
);
return
;
}
alarmType
=
AlarmType
.
None
;
WarnMsg
=
""
;
MoveInfo
.
EndMove
();
MoveInfo
.
NewMove
(
StoreMoveType
.
StoreReset
);
MoveInfo
.
NextMoveStep
(
MoveStep
.
SR_01_LocationDown
);
if
(
ProcessShelfEnter
||
ProcessShelfOut
)
{
LogUtil
.
info
(
Name
+
" 开始复位:顶升下降"
);
}
else
{
LogUtil
.
info
(
Name
+
" 开始复位:顶升下降,设置状态为None"
);
AgvClient
.
SetToNone
(
AgvName
);
}
LocationDown
(
MoveInfo
);
}
private
void
ResetProcess
()
{
if
(
MoveInfo
.
IsInWait
)
{
CheckWait
(
MoveInfo
);
}
if
(
MoveInfo
.
IsInWait
)
{
return
;
}
if
(
MoveInfo
.
IsStep
(
MoveStep
.
SR_01_LocationDown
))
{
if
(
CheckShelf
(
IO_VALUE
.
HIGH
))
{
//有料架
if
(
CurrShelf
.
rfid
.
Equals
(
""
).
Equals
(
false
)
&&
CurrShelf
.
IsNeedLeave
)
{
AgvClient
.
NeedLeave
(
AgvName
,
CurrShelf
.
rfid
);
LogUtil
.
info
(
Name
+
"复位:"
+
CurrShelf
.
ToStr
()
+
"需要离开,发送NeedLeave"
);
MoveInfo
.
EndMove
();
}
else
{
SR_03_LineRunWait
();
}
}
else
{
SR_02_LineRun
();
}
}
else
if
(
MoveInfo
.
IsStep
(
MoveStep
.
SR_02_LineRun
))
{
if
(
CheckShelf
(
IO_VALUE
.
HIGH
))
{
SR_03_LineRunWait
();
}
else
if
(
CheckShelf
(
IO_VALUE
.
LOW
))
{
ResetEnd
();
}
else
{
//有一个信号亮,再次转动链条
SR_02_LineRun
();
}
}
else
if
(
MoveInfo
.
IsStep
(
MoveStep
.
SR_03_LineRunWait
))
{
if
(
CheckShelf
(
IO_VALUE
.
HIGH
))
{
SR_04_LocationUp
();
}
else
if
(
CheckShelf
(
IO_VALUE
.
LOW
))
{
ResetEnd
();
}
else
{
//有一个信号亮,再次转动链条
SR_02_LineRun
();
}
}
else
if
(
MoveInfo
.
IsStep
(
MoveStep
.
SR_04_LocationUp
))
{
LineStop
();
if
(
LocationIsUp
())
{
LogUtil
.
info
(
Name
+
"复位:"
+
CurrShelf
.
ToStr
()
+
"准备完成,可以放料 "
);
MoveInfo
.
EndMove
();
}
else
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
SR_04_LocationUp
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
LocationUp
(
MoveInfo
);
LogUtil
.
info
(
Name
+
"复位:料架"
+
CurrShelf
.
ToStr
()
+
"定位气缸不到位,再次顶升上升 "
);
}
}
}
private
void
ResetEnd
()
{
LineStop
();
CurrShelf
=
new
ShelfInfo
();
LogUtil
.
info
(
Name
+
"复位完成,当前无料架"
);
MoveInfo
.
EndMove
();
}
private
void
SR_04_LocationUp
()
{
//MoveInfo.NewMove(StoreMoveType.StoreReset);
MoveInfo
.
NextMoveStep
(
MoveStep
.
SR_04_LocationUp
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
ReadShelfId
();
if
(
CheckNeedLeave
(
false
))
{
AgvClient
.
NeedLeave
(
AgvName
,
CurrShelf
.
rfid
);
LogUtil
.
info
(
Name
+
"复位:当前"
+
CurrShelf
.
ToStr
()
+
"需要离开,发送NeedLeave"
);
MoveInfo
.
EndMove
();
}
else
{
//MoveInfo.NextMoveStep(MoveStep.SR_04_LocationUp);
LocationUp
(
MoveInfo
);
LogUtil
.
info
(
Name
+
"复位:读取到新料架:"
+
CurrShelf
.
ToStr
()
+
",顶升上升 "
);
}
}
private
void
SR_03_LineRunWait
()
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
SR_03_LineRunWait
);
LineRun
(
MoveInfo
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
5000
));
LogUtil
.
info
(
Name
+
"复位: 检测到料架,继续线体转动5秒 "
);
}
private
void
SR_02_LineRun
()
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
SR_02_LineRun
);
LineRun
(
MoveInfo
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
5000
));
LogUtil
.
info
(
Name
+
"复位: 线体转动5秒 "
);
}
public
bool
IsDis
()
{
if
(
EquipManager
.
DisStationList
.
Contains
(
StationId
))
{
return
true
;
}
return
false
;
}
public
void
TimerProcess
()
{
if
(
IsDis
())
{
return
;
}
if
(
MoveInfo
.
MoveType
.
Equals
(
StoreMoveType
.
StoreReset
))
{
ResetProcess
();
}
else
{
if
(
ProcessShelfEnter
||
ProcessShelfOut
)
{
}
else
{
if
(
CheckShelf
(
IO_VALUE
.
HIGH
)
&&
(
CurrShelf
.
rfid
.
Equals
(
""
)))
{
LogUtil
.
info
(
Name
+
"检测到料架信号,但是没有料架号,自动复位"
);
Reset
();
}
else
if
(
CheckShelf
(
IO_VALUE
.
LOW
)
&&
(!
CurrShelf
.
rfid
.
Equals
(
""
)))
{
LogUtil
.
info
(
Name
+
"未检测到料架信号,但是有料架号,自动复位"
);
Reset
();
}
else
if
(
IOManager
.
IOValue
(
Shelf_Front_Check
).
Equals
(
IO_VALUE
.
HIGH
)
&&
(
CurrShelf
.
rfid
.
Equals
(
""
)))
{
LogUtil
.
info
(
Name
+
"检测到入口料架信号,但是没有料架号,自动复位"
);
Reset
();
}
else
{
AgvStatusPro
();
}
}
}
}
internal
bool
IsRightShelf
(
TrayInfo
CurrTray
,
out
string
ShelfPosId
)
{
ShelfPosId
=
""
;
if
(
IsDis
())
{
return
false
;
}
if
(
IsReady
())
{
if
(
CurrShelf
.
rfid
.
Equals
(
CurrTray
.
realRFID
))
{
if
(
String
.
IsNullOrEmpty
(
CurrShelf
.
XNShelf
))
{
CurrShelf
.
XNShelf
=
CurrTray
.
rfid
;
LogUtil
.
info
(
Name
+
"增加虚拟料架号绑定:"
+
CurrShelf
.
ToStr
());
}
ShelfPosId
=
Name
+
CurrTray
.
shelfP
;
return
true
;
}
else
if
(
String
.
IsNullOrEmpty
(
CurrTray
.
realRFID
))
{
if
((!
CurrShelf
.
XNShelf
.
Equals
(
""
))
&&
CurrShelf
.
XNShelf
.
Equals
(
CurrTray
.
rfid
))
{
CurrTray
.
realRFID
=
CurrShelf
.
rfid
;
ShelfPosId
=
Name
+
CurrTray
.
shelfP
;
return
true
;
}
if
(!
String
.
IsNullOrEmpty
(
CurrTray
.
usedRfidList
))
{
string
[]
array
=
CurrTray
.
usedRfidList
.
Split
(
','
);
//若料架已使用过,直接返回false
if
(
array
.
Contains
(
CurrShelf
.
rfid
))
{
return
false
;
}
}
if
(
CurrShelf
.
XNShelf
.
Equals
(
""
))
{
CurrShelf
.
XNShelf
=
CurrTray
.
rfid
;
CurrTray
.
realRFID
=
CurrShelf
.
rfid
;
LogUtil
.
info
(
Name
+
"增加虚拟料架号绑定:"
+
CurrShelf
.
ToStr
());
ShelfPosId
=
Name
+
CurrTray
.
shelfP
;
return
true
;
}
}
}
return
false
;
}
#
region
出料结果验证
private
DateTime
preRWTime
=
DateTime
.
Now
;
public
void
CheckWait
(
MoveInfo
checkmove
)
{
List
<
WaitResultInfo
>
list
=
checkmove
.
WaitList
;
//当等待超过一分钟时,需要打印提示
TimeSpan
span
=
DateTime
.
Now
-
checkmove
.
LastSetpTime
;
string
NotOkMsg
=
""
;
if
(
list
.
Count
<=
0
)
{
checkmove
.
EndStepWait
();
return
;
}
bool
isOk
=
true
;
if
(
checkmove
.
OneWaitCanEndStep
)
{
isOk
=
false
;
}
foreach
(
WaitResultInfo
wait
in
list
)
{
if
(
wait
.
IsEnd
)
{
continue
;
}
NotOkMsg
=
wait
.
ToStr
();
if
(
wait
.
WaitType
==
1
)
{
}
else
if
(
wait
.
WaitType
==
2
)
{
wait
.
IsEnd
=
IOManager
.
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
);
int
timeOutMs
=
EquipManager
.
Equip
.
Config
.
IOSingle_TimerOut
;
if
((!
wait
.
IsEnd
)
&&
span
.
TotalMilliseconds
>
timeOutMs
)
{
ConfigIO
io
=
EquipManager
.
Equip
.
Config
.
getWaitIO
(
wait
.
IoType
);
WarnMsg
=
Name
+
"["
+
checkmove
.
MoveType
+
"]["
+
checkmove
.
MoveStep
+
"] 等待"
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
"超时 "
;
alarmType
=
AlarmType
.
IoSingleTimeOut
;
LogUtil
.
error
(
Name
+
wait
.
IoType
+
"等待信号("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
14
);
isOk
=
false
;
break
;
}
TimeSpan
rwSpan
=
DateTime
.
Now
-
preRWTime
;
if
(!
wait
.
IsEnd
&&
rwSpan
.
TotalSeconds
>
5
&&
span
.
TotalSeconds
>
6
)
{
preRWTime
=
DateTime
.
Now
;
string
msg
=
Name
+
" "
+
NotOkMsg
+
"已等待 "
+
Math
.
Abs
(
span
.
TotalSeconds
)
+
"秒,重写DO:"
;
bool
isLog
=
false
;
foreach
(
WaitResultInfo
ww
in
list
)
{
if
(
ww
!=
null
&&
ww
.
WaitType
.
Equals
(
2
)
&&
EquipManager
.
Equip
.
Config
.
DOList
.
ContainsKey
(
ww
.
IoType
))
{
isLog
=
true
;
EquipManager
.
Equip
.
IOMove
(
ww
.
IoType
,
ww
.
IoValue
);
msg
+=
ww
.
ToStr
()
+
","
;
}
}
if
(
isLog
)
{
LogUtil
.
error
(
msg
);
}
isOk
=
false
;
break
;
}
}
else
if
(
wait
.
WaitType
==
3
)
{
wait
.
IsEnd
=
(
span
.
TotalMilliseconds
>=
wait
.
TimeMSeconds
);
}
if
(
wait
.
IsEnd
)
{
if
(
checkmove
.
OneWaitCanEndStep
)
{
isOk
=
true
;
break
;
}
}
else
{
if
(!
checkmove
.
OneWaitCanEndStep
)
{
isOk
=
false
;
break
;
}
}
}
if
(
isOk
)
{
checkmove
.
EndStepWait
();
}
else
if
(
span
.
TotalSeconds
>
checkmove
.
TimeOutSeconds
)
{
WarnMsg
=
Name
+
"["
+
checkmove
.
MoveType
+
"]["
+
checkmove
.
MoveStep
+
"] 等待超时 ["
+
NotOkMsg
+
"]已等待["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
LogUtil
.
error
(
WarnMsg
,
100
);
alarmType
=
AlarmType
.
IoSingleTimeOut
;
}
}
private
static
DateTime
lastComRHomeTime
=
DateTime
.
Now
;
#
endregion
#
region
AGV
#
region
AGV
状态处理
private
void
AgvStatusPro
()
{
if
(
IsReady
())
{
if
(
CheckNeedLeave
())
{
return
;
}
AgvClient
.
SetToNone
(
AgvName
);
}
else
if
(
CurrShelf
.
rfid
.
Equals
(
""
)
&&
IOManager
.
IOValue
(
Shelf_Back_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOManager
.
IOValue
(
Shelf_Front_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
if
(
LocationIsDown
())
{
AgvClient
.
NeedEnter
(
AgvName
,
""
);
}
else
{
LocationDown
();
AgvClient
.
SetToNone
(
AgvName
);
}
}
else
if
(
IOManager
.
IOValue
(
Shelf_Back_Check
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
Shelf_Front_Check
).
Equals
(
IO_VALUE
.
HIGH
)
&&
CurrShelf
.
IsNeedLeave
)
{
if
(
LocationIsDown
())
{
AgvClient
.
NeedLeave
(
AgvName
,
CurrShelf
.
rfid
);
}
else
{
LocationDown
();
AgvClient
.
SetToNone
(
AgvName
);
}
}
else
{
AgvClient
.
SetToNone
(
AgvName
);
}
}
#
endregion
internal
void
AgvArrive
(
string
nodeId
,
string
rfid
)
{
string
logN
=
Name
+
"收到 AgvArrive 事件 ["
+
nodeId
+
"] ["
+
rfid
+
"] "
;
if
(
nodeId
.
Equals
(
AgvName
))
{
}
else
if
(
nodeId
.
Equals
(
AgvName
))
{
}
LogUtil
.
info
(
logN
+
":"
+
"暂无处理"
);
}
internal
void
AgvReadyEnter
(
string
nodeId
,
string
rfid
=
""
)
{
string
logN
=
Name
+
"收到 AgvReady 事件 ["
+
nodeId
+
"] ["
+
rfid
+
"] "
;
if
(
nodeId
.
Equals
(
AgvName
))
{
if
(
IOManager
.
IOValue
(
Shelf_Back_Check
).
Equals
(
IO_VALUE
.
HIGH
)
||
IOManager
.
IOValue
(
Shelf_Front_Check
).
Equals
(
IO_VALUE
.
HIGH
))
{
LogUtil
.
info
(
logN
+
" ,已有料架,暂不处理,重置 ["
+
nodeId
+
"] 状态为None"
);
AgvClient
.
SetStatus
(
nodeId
);
return
;
}
ShelfEnterProcess
();
}
}
internal
void
AgvReadyLeave
(
string
nodeId
,
string
rfid
=
""
)
{
string
logN
=
Name
+
"收到 AgvReady 事件 ["
+
nodeId
+
"] ["
+
rfid
+
"] "
;
if
(
nodeId
.
Equals
(
AgvName
))
{
if
(
IOManager
.
IOValue
(
Shelf_Back_Check
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOManager
.
IOValue
(
Shelf_Front_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
LogUtil
.
info
(
logN
+
" ,未检测到料架,暂不处理,重置 ["
+
nodeId
+
"] 状态为None"
);
AgvClient
.
SetStatus
(
nodeId
);
return
;
}
ShelfLeaveProcess
();
}
}
private
bool
ProcessShelfEnter
=
false
;
private
bool
ProcessShelfOut
=
false
;
internal
void
ShelfLeaveProcess
()
{
//AGV已到达,将料架送入AGV中
Task
.
Factory
.
StartNew
(
delegate
{
string
logName
=
Name
+
"["
+
AgvName
+
"] 料架送入AGV "
;
try
{
LogUtil
.
info
(
logName
+
"开始,先设置状态为 MayLeave"
);
//AgvClient.SetStatus(AgvName, CurrShelf.rfid, ClientAction.None, ClientLevel.High);
AgvClient
.
SetStatus
(
AgvName
,
CurrShelf
.
rfid
,
ClientAction
.
MayLeave
,
ClientLevel
.
High
);
ProcessShelfOut
=
true
;
LineBackRun
();
bool
result
=
WaitIo
(
Shelf_Back_Check
,
IO_VALUE
.
LOW
,
60000
);
if
(!
result
)
{
LogUtil
.
info
(
logName
+
" 等待 "
+
Shelf_Back_Check
+
"=LOW超时,等待60000后停止线体转动,发送FinishLeave"
);
}
else
{
LogUtil
.
info
(
logName
+
" 已收到"
+
Shelf_Back_Check
+
"=LOW ,等待60000后停止线体转动,发送FinishLeave"
);
}
result
=
WaitIo
(
Shelf_Front_Check
,
IO_VALUE
.
LOW
,
60000
);
if
(!
result
)
{
LogUtil
.
info
(
logName
+
" 等待 "
+
Shelf_Front_Check
+
"=LOW超时,等待60000后停止线体转动,发送FinishLeave"
);
}
else
{
LogUtil
.
info
(
logName
+
" 已收到"
+
Shelf_Front_Check
+
"=LOW ,等待60000后停止线体转动,发送FinishLeave"
);
}
Thread
.
Sleep
(
8000
);
LineStop
();
AgvClient
.
SetStatus
(
AgvName
,
CurrShelf
.
rfid
,
ClientAction
.
FinishLeave
,
ClientLevel
.
High
);
Thread
.
Sleep
(
2000
);
AgvClient
.
SetStatus
(
AgvName
,
""
,
ClientAction
.
None
,
ClientLevel
.
High
);
ProcessShelfOut
=
false
;
LogUtil
.
info
(
logName
+
",停止转动,清空"
+
CurrShelf
.
ToStr
()
+
", 结束"
);
CurrShelf
=
new
ShelfInfo
();
}
catch
(
TimeoutException
te
)
{
LogUtil
.
error
(
logName
+
" 超时:"
+
te
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
logName
+
" 出错:"
,
ex
);
}
finally
{
AgvClient
.
SetStatus
(
AgvName
,
""
,
ClientAction
.
None
,
ClientLevel
.
High
);
LineStop
();
ProcessShelfOut
=
false
;
}
});
}
internal
void
ShelfEnterProcess
()
{
Task
.
Factory
.
StartNew
(
delegate
{
string
logName
=
Name
+
"AGV料架进入 ["
+
AgvName
+
"] "
;
try
{
CurrShelf
=
new
ShelfInfo
();
LogUtil
.
info
(
logName
+
" 开始,清空料架信息,设置状态=MayEnter"
);
AgvClient
.
SetStatus
(
AgvName
,
""
,
ClientAction
.
MayEnter
,
ClientLevel
.
High
,
true
);
ProcessShelfEnter
=
true
;
LineRun
();
bool
result
=
false
;
//等待进料检测信号
result
=
WaitIo
(
Shelf_Front_Check
,
IO_VALUE
.
HIGH
,
600000
,
logName
+
"等待"
+
Shelf_Front_Check
+
"信号"
);
LogUtil
.
info
(
logName
+
" 等待 "
+
Shelf_Front_Check
+
"=High 结果: "
+
result
+
", 开始等待 "
+
Shelf_Back_Check
+
" 信号"
);
result
=
WaitIo
(
Shelf_Back_Check
,
IO_VALUE
.
HIGH
,
600000
,
logName
+
"等待"
+
Shelf_Back_Check
+
"信号"
);
//LogUtil.info(logName + " 等待 " + Shelf_Back_Check + "=High 结果: " + result + ",开始等待 FinishEnter 超时10分钟");
//try
//{
// result = WaitUtil.Wait(600000, delegate ()
// {
// return AgvClient.GetAction(AgvName).Equals(ClientAction.FinishEnter);
// }, logName + "等待FinishEnter超时");
//}
//catch (TimeoutException te)
//{
// LogUtil.error(logName + " 超时:" + te);
//}
LogUtil
.
info
(
logName
+
",完成,信号已到位"
);
LineStop
();
Thread
.
Sleep
(
2000
);
AgvClient
.
SetStatus
(
AgvName
,
""
,
ClientAction
.
None
,
ClientLevel
.
High
,
true
);
ProcessShelfEnter
=
false
;
Reset
();
}
catch
(
TimeoutException
te
)
{
LogUtil
.
error
(
logName
+
" 超时:"
+
te
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
logName
+
" 出错:"
,
ex
);
}
finally
{
AgvClient
.
SetStatus
(
AgvName
,
""
,
ClientAction
.
None
,
ClientLevel
.
High
,
true
);
LineStop
();
ProcessShelfEnter
=
false
;
}
});
}
#
endregion
#
region
IO
操作
private
bool
CheckShelf
(
IO_VALUE
value
)
{
if
(
IOManager
.
IOValue
(
Shelf_Back_Check
).
Equals
(
value
)
&&
IOManager
.
IOValue
(
Shelf_Front_Check
).
Equals
(
value
))
{
return
true
;
}
return
false
;
}
protected
bool
WaitIo
(
string
ioType
,
IO_VALUE
value
,
int
timeOut
,
string
errName
=
""
)
{
try
{
return
WaitUtil
.
Wait
(
timeOut
,
delegate
()
{
return
value
.
Equals
(
IOManager
.
IOValue
(
ioType
));
},
errName
);
}
catch
(
Exception
ex
)
{
LogUtil
.
error
(
Name
+
"等待"
+
ioType
+
"="
+
value
+
"超时:"
+
ex
.
ToString
());
return
false
;
}
}
public
void
LineRun
(
MoveInfo
moveInfo
=
null
)
{
EquipManager
.
Equip
.
CylinderMove
(
Moto_Rwd
,
Moto_Fwd
,
moveInfo
);
}
public
void
LineBackRun
(
MoveInfo
moveInfo
=
null
)
{
EquipManager
.
Equip
.
CylinderMove
(
Moto_Fwd
,
Moto_Rwd
,
moveInfo
);
}
public
void
LineStop
(
MoveInfo
moveInfo
=
null
)
{
IOManager
.
IOMove
(
Moto_Fwd
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
Moto_Rwd
,
IO_VALUE
.
LOW
);
if
(
moveInfo
!=
null
)
{
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Moto_Fwd
,
IO_VALUE
.
LOW
));
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
Moto_Rwd
,
IO_VALUE
.
LOW
));
}
}
public
void
LocationDown
(
MoveInfo
moveInfo
=
null
)
{
IOManager
.
IOMove
(
Location_Up
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
Location_Down
,
IO_VALUE
.
HIGH
);
if
(
moveInfo
!=
null
)
{
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
DI_LocationCylinder_Up1
,
IO_VALUE
.
LOW
));
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
DI_LocationCylinder_Down1
,
IO_VALUE
.
HIGH
));
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
DI_LocationCylinder_Up2
,
IO_VALUE
.
LOW
));
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
DI_LocationCylinder_Down2
,
IO_VALUE
.
HIGH
));
}
}
public
void
LocationUp
(
MoveInfo
moveInfo
=
null
)
{
IOManager
.
IOMove
(
Location_Down
,
IO_VALUE
.
LOW
);
IOManager
.
IOMove
(
Location_Up
,
IO_VALUE
.
HIGH
);
if
(
moveInfo
!=
null
)
{
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
DI_LocationCylinder_Down1
,
IO_VALUE
.
LOW
));
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
DI_LocationCylinder_Up1
,
IO_VALUE
.
HIGH
));
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
DI_LocationCylinder_Down2
,
IO_VALUE
.
LOW
));
moveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
DI_LocationCylinder_Up2
,
IO_VALUE
.
HIGH
));
}
}
public
bool
LocationIsDown
()
{
if
(
IOManager
.
IOValue
(
DI_LocationCylinder_Up1
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOManager
.
IOValue
(
DI_LocationCylinder_Down1
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
DI_LocationCylinder_Up2
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOManager
.
IOValue
(
DI_LocationCylinder_Down2
).
Equals
(
IO_VALUE
.
HIGH
)
)
{
return
true
;
}
return
false
;
}
public
bool
LocationIsUp
()
{
if
(
IOManager
.
IOValue
(
DI_LocationCylinder_Down1
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOManager
.
IOValue
(
DI_LocationCylinder_Up1
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
DI_LocationCylinder_Down2
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOManager
.
IOValue
(
DI_LocationCylinder_Up2
).
Equals
(
IO_VALUE
.
HIGH
)
)
{
return
true
;
}
return
false
;
}
private
string
Shelf_Back_Check
=
"FrontCheck"
;
private
string
Shelf_Front_Check
=
"InCheck"
;
private
string
DI_LocationCylinder_Up1
=
"LocationCylinder_Up1"
;
private
string
DI_LocationCylinder_Down1
=
"LocationCylinder_Down1"
;
private
string
DI_LocationCylinder_Up2
=
"LocationCylinder_Up2"
;
private
string
DI_LocationCylinder_Down2
=
"LocationCylinder_Down2"
;
private
string
Moto_Fwd
=
"LineRun"
;
private
string
Moto_Rwd
=
"LineBackRun"
;
private
string
Location_Up
=
"LocationCylinder_Up"
;
private
string
Location_Down
=
"LocationCylinder_Down"
;
#
endregion
}
}
LoadCVSLibrary/Config/Magzine.csv
查看文件 @
9c7f139
位置,备注,优先级,高度,宽度,旋转轴位置P2,升降轴库位入料高点P3,升降轴库位入料低点P4,进出轴库位点取料点P3
U1_A1,出口1_A1,0,24,7,99198,417323,379066,227002
U1_A2,出口1_A2,0,24,7,219347,91377,80569,206929
U1_A3,出口1_A3,0,24,7,99198,417323,-99999999,227002
U1_A4,出口1_A4,0,24,7,219347,91377,-99999999,206929
U1_A5,出口1_A5,0,24,7,219347,91377,123,206929
U1_A6,出口1_A6,0,24,7,219347,91377,1231,206929
U1_A7,出口1_A7,0,24,7,219347,91377,23,206929
,,,,,,,,
,,,,,,,,
U2_A1,出口2_A1,0,24,7,99198,417323,379066,227002
U2_A2,出口2_A2,0,24,7,219347,91377,80569,206929
U2_A3,出口2_A3,0,24,7,99198,417323,-99999999,227002
U2_A4,出口2_A4,0,24,7,219347,91377,-99999999,206929
U2_A5,出口2_A5,0,24,7,219347,91377,123,206929
U2_A6,出口2_A6,0,24,7,219347,91377,1231,206929
U2_A7,出口2_A7,0,24,7,219347,91377,23,206929
位置,
类型,
备注,优先级,高度,宽度,旋转轴位置P2,升降轴库位入料高点P3,升降轴库位入料低点P4,进出轴库位点取料点P3
U1_A1,
0,
出口1_A1,0,24,7,99198,417323,379066,227002
U1_A2,
0,
出口1_A2,0,24,7,219347,91377,80569,206929
U1_A3,
0,
出口1_A3,0,24,7,99198,417323,-99999999,227002
U1_A4,
0,
出口1_A4,0,24,7,219347,91377,-99999999,206929
U1_A5,
0,
出口1_A5,0,24,7,219347,91377,123,206929
U1_A6,
0,
出口1_A6,0,24,7,219347,91377,1231,206929
U1_A7,
0,
出口1_A7,0,24,7,219347,91377,23,206929
,,,,,,,,
,
,,,,,,,,
,
U2_A1,
0,
出口2_A1,0,24,7,99198,417323,379066,227002
U2_A2,
0,
出口2_A2,0,24,7,219347,91377,80569,206929
U2_A3,
0,
出口2_A3,0,24,7,99198,417323,-99999999,227002
U2_A4,
0,
出口2_A4,0,24,7,219347,91377,-99999999,206929
U2_A5,
0,
出口2_A5,0,24,7,219347,91377,123,206929
U2_A6,
0,
出口2_A6,0,24,7,219347,91377,1231,206929
U2_A7,
0,
出口2_A7,0,24,7,219347,91377,23,206929
LoadCVSLibrary/Config/Orther.csv
查看文件 @
9c7f139
位置,备注,优先级,高度,宽度,旋转轴位置P2,升降轴库位入料高点P3,升降轴库位入料低点P4,进出轴库位点取料点P3
IN_1,上层入料口,0,24,7,99198,417323,379066,227002
IN_2,下层入料口,0,24,7,219347,91377,80569,206929
,,,,,,,,
NG_7_1,NG 7寸 1,0,24,7,99198,417323,379066,227002
NG_7_2,NG 7寸 2,0,24,7,219347,91377,80569,206929
NG_7_3,NG 7寸 3,0,24,7,99198,417323,-99999999,227002
NG_7_4,NG 7寸 4,0,24,7,219347,91377,-99999999,206929
NG_7_5,NG 7寸 5,0,24,7,219347,91377,123,206929
NG_7_6,NG 7寸 6,0,24,7,219347,91377,1231,206929
NG_7_7,NG 7寸 7,0,24,7,219347,91377,23,206929
,,,,,,,,
NG_13_1,NG 13寸 1,0,56,7,219347,91377,23,206929
NG_13_2,NG 13寸 2,0,56,7,219347,91377,23,206929
NG_13_3,NG 13寸 3,0,56,7,219347,91377,23,206929
NG_13_4,NG 13寸 4,0,56,7,219347,91377,23,206929
NG_13_5,NG 13寸 5,0,56,7,219347,91377,23,206929
位置,
类型,
备注,优先级,高度,宽度,旋转轴位置P2,升降轴库位入料高点P3,升降轴库位入料低点P4,进出轴库位点取料点P3
IN_1,
1,
上层入料口,0,24,7,99198,417323,379066,227002
IN_2,
1,
下层入料口,0,24,7,219347,91377,80569,206929
,,,,,,,,
,
NG_7_1,
2,
NG 7寸 1,0,24,7,99198,417323,379066,227002
NG_7_2,
2,
NG 7寸 2,0,24,7,219347,91377,80569,206929
NG_7_3,
2,
NG 7寸 3,0,24,7,99198,417323,-99999999,227002
NG_7_4,
2,
NG 7寸 4,0,24,7,219347,91377,-99999999,206929
NG_7_5,
2,
NG 7寸 5,0,24,7,219347,91377,123,206929
NG_7_6,
2,
NG 7寸 6,0,24,7,219347,91377,1231,206929
NG_7_7,
2,
NG 7寸 7,0,24,7,219347,91377,23,206929
,,,,,,,,
,
NG_13_1,
2,
NG 13寸 1,0,56,7,219347,91377,23,206929
NG_13_2,
2,
NG 13寸 2,0,56,7,219347,91377,23,206929
NG_13_3,
2,
NG 13寸 3,0,56,7,219347,91377,23,206929
NG_13_4,
2,
NG 13寸 4,0,56,7,219347,91377,23,206929
NG_13_5,
2,
NG 13寸 5,0,56,7,219347,91377,23,206929
LoadCVSLibrary/position/StorePostionBase.cs
查看文件 @
9c7f139
...
...
@@ -14,6 +14,11 @@ namespace OnlineStore.LoadCSVLibrary
[
CSVAttribute
(
"位置"
)]
public
string
PositionNum
{
get
;
set
;
}
/// <summary>
/// 类型。0=库位。1=入库库位,2=NG库位
/// </summary>
[
CSVAttribute
(
"类型"
)]
public
int
PosType
{
get
;
set
;
}
/// <summary>
/// 优先级
/// </summary>
[
CSVAttribute
(
"优先级"
)]
...
...
TheMachine/Form
1
.Designer.cs
→
TheMachine/Form
Main
.Designer.cs
查看文件 @
9c7f139
namespace
TheMachine
{
partial
class
Form
1
partial
class
Form
Main
{
/// <summary>
/// 必需的设计器变量。
...
...
@@ -47,10 +47,10 @@ namespace TheMachine
this
.
tabc
=
new
System
.
Windows
.
Forms
.
TabControl
();
this
.
tabP1
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
pnl
=
new
System
.
Windows
.
Forms
.
Panel
();
this
.
listReelInfo
=
new
System
.
Windows
.
Forms
.
ListView
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
stateView
=
new
System
.
Windows
.
Forms
.
ListView
();
this
.
pictureBox2
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
pictureBox1
=
new
System
.
Windows
.
Forms
.
PictureBox
();
this
.
btn_IgnoreX09
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn_PauseBuzzer
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
listView1
=
new
System
.
Windows
.
Forms
.
ListView
();
...
...
@@ -60,7 +60,6 @@ namespace TheMachine
this
.
pnl
.
SuspendLayout
();
this
.
groupBox1
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox2
)).
BeginInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox1
)).
BeginInit
();
this
.
SuspendLayout
();
//
// menuStrip1
...
...
@@ -164,7 +163,7 @@ namespace TheMachine
// 简体中文ToolStripMenuItem
//
this
.
简体中文
ToolStripMenuItem
.
Name
=
"简体中文ToolStripMenuItem"
;
this
.
简体中文
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
简体中文
ToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
简体中文
ToolStripMenuItem
.
Tag
=
"not"
;
this
.
简体中文
ToolStripMenuItem
.
Text
=
"简体中文"
;
this
.
简体中文
ToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
简体中文
ToolStripMenuItem_Click
);
...
...
@@ -172,7 +171,7 @@ namespace TheMachine
// englishToolStripMenuItem
//
this
.
englishToolStripMenuItem
.
Name
=
"englishToolStripMenuItem"
;
this
.
englishToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
80
,
26
);
this
.
englishToolStripMenuItem
.
Size
=
new
System
.
Drawing
.
Size
(
1
44
,
26
);
this
.
englishToolStripMenuItem
.
Tag
=
"not"
;
this
.
englishToolStripMenuItem
.
Text
=
"English"
;
this
.
englishToolStripMenuItem
.
Click
+=
new
System
.
EventHandler
(
this
.
englishToolStripMenuItem_Click
);
...
...
@@ -210,9 +209,9 @@ namespace TheMachine
//
// pnl
//
this
.
pnl
.
Controls
.
Add
(
this
.
listReelInfo
);
this
.
pnl
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
pnl
.
Controls
.
Add
(
this
.
pictureBox2
);
this
.
pnl
.
Controls
.
Add
(
this
.
pictureBox1
);
this
.
pnl
.
Controls
.
Add
(
this
.
btn_IgnoreX09
);
this
.
pnl
.
Controls
.
Add
(
this
.
btn_PauseBuzzer
);
this
.
pnl
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
...
...
@@ -221,8 +220,23 @@ namespace TheMachine
this
.
pnl
.
Size
=
new
System
.
Drawing
.
Size
(
1000
,
576
);
this
.
pnl
.
TabIndex
=
273
;
//
// listReelInfo
//
this
.
listReelInfo
.
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
.
listReelInfo
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
listReelInfo
.
HideSelection
=
false
;
this
.
listReelInfo
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
300
);
this
.
listReelInfo
.
Name
=
"listReelInfo"
;
this
.
listReelInfo
.
Size
=
new
System
.
Drawing
.
Size
(
530
,
268
);
this
.
listReelInfo
.
TabIndex
=
1
;
this
.
listReelInfo
.
UseCompatibleStateImageBehavior
=
false
;
//
// groupBox1
//
this
.
groupBox1
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
groupBox1
.
Controls
.
Add
(
this
.
stateView
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
4
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
...
...
@@ -233,8 +247,10 @@ namespace TheMachine
//
// stateView
//
this
.
stateView
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Left
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
stateView
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
None
;
this
.
stateView
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
stateView
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)))
;
this
.
stateView
.
HeaderStyle
=
System
.
Windows
.
Forms
.
ColumnHeaderStyle
.
Nonclickable
;
this
.
stateView
.
HideSelection
=
false
;
this
.
stateView
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
25
);
...
...
@@ -246,10 +262,12 @@ namespace TheMachine
//
// pictureBox2
//
this
.
pictureBox2
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
pictureBox2
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
pictureBox2
.
Location
=
new
System
.
Drawing
.
Point
(
472
,
321
);
this
.
pictureBox2
.
Location
=
new
System
.
Drawing
.
Point
(
539
,
300
);
this
.
pictureBox2
.
Name
=
"pictureBox2"
;
this
.
pictureBox2
.
Size
=
new
System
.
Drawing
.
Size
(
436
,
2
04
);
this
.
pictureBox2
.
Size
=
new
System
.
Drawing
.
Size
(
436
,
2
68
);
this
.
pictureBox2
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
Zoom
;
this
.
pictureBox2
.
TabIndex
=
270
;
this
.
pictureBox2
.
TabStop
=
false
;
...
...
@@ -257,19 +275,6 @@ namespace TheMachine
this
.
pictureBox2
.
DoubleClick
+=
new
System
.
EventHandler
(
this
.
pictureBox1_DoubleClick
);
this
.
pictureBox2
.
MouseDown
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
pictureBox1_MouseDown
);
//
// pictureBox1
//
this
.
pictureBox1
.
BackColor
=
System
.
Drawing
.
Color
.
Gainsboro
;
this
.
pictureBox1
.
Location
=
new
System
.
Drawing
.
Point
(
3
,
321
);
this
.
pictureBox1
.
Name
=
"pictureBox1"
;
this
.
pictureBox1
.
Size
=
new
System
.
Drawing
.
Size
(
451
,
204
);
this
.
pictureBox1
.
SizeMode
=
System
.
Windows
.
Forms
.
PictureBoxSizeMode
.
Zoom
;
this
.
pictureBox1
.
TabIndex
=
271
;
this
.
pictureBox1
.
TabStop
=
false
;
this
.
pictureBox1
.
Visible
=
false
;
this
.
pictureBox1
.
DoubleClick
+=
new
System
.
EventHandler
(
this
.
pictureBox1_DoubleClick
);
this
.
pictureBox1
.
MouseDown
+=
new
System
.
Windows
.
Forms
.
MouseEventHandler
(
this
.
pictureBox1_MouseDown
);
//
// btn_IgnoreX09
//
this
.
btn_IgnoreX09
.
BackColor
=
System
.
Drawing
.
Color
.
OrangeRed
;
...
...
@@ -309,7 +314,7 @@ namespace TheMachine
this
.
listView1
.
TabIndex
=
2
;
this
.
listView1
.
UseCompatibleStateImageBehavior
=
false
;
//
// Form
1
// Form
Main
//
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
None
;
this
.
BackColor
=
System
.
Drawing
.
Color
.
White
;
...
...
@@ -319,9 +324,9 @@ namespace TheMachine
this
.
Controls
.
Add
(
this
.
menuStrip1
);
this
.
Font
=
new
System
.
Drawing
.
Font
(
"宋体"
,
10.5F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
MainMenuStrip
=
this
.
menuStrip1
;
this
.
Name
=
"Form
1
"
;
this
.
Name
=
"Form
Main
"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
Manual
;
this
.
Text
=
"
Form1
"
;
this
.
Text
=
"
出料机构
"
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
Form1_Load
);
this
.
Shown
+=
new
System
.
EventHandler
(
this
.
Form1_Shown
);
this
.
menuStrip1
.
ResumeLayout
(
false
);
...
...
@@ -331,7 +336,6 @@ namespace TheMachine
this
.
pnl
.
ResumeLayout
(
false
);
this
.
groupBox1
.
ResumeLayout
(
false
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox2
)).
EndInit
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox1
)).
EndInit
();
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
...
...
@@ -352,7 +356,6 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
关于
ToolStripMenuItem
;
private
System
.
Windows
.
Forms
.
Button
btn_PauseBuzzer
;
private
System
.
Windows
.
Forms
.
PictureBox
pictureBox2
;
private
System
.
Windows
.
Forms
.
PictureBox
pictureBox1
;
private
System
.
Windows
.
Forms
.
Button
btn_IgnoreX09
;
private
System
.
Windows
.
Forms
.
Panel
pnl
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
语言
toolStripMenuItem
;
...
...
@@ -364,6 +367,7 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
btn_stop
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator2
;
private
System
.
Windows
.
Forms
.
ToolStripSeparator
toolStripSeparator3
;
private
System
.
Windows
.
Forms
.
ListView
listReelInfo
;
}
}
TheMachine/Form
1
.cs
→
TheMachine/Form
Main
.cs
查看文件 @
9c7f139
using
CodeLibrary
;
using
ConfigHelper
;
using
DeviceLibrary
;
using
OnlineStore
;
using
OnlineStore.Common
;
using
OnlineStore.LoadCSVLibrary
;
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.IO
;
using
System.Linq
;
using
System.Runtime.ExceptionServices
;
using
System.Runtime.Serialization.Formatters.Binary
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
namespace
TheMachine
{
public
partial
class
Form
1
:
Form
public
partial
class
Form
Main
:
Form
{
public
Form
1
()
public
Form
Main
()
{
crc
.
OpenResourceLog
=
true
;
InitializeComponent
();
...
...
@@ -76,59 +69,32 @@ namespace TheMachine
readonly
System
.
Windows
.
Forms
.
Timer
t1
=
new
System
.
Windows
.
Forms
.
Timer
();
private
void
Form1_Load
(
object
sender
,
EventArgs
e
)
{
//this.Width = Screen.PrimaryScreen.WorkingArea.Width;//获取主显⽰设备的桌⾯宽度
//this.Height = Screen.PrimaryScreen.WorkingArea.Height;//获取主显⽰设备的桌⾯⾼度
//if (this.Width > 1366)
// this.Width = 1366;
//if (this.Height > 900)
// this.Height = 900;
List
<
CodeInfo
>
codeInfos
=
new
List
<
CodeInfo
>();
//codeInfos.Add(new CodeInfo("", 528, 406));
codeInfos
.
Add
(
new
CodeInfo
(
""
,
925
,
520
));
//codeInfos.Add(new CodeInfo("", 564, 684));
btn_run
.
Enabled
=
false
;
//btn_stop.Enabled = false;
#
region
报警信息
listview
初始化
listView1
.
View
=
View
.
Details
;
ColumnHeader
emptycol
=
new
ColumnHeader
();
emptycol
.
Text
=
""
;
emptycol
.
Width
=
0
;
ColumnHeader
msgcol
=
new
ColumnHeader
();
msgcol
.
Text
=
crc
.
GetString
(
"Res0047"
,
"信息"
);
msgcol
.
Width
=
530
;
ColumnHeader
timecol
=
new
ColumnHeader
();
timecol
.
Text
=
crc
.
GetString
(
"Res0048"
,
"时间"
);
timecol
.
Width
=
150
;
listView1
.
Columns
.
Add
(
emptycol
);
listView1
.
Columns
.
Add
(
timecol
);
listView1
.
Columns
.
Add
(
msgcol
);
AddHeader
(
listView1
,
""
,
0
);
AddHeader
(
listView1
,
crc
.
GetString
(
"Res0048"
,
"时间"
),
150
);
AddHeader
(
listView1
,
crc
.
GetString
(
"Res0047"
,
"信息"
),
530
);
listView1
.
ColumnWidthChanging
+=
listView_ColumnWidthChanging
;
#
endregion
#
region
状态信息
listview
初始化
stateView
.
View
=
View
.
Details
;
ColumnHeader
c1
=
new
ColumnHeader
();
c1
.
Text
=
""
;
c1
.
Width
=
0
;
ColumnHeader
c2
=
new
ColumnHeader
();
c2
.
Text
=
crc
.
GetString
(
"Res0049"
,
"模块"
);
c2
.
Width
=
200
;
ColumnHeader
c3
=
new
ColumnHeader
();
c3
.
Text
=
crc
.
GetString
(
"Res0050"
,
"步骤"
);
c3
.
Width
=
200
;
ColumnHeader
c4
=
new
ColumnHeader
();
c4
.
Text
=
crc
.
GetString
(
"Res0047"
,
"信息"
);
c4
.
Width
=
500
;
stateView
.
Columns
.
Add
(
c1
);
stateView
.
Columns
.
Add
(
c2
);
stateView
.
Columns
.
Add
(
c3
);
stateView
.
Columns
.
Add
(
c4
);
AddHeader
(
stateView
,
""
,
0
);
AddHeader
(
stateView
,
crc
.
GetString
(
"Res0049"
,
"模块"
),
200
);
AddHeader
(
stateView
,
crc
.
GetString
(
"Res0050"
,
"步骤"
),
200
);
AddHeader
(
stateView
,
crc
.
GetString
(
"Res0047"
,
"信息"
),
500
);
stateView
.
ColumnWidthChanging
+=
listView_ColumnWidthChanging
;
#
endregion
#
region
物料信息显示列表
listReelInfo
.
View
=
View
.
Details
;
AddHeader
(
listReelInfo
,
""
,
0
);
AddHeader
(
listReelInfo
,
"位置"
,
200
);
AddHeader
(
listReelInfo
,
"料盘信息"
,
listReelInfo
.
Width
-
200
);
listReelInfo
.
ColumnWidthChanging
+=
listView_ColumnWidthChanging
;
#
endregion
LogUtil
.
info
(
"开始初始化"
);
AlarmBuzzer
.
BuzzerStateChange
+=
AlarmBuzzer_BuzzerStateChange
;
...
...
@@ -136,7 +102,7 @@ namespace TheMachine
RobotManage
.
UserPauseSet
+=
RobotManage_UserPauseSet
;
RobotManage
.
CameraA
.
camera_event
+=
CameraA_camera_event
;
//
RobotManage.CameraA.camera_event += CameraA_camera_event;
CodeManager
.
camera_event
+=
CameraB_camera_event
;
var
loadtask
=
Task
.
Run
(()
=>
{
...
...
@@ -154,14 +120,22 @@ namespace TheMachine
禁用蜂鸣器
ToolStripMenuItem_Click
(
this
,
EventArgs
.
Empty
);
}
private
void
CameraA_camera_event
(
object
sender
,
Bitmap
e
)
private
void
AddHeader
(
ListView
listView
,
string
headerText
,
int
width
)
{
this
.
Invoke
((
EventHandler
<
Bitmap
>)
delegate
{
pictureBox1
.
Visible
=
true
;
pictureBox1
.
Image
=
e
;
},
sender
,
e
);
ColumnHeader
header
=
new
ColumnHeader
();
header
.
Text
=
headerText
;
header
.
Width
=
width
;
listView
.
Columns
.
Add
(
header
);
}
//private void CameraA_camera_event(object sender, Bitmap e)
//{
// this.Invoke((EventHandler<Bitmap>)delegate
// {
// pictureBox1.Visible = true;
// pictureBox1.Image = e;
// }, sender, e);
//}
private
void
CameraB_camera_event
(
object
sender
,
Bitmap
e
)
{
this
.
Invoke
((
EventHandler
<
Bitmap
>)
delegate
...
...
@@ -193,7 +167,37 @@ namespace TheMachine
private
void
T1_Tick
(
object
sender
,
EventArgs
e
)
{
if
(
RobotManage
.
mainMachine
==
null
)
{
return
;
}
SetState
(
MoveInfo
.
List
);
Dictionary
<
string
,
string
>
map
=
new
Dictionary
<
string
,
string
>();
try
{
if
(
RobotManage
.
mainMachine
.
LoadOk
)
{
foreach
(
InReelBean
bean
in
RobotManage
.
mainMachine
.
inReelBeans
)
{
if
(
bean
.
CurrTray
!=
null
)
{
map
.
Add
(
bean
.
Name
,
bean
.
CurrTray
.
ToStr
());
}
}
foreach
(
string
key
in
RobotManage
.
mainMachine
.
NgPosMap
.
Keys
)
{
ReelParam
param
=
RobotManage
.
mainMachine
.
NgPosMap
[
key
];
map
.
Add
(
key
,
param
.
ToStr
());
}
ShowReelList
(
map
);
}
}
catch
(
Exception
ex
)
{
}
}
void
SetState
(
List
<
MoveInfo
>
moveInfoList
)
{
...
...
@@ -214,13 +218,45 @@ namespace TheMachine
}
var
stateinfo
=
moveInfo
.
GetStateStr
();
if
(!
RobotManage
.
isRunning
)
stateinfo
=
crc
.
GetString
(
"Res0051"
,
"未启动"
);
ListViewItem
lvi
=
new
ListViewItem
(
new
string
[]
{
""
,
moveInfo
.
Name
,
moveInfo
.
MoveStep
.
ToString
(),
stateinfo
});
{
stateinfo
=
crc
.
GetString
(
"Res0051"
,
"未启动"
);
}
string
name
=
moveInfo
.
Name
;
OutShelfBean
bean
=
RobotManage
.
mainMachine
.
getOutShelf
(
name
);
if
(
bean
!=
null
&&
bean
.
CurrShelf
!=
null
)
{
stateinfo
+=
"["
+
bean
.
CurrShelf
.
ToStr
()
+
"]"
;
}
else
{
InReelBean
inReelBean
=
RobotManage
.
mainMachine
.
getInReelBean
(
name
);
if
(
inReelBean
!=
null
&&
inReelBean
.
CurrTray
!=
null
)
{
stateinfo
+=
"["
+
inReelBean
.
CurrTray
.
ToStr
()
+
"]"
;
}
}
ListViewItem
lvi
=
new
ListViewItem
(
new
string
[]
{
""
,
name
,
moveInfo
.
MoveStep
.
ToString
(),
stateinfo
});
stateView
.
Items
.
Add
(
lvi
);
}
this
.
ResumeLayout
(
true
);
}
void
ShowReelList
(
Dictionary
<
string
,
string
>
reelMap
)
{
if
(
RobotManage
.
mainMachine
==
null
)
return
;
this
.
SuspendLayout
();
listReelInfo
.
Items
.
Clear
();
List
<
string
>
keys
=
new
List
<
string
>(
reelMap
.
Keys
);
foreach
(
string
key
in
keys
)
{
ListViewItem
lvi
=
new
ListViewItem
(
new
string
[]
{
""
,
key
,
reelMap
[
key
]
});
listReelInfo
.
Items
.
Add
(
lvi
);
}
this
.
ResumeLayout
(
true
);
}
private
void
AddForm
(
string
id
,
string
text
,
UserControl
form
)
{
foreach
(
TabPage
tp
in
tabc
.
TabPages
)
...
...
TheMachine/Form
1
.resx
→
TheMachine/Form
Main
.resx
查看文件 @
9c7f139
文件被删除
TheMachine/Program.cs
查看文件 @
9c7f139
...
...
@@ -59,7 +59,7 @@ namespace TheMachine
Application
.
EnableVisualStyles
();
Application
.
SetCompatibleTextRenderingDefault
(
false
);
Application
.
Run
(
new
Form
1
());
Application
.
Run
(
new
Form
Main
());
}
private
static
void
CurrentDomain_UnhandledException
(
object
sender
,
UnhandledExceptionEventArgs
e
)
...
...
TheMachine/TheMachine.csproj
查看文件 @
9c7f139
...
...
@@ -85,11 +85,11 @@
<Compile Include="AxisControl.Designer.cs">
<DependentUpon>AxisControl.cs</DependentUpon>
</Compile>
<Compile Include="Form
1
.cs">
<Compile Include="Form
Main
.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form
1
.Designer.cs">
<DependentUpon>Form
1
.cs</DependentUpon>
<Compile Include="Form
Main
.Designer.cs">
<DependentUpon>Form
Main
.cs</DependentUpon>
</Compile>
<Compile Include="IOControls.cs">
<SubType>UserControl</SubType>
...
...
@@ -169,8 +169,8 @@
<DependentUpon>AxisControl.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Form
1
.resx">
<DependentUpon>Form
1
.cs</DependentUpon>
<EmbeddedResource Include="Form
Main
.resx">
<DependentUpon>Form
Main
.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="IOControls.resx">
<DependentUpon>IOControls.cs</DependentUpon>
...
...
TheMachine/UC/uc_boxdebug.cs
查看文件 @
9c7f139
...
...
@@ -270,6 +270,14 @@ namespace TheMachine
label_size
.
Text
=
$
"[{ktkPosition.BagWidth}x{ktkPosition.BagHigh}]"
;
storePosControl1
.
LoadPos
(
ktkPosition
);
if
(
ktkPosition
.
PosType
.
Equals
(
1
))
{
groupInout
.
Enabled
=
false
;
}
else
{
groupInout
.
Enabled
=
true
;
}
}
private
void
btnInStore_Click
(
object
sender
,
EventArgs
e
)
...
...
@@ -279,7 +287,12 @@ namespace TheMachine
{
int
posindex
=
RobotManage
.
PositionNumList
.
IndexOf
(
cmbPosition
.
Text
);
LogUtil
.
info
(
$
"入库位:{cmbPosition.Text},index:{posindex}"
);
if
(
RobotManage
.
mainMachine
.
ManualIn
(
posindex
,
out
string
errmsg
))
string
startPosname
=
"IN_1"
;
if
(
radioButton2
.
Checked
)
{
startPosname
=
"IN_2"
;
}
if
(
RobotManage
.
mainMachine
.
ManualIn
(
startPosname
,
posindex
,
out
string
errmsg
))
{
LogUtil
.
info
(
$
"手动入库:{posindex}"
);
}
...
...
@@ -375,13 +388,13 @@ namespace TheMachine
if
(
RobotManage
.
mainMachine
.
runStatus
==
RunStatus
.
Running
)
{
if
(
!
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
IN_1_Reel_Check
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
IN_1_Reel_Check
).
Equals
(
IO_VALUE
.
LOW
)||
RobotManage
.
mainMachine
.
IOValue
(
IO_Type
.
IN_2_Reel_Check
).
Equals
(
IO_VALUE
.
LOW
))
{
MessageBox
.
Show
(
crc
.
GetString
(
"Res0217"
,
"
入库
料盘没有准备好,请先点击[上料准备],无法启动"
));
MessageBox
.
Show
(
crc
.
GetString
(
"Res0217"
,
"料盘没有准备好,请先点击[上料准备],无法启动"
));
return
;
}
DialogResult
res
=
MessageBox
.
Show
(
crc
.
GetString
(
"Res0218"
,
"确定开始自动库位测试?\n请确保料
仓
库位全部为空."
),
crc
.
GetString
(
"Res0167"
,
"提示"
),
MessageBoxButtons
.
YesNo
);
DialogResult
res
=
MessageBox
.
Show
(
crc
.
GetString
(
"Res0218"
,
"确定开始自动库位测试?\n请确保料
架
库位全部为空."
),
crc
.
GetString
(
"Res0167"
,
"提示"
),
MessageBoxButtons
.
YesNo
);
if
(
res
==
DialogResult
.
No
)
return
;
int
posindex
=
RobotManage
.
PositionNumList
.
IndexOf
(
cmbPosition
.
Text
);
...
...
TheMachine/UC/uc_boxdebug.designer.cs
查看文件 @
9c7f139
...
...
@@ -42,12 +42,17 @@ namespace TheMachine
this
.
label_verify
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
cb_fixpos
=
new
System
.
Windows
.
Forms
.
ComboBox
();
this
.
storePosControl1
=
new
TheMachine
.
StorePosControl
();
this
.
groupBox1
=
new
System
.
Windows
.
Forms
.
GroupBox
();
this
.
radioButton1
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
radioButton2
=
new
System
.
Windows
.
Forms
.
RadioButton
();
this
.
groupInout
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dataGridView1
)).
BeginInit
();
this
.
groupBox1
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// groupInout
//
this
.
groupInout
.
Controls
.
Add
(
this
.
groupBox1
);
this
.
groupInout
.
Controls
.
Add
(
this
.
cb_inoutdebugmode
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btn_autoinout
);
this
.
groupInout
.
Controls
.
Add
(
this
.
btnInStore
);
...
...
@@ -62,7 +67,7 @@ namespace TheMachine
// cb_inoutdebugmode
//
this
.
cb_inoutdebugmode
.
AutoSize
=
true
;
this
.
cb_inoutdebugmode
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
20
);
this
.
cb_inoutdebugmode
.
Location
=
new
System
.
Drawing
.
Point
(
15
,
28
);
this
.
cb_inoutdebugmode
.
Name
=
"cb_inoutdebugmode"
;
this
.
cb_inoutdebugmode
.
Size
=
new
System
.
Drawing
.
Size
(
108
,
16
);
this
.
cb_inoutdebugmode
.
TabIndex
=
103
;
...
...
@@ -76,7 +81,7 @@ namespace TheMachine
this
.
btn_autoinout
.
Enabled
=
false
;
this
.
btn_autoinout
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btn_autoinout
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btn_autoinout
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
162
);
this
.
btn_autoinout
.
Location
=
new
System
.
Drawing
.
Point
(
15
,
161
);
this
.
btn_autoinout
.
Name
=
"btn_autoinout"
;
this
.
btn_autoinout
.
Size
=
new
System
.
Drawing
.
Size
(
173
,
32
);
this
.
btn_autoinout
.
TabIndex
=
102
;
...
...
@@ -90,11 +95,11 @@ namespace TheMachine
this
.
btnInStore
.
Enabled
=
false
;
this
.
btnInStore
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnInStore
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnInStore
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
86
);
this
.
btnInStore
.
Location
=
new
System
.
Drawing
.
Point
(
15
,
118
);
this
.
btnInStore
.
Name
=
"btnInStore"
;
this
.
btnInStore
.
Size
=
new
System
.
Drawing
.
Size
(
1
17
,
32
);
this
.
btnInStore
.
Size
=
new
System
.
Drawing
.
Size
(
1
73
,
32
);
this
.
btnInStore
.
TabIndex
=
102
;
this
.
btnInStore
.
Text
=
"
入库
测试"
;
this
.
btnInStore
.
Text
=
"
放料
测试"
;
this
.
btnInStore
.
UseVisualStyleBackColor
=
false
;
this
.
btnInStore
.
Click
+=
new
System
.
EventHandler
(
this
.
btnInStore_Click
);
//
...
...
@@ -104,12 +109,13 @@ namespace TheMachine
this
.
btnOutStore
.
Enabled
=
false
;
this
.
btnOutStore
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnOutStore
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnOutStore
.
Location
=
new
System
.
Drawing
.
Point
(
6
,
124
);
this
.
btnOutStore
.
Location
=
new
System
.
Drawing
.
Point
(
129
,
17
);
this
.
btnOutStore
.
Name
=
"btnOutStore"
;
this
.
btnOutStore
.
Size
=
new
System
.
Drawing
.
Size
(
1
17
,
32
);
this
.
btnOutStore
.
Size
=
new
System
.
Drawing
.
Size
(
1
50
,
32
);
this
.
btnOutStore
.
TabIndex
=
101
;
this
.
btnOutStore
.
Text
=
"出库测试"
;
this
.
btnOutStore
.
UseVisualStyleBackColor
=
false
;
this
.
btnOutStore
.
Visible
=
false
;
this
.
btnOutStore
.
Click
+=
new
System
.
EventHandler
(
this
.
btnOutStore_Click
);
//
// label_size
...
...
@@ -192,6 +198,40 @@ namespace TheMachine
this
.
storePosControl1
.
TabIndex
=
227
;
this
.
storePosControl1
.
Tag
=
"not"
;
//
// groupBox1
//
this
.
groupBox1
.
Controls
.
Add
(
this
.
radioButton2
);
this
.
groupBox1
.
Controls
.
Add
(
this
.
radioButton1
);
this
.
groupBox1
.
Location
=
new
System
.
Drawing
.
Point
(
15
,
55
);
this
.
groupBox1
.
Name
=
"groupBox1"
;
this
.
groupBox1
.
Size
=
new
System
.
Drawing
.
Size
(
216
,
52
);
this
.
groupBox1
.
TabIndex
=
104
;
this
.
groupBox1
.
TabStop
=
false
;
this
.
groupBox1
.
Text
=
"料盘位置"
;
//
// radioButton1
//
this
.
radioButton1
.
AutoSize
=
true
;
this
.
radioButton1
.
Checked
=
true
;
this
.
radioButton1
.
Location
=
new
System
.
Drawing
.
Point
(
7
,
22
);
this
.
radioButton1
.
Name
=
"radioButton1"
;
this
.
radioButton1
.
Size
=
new
System
.
Drawing
.
Size
(
71
,
16
);
this
.
radioButton1
.
TabIndex
=
0
;
this
.
radioButton1
.
TabStop
=
true
;
this
.
radioButton1
.
Text
=
"上层料盘"
;
this
.
radioButton1
.
UseVisualStyleBackColor
=
true
;
//
// radioButton2
//
this
.
radioButton2
.
AutoSize
=
true
;
this
.
radioButton2
.
Location
=
new
System
.
Drawing
.
Point
(
125
,
22
);
this
.
radioButton2
.
Name
=
"radioButton2"
;
this
.
radioButton2
.
Size
=
new
System
.
Drawing
.
Size
(
71
,
16
);
this
.
radioButton2
.
TabIndex
=
1
;
this
.
radioButton2
.
TabStop
=
true
;
this
.
radioButton2
.
Text
=
"下层料盘"
;
this
.
radioButton2
.
UseVisualStyleBackColor
=
true
;
//
// uc_boxdebug
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
...
@@ -209,6 +249,8 @@ namespace TheMachine
this
.
groupInout
.
ResumeLayout
(
false
);
this
.
groupInout
.
PerformLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dataGridView1
)).
EndInit
();
this
.
groupBox1
.
ResumeLayout
(
false
);
this
.
groupBox1
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
}
...
...
@@ -227,5 +269,8 @@ namespace TheMachine
private
System
.
Windows
.
Forms
.
Label
label_verify
;
private
System
.
Windows
.
Forms
.
ComboBox
cb_fixpos
;
private
StorePosControl
storePosControl1
;
private
System
.
Windows
.
Forms
.
GroupBox
groupBox1
;
private
System
.
Windows
.
Forms
.
RadioButton
radioButton2
;
private
System
.
Windows
.
Forms
.
RadioButton
radioButton1
;
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论