Commit 602d04fd LN

一键检查料叉功能。出库未检测到物料时自动禁用库位。

1 个父辈 c58170bf
......@@ -808,10 +808,10 @@ namespace DeviceLibrary
string msg = "";
try
{
if (String.IsNullOrEmpty(barcode))
{
return msg;
}
//if (String.IsNullOrEmpty(barcode))
//{
// return msg;
//}
Dictionary<string, string> paramMap = new Dictionary<string, string>
{
{ "posId", poid },//posId:库位号
......@@ -819,7 +819,7 @@ namespace DeviceLibrary
{ "msg", reason }
};
string server = GetAddr(Addr_cancelPutInTask, paramMap);
string server = GetAddr(Addr_disabledPos, paramMap);
DateTime startTime = DateTime.Now;
string resultStr = HttpHelper.Post(server, "",3000);
LogUtil.info(deviceName + "DisablePos " + FormUtil.GetSpanStr(DateTime.Now - startTime) + " 【" + server + "】【" + resultStr + "】");
......
......@@ -54,17 +54,18 @@ namespace DeviceLibrary
string WareCode = "";
int plateH = 0;
bool PreMove = false;
private bool AlarmNeedDisPos = false;
/// <summary>
/// 料盘放置在校准库位是否正常
/// </summary>
bool reelStatusInFix = true;
public bool Start(BoxStorePosition from, BoxStorePosition to, StoreMoveType _storeMoveType, bool premove = false)
public bool Start(BoxStorePosition from, BoxStorePosition to, StoreMoveType _storeMoveType, bool premove = false,bool needDisPos=false )
{
if (MoveInfo.MoveStep != MoveStep.Wait)
return false;
AlarmNeedDisPos = needDisPos;
storeMoveType = _storeMoveType;
PreMove = premove;
if (from == null)
......@@ -73,7 +74,7 @@ namespace DeviceLibrary
plateH = 32;
To = to.clone();
MoveInfo.NewMove(MoveStep.StoreTS10);
MoveInfo.log($"{storeMoveType}:开始运输料盘,直接到:{to.posid}");
MoveInfo.log($"{storeMoveType}:开始运输料盘{WareCode},直接到:{to.posid}, AlarmNeedDisPos=" + AlarmNeedDisPos);
MoveInfo.MoveParam.PosID = $"NA=>{To.posid}";
}
else
......@@ -84,7 +85,7 @@ namespace DeviceLibrary
To = to.clone();
MoveInfo.NewMove(MoveStep.StoreTS01);
MoveInfo.log($"{storeMoveType}:开始运输料盘,从:{from.posid},到:{to.posid}");
MoveInfo.log($"{storeMoveType}:开始运输料盘{WareCode},从:{from.posid},到:{to.posid},AlarmNeedDisPos=" + AlarmNeedDisPos);
MoveInfo.MoveParam.PosID = $"{From.posid}=>{To.posid}";
}
if (To.posid == BoxStorePosition.strings)
......@@ -106,7 +107,7 @@ namespace DeviceLibrary
MoveInfo.NextMoveStep(MoveStep.StoreTS06);
return true;
}
private bool isWaitIgnoreX09 = false;
private bool disPos = false;
public bool Process()
{
if (mainMachine.CheckWait(MoveInfo))
......@@ -176,29 +177,32 @@ namespace DeviceLibrary
MoveInfo.NextMoveStep(MoveStep.StoreTS09);
InOut_Axis.AbsMove(MoveInfo, Config.InOut_P1, Config.InOut_P1_speed);
IgnoreX09 = false;
isWaitIgnoreX09 = false;
MoveInfo.log($"{storeMoveType}:进出轴去待机点P1【{Config.InOut_P1}】【{Config.InOut_P1_speed}】,设置 isWaitIgnoreX09="+ isWaitIgnoreX09);
disPos = false;
MoveInfo.log($"{storeMoveType}:进出轴去待机点P1【{Config.InOut_P1}】【{Config.InOut_P1_speed}】,设置 IgnoreX09=" + IgnoreX09);
break;
case MoveStep.StoreTS09:
RobotManage.CameraA.CameraGrabOne(RobotManage.CameraA.GetFixtureStateFilename(From.posid, WareCode, storeMoveType, FixtureState.FromOut));
if (!IgnoreX09 && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW))
{
isWaitIgnoreX09 = true;
Msg.add(crc.GetString(L.out_store_not_detect_material, "取料后料叉X30没有检测到有物料无法继续,请检查."), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
if (!disPos && storeMoveType.Equals(StoreMoveType.OutStore) && AlarmNeedDisPos )
{
disPos = true;
//屏蔽库位
string pos = From.posid;
MoveInfo.log($"{storeMoveType}:取到料后未检测到物料,AlarmNeedDisPos={AlarmNeedDisPos},需要屏蔽库位:{pos}, WareCode={WareCode}" );
ServerCommunication.DisablePos(Setting_Init.App_CID, WareCode, pos, "IgnoreX09");
}
//RobotManage.UserPause(crc.GetString(L.out_store_not_detect_material, "取料前料叉X30没有检测到有物料无法继续,请检查."));
}
else
{
if (isWaitIgnoreX09 && IgnoreX09&& storeMoveType.Equals(StoreMoveType.OutStore))
{ //屏蔽库位
string pos = From.posid;
MoveInfo.log($"{storeMoveType}:取到料后未检测到物料,点忽略信号继续,需要屏蔽库位:"+pos);
ServerCommunication.DisablePos(Setting_Init.App_CID, WareCode, pos, "IgnoreX09");
}
Msg.add("", MsgLevel.info, ErrInfo.X09_Clear);
IgnoreX09 = false;
isWaitIgnoreX09 = false;
disPos = false;
if (To.posid == BoxStorePosition.strings && Setting_Init.Enable_Fixpos && Fix != null)
MoveInfo.NextMoveStep(MoveStep.StoreFIX01);
else
......
......@@ -442,7 +442,7 @@ namespace DeviceLibrary
}
}
StringDoorClose(null);
StringDoorClose(null);
break;
case MoveStep.H02_HomeReset_01:
ResetMoveInfo.NextMoveStep(MoveStep.H02_HomeReset);
......@@ -500,7 +500,7 @@ namespace DeviceLibrary
{
ResetMoveInfo.NextMoveStep(MoveStep.H12_HomeReset);
ResetMoveInfo.log("反转托盘上有料盘,送到NG口");
}
}
else
{
if (IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
......@@ -508,7 +508,7 @@ namespace DeviceLibrary
ResetMoveInfo.NextMoveStep(MoveStep.HEND_HomeReset);
ResetMoveInfo.log("叉子上有料,不去进行超声感应器检测");
}
else if (RobotManage.NeedSensorPro())
else if (RobotManage.NeedSensorPro())
{
ResetMoveInfo.NextMoveStep(MoveStep.H21_HomeStartCheck);
ResetMoveInfo.log("夹爪上没有料盘,开始去进行超声感应器检测");
......@@ -584,7 +584,7 @@ namespace DeviceLibrary
}
else
{
RobotManage.UserPause($"系统启动检测到有无信息料盘,等待取走单料口料盘");
RobotManage.UserPause($"系统启动检测到有无信息料盘,等待取走单料口料盘");
}
}
else
......@@ -638,10 +638,10 @@ namespace DeviceLibrary
#region 声波传感器检测
case MoveStep.H21_HomeStartCheck:
FixPos = BoxStorePosition.GetFixPos(Config, new ReelParam("",7,8));
case MoveStep.H21_HomeStartCheck:
FixPos = BoxStorePosition.GetFixPos(Config, new ReelParam("", 7, 8));
if (FixPos == null)
{
{
ResetMoveInfo.NextMoveStep(MoveStep.HEND_HomeReset);
ResetMoveInfo.log("未找到校准库位,不进行声波传感器检测");
}
......@@ -651,22 +651,22 @@ namespace DeviceLibrary
Middle_Axis.AbsMove(ResetMoveInfo, FixPos.Middle_P2, Config.Middle_P2_speed);
ResetMoveInfo.log($"{FixPos.posid} 旋转轴去取料点P2【{FixPos.Middle_P2}】【{Config.Middle_P2_speed}】");
UpDown_Axis.AbsMove(ResetMoveInfo, FixPos.UpDown_PH, Config.UpDown_P1_speed);
ResetMoveInfo.log($" {FixPos.posid}升降轴去取料高点【{FixPos.UpDown_PH}】【{Config.UpDown_P1_speed}】");
ResetMoveInfo.log($" {FixPos.posid}升降轴去取料高点【{FixPos.UpDown_PH}】【{Config.UpDown_P1_speed}】");
Comp_Axis.AbsMove(ResetMoveInfo, FixPos.Comp_PL, Config.Comp_P2_speed);
ResetMoveInfo.log($"{FixPos.posid}:压紧轴去压紧低点【{FixPos.Comp_PL}】【{Config.Comp_P2_speed}】");
}
break;
case MoveStep.H22_HomeCheck:
ResetMoveInfo.NextMoveStep(MoveStep.H23_HomeCheck);
InOut_Axis.AbsMove(ResetMoveInfo, FixPos.InOut_P2, Config.InOut_P2_speed);
InOut_Axis.AbsMove(ResetMoveInfo, FixPos.InOut_P2, Config.InOut_P2_speed);
InOut_Axis.SensorDetection(Setting_Init.Device_WeightSensor_MaxValue);
ResetMoveInfo.log($"{FixPos.posid}:进出轴去取料点【{FixPos.InOut_P2}】【{Config.InOut_P2_speed}】");
break;
case MoveStep.H23_HomeCheck:
ResetMoveInfo.NextMoveStep(MoveStep.H24_HomeCheck);
ResetMoveInfo.NextMoveStep(MoveStep.H24_HomeCheck);
Comp_Axis.AbsMove(ResetMoveInfo, FixPos.Comp_PH, Config.Comp_P2_speed);
ResetMoveInfo.log($"{FixPos.posid}:压紧轴去压紧高点【{FixPos.Comp_PH}】【{Config.Comp_P2_speed}】");
UpDown_Axis.AbsMove(ResetMoveInfo, FixPos.UpDown_PL, Config.UpDown_P3_speed / 2);
......@@ -679,7 +679,7 @@ namespace DeviceLibrary
break;
case MoveStep.H25_HomeCheck:
bool checkOk= RobotManage.SensorProcess();
bool checkOk = RobotManage.SensorProcess();
if (checkOk)
{
ResetMoveInfo.NextMoveStep(MoveStep.H27_HomeCheck);
......@@ -700,7 +700,7 @@ namespace DeviceLibrary
ResetMoveInfo.log("旋转轴,升降轴,压紧轴,到P1待机点");
Middle_Axis.AbsMove(ResetMoveInfo, Config.Middle_P1, Config.Middle_P1_speed);
UpDown_Axis.AbsMove(ResetMoveInfo, Config.UpDown_P1, Config.UpDown_P1_speed);
Comp_Axis.AbsMove(ResetMoveInfo,Config.Comp_P1,Config.Comp_P1_speed);
Comp_Axis.AbsMove(ResetMoveInfo, Config.Comp_P1, Config.Comp_P1_speed);
break;
case MoveStep.H28_HomeCheck:
......@@ -713,14 +713,14 @@ namespace DeviceLibrary
Msg.add(crc.GetString("shengboError", "声波传感器误差过大,请检查后重新复位"), MsgLevel.alarm);
ResetMoveInfo.log(crc.GetString("shengboError", "声波传感器误差过大,请检查后重新复位"));
break;
// H22_HomeCheck,//旋转轴到校准为止,升降轴到高点,压紧轴压紧
//H23_HomeCheck,//进出轴进入
//H24_HomeCheck,//升降轴下降,压紧轴放松
//H25_HomeCheck,//等待500毫秒
//H26_HomeCheck,//开始检测
//H27_HomeCheck,//进出轴返回待机点
//H28_HomeCheck,//旋转轴升降轴到待机点
//H31_HomeError,//检测错误,报警
// H22_HomeCheck,//旋转轴到校准为止,升降轴到高点,压紧轴压紧
//H23_HomeCheck,//进出轴进入
//H24_HomeCheck,//升降轴下降,压紧轴放松
//H25_HomeCheck,//等待500毫秒
//H26_HomeCheck,//开始检测
//H27_HomeCheck,//进出轴返回待机点
//H28_HomeCheck,//旋转轴升降轴到待机点
//H31_HomeError,//检测错误,报警
#endregion
case MoveStep.HEND_HomeReset:
......@@ -766,8 +766,80 @@ namespace DeviceLibrary
runStatus = RunStatus.Running;
ServerCM.storeStatus = StoreStatus.StoreOnline;
break;
#region 交叉检查处理
case MoveStep.CH01_StartTo:
ResetMoveInfo.NextMoveStep(MoveStep.CH02_InoutToP1);
ResetMoveInfo.log($"料叉检查:进出轴返回待机点P1 {Config.InOut_P1}");
InOut_Axis.AbsMove(ResetMoveInfo, Config.InOut_P1, Config.InOut_P1_speed);
break;
case MoveStep.CH02_InoutToP1:
ResetMoveInfo.NextMoveStep(MoveStep.CH03_ToTarget);
ResetMoveInfo.log($"料叉检查:旋转轴到P2 {Config.Middle_P2} ,升降轴到P2:{Config.UpDown_P2}");
Middle_Axis.AbsMove(ResetMoveInfo, Config.Middle_P2, Config.Middle_P2_speed);
UpDown_Axis.AbsMove(ResetMoveInfo, Config.UpDown_P2, Config.UpDown_P2_speed);
break;
case MoveStep.CH03_ToTarget:
ResetMoveInfo.NextMoveStep(MoveStep.CH04_OpenDoor);
ResetMoveInfo.log($"料叉检查:打开NG门 ");
OpenSingleDoor(ResetMoveInfo);
break;
case MoveStep.CH04_OpenDoor:
ResetMoveInfo.NextMoveStep(MoveStep.CH05_InoutToP2);
ResetMoveInfo.log($"料叉检查:进出轴去P2 {Config.InOut_P2}");
InOut_Axis.AbsMove(ResetMoveInfo, Config.InOut_P2, Config.InOut_P2_speed);
break;
case MoveStep.CH05_InoutToP2:
ResetMoveInfo.NextMoveStep(MoveStep.CH06_WaitCheck);
ResetMoveInfo.log($"料叉检查:进出轴已到位,请检查料叉 ");
Msg.add(crc.GetString("CH06_WaitCheck", "料叉已到位,请检查"), MsgLevel.warning);
break;
case MoveStep.CH06_WaitCheck:
ResetMoveInfo.NextMoveStep(MoveStep.CH06_WaitCheck);
ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
Msg.add(crc.GetString("CH06_WaitCheck", "料叉已到位,请检查"), MsgLevel.warning);
break;
case MoveStep.CH07_CheckOk:
ResetMoveInfo.NextMoveStep(MoveStep.CH08_InoutBack);
ResetMoveInfo.log($"料叉检查:检查完成,进出轴返回待机点P1 {Config.InOut_P1}");
InOut_Axis.AbsMove(ResetMoveInfo, Config.InOut_P1, Config.InOut_P1_speed);
break;
case MoveStep.CH08_InoutBack:
ResetMoveInfo.NextMoveStep(MoveStep.CH09_CloseDoor);
ResetMoveInfo.log($"料叉检查:检查完成,关闭门");
CloseSingleDoor(ResetMoveInfo);
break;
case MoveStep.CH09_CloseDoor:
ResetMoveInfo.log("检查完成");
ResetMoveInfo.EndMove();
runStatus = RunStatus.Running;
ServerCM.storeStatus = StoreStatus.StoreOnline;
break;
#endregion
}
}
public bool CheckOk()
{
if (ResetMoveInfo.IsStep(MoveStep.CH06_WaitCheck))
{
ResetMoveInfo.NextMoveStep(MoveStep.CH07_CheckOk);
ResetMoveInfo.log($"确认检测完成 ");
return true;
}
return false;
}
public void StartToCheck( )
{
runStatus = RunStatus.HomeReset;
ServerCM.storeStatus = StoreStatus.ResetMove;
ResetMoveInfo.NewMove(MoveStep.CH01_StartTo);
ResetMoveInfo.log("开始料叉检查");
RobotManage.LastResetTime = DateTime.Now;
ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
}
private BoxStorePosition FixPos = null;
//bool _IgnoreSafecheck = false;
public bool IgnoreSafecheck
......
......@@ -183,8 +183,8 @@ namespace DeviceLibrary
outTo = new BoxStorePosition(Config, StoreSide.NGDoor, StoreMoveInfo.MoveParam);
else
outTo = new BoxStorePosition(Config, StoreSide.String, StoreMoveInfo.MoveParam);
boxTransport.Start(outFrom == null ? null : new BoxStorePosition(Config, outFrom, StoreMoveInfo.MoveParam), outTo, StoreMoveType.OutStore);
StoreMoveInfo.log($"开始转运料盘{(StoreMoveInfo.MoveParam.IsNg ? "单料口" : "料串")}");
boxTransport.Start(outFrom == null ? null : new BoxStorePosition(Config, outFrom, StoreMoveInfo.MoveParam), outTo, StoreMoveType.OutStore,false,true);
StoreMoveInfo.log($"开始转运料盘{(StoreMoveInfo.MoveParam.IsNg ? "单料口" : "料串")}, 未检测到物料时需要屏蔽库位");
break;
case MoveStep.StoreOut11:
......@@ -266,5 +266,18 @@ namespace DeviceLibrary
return state;
}
public bool isInBusy()
{
//出入库 绿闪 黄闪
if (ClampMoveInfo.MoveStep > MoveStep.Wait
|| StoreMoveInfo.MoveStep > MoveStep.Wait
|| (StringMoveInfo.MoveStep > MoveStep.Wait && StringMoveInfo.MoveStep != MoveStep.StringReadyPut && StringMoveInfo.MoveStep <= MoveStep.StringOut_01))
{
return true;
}
return false;
}
}
}
\ No newline at end of file
......@@ -52,6 +52,49 @@ namespace DeviceLibrary
HEND_HomeReset,
/// <summary>
/// 料叉检查功能:进出轴返回待机点P1
/// </summary>
CH01_StartTo,
/// <summary>
/// 料叉检查功能:进出轴返回待机点P1
/// </summary>
CH02_InoutToP1,
/// <summary>
/// 料叉检查功能:旋转轴到NG门位置,升降轴到NG门位置
/// </summary>
CH03_ToTarget,
/// <summary>
/// 料叉检查功能:打开NG门
/// </summary>
CH04_OpenDoor,
/// <summary>
/// 料叉检查功能:进出轴前进
/// </summary>
CH05_InoutToP2,
/// <summary>
/// 料叉检查功能:等待检查,检查完成必须复位
/// </summary>
CH06_WaitCheck,
/// <summary>
/// 料叉检查功能:检查完成
/// </summary>
CH07_CheckOk,
/// <summary>
/// 料叉检查功能: ,进出轴返回待机点
/// </summary>
CH08_InoutBack,
/// <summary>
/// 料叉检查功能: ,NG关闭
/// </summary>
CH09_CloseDoor,
StringLoad_01,
StringLoad_01a,
StringLoad_02,
......
......@@ -31,6 +31,7 @@ namespace TheMachine
{
this.components = new System.ComponentModel.Container();
this.panel1 = new System.Windows.Forms.Panel();
this.btnCheck = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.btnChangeColor = new System.Windows.Forms.Button();
this.btnGree = new System.Windows.Forms.Button();
......@@ -44,12 +45,15 @@ namespace TheMachine
this.configControl1 = new TheMachine.ConfigControl();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.colorDialog1 = new System.Windows.Forms.ColorDialog();
this.btnCheckOk = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.AutoScroll = true;
this.panel1.Controls.Add(this.btnCheckOk);
this.panel1.Controls.Add(this.btnCheck);
this.panel1.Controls.Add(this.button1);
this.panel1.Controls.Add(this.btnChangeColor);
this.panel1.Controls.Add(this.btnGree);
......@@ -67,9 +71,23 @@ namespace TheMachine
this.panel1.Size = new System.Drawing.Size(1234, 924);
this.panel1.TabIndex = 2;
//
// btnCheck
//
this.btnCheck.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCheck.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCheck.Location = new System.Drawing.Point(16, 453);
this.btnCheck.Name = "btnCheck";
this.btnCheck.Size = new System.Drawing.Size(155, 31);
this.btnCheck.TabIndex = 21;
this.btnCheck.Text = "启动料叉检测";
this.btnCheck.UseVisualStyleBackColor = true;
this.btnCheck.Click += new System.EventHandler(this.btnCheck_Click);
//
// button1
//
this.button1.Location = new System.Drawing.Point(211, 578);
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button1.Location = new System.Drawing.Point(211, 624);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(155, 31);
this.button1.TabIndex = 20;
......@@ -79,7 +97,9 @@ namespace TheMachine
//
// btnChangeColor
//
this.btnChangeColor.Location = new System.Drawing.Point(211, 541);
this.btnChangeColor.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnChangeColor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnChangeColor.Location = new System.Drawing.Point(211, 587);
this.btnChangeColor.Name = "btnChangeColor";
this.btnChangeColor.Size = new System.Drawing.Size(155, 31);
this.btnChangeColor.TabIndex = 19;
......@@ -89,7 +109,9 @@ namespace TheMachine
//
// btnGree
//
this.btnGree.Location = new System.Drawing.Point(25, 578);
this.btnGree.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnGree.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnGree.Location = new System.Drawing.Point(25, 624);
this.btnGree.Name = "btnGree";
this.btnGree.Size = new System.Drawing.Size(155, 31);
this.btnGree.TabIndex = 18;
......@@ -99,7 +121,9 @@ namespace TheMachine
//
// btnYellow
//
this.btnYellow.Location = new System.Drawing.Point(25, 541);
this.btnYellow.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnYellow.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnYellow.Location = new System.Drawing.Point(25, 587);
this.btnYellow.Name = "btnYellow";
this.btnYellow.Size = new System.Drawing.Size(155, 31);
this.btnYellow.TabIndex = 17;
......@@ -110,7 +134,7 @@ namespace TheMachine
// lblLed
//
this.lblLed.AutoSize = true;
this.lblLed.Location = new System.Drawing.Point(23, 508);
this.lblLed.Location = new System.Drawing.Point(23, 554);
this.lblLed.Name = "lblLed";
this.lblLed.Size = new System.Drawing.Size(41, 12);
this.lblLed.TabIndex = 16;
......@@ -119,7 +143,7 @@ namespace TheMachine
// lblOkValue
//
this.lblOkValue.AutoSize = true;
this.lblOkValue.Location = new System.Drawing.Point(23, 482);
this.lblOkValue.Location = new System.Drawing.Point(23, 528);
this.lblOkValue.Name = "lblOkValue";
this.lblOkValue.Size = new System.Drawing.Size(65, 12);
this.lblOkValue.TabIndex = 15;
......@@ -128,7 +152,7 @@ namespace TheMachine
// lblSensor
//
this.lblSensor.AutoSize = true;
this.lblSensor.Location = new System.Drawing.Point(23, 456);
this.lblSensor.Location = new System.Drawing.Point(23, 502);
this.lblSensor.Name = "lblSensor";
this.lblSensor.Size = new System.Drawing.Size(65, 12);
this.lblSensor.TabIndex = 14;
......@@ -136,7 +160,9 @@ namespace TheMachine
//
// btnAxisRStop
//
this.btnAxisRStop.Location = new System.Drawing.Point(397, 495);
this.btnAxisRStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisRStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisRStop.Location = new System.Drawing.Point(397, 541);
this.btnAxisRStop.Name = "btnAxisRStop";
this.btnAxisRStop.Size = new System.Drawing.Size(155, 31);
this.btnAxisRStop.TabIndex = 13;
......@@ -146,7 +172,9 @@ namespace TheMachine
//
// btnAxisRTest
//
this.btnAxisRTest.Location = new System.Drawing.Point(397, 453);
this.btnAxisRTest.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisRTest.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisRTest.Location = new System.Drawing.Point(397, 499);
this.btnAxisRTest.Name = "btnAxisRTest";
this.btnAxisRTest.Size = new System.Drawing.Size(155, 31);
this.btnAxisRTest.TabIndex = 12;
......@@ -176,6 +204,18 @@ namespace TheMachine
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// btnCheckOk
//
this.btnCheckOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCheckOk.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCheckOk.Location = new System.Drawing.Point(211, 453);
this.btnCheckOk.Name = "btnCheckOk";
this.btnCheckOk.Size = new System.Drawing.Size(155, 31);
this.btnCheckOk.TabIndex = 22;
this.btnCheckOk.Text = "检测完成";
this.btnCheckOk.UseVisualStyleBackColor = true;
this.btnCheckOk.Click += new System.EventHandler(this.btnCheckOk_Click);
//
// AxisControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -207,5 +247,7 @@ namespace TheMachine
private System.Windows.Forms.Button btnYellow;
private System.Windows.Forms.ColorDialog colorDialog1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button btnCheck;
private System.Windows.Forms.Button btnCheckOk;
}
}
......@@ -231,5 +231,52 @@ namespace TheMachine
{
RobotManage.mainMachine.CloseColor();
}
private void btnCheck_Click(object sender, EventArgs e)
{
//判断是否空闲中
if (RobotManage.mainMachine.isInBusy())
{
MessageBox.Show("操作失败:当前忙碌中");
return;
}
if (RobotManage.mainMachine.runStatus != RunStatus.Running)
{
MessageBox.Show("操作失败:设备未在待机状态");
return;
}
DialogResult result=MessageBox.Show("启动料叉检测后需要复位设备,确定启动?","提示",MessageBoxButtons.YesNo,MessageBoxIcon.Question); ;
if (result.Equals(DialogResult.Yes))
{
LogUtil.info("点击按钮:" + btnCheck.Text + ", 确认开始料叉检测");
RobotManage.mainMachine.StartToCheck();
MessageBox.Show("操作成功:请在料叉到位后进行检查,确认后请点检测完成按钮!");
}
}
private void btnCheckOk_Click(object sender, EventArgs e)
{
if (RobotManage.mainMachine.ResetMoveInfo.IsStep(MoveStep.CH06_WaitCheck))
{
LogUtil.info("点击按钮:" + btnCheck.Text + ", 确认检查完成");
bool result = RobotManage.mainMachine.CheckOk();
LogUtil.info("点击按钮:" + btnCheck.Text + ", CheckOk 结果:" + result);
if(result)
{
MessageBox.Show("操作成功");
}
else
{
MessageBox.Show("操作失败");
}
}
else
{
MessageBox.Show("操作失败");
}
}
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!