Commit 86f90bf4 LN

bug修改

1 个父辈 dee11770
...@@ -1093,7 +1093,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1093,7 +1093,7 @@ namespace OnlineStore.ACSingleStore
} }
else else
{ {
ConfigAppSettings.SaveValue(Setting_Init.App_AutoRun, 0); ConfigAppSettings.SaveValue(Setting_Init.UseBuzzer, 0);
store.UseBuzzer = false; store.UseBuzzer = false;
LogUtil.info("去掉:启用蜂鸣器"); LogUtil.info("去掉:启用蜂鸣器");
} }
......
...@@ -42,7 +42,7 @@ namespace OnlineStore ...@@ -42,7 +42,7 @@ namespace OnlineStore
LoadData(); LoadData();
} }
} }
private static char spilt = ','; private static char spilt = ',';
private static void LoadData() private static void LoadData()
{ {
ResourceControl.GetChinaStringEvent += GetChinaString; ResourceControl.GetChinaStringEvent += GetChinaString;
...@@ -51,12 +51,12 @@ namespace OnlineStore ...@@ -51,12 +51,12 @@ namespace OnlineStore
ResourceControl.GetStringEvent += GetString; ResourceControl.GetStringEvent += GetString;
CSVResourceControl.GetStrEvent += GetString; CSVResourceControl.GetStrEvent += GetString;
CSVResourceControl.GetStringEvent += GetString; CSVResourceControl.GetStringEvent += GetString;
// CodeLibrary.CodeResourceControl.GetLanguageEvent += CodeResourceControl_GetLanguageEvent; // CodeLibrary.CodeResourceControl.GetLanguageEvent += CodeResourceControl_GetLanguageEvent;
//string englishPath = Application.StartupPath + @"\resource\en-US.resource"; //string englishPath = Application.StartupPath + @"\resource\en-US.resource";
//string chinaPath = Application.StartupPath + @"\resource\zh-CN.resource"; //string chinaPath = Application.StartupPath + @"\resource\zh-CN.resource";
//Dictionary<string, string> ChinaMap = LoadDataMap(chinaPath); //Dictionary<string, string> ChinaMap = LoadDataMap(chinaPath);
//Dictionary<string, string> EnglishMap = LoadDataMap(englishPath); //Dictionary<string, string> EnglishMap = LoadDataMap(englishPath);
string rPath= Application.StartupPath + @"\resource\language.resource"; string rPath = Application.StartupPath + @"\resource\language.resource";
ResourceMap = new Dictionary<string, Dictionary<string, string>>(); ResourceMap = new Dictionary<string, Dictionary<string, string>>();
Dictionary<string, string> ChinaMap = new Dictionary<string, string>(); Dictionary<string, string> ChinaMap = new Dictionary<string, string>();
Dictionary<string, string> EnglishMap = new Dictionary<string, string>(); Dictionary<string, string> EnglishMap = new Dictionary<string, string>();
...@@ -82,15 +82,31 @@ namespace OnlineStore ...@@ -82,15 +82,31 @@ namespace OnlineStore
{ {
eng = array[2].Replace('&', ',').Trim(); eng = array[2].Replace('&', ',').Trim();
} }
ChinaMap.Add(key, china); if (ChinaMap.ContainsKey(key))
{
ChinaMap[key] = china;
}
else
{
ChinaMap.Add(key, china);
}
if (String.IsNullOrEmpty(eng).Equals(false)) if (String.IsNullOrEmpty(eng).Equals(false))
{ {
EnglishMap.Add(key, eng); if (EnglishMap.ContainsKey(key))
{
EnglishMap[key] = eng;
}
else
{
EnglishMap.Add(key, eng);
}
// EnglishMap.Add(key, eng);
} }
} }
}catch(Exception ex) }
catch (Exception ex)
{ {
LogUtil.error("读取文件【"+ rPath + "】【"+ line + "】出错:" + ex.ToString()); LogUtil.error("读取文件【" + rPath + "】【" + line + "】出错:" + ex.ToString());
} }
} }
} }
...@@ -123,7 +139,7 @@ namespace OnlineStore ...@@ -123,7 +139,7 @@ namespace OnlineStore
EnglishMap.Add(key, englistr); EnglishMap.Add(key, englistr);
} }
} }
string str = key + spilt + chinastr.Replace( spilt, '&') + spilt + englistr.Replace( spilt, '&'); string str = key + spilt + chinastr.Replace(spilt, '&') + spilt + englistr.Replace(spilt, '&');
allList.Add(str); allList.Add(str);
} }
if (isNeedUpE) if (isNeedUpE)
...@@ -148,17 +164,17 @@ namespace OnlineStore ...@@ -148,17 +164,17 @@ namespace OnlineStore
//FileUtil.SaveListToFile(allList.ToArray(), Application.StartupPath + "\\a.txt"); //FileUtil.SaveListToFile(allList.ToArray(), Application.StartupPath + "\\a.txt");
} }
private static Dictionary<string,string> LoadRMap() private static Dictionary<string, string> LoadRMap()
{ {
string path = Application.StartupPath + @"\resource\ResourceMap.csv"; string path = Application.StartupPath + @"\resource\ResourceMap.csv";
Dictionary<string, string> map = new Dictionary<string, string>(); Dictionary<string, string> map = new Dictionary<string, string>();
try try
{ {
if (!File.Exists(path)) if (!File.Exists(path))
{ {
return map; return map;
} }
string[] lines = File.ReadAllLines(path); string[] lines = File.ReadAllLines(path);
foreach (string line in lines) foreach (string line in lines)
{ {
if (String.IsNullOrEmpty(line)) if (String.IsNullOrEmpty(line))
...@@ -170,18 +186,24 @@ namespace OnlineStore ...@@ -170,18 +186,24 @@ namespace OnlineStore
{ {
if (array.Length >= 3) if (array.Length >= 3)
{ {
map.Add(array[1].Replace('&', ',').Trim(), array[2].Replace('&', ',').Trim()); string key = array[1].Replace('&', ',').Trim();
string value = array[2].Replace('&', ',').Trim();
if (map.ContainsKey(key))
{
map[key] = value;
}
else { map.Add(key, value); }
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error("加载 " + path + "[" + line + "] 出错:" + ex.ToString()); LogUtil.error("加载 " + path + "[" + line + "] 出错:" + ex.ToString());
} }
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
LogUtil.error("加载 "+ path + " 出错:" + ex.ToString()); LogUtil.error("加载 " + path + " 出错:" + ex.ToString());
} }
return map; return map;
} }
...@@ -244,14 +266,14 @@ namespace OnlineStore ...@@ -244,14 +266,14 @@ namespace OnlineStore
public static string GetChinaString(string id, params object[] param) public static string GetChinaString(string id, params object[] param)
{ {
string strCurLanguage = gets(China, id); string strCurLanguage = gets(China, id);
return String.Format(strCurLanguage, param); return String.Format(strCurLanguage, param);
} }
public static string GetEnglishString(string id, params object[] param) public static string GetEnglishString(string id, params object[] param)
{ {
string strCurLanguage = gets(English, id); string strCurLanguage = gets(English, id);
return String.Format(strCurLanguage, param); return String.Format(strCurLanguage, param);
} }
private static string gets(string language,string id,string defaultStr="") private static string gets(string language, string id, string defaultStr = "")
{ {
if (String.IsNullOrEmpty(defaultStr)) if (String.IsNullOrEmpty(defaultStr))
{ {
...@@ -273,21 +295,22 @@ namespace OnlineStore ...@@ -273,21 +295,22 @@ namespace OnlineStore
{ {
if (ResourceMap[language].ContainsKey(id.Trim())) if (ResourceMap[language].ContainsKey(id.Trim()))
{ {
return ResourceMap[language][id]; return ResourceMap[language][id];
} }
else else
{ {
NoIdLog(id, defaultStr); NoIdLog(id, defaultStr);
} }
} }
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
NoIdLog(id, defaultStr); NoIdLog(id, defaultStr);
}return defaultStr; }
return defaultStr;
} }
public static string GetString(string id, string defaultStr="") public static string GetString(string id, string defaultStr = "")
{ {
string strCurLanguage = defaultStr; string strCurLanguage = defaultStr;
if (string.IsNullOrEmpty(defaultStr)) if (string.IsNullOrEmpty(defaultStr))
...@@ -356,8 +379,8 @@ namespace OnlineStore ...@@ -356,8 +379,8 @@ namespace OnlineStore
foreach (string key in defaultMap.Keys) foreach (string key in defaultMap.Keys)
{ {
string value = defaultMap[key]; string value = defaultMap[key];
LogUtil.info("" + key + spilt + value +spilt +""); LogUtil.info("" + key + spilt + value + spilt + "");
LogUtil.RLog("" + key + spilt + value.Replace(spilt,'&') + spilt+""); LogUtil.RLog("" + key + spilt + value.Replace(spilt, '&') + spilt + "");
} }
LogUtil.info("结束打印缺少的文字配置"); LogUtil.info("结束打印缺少的文字配置");
...@@ -394,7 +417,7 @@ namespace OnlineStore ...@@ -394,7 +417,7 @@ namespace OnlineStore
string showMsg = ResourceCulture.GetString(msg, msg, param); string showMsg = ResourceCulture.GetString(msg, msg, param);
string showTitle = ResourceCulture.GetString("提示"); string showTitle = ResourceCulture.GetString("提示");
return MessageBox.Show( showMsg,showTitle); return MessageBox.Show(showMsg, showTitle);
} }
public static DialogResult Show(string msg, string title, MessageBoxButtons but, params object[] param) public static DialogResult Show(string msg, string title, MessageBoxButtons but, params object[] param)
{ {
......
...@@ -299,4 +299,17 @@ trayHeight,料盘高度,Reel height, ...@@ -299,4 +299,17 @@ trayHeight,料盘高度,Reel height,
左侧门未关,左侧门未关,Left door open 左侧门未关,左侧门未关,Left door open
右侧门未关,右侧门未关,Right door open 右侧门未关,右侧门未关,Right door open
FrmStoreBox_chbIsDebug_Text,调试状态,debug mode FrmStoreBox_chbIsDebug_Text,调试状态,debug mode
光栅被遮挡,光栅被遮挡,Grating blocked
\ No newline at end of file \ No newline at end of file
光栅被遮挡,光栅被遮挡,Grating blocked
InTrouble,故障中,In trouble
OutStoreBoxEnd,料盘出仓位完成,Providing executed
OutStoreExecute,出库执行中,Providing Executing
StoreOnline,设备联机,System online
SuddenStop,急停中,Emerengy stop
OutMoveExecute,出库完成,Providing Executed
InStoreFailed,入库失败,Saving failed
OutStoreFailed,出库失败,Providing failed
WaitSingle,等待信号,Wait signal
TimeOut,超时,Time out
Run,运行中,Runing
Runing,运行中,Runing
OutStorEnd,出库完成,OutStorEnd
\ No newline at end of file \ No newline at end of file
...@@ -389,5 +389,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -389,5 +389,9 @@ namespace OnlineStore.DeviceLibrary
/// 批量轴已满,请取出料盘 /// 批量轴已满,请取出料盘
/// </summary> /// </summary>
public static string OutFull = "OutFull"; public static string OutFull = "OutFull";
/// <summary>
/// 出库完成
/// </summary>
public static string OutStorEnd = "OutStorEnd";
} }
} }
...@@ -864,7 +864,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -864,7 +864,7 @@ namespace OnlineStore.DeviceLibrary
return; return;
} }
if (UseBuzzer) if (!UseBuzzer)
{ {
IOManager.IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.LOW); IOManager.IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.LOW);
} }
...@@ -1854,7 +1854,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1854,7 +1854,7 @@ namespace OnlineStore.DeviceLibrary
{ {
boxStatus.msg = CodeMsg; boxStatus.msg = CodeMsg;
boxStatus.msgEn = CodeMsgEn; boxStatus.msgEn = CodeMsgEn;
// lineOperation.msg = CodeMsg; // lineOperation.msg = CodeMsg;
lineOperation.msg = CodeMsg; lineOperation.msg = CodeMsg;
lineOperation.msgEn = CodeMsgEn; lineOperation.msgEn = CodeMsgEn;
} }
...@@ -1905,6 +1905,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -1905,6 +1905,11 @@ namespace OnlineStore.DeviceLibrary
{ {
lineOperation.alarmList.Add(alarmInfo); lineOperation.alarmList.Add(alarmInfo);
} }
if (lineOperation.data == null)
{
lineOperation.data = new Dictionary<string, string>();
}
lineOperation.data.Add(IO_Type.TrayCheck_Door, IOManager.IOValue(IO_Type.TrayCheck_Door).ToString());
return lineOperation; return lineOperation;
} }
......
...@@ -710,10 +710,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -710,10 +710,8 @@ namespace OnlineStore.DeviceLibrary
{ {
if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW)) if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW))
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_14_GoBack);
OutStoreLog("出库:SO_13 升降轴返回,轴2至P1(待机点) ,关闭舱门"); SO_14_GoBack();
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoorAndWait();
} }
else else
{ {
...@@ -724,10 +722,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -724,10 +722,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_13_CheckTray) else if (StoreMove.MoveStep == StoreMoveStep.SO_13_CheckTray)
{ {
StoreMove.NextMoveStep(StoreMoveStep.SO_14_GoBack); SO_14_GoBack();
OutStoreLog("出库:SO_13 升降轴返回,轴2至P1(待机点) ,关闭舱门");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoorAndWait();
} }
else if (StoreMove.MoveStep == StoreMoveStep.SO_14_GoBack) else if (StoreMove.MoveStep == StoreMoveStep.SO_14_GoBack)
{ {
...@@ -761,6 +756,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -761,6 +756,21 @@ namespace OnlineStore.DeviceLibrary
} }
} }
private void SO_14_GoBack()
{
StoreMove.NextMoveStep(StoreMoveStep.SO_14_GoBack);
OutStoreLog("出库:SO_13 升降轴返回,轴2至P1(待机点) ,关闭舱门,更改状态为出库完成");
ACAxisMove(Config.UpDown_Axis, StoreMove.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
CloseDoorAndWait();
//改为出库完成
string posId = StoreMove.MoveParam != null ? StoreMove.MoveParam.PositionNum : "";
lastPosId = posId;
lastPosIdStatus = StoreStatus.OutStorEnd;
storeStatus = StoreStatus.OutStorEnd;
}
private void SO_10_DeviceToDoorPro() private void SO_10_DeviceToDoorPro()
{ {
LineMoveP moveP = StoreMove.MoveParam.MoveP; LineMoveP moveP = StoreMove.MoveParam.MoveP;
......
...@@ -161,8 +161,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -161,8 +161,8 @@ namespace OnlineStore.DeviceLibrary
case StoreStatus.InStoreFaild: case StoreStatus.InStoreFaild:
aa = ResourceControl.GetString(ResourceControl.InStoreFailed, "入库失败") + "(" + WarnObj.WarnMsg + ")"; aa = ResourceControl.GetString(ResourceControl.InStoreFailed, "入库失败") + "(" + WarnObj.WarnMsg + ")";
break; break;
case StoreStatus.OutStoreFaild: case StoreStatus.OutStorEnd:
aa = ResourceControl.GetString(ResourceControl.OutStoreFailed, "出库失败") + "(" + WarnObj.WarnMsg + ")"; aa = ResourceControl.GetString(ResourceControl.OutStorEnd, "出库完成") + "(" + WarnObj.WarnMsg + ")";
break; break;
} }
if (!String.IsNullOrEmpty(aa)) if (!String.IsNullOrEmpty(aa))
......
...@@ -93,13 +93,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -93,13 +93,13 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
OutStoreBoxEnd = 10, OutStoreBoxEnd = 10,
/// <summary> /// <summary>
/// 12=移栽出库移栽过程中(移栽完成后变成OnLine) ///11=出库完成
/// </summary> /// </summary>
OutMoveExecute = 12, OutStorEnd = 11,
/// <summary> /// <summary>
///11=出库失败 /// 12=移栽出库移栽过程中(移栽完成后变成OnLine)
/// </summary> /// </summary>
OutStoreFaild = 11, OutMoveExecute = 12,
/// <summary> /// <summary>
/// 重置中(原点返回和重置都发此状态) /// 重置中(原点返回和重置都发此状态)
/// </summary> /// </summary>
......
SISO料仓9台
datalogic版本,增加照明DO,门打开时自动打开照明。
DIDO定义修改。
\ No newline at end of file \ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!