Commit a5fe1738 刘韬

添加出库料串已满的提示

1 个父辈 8e235319
...@@ -237,6 +237,7 @@ ...@@ -237,6 +237,7 @@
<Content Include="image\us\pPoint.png"> <Content Include="image\us\pPoint.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="resources\en-US.txt" />
<Content Include="resources\resources.txt"> <Content Include="resources\resources.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
......
...@@ -72,7 +72,7 @@ namespace OnlineStore.AutoInOutStore ...@@ -72,7 +72,7 @@ namespace OnlineStore.AutoInOutStore
{ {
if (CurrLanguage.Equals(ResourceCulture.CurrLanguage)) if (CurrLanguage.Equals(ResourceCulture.CurrLanguage))
{ {
return; //return;
} }
string className = this.ClassName; string className = this.ClassName;
CurrLanguage = ResourceCulture.CurrLanguage; CurrLanguage = ResourceCulture.CurrLanguage;
......
...@@ -453,6 +453,7 @@ ...@@ -453,6 +453,7 @@
this.groupBox6.Controls.Add(this.btnClearBuzzer); this.groupBox6.Controls.Add(this.btnClearBuzzer);
this.groupBox6.Controls.Add(this.btnSingleTrayIn); this.groupBox6.Controls.Add(this.btnSingleTrayIn);
this.groupBox6.Controls.Add(this.lblBatchMsg); this.groupBox6.Controls.Add(this.lblBatchMsg);
this.groupBox6.Controls.Add(this.lblWarnMsg);
this.groupBox6.Controls.Add(this.btnOpenDoor); this.groupBox6.Controls.Add(this.btnOpenDoor);
this.groupBox6.Controls.Add(this.lblWaitTragGo); this.groupBox6.Controls.Add(this.lblWaitTragGo);
this.groupBox6.Controls.Add(this.btnWaitTrgGo); this.groupBox6.Controls.Add(this.btnWaitTrgGo);
...@@ -688,7 +689,6 @@ ...@@ -688,7 +689,6 @@
this.groupBox3.Controls.Add(this.chbDebug); this.groupBox3.Controls.Add(this.chbDebug);
this.groupBox3.Controls.Add(this.lblThisSta); this.groupBox3.Controls.Add(this.lblThisSta);
this.groupBox3.Controls.Add(this.chbAuto); this.groupBox3.Controls.Add(this.chbAuto);
this.groupBox3.Controls.Add(this.lblWarnMsg);
this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.groupBox3.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox3.Location = new System.Drawing.Point(8, 7); this.groupBox3.Location = new System.Drawing.Point(8, 7);
this.groupBox3.Name = "groupBox3"; this.groupBox3.Name = "groupBox3";
...@@ -738,7 +738,7 @@ ...@@ -738,7 +738,7 @@
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.lblWarnMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblWarnMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red; this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(6, 58); this.lblWarnMsg.Location = new System.Drawing.Point(7, -16);
this.lblWarnMsg.Name = "lblWarnMsg"; this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(1218, 40); this.lblWarnMsg.Size = new System.Drawing.Size(1218, 40);
this.lblWarnMsg.TabIndex = 224; this.lblWarnMsg.TabIndex = 224;
...@@ -2017,6 +2017,7 @@ ...@@ -2017,6 +2017,7 @@
// uc_boxdebug1 // uc_boxdebug1
// //
this.uc_boxdebug1.Location = new System.Drawing.Point(6, 6); this.uc_boxdebug1.Location = new System.Drawing.Point(6, 6);
this.uc_boxdebug1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.uc_boxdebug1.Name = "uc_boxdebug1"; this.uc_boxdebug1.Name = "uc_boxdebug1";
this.uc_boxdebug1.Size = new System.Drawing.Size(1076, 596); this.uc_boxdebug1.Size = new System.Drawing.Size(1076, 596);
this.uc_boxdebug1.TabIndex = 0; this.uc_boxdebug1.TabIndex = 0;
......
...@@ -1282,6 +1282,7 @@ namespace OnlineStore.AutoInOutStore ...@@ -1282,6 +1282,7 @@ namespace OnlineStore.AutoInOutStore
} }
CodeLibrary.FrmCodeDecode frm = new FrmCodeDecode(); CodeLibrary.FrmCodeDecode frm = new FrmCodeDecode();
frm.chbZxing.Checked = false; frm.chbZxing.Checked = false;
frm.LanguageProcess();
frm.ShowDialog(); frm.ShowDialog();
IOManager.IOMove(IO_Type.CameraLight_Power, IO_VALUE.LOW); IOManager.IOMove(IO_Type.CameraLight_Power, IO_VALUE.LOW);
} }
...@@ -1707,6 +1708,8 @@ namespace OnlineStore.AutoInOutStore ...@@ -1707,6 +1708,8 @@ namespace OnlineStore.AutoInOutStore
} }
打开日志ToolStripMenuItem.Text = openLog; 打开日志ToolStripMenuItem.Text = openLog;
} }
Application.DoEvents();
LanguageProcess();
} }
private void chbDebug_CheckedChanged(object sender, EventArgs e) private void chbDebug_CheckedChanged(object sender, EventArgs e)
......
...@@ -53,7 +53,6 @@ namespace OnlineStore.AutoInOutStore ...@@ -53,7 +53,6 @@ namespace OnlineStore.AutoInOutStore
[STAThread] [STAThread]
static void Main(string[] Args) static void Main(string[] Args)
{ {
var xx = DeviceLibrary.ACServerManager.SpeedToStr(32767, 4);
Environment.CurrentDirectory = Application.StartupPath; Environment.CurrentDirectory = Application.StartupPath;
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException); Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
......
...@@ -1218,4 +1218,10 @@ ...@@ -1218,4 +1218,10 @@
<data name="FrmStoreBox_tabPage6_Text1" xml:space="preserve"> <data name="FrmStoreBox_tabPage6_Text1" xml:space="preserve">
<value>Storage location</value> <value>Storage location</value>
</data> </data>
<data name="BatchOutFail_DoorNotLock" xml:space="preserve">
<value>Batch delivery failed, the door lock is not closed</value>
</data>
<data name="BatchFull" xml:space="preserve">
<value>The material tray is full, please take out the material</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -1218,4 +1218,10 @@ ...@@ -1218,4 +1218,10 @@
<data name="FrmStoreBox_tabPage6_Text" xml:space="preserve"> <data name="FrmStoreBox_tabPage6_Text" xml:space="preserve">
<value>ロケーションデバッグ</value> <value>ロケーションデバッグ</value>
</data> </data>
<data name="BatchOutFail_DoorNotLock" xml:space="preserve">
<value>バッチ配信に失敗しました。ドアロックが閉じていません。</value>
</data>
<data name="BatchFull" xml:space="preserve">
<value>トレイがいっぱいになっていますので、材料を取り出してください</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -1218,4 +1218,7 @@ ...@@ -1218,4 +1218,7 @@
<data name="FrmStoreBox_tabPage6_Text" xml:space="preserve"> <data name="FrmStoreBox_tabPage6_Text" xml:space="preserve">
<value>库位调试</value> <value>库位调试</value>
</data> </data>
<data name="BatchOutFail_DoorNotLock" xml:space="preserve">
<value>批量出库失败,门锁未关闭</value>
</data>
</root> </root>
\ No newline at end of file \ No newline at end of file
...@@ -89,7 +89,7 @@ namespace OnlineStore.Common ...@@ -89,7 +89,7 @@ namespace OnlineStore.Common
} }
catch (Exception e) catch (Exception e)
{ {
LogUtil.error("PostJson【" + paramData + "】 ERROR:" + e.StackTrace, 1); LogUtil.error("PostJson["+ url + "]【" + paramData + "】 ERROR:" + e.ToString(), 1);
} }
if (isLog == 1) if (isLog == 1)
......
...@@ -355,5 +355,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -355,5 +355,13 @@ namespace OnlineStore.DeviceLibrary
/// 批量轴已满,请取出料盘 /// 批量轴已满,请取出料盘
/// </summary> /// </summary>
public static string OutFull = "OutFull"; public static string OutFull = "OutFull";
/// <summary>
/// 批量出库失败,门锁未关闭
/// </summary>
public static string BatchOutFail_DoorNotLock= "BatchOutFail_DoorNotLock";
/// <summary>
/// 批量轴已放满
/// </summary>
public static string BatchFull= "BatchFull";
} }
} }
...@@ -171,13 +171,13 @@ PRO,(轴五)上料轴P3点(上料目标位置),BatchAxis_P3,1724717,,,,,,, ...@@ -171,13 +171,13 @@ PRO,(轴五)上料轴P3点(上料目标位置),BatchAxis_P3,1724717,,,,,,,
PRO,(轴二)升降轴单盘入库抬升料盘的高度,UpdownAxis_UpPosition,10000,,,,,,, PRO,(轴二)升降轴单盘入库抬升料盘的高度,UpdownAxis_UpPosition,10000,,,,,,,
PRO,(轴五)上料轴出库上升最大高度,BatchAxis_OutMaxValue,1491390,,,,,,, PRO,(轴五)上料轴出库上升最大高度,BatchAxis_OutMaxValue,1491390,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,(轴四)压紧轴目标速度,CompAxis_TargetSpeed,330000,,,,,,, PRO,(轴四)压紧轴目标速度,CompAxis_TargetSpeed,2000,,,,,,,
PRO,(轴四)压紧轴加速度,CompAxis_AddSpeed,930000,,,,,,, PRO,(轴四)压紧轴加速度,CompAxis_AddSpeed,2000,,,,,,,
PRO,(轴四)压紧轴减速度,CompAxis_DelSpeed,930000,,,,,,, PRO,(轴四)压紧轴减速度,CompAxis_DelSpeed,2000,,,,,,,
PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,200,,,,,,, PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,200,,,,,,,
PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,200,,,,,,, PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,200,,,,,,,
PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,2000,,,,,,, PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,2000,,,,,,,
PRO,(轴四)压紧轴P1速度,CompAxis_P1_Speed,1100,,,,,,, PRO,(轴四)压紧轴P1速度,CompAxis_P1_Speed,1100,,,,,,,
PRO,(轴四)压紧轴P2速度,CompAxis_P2_Speed,330000,,,,,,, PRO,(轴四)压紧轴P2速度,CompAxis_P2_Speed,2000,,,,,,,
PRO,(轴四)压紧轴P3速度,CompAxis_P3_Speed,1100,,,,,,, PRO,(轴四)压紧轴P3速度,CompAxis_P3_Speed,1100,,,,,,,
PRO,特殊二维码尺寸配置,CodeSizeConfig,T;PartNum;1=330x81,,,,,,, PRO,特殊二维码尺寸配置,CodeSizeConfig,T;PartNum;1=330x81,,,,,,,
...@@ -300,6 +300,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -300,6 +300,8 @@ namespace OnlineStore.DeviceLibrary
if (!AutomaticBaiting.DoorCloseOK()) if (!AutomaticBaiting.DoorCloseOK())
{ {
UpdateInOutMsg(logMsg + "失败,门锁未关闭"); UpdateInOutMsg(logMsg + "失败,门锁未关闭");
//SetWarnMsg(ResourceControl.BatchOutFail_DoorNotLock);
//WarnMsg = Msg;
return false; return false;
} }
if (IsBatchWork && (!SupportBatch(posId))) if (IsBatchWork && (!SupportBatch(posId)))
...@@ -351,13 +353,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -351,13 +353,13 @@ namespace OnlineStore.DeviceLibrary
} }
private void SI_03_AxisToP1(LineMoveP moveP) private void SI_03_AxisToP1(LineMoveP moveP)
{ {
InStoreLog("入库:SI_03 所有轴回待机点,轴2、轴1 到P1, 轴4到P3,吸盘在上升端"); InStoreLog("入库:SI_03 所有轴回待机点,轴2、轴1 到P1, 轴4到P1,吸盘在上升端");
StoreMove.NextMoveStep(StoreMoveStep.SI_03_ReturnHome); StoreMove.NextMoveStep(StoreMoveStep.SI_03_ReturnHome);
bool needMove = false; bool needMove = false;
if (!ACServerManager.isInPosition(Config.Comp_Axis, moveP.ComPress_P3)) if (!ACServerManager.isInPosition(Config.Comp_Axis, moveP.ComPress_P1))
{ {
needMove = true; needMove = true;
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed); ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed);
} }
if (!ACServerManager.isInPosition(Config.UpDown_Axis, moveP.UpDown_P1)) if (!ACServerManager.isInPosition(Config.UpDown_Axis, moveP.UpDown_P1))
{ {
...@@ -558,8 +560,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -558,8 +560,9 @@ namespace OnlineStore.DeviceLibrary
StoreMove.NextMoveStep(StoreMoveStep.SI_12_PutWareToBag); StoreMove.NextMoveStep(StoreMoveStep.SI_12_PutWareToBag);
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed); ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P4, Config.UpDownAxis_P4_Speed);
Thread.Sleep(100); Thread.Sleep(100);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P4, Config.UpDownAxis_P4_Speed);
Thread.Sleep(500);
} }
else if (StoreMove.MoveStep == StoreMoveStep.SI_12_PutWareToBag) else if (StoreMove.MoveStep == StoreMoveStep.SI_12_PutWareToBag)
{ {
...@@ -806,6 +809,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -806,6 +809,7 @@ namespace OnlineStore.DeviceLibrary
if (!AutomaticBaiting.DoorCloseOK()) if (!AutomaticBaiting.DoorCloseOK())
{ {
UpdateInOutMsg(logMsg + "失败,门锁未关闭"); UpdateInOutMsg(logMsg + "失败,门锁未关闭");
SetWarnMsg(ResourceControl.BatchOutFail_DoorNotLock);
//LogUtil.error(LOGGER, StoreName + logMsg + " 出错,门锁未关闭"); //LogUtil.error(LOGGER, StoreName + logMsg + " 出错,门锁未关闭");
return false; return false;
} }
...@@ -867,6 +871,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -867,6 +871,8 @@ namespace OnlineStore.DeviceLibrary
OutStoreLog("出库:SO_01 定位气缸下降"); OutStoreLog("出库:SO_01 定位气缸下降");
//LocationDownAndWait(); //LocationDownAndWait();
} }
upfix1 = false;
upfix2 = false;
CodeOrInoutMsg = ""; CodeOrInoutMsg = "";
return true; return true;
} }
...@@ -900,18 +906,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -900,18 +906,22 @@ namespace OnlineStore.DeviceLibrary
int outDownPosition = StoreMove.MoveParam.MoveP.BatchAxis_DownValue; int outDownPosition = StoreMove.MoveParam.MoveP.BatchAxis_DownValue;
if (StoreMove.IsBatchInOutStore) if (StoreMove.IsBatchInOutStore)
{ //如果料盘检测信号不亮,不需要下降这么多 {
//如果料盘检测信号不亮,不需要下降这么多
//判断是否在P1点 //判断是否在P1点
int acPosition = ACServerManager.GetActualtPosition(Config.Batch_Axis); int acPosition = ACServerManager.GetActualtPosition(Config.Batch_Axis);
bool isIn = Math.Abs(acPosition - Config.BatchAxis_P1) < Config.Batch_Axis.CanErrorCountMax; bool isIn = Math.Abs(acPosition - Config.BatchAxis_P1) < Config.Batch_Axis.CanErrorCountMax;
OutStoreLog($"出库:acPosition:{acPosition}, needup:{needup}, TrayCheck_LoadMaterial:{IOManager.IOValue(IO_Type.TrayCheck_LoadMaterial)}, outDownPosition:{outDownPosition}, BatchAxis_OutDownPosition:{Config.BatchAxis_OutDownPosition}, isIn:{isIn}");
if (IOManager.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.LOW) && outDownPosition > Config.BatchAxis_OutDownPosition && isIn) if (IOManager.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.LOW) && outDownPosition > Config.BatchAxis_OutDownPosition && isIn)
{ {
outDownPosition = outDownPosition - Config.BatchAxis_OutDownPosition; outDownPosition = outDownPosition - Config.BatchAxis_OutDownPosition;
OutStoreLog($"出库:在p1位置 outDownPosition:{outDownPosition}");
} }
//如果检测信号亮,需要多下降 //如果检测信号亮,需要多下降
if (IOManager.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.HIGH)) if (needup || IOManager.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.HIGH))
{ {
outDownPosition = outDownPosition + Config.BatchAxis_DownPosition2; outDownPosition = outDownPosition + Config.BatchAxis_DownPosition2;
OutStoreLog($"出库:对射亮,需要多下降 outDownPosition:{outDownPosition}");
} }
//上下料机构下降的距离=料盘最低高度+默认的高度 //上下料机构下降的距离=料盘最低高度+默认的高度
targetValue = GetBatchTargetValue(outDownPosition); targetValue = GetBatchTargetValue(outDownPosition);
...@@ -931,6 +941,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -931,6 +941,7 @@ namespace OnlineStore.DeviceLibrary
StoreMove.EndMove(); StoreMove.EndMove();
storeRunStatus = StoreRunStatus.Runing; storeRunStatus = StoreRunStatus.Runing;
InOutEndProcess(posId,StoreMoveType.OutStore); InOutEndProcess(posId,StoreMoveType.OutStore);
SetWarnMsg(ResourceControl.BatchFull);
return; return;
} }
} }
...@@ -1101,6 +1112,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -1101,6 +1112,10 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(LOGGER, StoreName + " 出库 moveStatus=" + StoreMove.MoveStep + ",没有对应的处理!"); LogUtil.error(LOGGER, StoreName + " 出库 moveStatus=" + StoreMove.MoveStep + ",没有对应的处理!");
} }
} }
bool upfix1 = false;
bool upfix2 = false;
bool needup = false;
private void SO_02_DeviceBack() private void SO_02_DeviceBack()
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_02_DeviceBack); StoreMove.NextMoveStep(StoreMoveStep.SO_02_DeviceBack);
...@@ -1108,15 +1123,30 @@ namespace OnlineStore.DeviceLibrary ...@@ -1108,15 +1123,30 @@ namespace OnlineStore.DeviceLibrary
InOutBackToP1(StoreMove.MoveParam.MoveP.InOut_P1); InOutBackToP1(StoreMove.MoveParam.MoveP.InOut_P1);
if (StoreMove.IsBatchInOutStore) if (StoreMove.IsBatchInOutStore)
{ {
needup = false;
//如果可以直接下降,则不需要匀速上升 //如果可以直接下降,则不需要匀速上升
int targetValue = GetBatchTargetValue(StoreMove.MoveParam.MoveP.BatchAxis_DownValue); int targetValue = GetBatchTargetValue(StoreMove.MoveParam.MoveP.BatchAxis_DownValue);
if (targetValue >= 300000) if (targetValue < (Config.BatchAxis_P3 - Config.BatchAxis_P2) * 0.1)
{ {
OutStoreLog("出库:SO_02 批量上下料轴直接下降后目标位置【" + targetValue + "】不需要匀速上升 "); if (!upfix2)
{
OutStoreLog($"出库:SO_02 2 targetValue:{targetValue}<{(Config.BatchAxis_P3 - Config.BatchAxis_P2) * 0.1} 需要匀速上升 ");
upfix2 = true;
needup = true;
}
}
else if (targetValue < (Config.BatchAxis_P3 - Config.BatchAxis_P2) * 0.5)
{
if (!upfix1)
{
OutStoreLog($"出库:SO_02 1 targetValue:{targetValue}<{(Config.BatchAxis_P3 - Config.BatchAxis_P2) * 0.5} 需要匀速上升 ");
upfix1 = true;
needup = true;
}
} }
//如果批量能未检测到料盘,需要把批量轴走到能检测到料盘的位置 //如果批量能未检测到料盘,需要把批量轴走到能检测到料盘的位置
else if (IOManager.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.LOW)) if (needup && IOManager.IOValue(IO_Type.TrayCheck_LoadMaterial).Equals(IO_VALUE.LOW))
{ {
StoreMove.TimeOutSeconds = 120; StoreMove.TimeOutSeconds = 120;
//ACAxisMove(Config.Batch_Axis, Config.BatchAxis_P1, Config.BatchAxis_P1_Speed); //ACAxisMove(Config.Batch_Axis, Config.BatchAxis_P1, Config.BatchAxis_P1_Speed);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!