Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
李娜
/
SO827-OutletEquip
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 60e454df
由
LN
编写于
2021-03-29 13:45:10 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
多料架放料bug修改。报警显示修改
1 个父辈
8e3f0ffb
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
86 行增加
和
63 行删除
source/DeviceLibrary/StoreConfig/StoreConfig.csv
source/DeviceLibrary/bean/EquipBean.cs
source/DeviceLibrary/bean/EquipBean_Partial.cs
source/DeviceLibrary/bean/WorkStation.cs
source/DeviceLibrary/mananger/HttpServer.cs
source/HCSingleStore/FrmEquip.Designer.cs
source/HCSingleStore/FrmEquip.cs
source/DeviceLibrary/StoreConfig/StoreConfig.csv
查看文件 @
60e454d
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,0,(轴一)旋转轴,Middle_Axis,0,HC,,100
,1000,1000,20,1
00,3000,10,100,0,0
AXIS,0,(轴一)旋转轴,Middle_Axis,0,HC,,100
0,1000,1000,50,4
00,3000,10,100,0,0
AXIS,0,(轴二)升降轴,UpDown_Axis,1,HC,,100,1000,1000,20,150,3000,10,100,0,0
AXIS,0,(轴二)升降轴,UpDown_Axis,1,HC,,100,1000,1000,20,150,3000,10,100,0,0
AXIS,0,(轴三)进出轴,InOut_Axis,2,HC,,3000,3000,3000,100,400,3000,10,100,0,0
AXIS,0,(轴三)进出轴,InOut_Axis,2,HC,,3000,3000,3000,100,400,3000,10,100,0,0
AXIS,0,(轴四)压紧轴,Comp_Axis,3,HC,,30000,15000,15000,3000,5000,10000,10,100,0,0
AXIS,0,(轴四)压紧轴,Comp_Axis,3,HC,,30000,15000,15000,3000,5000,10000,10,100,0,0
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,0,升降轴(轴2)进料口取料低点 P1,UpDownAxis_DoorL_P1,2914,,,,,,,,,,,,
PRO,0,升降轴(轴2)进料口取料低点 P1,UpDownAxis_DoorL_P1,2914,,,,,,,,,,,,
PRO,0,升降轴(轴2)进料口取料高点 P2,UpDownAxis_DoorH_P2,3200,,,,,,,,,,,,
PRO,0,升降轴(轴2)进料口取料高点 P2,UpDownAxis_DoorH_P2,3200,,,,,,,,,,,,
PRO,0,升降轴(轴2)NG口放料高点 P5,UpDownAxis_DoorH_P5,4
90
0,,,,,,,,,,,,
PRO,0,升降轴(轴2)NG口放料高点 P5,UpDownAxis_DoorH_P5,4
76
0,,,,,,,,,,,,
PRO,0,升降轴(轴2)NG口放料低点 P6,UpDownAxis_DoorH_P6,4
90
0,,,,,,,,,,,,
PRO,0,升降轴(轴2)NG口放料低点 P6,UpDownAxis_DoorH_P6,4
76
0,,,,,,,,,,,,
PRO,0,旋转轴(轴1)P1/取料点/待机原位点,MiddleAxis_P1,4760,,,,,,,,,,,,
PRO,0,旋转轴(轴1)P1/取料点/待机原位点,MiddleAxis_P1,4760,,,,,,,,,,,,
PRO,0,旋转轴(轴1)P3/NG口放料点,MiddleAxis_P3,
245
0,,,,,,,,,,,,
PRO,0,旋转轴(轴1)P3/NG口放料点,MiddleAxis_P3,
476
0,,,,,,,,,,,,
PRO,0,进出轴(轴3)P1/待机原位点,InOutAxis_P1,200,,,,,,,,,,,,
PRO,0,进出轴(轴3)P1/待机原位点,InOutAxis_P1,200,,,,,,,,,,,,
PRO,0,进出轴(轴3)P4/NG口放料点,InOutAxis_P4,
10
0,,,,,,,,,,,,
PRO,0,进出轴(轴3)P4/NG口放料点,InOutAxis_P4,
476
0,,,,,,,,,,,,
PRO,0,压紧轴(轴4)P1待机原位点,CompressAxis_P1,4760,,,,,,,,,,,,
PRO,0,压紧轴(轴4)P1待机原位点,CompressAxis_P1,4760,,,,,,,,,,,,
PRO,0,压紧轴(轴4)P2压紧点列表,CompAxis_P2_List,8=74800,12=71300,28=59300,36=46800,48=40400,,,,,,,,
PRO,0,压紧轴(轴4)P2压紧点列表,CompAxis_P2_List,8=74800,12=71300,28=59300,36=46800,48=40400,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
...
@@ -21,9 +21,9 @@ PRO,0,升降轴(轴2)P3速度,UpDownAxis_P3_Speed,1000,,,,,,,,,,,,
...
@@ -21,9 +21,9 @@ PRO,0,升降轴(轴2)P3速度,UpDownAxis_P3_Speed,1000,,,,,,,,,,,,
PRO,0,升降轴(轴2)P4速度,UpDownAxis_P4_Speed,500,,,,,,,,,,,,
PRO,0,升降轴(轴2)P4速度,UpDownAxis_P4_Speed,500,,,,,,,,,,,,
PRO,0,升降轴(轴2)P5速度,UpDownAxis_P5_Speed,1000,,,,,,,,,,,,
PRO,0,升降轴(轴2)P5速度,UpDownAxis_P5_Speed,1000,,,,,,,,,,,,
PRO,0,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,500,,,,,,,,,,,,
PRO,0,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,500,,,,,,,,,,,,
PRO,0,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,300,,,,,,,,,,,,
PRO,0,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,300
0
,,,,,,,,,,,,
PRO,0,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,300,,,,,,,,,,,,
PRO,0,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,300
0
,,,,,,,,,,,,
PRO,1,旋转轴(轴1)P3速度,MiddleAxis_P3_Speed,30
1
,,,,,,,,,,,,
PRO,1,旋转轴(轴1)P3速度,MiddleAxis_P3_Speed,30
00
,,,,,,,,,,,,
PRO,0,进出轴(轴3)P1速度,InOutAxis_P1_Speed,6000,,,,,,,,,,,,
PRO,0,进出轴(轴3)P1速度,InOutAxis_P1_Speed,6000,,,,,,,,,,,,
PRO,0,进出轴(轴3)P2速度,InOutAxis_P2_Speed,6000,,,,,,,,,,,,
PRO,0,进出轴(轴3)P2速度,InOutAxis_P2_Speed,6000,,,,,,,,,,,,
PRO,0,进出轴(轴3)P3速度,InOutAxis_P3_Speed,6000,,,,,,,,,,,,
PRO,0,进出轴(轴3)P3速度,InOutAxis_P3_Speed,6000,,,,,,,,,,,,
...
...
source/DeviceLibrary/bean/EquipBean.cs
查看文件 @
60e454d
...
@@ -822,7 +822,6 @@ namespace OnlineStore.DeviceLibrary
...
@@ -822,7 +822,6 @@ namespace OnlineStore.DeviceLibrary
CurrTray
=
HttpServer
.
GetLocation
(
LineConnect
.
DoorPosInfo
.
barcode
,
shelfRfid
,
out
outMsg
);
CurrTray
=
HttpServer
.
GetLocation
(
LineConnect
.
DoorPosInfo
.
barcode
,
shelfRfid
,
out
outMsg
);
//需要取放料,且料架已准备好
//需要取放料,且料架已准备好
if
(
outMsg
.
Equals
(
""
))
if
(
outMsg
.
Equals
(
""
))
//if (String.IsNullOrEmpty(CurrTray.getP).Equals(false) && outMsg.Equals(""))
{
{
ClearWarnMsg
(
"getLocation"
);
ClearWarnMsg
(
"getLocation"
);
string
targetP
=
GetShelfPosId
();
string
targetP
=
GetShelfPosId
();
...
@@ -833,7 +832,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -833,7 +832,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
WarnMsg
=
"
getLocation "
+
outMsg
;
WarnMsg
=
"
未找到可用料架 getLocation "
+
CurrTray
.
ToStr
()
;
}
}
}
}
else
if
(!
outMsg
.
Equals
(
""
))
else
if
(!
outMsg
.
Equals
(
""
))
...
@@ -890,15 +889,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -890,15 +889,15 @@ namespace OnlineStore.DeviceLibrary
}
}
private
void
StartMove
()
private
void
StartMove
()
{
{
LogInfo
(
"开始移栽【"
+
LineConnect
.
DoorPosInfo
.
ToStr
()
+
"】"
);
LogUtil
.
debug
(
Name
+
"开始移栽【"
+
LineConnect
.
DoorPosInfo
.
ToStr
()
+
"】"
);
bool
result
=
StartOutMove
(
new
InOutParam
(
LineConnect
.
DoorPosInfo
));
bool
result
=
StartOutMove
(
new
InOutParam
(
LineConnect
.
DoorPosInfo
));
if
(!
result
)
if
(!
result
)
{
{
Log
Info
(
" 移栽【"
+
LineConnect
.
DoorPosInfo
.
ToStr
()
+
"】失败"
);
Log
Util
.
debug
(
Name
+
" 移栽【"
+
LineConnect
.
DoorPosInfo
.
ToStr
()
+
"】失败"
);
}
}
else
else
{
{
Log
Info
(
" 移栽【"
+
LineConnect
.
DoorPosInfo
.
ToStr
()
+
"】成功,清理门口数据"
);
Log
Util
.
debug
(
Name
+
" 移栽【"
+
LineConnect
.
DoorPosInfo
.
ToStr
()
+
"】成功,清理门口数据"
);
LineConnect
.
DoorPosInfo
=
null
;
LineConnect
.
DoorPosInfo
=
null
;
}
}
}
}
...
@@ -1007,7 +1006,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -1007,7 +1006,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
msg
+=
shelf
.
Name
+
": "
+
shelf
.
CurrShelf
.
ToStr
()
+
"\r\n"
;
msg
+=
shelf
.
Name
+
": "
+
shelf
.
CurrShelf
.
ToStr
()
+
"
"
+
shelf
.
MoveInfo
.
MoveType
+
"_"
+
shelf
.
MoveInfo
.
MoveStep
+
"_"
+
shelf
.
alarmType
+
"
\r\n"
;
}
}
}
}
if
(
alarmType
.
Equals
(
StoreAlarmType
.
None
))
if
(
alarmType
.
Equals
(
StoreAlarmType
.
None
))
...
...
source/DeviceLibrary/bean/EquipBean_Partial.cs
查看文件 @
60e454d
...
@@ -273,15 +273,15 @@ namespace OnlineStore.DeviceLibrary
...
@@ -273,15 +273,15 @@ namespace OnlineStore.DeviceLibrary
{
{
if
(!
LoadParamPosition
(
param
))
if
(!
LoadParamPosition
(
param
))
{
{
LogUtil
.
error
(
Name
+
" 启动出料【"
+
param
.
PosInfo
.
ToStr
()
+
"】出错,找不到库位"
);
LogUtil
.
error
(
Name
+
" 启动出料
移栽
【"
+
param
.
PosInfo
.
ToStr
()
+
"】出错,找不到库位"
);
return
false
;
return
false
;
}
}
if
(
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
if
(
IOValue
(
IO_Type
.
TrayCheck_Fixture
).
Equals
(
IO_VALUE
.
HIGH
))
{
{
LogUtil
.
error
(
Name
+
" 启动出料【"
+
param
.
PosInfo
.
ToStr
()
+
"】出错,叉子料盘检测有料"
);
LogUtil
.
error
(
Name
+
" 启动出料
移栽
【"
+
param
.
PosInfo
.
ToStr
()
+
"】出错,叉子料盘检测有料"
);
return
false
;
return
false
;
}
}
LogInfo
(
" 启动出料【"
+
param
.
PosInfo
.
ToStr
()
+
"】
"
);
LogInfo
(
" 启动出料移栽【"
+
param
.
PosInfo
.
ToStr
()
+
"】成功
"
);
storeRunStatus
=
StoreRunStatus
.
Busy
;
storeRunStatus
=
StoreRunStatus
.
Busy
;
storeStatus
=
StoreStatus
.
OutStoreExecute
;
storeStatus
=
StoreStatus
.
OutStoreExecute
;
MoveInfo
.
NewMove
(
StoreMoveType
.
OutStore
,
param
);
MoveInfo
.
NewMove
(
StoreMoveType
.
OutStore
,
param
);
...
@@ -630,6 +630,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -630,6 +630,7 @@ namespace OnlineStore.DeviceLibrary
{
{
string
moveStr
=
"->料架 "
;
string
moveStr
=
"->料架 "
;
string
posId
=
MoveInfo
.
MoveParam
!=
null
?
MoveInfo
.
MoveParam
.
PosInfo
.
ShelfPosId
:
""
;
string
posId
=
MoveInfo
.
MoveParam
!=
null
?
MoveInfo
.
MoveParam
.
PosInfo
.
ShelfPosId
:
""
;
string
BoxPosId
=
MoveInfo
.
MoveParam
!=
null
?
MoveInfo
.
MoveParam
.
PosInfo
.
BoxPosId
:
""
;
string
barcode
=
MoveInfo
.
MoveParam
!=
null
?
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
:
""
;
string
barcode
=
MoveInfo
.
MoveParam
!=
null
?
MoveInfo
.
MoveParam
.
PosInfo
.
barcode
:
""
;
if
(
MoveInfo
.
MoveParam
!=
null
&&
MoveInfo
.
MoveParam
.
PosInfo
!=
null
&&
MoveInfo
.
MoveParam
.
PosInfo
.
IsNg
)
if
(
MoveInfo
.
MoveParam
!=
null
&&
MoveInfo
.
MoveParam
.
PosInfo
!=
null
&&
MoveInfo
.
MoveParam
.
PosInfo
.
IsNg
)
{
{
...
@@ -638,7 +639,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -638,7 +639,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
LogUtil
.
info
(
Name
+
"["
+
barcode
+
"]"
+
moveStr
+
"["
+
posId
+
"] : "
+
MoveInfo
.
MoveStep
+
" "
+
msg
);
LogUtil
.
info
(
Name
+
"["
+
BoxPosId
+
"]"
+
moveStr
+
"["
+
posId
+
"] : "
+
MoveInfo
.
MoveStep
+
" "
+
msg
);
}
}
}
}
}
}
...
...
source/DeviceLibrary/bean/WorkStation.cs
查看文件 @
60e454d
...
@@ -55,9 +55,17 @@ namespace OnlineStore.DeviceLibrary
...
@@ -55,9 +55,17 @@ namespace OnlineStore.DeviceLibrary
}
}
if
(
CheckShelf
(
IO_VALUE
.
HIGH
))
if
(
CheckShelf
(
IO_VALUE
.
HIGH
))
{
{
if
(!
CurrShelf
.
IsNeedLeave
&&
(!
String
.
IsNullOrEmpty
(
CurrShelf
.
RealShelf
))
&&
LocationIsUp
()
)
if
(!
CurrShelf
.
IsNeedLeave
&&
(!
String
.
IsNullOrEmpty
(
CurrShelf
.
RealShelf
))
)
{
{
return
true
;
if
(
LocationIsUp
())
{
return
true
;
}
else
{
WarnMsg
=
Name
+
"定位气缸上升不到位"
;
}
}
}
}
}
//料架准备好可以放料
//料架准备好可以放料
...
@@ -91,7 +99,8 @@ namespace OnlineStore.DeviceLibrary
...
@@ -91,7 +99,8 @@ namespace OnlineStore.DeviceLibrary
private
string
ReadShelfId
()
private
string
ReadShelfId
()
{
{
string
rfid
=
RFIDManager
.
ReadRFID
(
rfidIp
).
NumStr
();
string
rfid
=
RFIDManager
.
ReadRFID
(
rfidIp
).
NumStr
();
CurrShelf
=
new
ShelfInfo
(
rfid
);
CurrShelf
=
new
ShelfInfo
(
rfid
);
LogUtil
.
info
(
Name
+
"读取料架号:"
+
CurrShelf
.
ToStr
());
return
CurrShelf
.
RealShelf
;
return
CurrShelf
.
RealShelf
;
}
}
...
@@ -191,13 +200,26 @@ namespace OnlineStore.DeviceLibrary
...
@@ -191,13 +200,26 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
MoveInfo
.
IsStep
(
MoveStep
.
SR_04_LocationUp
))
else
if
(
MoveInfo
.
IsStep
(
MoveStep
.
SR_04_LocationUp
))
{
{
LogUtil
.
info
(
Name
+
"复位:"
+
CurrShelf
.
ToStr
()
+
"准备完成,可以放料 "
);
if
(
LocationIsUp
())
MoveInfo
.
EndMove
();
{
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
SR_04_LocationUp
()
private
void
SR_04_LocationUp
()
{
{
MoveInfo
.
NewMove
(
StoreMoveType
.
StoreReset
);
//MoveInfo.NewMove(StoreMoveType.StoreReset);
MoveInfo
.
NextMoveStep
(
MoveStep
.
SR_04_LocationUp
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
ReadShelfId
();
ReadShelfId
();
if
(
CheckNeedLeave
(
false
))
if
(
CheckNeedLeave
(
false
))
...
@@ -208,7 +230,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -208,7 +230,7 @@ namespace OnlineStore.DeviceLibrary
}
}
else
else
{
{
MoveInfo
.
NextMoveStep
(
MoveStep
.
SR_04_LocationUp
);
//
MoveInfo.NextMoveStep(MoveStep.SR_04_LocationUp);
LocationUp
(
MoveInfo
);
LocationUp
(
MoveInfo
);
LogUtil
.
info
(
Name
+
"复位:读取到新料架:"
+
CurrShelf
.
ToStr
()
+
",顶升上升 "
);
LogUtil
.
info
(
Name
+
"复位:读取到新料架:"
+
CurrShelf
.
ToStr
()
+
",顶升上升 "
);
}
}
...
@@ -271,7 +293,11 @@ namespace OnlineStore.DeviceLibrary
...
@@ -271,7 +293,11 @@ namespace OnlineStore.DeviceLibrary
if
(
IsReady
())
if
(
IsReady
())
{
{
if
(
CurrShelf
.
RealShelf
.
Equals
(
CurrTray
.
realRFID
))
if
(
CurrShelf
.
RealShelf
.
Equals
(
CurrTray
.
realRFID
))
{
{
if
(
String
.
IsNullOrEmpty
(
CurrShelf
.
XNShelf
))
{
CurrShelf
.
XNShelf
=
CurrTray
.
rfid
;
LogUtil
.
info
(
Name
+
"增加虚拟料架号绑定:"
+
CurrShelf
.
ToStr
());
}
ShelfPosId
=
Name
+
CurrTray
.
shelfP
;
ShelfPosId
=
Name
+
CurrTray
.
shelfP
;
return
true
;
return
true
;
}
}
...
@@ -287,14 +313,16 @@ namespace OnlineStore.DeviceLibrary
...
@@ -287,14 +313,16 @@ namespace OnlineStore.DeviceLibrary
{
{
string
[]
array
=
CurrTray
.
usedRfidList
.
Split
(
','
);
string
[]
array
=
CurrTray
.
usedRfidList
.
Split
(
','
);
//若料架已使用过,直接返回false
//若料架已使用过,直接返回false
if
(
array
.
Contains
(
CurrShelf
.
XN
Shelf
))
if
(
array
.
Contains
(
CurrShelf
.
Real
Shelf
))
{
{
return
false
;
return
false
;
}
}
}
}
if
(
CurrShelf
.
XNShelf
.
Equals
(
""
))
if
(
CurrShelf
.
XNShelf
.
Equals
(
""
))
{
{
CurrShelf
.
XNShelf
=
CurrTray
.
rfid
;
CurrTray
.
realRFID
=
CurrShelf
.
RealShelf
;
CurrTray
.
realRFID
=
CurrShelf
.
RealShelf
;
LogUtil
.
info
(
Name
+
"增加虚拟料架号绑定:"
+
CurrShelf
.
ToStr
());
ShelfPosId
=
Name
+
CurrTray
.
shelfP
;
ShelfPosId
=
Name
+
CurrTray
.
shelfP
;
return
true
;
return
true
;
}
}
...
@@ -335,19 +363,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -335,19 +363,14 @@ namespace OnlineStore.DeviceLibrary
}
}
else
if
(
wait
.
WaitType
==
2
)
else
if
(
wait
.
WaitType
==
2
)
{
{
wait
.
IsEnd
=
EquipManager
.
Equip
.
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
);
wait
.
IsEnd
=
IOManager
.
IOValue
(
wait
.
IoType
).
Equals
(
wait
.
IoValue
);
int
timeOutMs
=
EquipManager
.
Equip
.
Config
.
IOSingle_TimerOut
;
int
timeOutMs
=
EquipManager
.
Equip
.
Config
.
IOSingle_TimerOut
;
if
((!
wait
.
IsEnd
)
&&
span
.
TotalMilliseconds
>
timeOutMs
)
if
((!
wait
.
IsEnd
)
&&
span
.
TotalMilliseconds
>
timeOutMs
)
{
{
ConfigIO
io
=
EquipManager
.
Equip
.
Config
.
getWaitIO
(
wait
.
IoType
);
ConfigIO
io
=
EquipManager
.
Equip
.
Config
.
getWaitIO
(
wait
.
IoType
);
WarnMsg
=
Name
+
"["
+
checkmove
.
MoveType
+
"]["
+
checkmove
.
MoveStep
+
"] 等待"
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
"超时 "
;
WarnMsg
=
Name
+
"["
+
checkmove
.
MoveType
+
"]["
+
checkmove
.
MoveStep
+
"] 等待"
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
"超时 "
;
if
(
WarnMsg
.
Contains
(
"Check_Pos"
)
||
WarnMsg
.
Contains
(
"X03_点检"
))
{
WarnMsg
=
""
;
break
;
}
alarmType
=
StoreAlarmType
.
IoSingleTimeOut
;
alarmType
=
StoreAlarmType
.
IoSingleTimeOut
;
LogUtil
.
error
(
Name
+
wait
.
IoType
+
"等待信号("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
14
);
LogUtil
.
error
(
Name
+
wait
.
IoType
+
"等待信号("
+
io
.
DisplayStr
+
"="
+
wait
.
IoValue
+
") 超时"
,
14
);
isOk
=
false
;
isOk
=
false
;
...
@@ -408,12 +431,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -408,12 +431,7 @@ namespace OnlineStore.DeviceLibrary
{
{
WarnMsg
=
Name
+
"["
+
checkmove
.
MoveType
+
"]["
+
checkmove
.
MoveStep
+
"] 等待超时 ["
+
NotOkMsg
WarnMsg
=
Name
+
"["
+
checkmove
.
MoveType
+
"]["
+
checkmove
.
MoveStep
+
"] 等待超时 ["
+
NotOkMsg
+
"]已等待["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
+
"]已等待["
+
Math
.
Round
(
span
.
TotalSeconds
,
1
)
+
"]秒"
;
if
(
WarnMsg
.
Contains
(
"Check_Pos"
)
||
WarnMsg
.
Contains
(
"X03_点检"
))
{
WarnMsg
=
""
;
return
;
}
LogUtil
.
error
(
WarnMsg
,
100
);
LogUtil
.
error
(
WarnMsg
,
100
);
alarmType
=
StoreAlarmType
.
IoSingleTimeOut
;
alarmType
=
StoreAlarmType
.
IoSingleTimeOut
;
}
}
...
@@ -596,7 +614,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -596,7 +614,7 @@ namespace OnlineStore.DeviceLibrary
try
try
{
{
CurrShelf
=
new
ShelfInfo
();
CurrShelf
=
new
ShelfInfo
();
LogUtil
.
info
(
logName
+
" 开始,设置状态=MayEnter"
);
LogUtil
.
info
(
logName
+
" 开始,
清空料架信息,
设置状态=MayEnter"
);
AgvClient
.
SetStatus
(
AgvName
,
""
,
ClientAction
.
MayEnter
,
ClientLevel
.
High
,
true
);
AgvClient
.
SetStatus
(
AgvName
,
""
,
ClientAction
.
MayEnter
,
ClientLevel
.
High
,
true
);
ProcessShelfEnter
=
true
;
ProcessShelfEnter
=
true
;
...
@@ -719,7 +737,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -719,7 +737,7 @@ namespace OnlineStore.DeviceLibrary
}
}
}
}
public
bool
LocationIsDown
(
StoreMoveInfo
moveInfo
=
null
)
public
bool
LocationIsDown
()
{
{
if
(
IOManager
.
IOValue
(
DI_LocationCylinder_Up1
).
Equals
(
IO_VALUE
.
LOW
)
&&
if
(
IOManager
.
IOValue
(
DI_LocationCylinder_Up1
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOManager
.
IOValue
(
DI_LocationCylinder_Down1
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
DI_LocationCylinder_Down1
).
Equals
(
IO_VALUE
.
HIGH
)
&&
...
@@ -731,7 +749,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -731,7 +749,7 @@ namespace OnlineStore.DeviceLibrary
}
}
return
false
;
return
false
;
}
}
public
bool
LocationIsUp
(
StoreMoveInfo
moveInfo
=
null
)
public
bool
LocationIsUp
()
{
{
if
(
IOManager
.
IOValue
(
DI_LocationCylinder_Down1
).
Equals
(
IO_VALUE
.
LOW
)
&&
if
(
IOManager
.
IOValue
(
DI_LocationCylinder_Down1
).
Equals
(
IO_VALUE
.
LOW
)
&&
IOManager
.
IOValue
(
DI_LocationCylinder_Up1
).
Equals
(
IO_VALUE
.
HIGH
)
&&
IOManager
.
IOValue
(
DI_LocationCylinder_Up1
).
Equals
(
IO_VALUE
.
HIGH
)
&&
...
...
source/DeviceLibrary/mananger/HttpServer.cs
查看文件 @
60e454d
...
@@ -178,14 +178,14 @@ namespace OnlineStore.DeviceLibrary
...
@@ -178,14 +178,14 @@ namespace OnlineStore.DeviceLibrary
public
static
TrayInfo
GetLocation
(
string
barcode
,
string
currRFID
,
out
string
msg
)
public
static
TrayInfo
GetLocation
(
string
barcode
,
string
currRFID
,
out
string
msg
)
{
{
//getLocation这个接口传入barcode和rfid列表会分配料架
//getLocation这个接口传入barcode和rfid列表会分配料架
TrayInfo
tray
=
new
TrayInfo
();
TrayInfo
tray
=
new
TrayInfo
();
string
api
=
"getLocation"
;
msg
=
""
;
msg
=
""
;
try
try
{
{
string
url
=
httpAddr
+
api
+
"?barcode="
+
barcode
+
"&rfid="
+
currRFID
;
string
api
=
"getLocation"
+
"?barcode="
+
barcode
+
"&rfid="
+
currRFID
;
string
url
=
httpAddr
+
api
;
string
logName
=
"http :URL:"
+
url
+
""
;
string
logName
=
"http :URL:"
+
api
;
DateTime
startTime
=
DateTime
.
Now
;
DateTime
startTime
=
DateTime
.
Now
;
string
json
=
HttpHelper
.
Post
(
url
,
""
,
10000
);
string
json
=
HttpHelper
.
Post
(
url
,
""
,
10000
);
LogUtil
.
info
(
logName
+
": Response:"
+
json
+
",耗时【"
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
"】"
);
LogUtil
.
info
(
logName
+
": Response:"
+
json
+
",耗时【"
+
FormUtil
.
GetSpanStr
(
DateTime
.
Now
-
startTime
)
+
"】"
);
...
@@ -212,17 +212,7 @@ namespace OnlineStore.DeviceLibrary
...
@@ -212,17 +212,7 @@ namespace OnlineStore.DeviceLibrary
LogUtil
.
info
(
logName
+
": data=null"
);
LogUtil
.
info
(
logName
+
": data=null"
);
return
tray
;
return
tray
;
}
}
//if (dict.TryGetValue("w", out value))
//{
// switch (value)
// {
// case "7": tray.getP = "p1"; break;
// case "11": tray.getP = "p2"; break;
// case "13": tray.getP = "p3"; break;
// case "15": tray.getP = "p4"; break;
// }
//}
if
(
dict
.
TryGetValue
(
"rfidLoc"
,
out
value
))
if
(
dict
.
TryGetValue
(
"rfidLoc"
,
out
value
))
int
.
TryParse
(
value
.
ToString
(),
out
tray
.
shelfP
);
int
.
TryParse
(
value
.
ToString
(),
out
tray
.
shelfP
);
if
(
dict
.
TryGetValue
(
"rfid"
,
out
value
))
if
(
dict
.
TryGetValue
(
"rfid"
,
out
value
))
...
@@ -247,12 +237,26 @@ namespace OnlineStore.DeviceLibrary
...
@@ -247,12 +237,26 @@ namespace OnlineStore.DeviceLibrary
}
}
public
class
TrayInfo
public
class
TrayInfo
{
{
//public int robotNum = 0;
//Response:{"code":0,"msg":"ok","data":{"w":"7","realRfid":"","h":"8","rfid":"1-2F","usedRfidList":"F102","rfidLoc":"11","barcode":"985022*35030377*0822*3000*08220350"}}
//public string getP = "";
/// <summary>
/// 料架位置,1-31
/// </summary>
public
int
shelfP
=
0
;
public
int
shelfP
=
0
;
/// <summary>
/// 虚拟料架号
/// </summary>
public
string
rfid
=
""
;
public
string
rfid
=
""
;
/// <summary>
/// 真实料架号
/// </summary>
public
string
realRFID
=
""
;
public
string
realRFID
=
""
;
/// <summary>
/// 条码信息
/// </summary>
public
string
barcode
=
""
;
public
string
barcode
=
""
;
/// <summary>
/// 已使用的真实料架号
/// </summary>
public
string
usedRfidList
=
""
;
public
string
usedRfidList
=
""
;
public
string
ToStr
()
public
string
ToStr
()
{
{
...
...
source/HCSingleStore/FrmEquip.Designer.cs
查看文件 @
60e454d
此文件的差异被折叠,
点击展开。
source/HCSingleStore/FrmEquip.cs
查看文件 @
60e454d
...
@@ -345,10 +345,11 @@ namespace OnlineStore.ACSingleStore
...
@@ -345,10 +345,11 @@ namespace OnlineStore.ACSingleStore
private
int
GetV
(
int
currV
,
TextBox
text
,
ref
bool
needUpdate
)
private
int
GetV
(
int
currV
,
TextBox
text
,
ref
bool
needUpdate
)
{
{
if
(
currV
!=
FormUtil
.
GetIntValue
(
text
))
int
targetV
=
FormUtil
.
GetIntValue
(
text
);
if
(
currV
!=
targetV
)
{
{
needUpdate
=
true
;
needUpdate
=
true
;
return
FormUtil
.
GetIntValue
(
txtMiddleP1
)
;
return
targetV
;
}
}
return
currV
;
return
currV
;
}
}
...
@@ -1230,6 +1231,6 @@ namespace OnlineStore.ACSingleStore
...
@@ -1230,6 +1231,6 @@ namespace OnlineStore.ACSingleStore
equip
.
MoveStop
=
chbMoveStop
.
Checked
;
equip
.
MoveStop
=
chbMoveStop
.
Checked
;
LogUtil
.
info
(
equip
.
Name
+
"用户切换是否暂停: "
+
equip
.
MoveStop
);
LogUtil
.
info
(
equip
.
Name
+
"用户切换是否暂停: "
+
equip
.
MoveStop
);
}
}
}
}
}
}
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论