Commit fc21d0ff 刘韬

1

1 个父辈 ca83f21f
...@@ -140,6 +140,7 @@ namespace OnlineStore.Common ...@@ -140,6 +140,7 @@ namespace OnlineStore.Common
begin_close_string_door, begin_close_string_door,
tray_detect_reel_01, tray_detect_reel_01,
system_running_cantmove, system_running_cantmove,
before_FrmPositionTool_stopmuchine before_FrmPositionTool_stopmuchine,
temp
} }
} }
...@@ -313,8 +313,11 @@ namespace OnlineStore.Common ...@@ -313,8 +313,11 @@ namespace OnlineStore.Common
string hum = String.Format("{0:X2}", dataArray[5]) + String.Format("{0:X2}", dataArray[6]); string hum = String.Format("{0:X2}", dataArray[5]) + String.Format("{0:X2}", dataArray[6]);
double tempV = (double)Convert.ToInt32(temp, 16)/10; double tempV = (double)Convert.ToInt32(temp, 16)/10;
double humV =(double) Convert.ToInt32(hum, 16)/10; double humV =(double) Convert.ToInt32(hum, 16)/10;
if (humV < 0.1) if (humV < 0.1)
humV = 0.1; humV = 0.1;
if (tempV < 0.1)
tempV = 0.1;
list.Add(tempV); list.Add(tempV);
list.Add(humV); list.Add(humV);
} }
......
...@@ -204,18 +204,18 @@ namespace DeviceLibrary ...@@ -204,18 +204,18 @@ namespace DeviceLibrary
RobotManage.CameraA.CameraGrabOne(RobotManage.CameraA.GetFixtureStateFilename(To.posid, WareCode, storeMoveType, FixtureState.ToFix)); RobotManage.CameraA.CameraGrabOne(RobotManage.CameraA.GetFixtureStateFilename(To.posid, WareCode, storeMoveType, FixtureState.ToFix));
MoveInfo.NextMoveStep(MoveStep.StoreFIX04); MoveInfo.NextMoveStep(MoveStep.StoreFIX04);
Comp_Axis.AbsMove(MoveInfo, Fix.Comp_PH, Config.Comp_P2_speed); Comp_Axis.AbsMove(MoveInfo, Fix.Comp_PH, Config.Comp_P2_speed);
UpDown_Axis.AbsMove(MoveInfo, Fix.UpDown_PL, Config.UpDown_P3_speed); UpDown_Axis.AbsMove(MoveInfo, Fix.UpDown_PL, Config.UpDown_P3_speed/2);
MoveInfo.log($"{storeMoveType}:压紧轴高点:{Fix.Comp_PH}"); MoveInfo.log($"{storeMoveType}:压紧轴高点:{Fix.Comp_PH}");
MoveInfo.log($"{storeMoveType}:上下轴到达目的地低点:{Fix.UpDown_PL}"); MoveInfo.log($"{storeMoveType}:上下轴到达目的地低点:{Fix.UpDown_PL}");
break; break;
case MoveStep.StoreFIX04: case MoveStep.StoreFIX04:
MoveInfo.NextMoveStep(MoveStep.StoreFIX05); MoveInfo.NextMoveStep(MoveStep.StoreFIX05);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(400)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
break; break;
case MoveStep.StoreFIX05: case MoveStep.StoreFIX05:
MoveInfo.NextMoveStep(MoveStep.StoreFIX06); MoveInfo.NextMoveStep(MoveStep.StoreFIX06);
Comp_Axis.AbsMove(MoveInfo, Fix.Comp_PL, Config.Comp_P2_speed); Comp_Axis.AbsMove(MoveInfo, Fix.Comp_PL, Config.Comp_P2_speed);
UpDown_Axis.AbsMove(MoveInfo, Fix.UpDown_PH, Config.UpDown_P3_speed/2); UpDown_Axis.AbsMove(MoveInfo, Fix.UpDown_PH, Config.UpDown_P3_speed);
MoveInfo.log($"{storeMoveType}:压紧轴压紧点:{Fix.Comp_PL}"); MoveInfo.log($"{storeMoveType}:压紧轴压紧点:{Fix.Comp_PL}");
MoveInfo.log($"{storeMoveType}:上下轴到达目的高点:{Fix.UpDown_PH}"); MoveInfo.log($"{storeMoveType}:上下轴到达目的高点:{Fix.UpDown_PH}");
break; break;
......
...@@ -148,8 +148,13 @@ namespace DeviceLibrary ...@@ -148,8 +148,13 @@ namespace DeviceLibrary
UpDown_PL = aCStorePosition.UpDownAxis_ILPosition_P4; UpDown_PL = aCStorePosition.UpDownAxis_ILPosition_P4;
Comp_PH = Config.Comp_P2 - Config.Comp_PoToMM * (aCStorePosition.BagHigh-8 + Config.Comp_PH_MM); Comp_PH = Config.Comp_P2 - Config.Comp_PoToMM * (aCStorePosition.BagHigh-8 + Config.Comp_PH_MM);
int reelhighdiff = 0;
Comp_PL = Config.Comp_P2 - Config.Comp_PoToMM * (reel.PlateH-8) - (reel.PlateH > 8 ? Config.Comp_PoToMM * Config.Comp_PL_MM : 0);
if (reel.PlateW > 7)
reelhighdiff = ConfigHelper.Config.Get("Device_1315_ReelHeight_Compensation", 0);
Comp_PL = Config.Comp_P2 - Config.Comp_PoToMM * (reel.PlateH - 8+ reelhighdiff) - (reel.PlateH > 8 ? Config.Comp_PoToMM * Config.Comp_PL_MM : 0);
Comp_PH = Comp_PH < 0 ? 0 : Comp_PH; Comp_PH = Comp_PH < 0 ? 0 : Comp_PH;
Comp_PL = Comp_PL < 0 ? 0 : Comp_PL; Comp_PL = Comp_PL < 0 ? 0 : Comp_PL;
posid = aCStorePosition.PositionNum; posid = aCStorePosition.PositionNum;
...@@ -182,8 +187,11 @@ namespace DeviceLibrary ...@@ -182,8 +187,11 @@ namespace DeviceLibrary
if (reel.PlateW > 7 && Config.InOut_P4 > 0) if (reel.PlateW > 7 && Config.InOut_P4 > 0)
InOut_P2 = Config.InOut_P4; InOut_P2 = Config.InOut_P4;
} }
int reelhighdiff = 0;
if (reel.PlateW > 7)
reelhighdiff = ConfigHelper.Config.Get("Device_1315_ReelHeight_Compensation", 0);
Comp_PH = Config.Comp_P2 - Config.Comp_PoToMM * (reel.PlateH - 8 + Config.Comp_PH_MM+20); Comp_PH = Config.Comp_P2 - Config.Comp_PoToMM * (reel.PlateH - 8 + Config.Comp_PH_MM+20);
Comp_PL = Config.Comp_P2 - Config.Comp_PoToMM * (reel.PlateH - 8) - (reel.PlateH > 8 ? Config.Comp_PoToMM * Config.Comp_PL_MM : 0); Comp_PL = Config.Comp_P2 - Config.Comp_PoToMM * (reel.PlateH - 8+ reelhighdiff) - (reel.PlateH > 8 ? Config.Comp_PoToMM * Config.Comp_PL_MM : 0);
Comp_PH = Comp_PH < 0 ? 0 : Comp_PH; Comp_PH = Comp_PH < 0 ? 0 : Comp_PH;
Comp_PL = Comp_PL < 0 ? 0 : Comp_PL; Comp_PL = Comp_PL < 0 ? 0 : Comp_PL;
Reel = reel.clone(); Reel = reel.clone();
......
...@@ -180,6 +180,7 @@ namespace DeviceLibrary ...@@ -180,6 +180,7 @@ namespace DeviceLibrary
IOMonitor.RegisterIO(IO_Type.AutoRun_Single, Config, IO_VALUE.HIGH, Run_BTN, 2500,100); IOMonitor.RegisterIO(IO_Type.AutoRun_Single, Config, IO_VALUE.HIGH, Run_BTN, 2500,100);
LedProcessInit(); LedProcessInit();
ConfigHelper.Config.Get("CamTestReel_Ability", false); ConfigHelper.Config.Get("CamTestReel_Ability", false);
ConfigHelper.Config.Get("Device_1315_ReelHeight_Compensation", 0);
} }
private void Crc_LanguageChangeEvent(object sender, EventArgs e) private void Crc_LanguageChangeEvent(object sender, EventArgs e)
...@@ -319,6 +320,7 @@ namespace DeviceLibrary ...@@ -319,6 +320,7 @@ namespace DeviceLibrary
Run(); Run();
} }
public void Stop() { public void Stop() {
LogUtil.info("开始停止系统2.");
mstart = false; mstart = false;
AutoInOutTest = false; AutoInOutTest = false;
ServerCM.StopConnectServer(); ServerCM.StopConnectServer();
...@@ -515,10 +517,22 @@ namespace DeviceLibrary ...@@ -515,10 +517,22 @@ namespace DeviceLibrary
forceHome = false; forceHome = false;
StringMoveInfo.NewMove(MoveStep.Wait); StringMoveInfo.NewMove(MoveStep.Wait);
StoreMoveInfo.NewMove(MoveStep.Wait); StoreMoveInfo.NewMove(MoveStep.Wait);
ClampMoveInfo.NewMove(MoveStep.Wait);
boxTransport.Reset(); boxTransport.Reset();
ResetMoveInfo.log("回原完成"); ResetMoveInfo.log("回原完成");
ResetMoveInfo.EndMove(); ResetMoveInfo.EndMove();
if (IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH) && boxTransport.IsComplateOrFree && ClampMoveInfo.MoveStep == MoveStep.Wait)
{
StoreMoveInfo.NewMove(MoveStep.StoreOut_NGPre);
StoreMoveInfo.MoveParam.PosID = "NG";
StoreMoveInfo.MoveParam.PlateH = 56;
StoreMoveInfo.MoveParam.PlateW = 7;
StoreMoveInfo.MoveParam.IsNg = true;
StoreMoveInfo.MoveParam.NgMsg = crc.GetString(L.tray_detect_reel_01, "料叉传感器感应到有料,请人工确认");
StoreMoveInfo.log($"开始无信息料盘出库");
ServerCM.storeStatus = StoreStatus.OutStoreExecute;
CloseFlipDoor(StoreMoveInfo);
}
runStatus = RunStatus.Running; runStatus = RunStatus.Running;
ServerCM.storeStatus = StoreStatus.StoreOnline; ServerCM.storeStatus = StoreStatus.StoreOnline;
break; break;
...@@ -670,6 +684,8 @@ namespace DeviceLibrary ...@@ -670,6 +684,8 @@ namespace DeviceLibrary
Msg.add(crc.GetString(configMoveAxis.ProName, configMoveAxis.Explain) + $"[{configMoveAxis.GetAxisValue()}]:" Msg.add(crc.GetString(configMoveAxis.ProName, configMoveAxis.Explain) + $"[{configMoveAxis.GetAxisValue()}]:"
+ crc.GetString(L.motion_alarm, "运动报警"), MsgLevel.alarm, ErrInfo.SuddenStop); + crc.GetString(L.motion_alarm, "运动报警"), MsgLevel.alarm, ErrInfo.SuddenStop);
ok = false; ok = false;
LogUtil.error(string.Join(",", HuichuanLibrary.HCBoardManager.GetAxisErrorDetail(configMoveAxis.GetAxisValue())));
} }
} }
} }
......
...@@ -80,7 +80,7 @@ namespace DeviceLibrary ...@@ -80,7 +80,7 @@ namespace DeviceLibrary
switch (ClampMoveInfo.MoveStep) switch (ClampMoveInfo.MoveStep)
{ {
case MoveStep.Wait: case MoveStep.Wait:
if (IsGetReelReady && StoreMoveInfo.MoveStep < MoveStep.StoreOut10) if (IsGetReelReady && StoreMoveInfo.MoveStep < MoveStep.StoreOut10 && OutSingleJobList.Count == 0)
{ {
ClampMoveInfo.NewMove(MoveStep.ReelClamp_01); ClampMoveInfo.NewMove(MoveStep.ReelClamp_01);
OpenFlipDoor(ClampMoveInfo); OpenFlipDoor(ClampMoveInfo);
......
...@@ -25,7 +25,7 @@ namespace DeviceLibrary ...@@ -25,7 +25,7 @@ namespace DeviceLibrary
{ {
JobInfo jobInfo = new JobInfo("", posId, plateW, plateH); JobInfo jobInfo = new JobInfo("", posId, plateW, plateH);
OutSingleJobList.Enqueue(jobInfo); OutSingleJobList.Enqueue(jobInfo);
LogUtil.info($"添加单盘出库任务队列: {posId},当前任务数量: {OutStoreJobList.Count}"); LogUtil.info($"添加单盘出库任务队列: {posId},当前任务数量: {OutSingleJobList.Count}");
} }
void StoreProcess() void StoreProcess()
{ {
...@@ -36,7 +36,8 @@ namespace DeviceLibrary ...@@ -36,7 +36,8 @@ namespace DeviceLibrary
{ {
case MoveStep.Wait: case MoveStep.Wait:
//IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH) //IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)
//if (StoreMoveInfo.IsTimeOut(5) && IOMonitor.IODebound(IO_Type.TrayCheck_Fixture,Config,IO_VALUE.HIGH,5000) && boxTransport.IsComplateOrFree && ClampMoveInfo.MoveStep == MoveStep.Wait) { //if (StoreMoveInfo.IsTimeOut(5) && IOMonitor.IODebound(IO_Type.TrayCheck_Fixture, Config, IO_VALUE.HIGH, 5000) && boxTransport.IsComplateOrFree && ClampMoveInfo.MoveStep == MoveStep.Wait)
//{
// StoreMoveInfo.NewMove(MoveStep.StoreOut_NGPre); // StoreMoveInfo.NewMove(MoveStep.StoreOut_NGPre);
// StoreMoveInfo.MoveParam.PosID = "NG"; // StoreMoveInfo.MoveParam.PosID = "NG";
// StoreMoveInfo.MoveParam.PlateH = 56; // StoreMoveInfo.MoveParam.PlateH = 56;
......
...@@ -135,6 +135,7 @@ namespace DeviceLibrary ...@@ -135,6 +135,7 @@ namespace DeviceLibrary
public static void Stop() public static void Stop()
{ {
LogUtil.info("开始停止系统."); LogUtil.info("开始停止系统.");
if (mainMachine != null) if (mainMachine != null)
{ {
mainMachine.Stop(); mainMachine.Stop();
......
...@@ -383,6 +383,7 @@ namespace TheMachine ...@@ -383,6 +383,7 @@ namespace TheMachine
MainMachine_ProcessMsgEvent(Msg.get()); MainMachine_ProcessMsgEvent(Msg.get());
return; return;
} }
LogUtil.info("用户按下启动");
RobotManage.Start(); RobotManage.Start();
userpause = false; userpause = false;
if (RobotManage.isRunning) if (RobotManage.isRunning)
...@@ -391,7 +392,7 @@ namespace TheMachine ...@@ -391,7 +392,7 @@ namespace TheMachine
RobotManage_UserPauseSet(this, false); RobotManage_UserPauseSet(this, false);
//(sender as Button).Text = "暂停运行"; //(sender as Button).Text = "暂停运行";
} }
LogUtil.info("用户按下启动");
} }
else if (!userpause) else if (!userpause)
{ {
...@@ -441,10 +442,14 @@ namespace TheMachine ...@@ -441,10 +442,14 @@ namespace TheMachine
}, sender, e); }, sender, e);
return; return;
} }
if (!btn_stop.Enabled)
return;
btn_stop.Enabled = false;
LogUtil.info("用户按下停止按钮");
RobotManage.UserPause(false); RobotManage.UserPause(false);
userpause = false; userpause = false;
Task.Run(() => { RobotManage.Stop(); }); Task.Run(() => { RobotManage.Stop(); });
btn_stop.Enabled = false;
btn_run.Text = crc.GetString(L.start, "启动"); btn_run.Text = crc.GetString(L.start, "启动");
btn_run.BackColor = Color.Transparent; btn_run.BackColor = Color.Transparent;
cb_IgnoreSafecheck.Enabled = true; cb_IgnoreSafecheck.Enabled = true;
......
...@@ -125,7 +125,7 @@ namespace TheMachine ...@@ -125,7 +125,7 @@ namespace TheMachine
return; return;
} }
var t = HumitureController.LastData; var t = HumitureController.LastData;
lbl_hmdstate.Text += $"{crc.GetString(L.humidity, "温度")}:{t.Temperate}℃, {crc.GetString(L.humidity, "湿度")}:{t.Humidity}%"; lbl_hmdstate.Text += $"{crc.GetString(L.temp, "温度")}:{t.Temperate}℃, {crc.GetString(L.humidity, "湿度")}:{t.Humidity}%";
} }
private void button1_Click_1(object sender, EventArgs e) private void button1_Click_1(object sender, EventArgs e)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!