|
|
@@ -96,7 +96,7 @@ namespace HBLConsole.MORKJC |
|
|
|
{ |
|
|
|
MessageLog.GetInstance.Show($"开始制作订单[{order.SortNum}]"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//商品类型 |
|
|
|
GOODS_TYPE currentGoodsType = GOODS_TYPE.NEITHER; |
|
|
@@ -270,7 +270,7 @@ namespace HBLConsole.MORKJC |
|
|
|
JaKaHelper.GetInstance.JaKaProgramName(JaKaHelper.SENCE_接茶); |
|
|
|
Wait(int.Parse(JaKaHelper.SENCE_接茶)); |
|
|
|
|
|
|
|
MCUSerialHelper.GetInstance.ServoControl(1, 105); |
|
|
|
MCUSerialHelper.GetInstance.ServoControl(1, 105); |
|
|
|
Thread.Sleep(1000); |
|
|
|
MCUSerialHelper.GetInstance.ServoControl(1, 130); |
|
|
|
Thread.Sleep(1000); |
|
|
@@ -380,7 +380,7 @@ namespace HBLConsole.MORKJC |
|
|
|
switch (JuicerNum1) |
|
|
|
{ |
|
|
|
case 52: |
|
|
|
if(GuMake) |
|
|
|
if (GuMake) |
|
|
|
{ |
|
|
|
JuicerNum = 0x00; |
|
|
|
} |
|
|
@@ -493,7 +493,7 @@ namespace HBLConsole.MORKJC |
|
|
|
Wait(int.Parse(JaKaHelper.SENCE_初始位)); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
switch (JuicerNum1) |
|
|
|
{ |
|
|
@@ -544,7 +544,7 @@ namespace HBLConsole.MORKJC |
|
|
|
/// 取杯流程 |
|
|
|
/// </summary> |
|
|
|
/// <returns>0:无意义,1:取杯成功 2:机构有杯子,取杯失败 3:机构没有杯子</returns> |
|
|
|
private int takeCup() |
|
|
|
private int takeCup() |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
@@ -560,12 +560,12 @@ namespace HBLConsole.MORKJC |
|
|
|
JaKaHelper.GetInstance.JaKaProgramName(JaKaHelper.SENCE_取杯); |
|
|
|
Wait(int.Parse(JaKaHelper.SENCE_取杯)); |
|
|
|
bSensorInput = sensor_Sign(1); |
|
|
|
while (bSensorInput == 3 ) |
|
|
|
while (bSensorInput == 3) |
|
|
|
{ |
|
|
|
Thread.Sleep(100); |
|
|
|
bSensorInput = sensor_Sign(1); |
|
|
|
} |
|
|
|
if (bSensorInput == 2) |
|
|
|
if (bSensorInput == 2) |
|
|
|
{ |
|
|
|
Thread.Sleep(500); |
|
|
|
MCUSerialHelper.GetInstance.OutputControl(1, false); |
|
|
@@ -590,7 +590,7 @@ namespace HBLConsole.MORKJC |
|
|
|
Thread.Sleep(100); |
|
|
|
bSensorInput = sensor_Sign(1); |
|
|
|
} |
|
|
|
while (getCup_cnt < 4 && (bSensorInput==2|| bSensorInput == 3)) |
|
|
|
while (getCup_cnt < 4 && (bSensorInput == 2 || bSensorInput == 3)) |
|
|
|
{ |
|
|
|
MessageLog.GetInstance.Show($"第{getCup_cnt}次取杯失败"); |
|
|
|
Thread.Sleep(500); |
|
|
@@ -610,7 +610,7 @@ namespace HBLConsole.MORKJC |
|
|
|
{ |
|
|
|
return 1; |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
return 2; |
|
|
|
} |
|
|
@@ -631,7 +631,7 @@ namespace HBLConsole.MORKJC |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
while (checkCup() == 2) |
|
|
|
while (checkCup() == 2) |
|
|
|
{ |
|
|
|
Thread.Sleep(100); |
|
|
|
} |
|
|
@@ -656,7 +656,7 @@ namespace HBLConsole.MORKJC |
|
|
|
} |
|
|
|
return 1; |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
MessageLog.GetInstance.Show(ex.ToString()); |
|
|
|
return 0; |
|
|
@@ -667,7 +667,7 @@ namespace HBLConsole.MORKJC |
|
|
|
/// 检测放杯位,是否有杯子 |
|
|
|
/// </summary> |
|
|
|
/// <returns>0:无意义 1:没有杯子 2:有杯子 </returns> |
|
|
|
private int checkCup() |
|
|
|
private int checkCup() |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
@@ -689,14 +689,15 @@ namespace HBLConsole.MORKJC |
|
|
|
{ |
|
|
|
MessageLog.GetInstance.Show($"放杯位传感器没有信号:{cnt_Check}"); |
|
|
|
return 1; |
|
|
|
} else if (cnt_Check<=-20) |
|
|
|
} |
|
|
|
else if (cnt_Check <= -20) |
|
|
|
{ |
|
|
|
MessageLog.GetInstance.Show($"放杯位传感器有信号:{cnt_Check}"); |
|
|
|
return 2; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
MessageLog.GetInstance.Show(ex.ToString()); |
|
|
|
return 0; |
|
|
@@ -707,7 +708,7 @@ namespace HBLConsole.MORKJC |
|
|
|
/// </summary> |
|
|
|
/// <param name="num"></param> |
|
|
|
/// <returns></returns> |
|
|
|
private int sensor_Sign(byte num) |
|
|
|
private int sensor_Sign(byte num) |
|
|
|
{ |
|
|
|
int cnt = 0; |
|
|
|
cnt_Check = 0; |
|
|
@@ -725,7 +726,7 @@ namespace HBLConsole.MORKJC |
|
|
|
cnt_Check = cnt_Check - 1; |
|
|
|
cnt = cnt + 1; |
|
|
|
} |
|
|
|
if (cnt >= 20) |
|
|
|
if (cnt >= 20) |
|
|
|
{ |
|
|
|
if (cnt_Check >= 0) |
|
|
|
{ |
|
|
@@ -738,7 +739,7 @@ namespace HBLConsole.MORKJC |
|
|
|
return 2; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|