Commit 39717666 刘韬

1

1 个父辈 954c4ece
...@@ -147,7 +147,8 @@ namespace DeviceLibrary ...@@ -147,7 +147,8 @@ namespace DeviceLibrary
try try
{ {
bool nohalcon = true; bool nohalcon = true;
ho_Image = Camera._cam.CaptureOnImage(cameraName, out bmp, nohalcon); //ho_Image = Camera._cam.CaptureOnImage(cameraName, out bmp, nohalcon);
bmp = Camera._cam.GrabOneImage(cameraName);
if (bmp == null) if (bmp == null)
{ {
if (retrytime > 2) if (retrytime > 2)
......
...@@ -74,6 +74,7 @@ namespace DeviceLibrary ...@@ -74,6 +74,7 @@ namespace DeviceLibrary
Line.LineRun("work", false, 10); Line.LineRun("work", false, 10);
MiddleStop(MoveInfo, IO_VALUE.HIGH); MiddleStop(MoveInfo, IO_VALUE.HIGH);
FrontStop(MoveInfo, IO_VALUE.LOW); FrontStop(MoveInfo, IO_VALUE.LOW);
IOMove(DO_Agv_Rsp, IO_VALUE.HIGH);
MoveInfo.log("线体正转,放下前阻挡"); MoveInfo.log("线体正转,放下前阻挡");
break; break;
case MoveStep.In02: case MoveStep.In02:
...@@ -82,10 +83,12 @@ namespace DeviceLibrary ...@@ -82,10 +83,12 @@ namespace DeviceLibrary
MoveInfo.NextMoveStep(MoveStep.In03); MoveInfo.NextMoveStep(MoveStep.In03);
Lift.LiftDown(null); Lift.LiftDown(null);
MoveInfo.log("检测到周转箱2,升降台下降,前往中间阻挡"); MoveInfo.log("检测到周转箱2,升降台下降,前往中间阻挡");
IOMove(DO_Agv_Rsp, IO_VALUE.LOW);
} }
else if (MoveInfo.IsTimeOut(3)) else if (MoveInfo.IsTimeOut(3))
{ {
MoveInfo.log("没有检测到周转箱,结束入库"); MoveInfo.log("没有检测到周转箱,结束入库");
IOMove(DO_Agv_Rsp, IO_VALUE.LOW);
Line.LineStop("work"); Line.LineStop("work");
MoveInfo.EndMove(); MoveInfo.EndMove();
} }
......
...@@ -109,6 +109,7 @@ namespace DeviceLibrary ...@@ -109,6 +109,7 @@ namespace DeviceLibrary
{ {
MoveInfo.NextMoveStep(MoveStep.Out09); MoveInfo.NextMoveStep(MoveStep.Out09);
Line.LineRun("work", true, 3); Line.LineRun("work", true, 3);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
} }
else if (MoveInfo.IsTimeOut(15)) else if (MoveInfo.IsTimeOut(15))
{ {
......
...@@ -99,7 +99,10 @@ namespace TheMachine ...@@ -99,7 +99,10 @@ namespace TheMachine
AlarmBuzzer.BuzzerStateChange += AlarmBuzzer_BuzzerStateChange; AlarmBuzzer.BuzzerStateChange += AlarmBuzzer_BuzzerStateChange;
RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent; RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent;
AddForm("日志", lc); AddForm("日志", lc);
RobotManage.Init(); var loadtask = Task.Run(() =>
{
RobotManage.Init();
});
RobotManage.UserPauseSet += RobotManage_UserPauseSet; RobotManage.UserPauseSet += RobotManage_UserPauseSet;
RobotManage.CameraA.camera_event += CameraA_camera_event; RobotManage.CameraA.camera_event += CameraA_camera_event;
...@@ -221,6 +224,15 @@ namespace TheMachine ...@@ -221,6 +224,15 @@ namespace TheMachine
private void RobotManage_LoadFinishEvent(bool state, string msg) private void RobotManage_LoadFinishEvent(bool state, string msg)
{ {
if (InvokeRequired)
{
Invoke((EventHandler)delegate {
RobotManage_LoadFinishEvent(state,msg);
});
return;
}
if (state) if (state)
{ {
btn_run.Enabled = true; btn_run.Enabled = true;
...@@ -243,6 +255,14 @@ namespace TheMachine ...@@ -243,6 +255,14 @@ namespace TheMachine
} }
void SetMsg(List<Msg> msgs) void SetMsg(List<Msg> msgs)
{ {
if (InvokeRequired) {
Invoke((EventHandler)delegate {
SetMsg(msgs);
});
return;
}
this.SuspendLayout(); this.SuspendLayout();
listView1.Items.Clear(); listView1.Items.Clear();
foreach (Msg msg in msgs) foreach (Msg msg in msgs)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!