AC_BOX_Bean_Shelf.cs
4.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary
{
/// <summary>
/// 料架新增的出入库逻辑
/// </summary>
partial class AC_BOX_Bean
{
/// <summary>
/// 开始入库移动移动
/// </summary>
public void StartShelfInStore()
{
if (storeRunStatus == StoreRunStatus.Runing)
{
if (IOValue(IO_Type.LineIn_Check).Equals(IO_VALUE.HIGH))
{
LogInfo(" 空闲中,检测到入料口有信号,料架入库:入料口移门打开,");
storeRunStatus = StoreRunStatus.Busy;
storeStatus = StoreStatus.InStoreExecute;
MoveInfo.NewMove(StoreMoveType.InStore, new InOutParam());
MoveInfo.NextMoveStep(StoreMoveStep.SI_S02_DoorOpen);
CylinderMove(MoveInfo, IO_Type.EntranceDoor_Close, IO_Type.EntranceDoor_Open);
}
}
}
private void ShelfInStoreProcess()
{
if (MoveInfo.MoveStep.Equals(StoreMoveStep.SI_S01_LineIn_Check))
{
MoveInfo.NextMoveStep(StoreMoveStep.SI_S02_DoorOpen);
InStoreLog("SI_S02_DoorOpen:料架入库:入料口移门打开");
CylinderMove(MoveInfo, IO_Type.EntranceDoor_Close, IO_Type.EntranceDoor_Open);
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SI_S02_DoorOpen))
{
MoveInfo.NextMoveStep(StoreMoveStep.SI_S03_LineRun);
InStoreLog("SI_S03_LineRun:料架入库:线体正转,等待取料位检测到信号");
IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW);
IOMove(IO_Type.Line_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineIn_Check, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineTake_Check, IO_VALUE.HIGH));
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SI_S03_LineRun))
{
MoveInfo.NextMoveStep(StoreMoveStep.SI_S04_LineStop);
InStoreLog("SI_S04_LineStop:料架入库:取料位检测到信号,停止线体正转");
IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SI_S04_LineStop))
{
MoveInfo.NextMoveStep(StoreMoveStep.SI_S05_DoorClose);
InStoreLog("SI_S05_DoorClose:料架入库:入料口移门关闭");
CylinderMove(MoveInfo, IO_Type.EntranceDoor_Open, IO_Type.EntranceDoor_Close);
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SI_S05_DoorClose))
{
MoveInfo.NextMoveStep(StoreMoveStep.SI_S06_LocationUp);
InStoreLog("SI_S06_LocationUp:料架入库:定位装置上升");
CylinderMove(MoveInfo, IO_Type.LocationCylinder_Down, IO_Type.LocationCylinder_Up);
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SI_S06_LocationUp))
{
MoveInfo.NextMoveStep(StoreMoveStep.SI_S07_TopCylinderUp);
InStoreLog("SI_S07_TopCylinderUp:料架入库:顶升装置上升");
CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_Up);
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SI_S07_TopCylinderUp))
{
MoveInfo.NextMoveStep(StoreMoveStep.SI_S08_StartGetTray);
InStoreLog("SI_S07_TopCylinderUp:料架入库:开始循环从第一个空位逐个取料盘,扫码入库");
CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_Up);
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.SI_S08_StartGetTray))
{
}
else
{
LogInfo(" 入库,moveStatus=" + MoveInfo.MoveStep + ",没有对应的处理!");
}
}
}
}