Commit 39717666 刘韬

1

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