From 7603e93e19891ec2aff0ad67e555fd55d9175b99 Mon Sep 17 00:00:00 2001
From: schangxiang@126.com <schangxiang@126.com>
Date: 周六, 23 11月 2024 14:55:09 +0800
Subject: [PATCH] 111
---
CC/iWareCC_ASRS/ThreadService/02_BZ39工位(补板后工位)/DataProcess_RobotBuffer_ModeChange.cs | 38 +++++++++++++++++++-------------------
1 files changed, 19 insertions(+), 19 deletions(-)
diff --git "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_RobotBuffer_ModeChange.cs" "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_RobotBuffer_ModeChange.cs"
index 97019c4..082f504 100644
--- "a/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_RobotBuffer_ModeChange.cs"
+++ "b/CC/iWareCC_ASRS/ThreadService/02_BZ39\345\267\245\344\275\215\357\274\210\350\241\245\346\235\277\345\220\216\345\267\245\344\275\215\357\274\211/DataProcess_RobotBuffer_ModeChange.cs"
@@ -27,16 +27,16 @@
public static async void Handler()
{
var alertMsg = "";
- LogType logType = LogType.DataProcess_BZ39;
+ LogType logType = LogType.DataProcess_RobotBuffer_ModeChange;
while (true)
{
Thread.Sleep(2000);//浼戠湢2绉掞紝灏嗕紤鐪犲啓鍒板墠闈紝鏄负浜嗕笅闈㈢殑continue鏂规硶鎵ц鍚庝笉鏄剧ず閿欒淇℃伅鐨勬彁绀猴紒锛侊紒銆怑ditBy shaocx,2022-05-24銆�
- SystemWarningMsg._lbl_alert_DataProcess_BZ39 = string.Empty;
+ SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = string.Empty;
try
{
- if (SystemValue.isAllowRuning_DataProcess_BZ39 && SystemValue.isStartedModel)
+ if (SystemValue.isAllowRuning_DataProcess_RobotBuffer_ModeChange && SystemValue.isStartedModel)
{
-
+ var rgvLocation = StationLocationEnum.BZ39.ToString();
if (FormCC.IsAllowRunOutMode)
{
using (WmsDBModel wmsDB = new WmsDBModel())
@@ -44,7 +44,7 @@
var rbRunMode = wmsDB.wms_rbline_runmode.FirstOrDefault();
if (rbRunMode.LineRunMode == (int)RbRunModeEnum.鍑哄簱妯″紡)
{
- SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"宸茬粡鏄嚭搴撴ā寮忎簡,姝ゆ寰幆缁撴潫";
+ SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = $"宸茬粡鏄嚭搴撴ā寮忎簡,姝ゆ寰幆缁撴潫";
continue;
}
rbRunMode.LineRunMode = (int)RbRunModeEnum.鍑哄簱妯″紡;
@@ -52,19 +52,19 @@
rbRunMode.UpdateTime = DateTime.Now;
//鎺ㄩ�佺粰PLC鍒囨崲妯″紡
- //using (StationServiceClient client = new StationServiceClient())
- //{
- // var res = await client.WriteOutStoreTaskInfoAsync((int)EDevice.Station, rgvLocation, doTask.PlaceCode, Convert.ToInt32(doTask.TaskNo));
- // if (!res.result)
- // {
- // SystemWarningMsg._lbl_alert_DataProcess_BZ39 = $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 澶辫触,WriteOutStoreTaskInfoAsync 杩斿洖:{res.resMsg}";
- // continue;
- // }
- // else
- // {
- // Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-涓嬪彂鍑哄簱浠诲姟 鎴愬姛,WriteOutStoreTaskInfoAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
- // }
- //}
+ using (StationServiceClient client = new StationServiceClient())
+ {
+ var res = await client.ChangeModeAsync((int)EDevice.Station, (int)RbRunModeEnum.鍑哄簱妯″紡, rgvLocation);
+ if (!res.result)
+ {
+ SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange = $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 澶辫触,ChangeModeAsync 杩斿洖:{res.resMsg}";
+ continue;
+ }
+ else
+ {
+ Log4NetHelper.WriteInfoLog(logType, $"{rgvLocation.ToString()}-鎺ㄩ�佺粰PLC鍒囨崲妯″紡 鎴愬姛,ChangeModeAsync锛屽弬鏁�: 绔欑偣{rgvLocation}");
+ }
+ }
wmsDB.SaveChanges();
@@ -74,7 +74,7 @@
}
catch (Exception ex)
{
- SystemWarningMsg._lbl_alert_DataProcess_BZ39 += " 鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
+ SystemWarningMsg._lbl_Alert_DataProcess_RobotBuffer_ModeChange += " 鍑虹幇寮傚父:" + ex.Message + SysGloble.SPLIT_STR;
Log4NetHelper.WriteErrorLog(logType, " 鍑虹幇寮傚父锛�" + ex.Message, ex);
}
}
--
Gitblit v1.9.3