MainMachine_ServerControl.cs
4.4 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
99
100
101
102
103
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
{
partial class MainMachine
{
public string doSingleInOpenNgDoor()
{
LogUtil.info("请求单盘入库,打开门");
if (ClampMoveInfo.MoveStep == MoveStep.Wait)
{
ClampMoveInfo.NewMove(MoveStep.SingleIn);
return crc.GetString(L.begin_singlein ,"开始单盘入库");
}
return crc.GetString(L.Clamp_Axis_running_cant_singlein,"取料机构运转中,无法单盘入库");
}
public string doTakeOutReel()
{
LogUtil.info("请求下降出库料串");
var step = RobotManage.mainMachine.StringMoveInfo.MoveStep;
var clampstep = RobotManage.mainMachine.ClampMoveInfo.MoveStep;
if (step == MoveStep.StringReadyGet && clampstep >= MoveStep.ReelClamp_GetHeight)
{
RobotManage.mainMachine.StringMoveInfo.NextMoveStep(MoveStep.StringOut_01);
return crc.GetString(L.string_begin_release, "开始释放料串");
}
if (step == MoveStep.StringReadyPut)
{
RobotManage.mainMachine.StringMoveInfo.NextMoveStep(MoveStep.StringOut_01);
return crc.GetString(L.string_begin_release, "开始释放料串");
}
LogUtil.info($"料串无法释放,料仓正在出入库中:{StringMoveInfo.MoveStep}");
return crc.GetString(L.store_running_cant_inout, "料串无法释放,料仓正在出入库中.");
}
public string doSingleInCloseNgDoor()
{
LogUtil.info("请求单盘入库,关闭门");
if (ClampMoveInfo.MoveStep == MoveStep.SingleInReady)
{
ClampMoveInfo.NewMove(MoveStep.SingleInRun);
return crc.GetString(L.close_singledoor, "关闭单料门");
}
else
{
if(NGDoor_Tray_Test_Reel)
{
RobotManage.UserPause(crc.GetString("please_take_ngdoor_reel", "等待取走单口料盘"));
return crc.GetString("please_take_ngdoor_reel", "等待取走单口料盘");
}
else
{
RobotManage.UserPause("",false);
}
}
LogUtil.info($"取料机构当前没有在等待单盘入库:{ClampMoveInfo.MoveStep}");
return crc.GetString(L.not_in_single_prosses, "当前没有在等待单盘入库:")+ClampMoveInfo.MoveStep;
}
public string doOpenBatchDoor()
{
LogUtil.info("请求打开批量料门");
var step = RobotManage.mainMachine.StringMoveInfo.MoveStep;
var clampstep = RobotManage.mainMachine.ClampMoveInfo.MoveStep;
StringMoveInfo.LastSetpTime = DateTime.Now;
StringMoveInfo.IsInWait = true;
if (!ConfigHelper.Config.Get("Device_Disable_StringDoor", false))
StringDoorOpen(StringMoveInfo);
return crc.GetString(L.begin_open_string_door, "开始打开料串门");
//LogUtil.info($"批量料门无法打开,料仓正在出入库中:{StringMoveInfo.MoveStep}");
//return $"批量料门无法打开,料仓正在出入库中.";
}
public string doCloseBatchDoor()
{
LogUtil.info("请求关闭批量料门");
if (IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.HIGH))
{
LogUtil.info("料串尚未到位无法关门X09=High");
return crc.GetString(L.string_not_onposition_01, "料串尚未到位无法关门X09=High");
}
//RobotManage.mainMachine.StringMoveInfo.NewMove(MoveStep.Wait);
//RobotManage.mainMachine.StringMoveInfo.NextMoveStep(RobotManage.mainMachine.StringMoveInfo.MoveStep);
StringMoveInfo.LastSetpTime = DateTime.Now;
StringMoveInfo.IsInWait = true;
if (!ConfigHelper.Config.Get("Device_Disable_StringDoor", false))
StringDoorClose(StringMoveInfo);
return crc.GetString(L.begin_close_string_door, "开始关闭料串门");
}
}
}