PutShelfJob.cs
1.6 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
using DeviceLib.Model.AGV;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DeviceLib.BLL
{
internal class PutShelfJob : ImpJob
{
public PutShelfJob(JobParam jobParam) : base(jobParam)
{
}
public override Job Run(Robot robot)
{
Job job = this;
switch (JobRunStep.CurStep)
{
case RunStep.None:
ToNextStep(RunStep.PutAction_01_ReadyToPut, "开始放下料架");
PutDown(robot);
break;
case RunStep.PutAction_01_ReadyToPut:
if (JobRunStep.IsTimeOut(60))
{
ToNextStep(RunStep.PutAction_02_PutTimeout, "放下料架超时");
}
else if (MissionIsOk())
{
ToNextStep(RunStep.PutAction_03_PutSuccess, "放下料架完成");
}
break;
case RunStep.PutAction_02_PutTimeout:
if (MissionIsOk())
{
ToNextStep(RunStep.PutAction_03_PutSuccess, "结束放下料架");
}
break;
case RunStep.PutAction_03_PutSuccess:
job = new DeliverShelfJob(JobParam);
job.ToNextStep(RunStep.DeliveryShelf_15_ActionSuccess, "放下料架完成");
break;
}
return job;
}
}
}