Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
孙克
/
RC1250-AssemblyLine
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 1e6f294f
由
LN
编写于
2020-06-28 14:12:05 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
横移模块逻辑优化
1 个父辈
f2463016
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
106 行增加
和
57 行删除
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
source/DeviceLibrary/assemblymanager/SServerManager.cs
source/DeviceLibrary/assemblyLine/FeedingEquip_InStore.cs
查看文件 @
1e6f294
...
...
@@ -367,7 +367,11 @@ namespace OnlineStore.DeviceLibrary
{
if
(
Config
.
SidesWayNum
>
0
)
{
CheckLog
(
"托盘放行 SecondStoreMove:(托盘放行结束) "
);
if
(
Config
.
SidesWayNum
.
Equals
(
3
)
||
Config
.
SidesWayNum
.
Equals
(
1
))
{
CylinderMove
(
null
,
IO_Type
.
SW_TopCylinder_Down
,
IO_Type
.
SW_TopCylinder_Up
);
}
CheckLog
(
"托盘放行 SecondStoreMove:(托盘放行结束)横移顶升先上升 "
);
SMoveEnd
();
}
else
...
...
@@ -925,7 +929,7 @@ namespace OnlineStore.DeviceLibrary
else
{
MoveInfo
.
NextMoveStep
(
LineMoveStep
.
FI_27_WaitCylinderUp
);
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
3
00
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1
00
));
MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SL_MoveCylinder_Down
,
IO_VALUE
.
LOW
));
CylinderMove
(
null
,
IO_Type
.
SL_MoveCylinder_Down
,
IO_Type
.
SL_MoveCylinder_Up
);
}
...
...
source/DeviceLibrary/assemblyLine/LineBean_Partial.cs
查看文件 @
1e6f294
...
...
@@ -641,29 +641,14 @@ namespace OnlineStore.DeviceLibrary
else
if
(
SW41_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW05_LocationDown
))
{
SW41_SW06_TopCylinderUp
();
//SW41_MoveInfo.NextMoveStep(LineMoveStep.SW06_TopCylinderUp);
//SWLog("横移轨道41:顶升气缸上升 ,至少等待1000 ");
//IOMove(IO_Type.SW4_StopDown, IO_VALUE.LOW);
//SW41_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
//CylinderMove(SW41_MoveInfo, IO_Type.SW4_TopCylinder_Down, IO_Type.SW4_TopCylinder_Up);
//Thread.Sleep(50);
//CylinderMove(SW41_MoveInfo, IO_Type.SW1_TopCylinder_Down, IO_Type.SW1_TopCylinder_Up);
}
else
if
(
SW41_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW06_TopCylinderUp
))
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW07_WaitNoTray
);
SWLog
(
"横移轨道41: 等待 SW1_TrayCheck=0 "
);
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW1_TrayCheck
,
IO_VALUE
.
LOW
));
SW41_SW07_WaitNoTray
();
}
else
if
(
SW41_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW07_WaitNoTray
))
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW08_DriveMotorMove
);
SWLog
(
"横移轨道41:开始转动电机 ,等待1000,SW4_TrayCheck=0, SW1_TrayCheck=1 "
);
IOMove
(
IO_Type
.
SW4_MotorRun
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
SW1_MotorRun
,
IO_VALUE
.
HIGH
);
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW1_TrayCheck
,
IO_VALUE
.
HIGH
));
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW4_TrayCheck
,
IO_VALUE
.
LOW
));
SW41_SW08_DriveMotorMove
();
}
else
if
(
SW41_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW08_DriveMotorMove
))
{
...
...
@@ -745,18 +730,50 @@ namespace OnlineStore.DeviceLibrary
{
lastSw4StopDownTime
=
DateTime
.
Now
.
AddSeconds
(-
2
);
SW41_MoveInfo
.
EndMove
();
SWLog
(
"横移轨道41:横移结束 "
);
CylinderMove
(
null
,
IO_Type
.
SW1_TopCylinder_Down
,
IO_Type
.
SW1_TopCylinder_Up
);
SWLog
(
"横移轨道41:横移结束 ,横移1顶升上升 "
);
}
}
private
void
SW41_SW08_DriveMotorMove
()
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW08_DriveMotorMove
);
SWLog
(
"横移轨道41:开始转动电机 ,等待1000,SW4_TrayCheck=0, SW1_TrayCheck=1 "
);
IOMove
(
IO_Type
.
SW4_MotorRun
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
SW1_MotorRun
,
IO_VALUE
.
HIGH
);
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW1_TrayCheck
,
IO_VALUE
.
HIGH
));
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW4_TrayCheck
,
IO_VALUE
.
LOW
));
}
private
void
SW41_SW07_WaitNoTray
()
{
if
(
IOValue
(
IO_Type
.
SW1_TrayCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
SW41_SW08_DriveMotorMove
();
}
else
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW07_WaitNoTray
);
SWLog
(
"横移轨道41: 等待 SW1_TrayCheck=0 "
);
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW1_TrayCheck
,
IO_VALUE
.
LOW
));
}
}
private
void
SW41_SW06_TopCylinderUp
()
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW06_TopCylinderUp
);
SWLog
(
"横移轨道41:顶升气缸上升 ,至少等待1000 "
);
IOMove
(
IO_Type
.
SW4_StopDown
,
IO_VALUE
.
LOW
);
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW4_TopCylinder_Down
,
IO_Type
.
SW4_TopCylinder_Up
);
Thread
.
Sleep
(
50
);
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW1_TopCylinder_Down
,
IO_Type
.
SW1_TopCylinder_Up
);
if
(
CylinderIsOk
(
IO_Type
.
SW4_TopCylinder_Down
,
IO_Type
.
SW4_TopCylinder_Up
)
&&
CylinderIsOk
(
IO_Type
.
SW1_TopCylinder_Down
,
IO_Type
.
SW1_TopCylinder_Up
))
{
SW41_SW07_WaitNoTray
();
}
else
{
SW41_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW06_TopCylinderUp
);
SWLog
(
"横移轨道41:顶升气缸上升 ,至少等待1000 "
);
IOMove
(
IO_Type
.
SW4_StopDown
,
IO_VALUE
.
LOW
);
SW41_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW4_TopCylinder_Down
,
IO_Type
.
SW4_TopCylinder_Up
);
Thread
.
Sleep
(
50
);
CylinderMove
(
SW41_MoveInfo
,
IO_Type
.
SW1_TopCylinder_Down
,
IO_Type
.
SW1_TopCylinder_Up
);
}
}
private
void
SW41_SW04_WaitCanUp
()
{
...
...
@@ -852,29 +869,14 @@ namespace OnlineStore.DeviceLibrary
else
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW05_LocationDown
))
{
SW23_SW06_TopCylinderUp
();
//SW23_MoveInfo.NextMoveStep(LineMoveStep.SW06_TopCylinderUp);
//SWLog("横移轨道23:顶升气缸上升 ,至少等待1000 ");
//IOMove(IO_Type.SW2_StopDown, IO_VALUE.LOW);
//SW23_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
//CylinderMove(SW23_MoveInfo, IO_Type.SW2_TopCylinder_Down, IO_Type.SW2_TopCylinder_Up);
//Thread.Sleep(50);
//CylinderMove(SW23_MoveInfo, IO_Type.SW3_TopCylinder_Down, IO_Type.SW3_TopCylinder_Up);
}
else
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW06_TopCylinderUp
))
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW07_WaitNoTray
);
SWLog
(
"横移轨道23: 等待 SW3_TrayCheck=0 "
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW3_TrayCheck
,
IO_VALUE
.
LOW
));
SW23_SW07_WaitNoTray
();
}
else
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW07_WaitNoTray
))
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW08_DriveMotorMove
);
SWLog
(
"横移轨道23:开始转动电机 ,等待1000,SW2_TrayCheck=0, SW3_TrayCheck=1 "
);
IOMove
(
IO_Type
.
SW2_MotorRun
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
SW3_MotorRun
,
IO_VALUE
.
HIGH
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW3_TrayCheck
,
IO_VALUE
.
HIGH
));
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW2_TrayCheck
,
IO_VALUE
.
LOW
));
SW23_SW08_DriveMotorMove
();
}
else
if
(
SW23_MoveInfo
.
MoveStep
.
Equals
(
LineMoveStep
.
SW08_DriveMotorMove
))
{
...
...
@@ -951,19 +953,52 @@ namespace OnlineStore.DeviceLibrary
{
lastSw2StopDownTime
=
DateTime
.
Now
.
AddSeconds
(-
2
);
SW23_MoveInfo
.
EndMove
();
SWLog
(
"横移轨道23:横移结束 "
);
CylinderMove
(
null
,
IO_Type
.
SW3_TopCylinder_Down
,
IO_Type
.
SW3_TopCylinder_Up
);
SWLog
(
"横移轨道23:横移结束,横移3顶升上升 "
);
}
}
private
void
SW23_SW0
6_TopCylinderUp
()
private
void
SW23_SW0
8_DriveMotorMove
()
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW06_TopCylinderUp
);
SWLog
(
"横移轨道23:顶升气缸上升 ,至少等待1000 "
);
IOMove
(
IO_Type
.
SW2_StopDown
,
IO_VALUE
.
LOW
);
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW08_DriveMotorMove
);
SWLog
(
"横移轨道23:开始转动电机 ,等待1000,SW2_TrayCheck=0, SW3_TrayCheck=1 "
);
IOMove
(
IO_Type
.
SW2_MotorRun
,
IO_VALUE
.
HIGH
);
IOMove
(
IO_Type
.
SW3_MotorRun
,
IO_VALUE
.
HIGH
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW2_TopCylinder_Down
,
IO_Type
.
SW2_TopCylinder_Up
);
Thread
.
Sleep
(
50
);
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW3_TopCylinder_Down
,
IO_Type
.
SW3_TopCylinder_Up
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW3_TrayCheck
,
IO_VALUE
.
HIGH
));
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW2_TrayCheck
,
IO_VALUE
.
LOW
));
}
private
void
SW23_SW07_WaitNoTray
()
{
if
(
IOValue
(
IO_Type
.
SW3_TrayCheck
).
Equals
(
IO_VALUE
.
LOW
))
{
SW23_SW08_DriveMotorMove
();
}
else
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW07_WaitNoTray
);
SWLog
(
"横移轨道23: 等待 SW3_TrayCheck=0 "
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitIO
(
IO_Type
.
SW3_TrayCheck
,
IO_VALUE
.
LOW
));
}
}
private
void
SW23_SW06_TopCylinderUp
()
{
if
(
CylinderIsOk
(
IO_Type
.
SW2_LocationCylinder_Up
,
IO_Type
.
SW2_LocationCylinder_Down
)
&&
CylinderIsOk
(
IO_Type
.
SW3_LocationCylinder_Up
,
IO_Type
.
SW3_LocationCylinder_Down
))
{
SW23_SW07_WaitNoTray
();
}
else
{
SW23_MoveInfo
.
NextMoveStep
(
LineMoveStep
.
SW06_TopCylinderUp
);
SWLog
(
"横移轨道23:顶升气缸上升 ,至少等待1000 "
);
IOMove
(
IO_Type
.
SW2_StopDown
,
IO_VALUE
.
LOW
);
SW23_MoveInfo
.
WaitList
.
Add
(
WaitResultInfo
.
WaitTime
(
1000
));
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW2_TopCylinder_Down
,
IO_Type
.
SW2_TopCylinder_Up
);
Thread
.
Sleep
(
50
);
CylinderMove
(
SW23_MoveInfo
,
IO_Type
.
SW3_TopCylinder_Down
,
IO_Type
.
SW3_TopCylinder_Up
);
}
}
private
void
SW23_SW04_WaitCanUp
()
...
...
source/DeviceLibrary/assemblymanager/SServerManager.cs
查看文件 @
1e6f294
...
...
@@ -542,15 +542,25 @@ namespace OnlineStore.DeviceLibrary
result
.
Param
=
new
InOutParam
(
0
,
serverResult
.
barcode
,
posId
,
height
,
width
);
result
.
Param
.
rfid
=
rfid
;
int
storeId
=
result
.
Param
.
GetStoreId
();
MoveEquip
moveEquip
=
LineManager
.
Line
.
MoveEquipMap
[
storeId
];
if
(
LineManager
.
Line
.
IsReviceInPosId
(
moveEquip
,
posId
))
if
(
LineManager
.
Line
.
MoveEquipMap
.
ContainsKey
(
storeId
))
{
MoveEquip
moveEquip
=
LineManager
.
Line
.
MoveEquipMap
[
storeId
];
if
(
LineManager
.
Line
.
IsReviceInPosId
(
moveEquip
,
posId
))
{
result
.
Param
.
InStoreNg
=
true
;
result
.
Param
.
NgMsg
=
"入库库位重复"
;
result
.
Msg
=
deviceName
+
(
"收到服务器入库命令 "
+
"入库库位重复: "
+
result
.
Param
.
ToStr
()
+
" ,入库失败!"
);
return
result
;
}
LogUtil
.
info
(
deviceName
+
"收到入库命令: "
+
result
.
Param
.
ToStr
()
+
" "
);
}
else
{
result
.
Param
.
InStoreNg
=
true
;
result
.
Param
.
NgMsg
=
"
入库库位重复
"
;
result
.
Msg
=
deviceName
+
(
"收到服务器入库命令 "
+
"
入库库位重复
: "
+
result
.
Param
.
ToStr
()
+
" ,入库失败!"
);
result
.
Param
.
NgMsg
=
"
未找到料仓["
+
storeId
+
"]
"
;
result
.
Msg
=
deviceName
+
(
"收到服务器入库命令 "
+
"
未找到料仓["
+
storeId
+
"]
: "
+
result
.
Param
.
ToStr
()
+
" ,入库失败!"
);
return
result
;
}
LogUtil
.
info
(
deviceName
+
"收到入库命令: "
+
result
.
Param
.
ToStr
()
+
" "
);
}
}
catch
(
Exception
ex
)
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论