Commit ac6deef9 LN

增加最大宽度配置

1 个父辈 a5400f31
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<!--是否使用蜂鸣器--> <!--是否使用蜂鸣器-->
<add key ="UseBuzzer" value ="1"/> <add key ="UseBuzzer" value ="1"/>
<add key ="StartScan_CMD" value ="S"/> <add key ="StartScan_CMD" value ="S"/>
<add key ="ShowLanguageMsg" value ="0"/> <add key ="ShowLanguageMsg" value ="1"/>
<!--每盘料扫码的次数--> <!--每盘料扫码的次数-->
<add key ="MaxScanCount" value ="2"/> <add key ="MaxScanCount" value ="2"/>
</appSettings> </appSettings>
......
...@@ -1096,6 +1096,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1096,6 +1096,7 @@ namespace OnlineStore.ACSingleStore
ConfigAppSettings.SaveValue(Setting_Init.UseBuzzer, 0); ConfigAppSettings.SaveValue(Setting_Init.UseBuzzer, 0);
store.UseBuzzer = false; store.UseBuzzer = false;
LogUtil.info("去掉:启用蜂鸣器"); LogUtil.info("去掉:启用蜂鸣器");
IOManager.IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.LOW);
} }
} }
......
...@@ -286,7 +286,7 @@ namespace OnlineStore ...@@ -286,7 +286,7 @@ namespace OnlineStore
{ {
if (ShowMsg) if (ShowMsg)
{ {
LogUtil.error("No Language Resources:[" + id + "], please add"); LogUtil.debug ("No Language Resources:[" + id + "], please add");
} }
return defaultStr; return defaultStr;
} }
...@@ -323,7 +323,7 @@ namespace OnlineStore ...@@ -323,7 +323,7 @@ namespace OnlineStore
{ {
if (ShowMsg) if (ShowMsg)
{ {
LogUtil.error("No Language Resources:[" + id + "], please add"); LogUtil.debug("No Language Resources:[" + id + "], please add");
} }
return defaultStr; return defaultStr;
} }
...@@ -359,9 +359,9 @@ namespace OnlineStore ...@@ -359,9 +359,9 @@ namespace OnlineStore
{ {
return; return;
} }
if (ShowMsg) // if (ShowMsg)
{ {
LogUtil.info("No id:[" + id + "], please add,use default string :" + defaultStr); LogUtil.debug("No id:[" + id + "], please add,use default string :" + defaultStr);
} }
if (!defaultMap.ContainsKey(id)) if (!defaultMap.ContainsKey(id))
{ {
......
...@@ -312,4 +312,6 @@ WaitSingle,等待信号,Wait signal ...@@ -312,4 +312,6 @@ WaitSingle,等待信号,Wait signal
TimeOut,超时,Time out TimeOut,超时,Time out
Run,运行中,Runing Run,运行中,Runing
Runing,运行中,Runing Runing,运行中,Runing
OutStorEnd,出库完成,OutStorEnd
\ No newline at end of file \ No newline at end of file
OutStorEnd,出库完成,OutStorEnd
FrmStoreBox_btnCloseDLed_Text,关闭设备照明,Turn off lighting
FrmStoreBox_btnOpenDLed_Text,打开设备照明,Turn on lighting
\ No newline at end of file \ No newline at end of file
...@@ -136,3 +136,10 @@ DeCodeType=解码类型,0=halcon,1=zxing解码 西安料仓解析方式。2= ...@@ -136,3 +136,10 @@ DeCodeType=解码类型,0=halcon,1=zxing解码 西安料仓解析方式。2=
20200420 20200420
新建SISO项目,增加照明功能。 新建SISO项目,增加照明功能。
20200429
增加最大尺寸配置,
StoreConfig.csv增加一行配置:
PRO,大盘宽度(13寸或15寸),Big_TrayWidth,15,,,,,,,
\ No newline at end of file \ No newline at end of file
...@@ -135,3 +135,5 @@ PRO,特殊二维码尺寸配置,CodeSizeConfig,XA=13x48#XB=13x32,,,,,,, ...@@ -135,3 +135,5 @@ PRO,特殊二维码尺寸配置,CodeSizeConfig,XA=13x48#XB=13x32,,,,,,,
,,,,,,,,, , ,,,,,,,,, ,
PRO,扫码枪IP,Scanner_Ip,192.168.201.21,,,,,,, PRO,扫码枪IP,Scanner_Ip,192.168.201.21,,,,,,,
PRO,扫码枪端口号,Scanner_Port,51236,,,,,,, PRO,扫码枪端口号,Scanner_Port,51236,,,,,,,
,,,,,,,,, ,
PRO,大盘宽度(13寸或15寸),Big_TrayWidth,15,,,,,,,
...@@ -58,7 +58,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -58,7 +58,7 @@ namespace OnlineStore.DeviceLibrary
serverConnectTimer.Enabled = false; serverConnectTimer.Enabled = false;
serverConnectTimer.Elapsed += server_connect_timer_Tick; serverConnectTimer.Elapsed += server_connect_timer_Tick;
IoCheckTimer = new System.Timers.Timer(); IoCheckTimer = new System.Timers.Timer();
IoCheckTimer.Interval = 200; IoCheckTimer.Interval = 400;
IoCheckTimer.AutoReset = true; IoCheckTimer.AutoReset = true;
IoCheckTimer.Enabled = false; IoCheckTimer.Enabled = false;
IoCheckTimer.Elapsed += IoCheckTimer_Elapsed; IoCheckTimer.Elapsed += IoCheckTimer_Elapsed;
...@@ -124,12 +124,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -124,12 +124,20 @@ namespace OnlineStore.DeviceLibrary
{ {
if (isInSuddenDown.Equals(false)) if (isInSuddenDown.Equals(false))
{ {
isInSuddenDown = true; LogUtil.error(StoreName + "收到急停信号,等待100后再次验证急停");
LogUtil.error(LOGGER, StoreName + "收到急停信号,报警急停"); Task.Factory.StartNew(delegate
// WarnMsg = StoreName + "收到急停信号,报警急停"; {
SetWarnMsg(ResourceControl.inSuddenStop); Thread.Sleep(100);
//报警时会关闭所有轴 if (IOManager.IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW))
Alarm(StoreAlarmType.SuddenStop, "1", StoreMoveType.None); {
isInSuddenDown = true;
LogUtil.error(LOGGER, StoreName + "收到急停信号,报警急停");
// WarnMsg = StoreName + "收到急停信号,报警急停";
SetWarnMsg(ResourceControl.inSuddenStop);
//报警时会关闭所有轴
Alarm(StoreAlarmType.SuddenStop, "1", StoreMoveType.None);
}
});
} }
} }
else else
...@@ -921,14 +929,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -921,14 +929,20 @@ namespace OnlineStore.DeviceLibrary
doorIsOpen = true; doorIsOpen = true;
} }
//if (doorIsOpen) if (doorIsOpen)
//{ {
// IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH); if (IOManager.IOValue(IO_Type.Device_Led).Equals(IO_VALUE.LOW))
//} {
//else IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH);
//{ }
// IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.LOW); }
//} else
{
if (IOManager.IOValue(IO_Type.Device_Led).Equals(IO_VALUE.HIGH))
{
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.LOW);
}
}
} }
catch (Exception ex) catch (Exception ex)
...@@ -1567,11 +1581,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -1567,11 +1581,11 @@ namespace OnlineStore.DeviceLibrary
} }
} }
return message; return message;
} }
#endregion #endregion
#region 高度传感器处理 #region 高度传感器处理
private int smallWidth = 7;
// 0、1对应7寸盘,2对应13寸,3对应夹具 // 0、1对应7寸盘,2对应13寸,3对应夹具
public int GetSize() public int GetSize()
{ {
...@@ -1582,52 +1596,52 @@ namespace OnlineStore.DeviceLibrary ...@@ -1582,52 +1596,52 @@ namespace OnlineStore.DeviceLibrary
} }
if (Config.AIDI3_Addr < 0 ) if (Config.AIDI3_Addr < 0 )
{ {
return 7; return smallWidth;
} }
else if (Config.AIDI1_Addr < 0 || Config.AIDI2_Addr < 0) else if (Config.AIDI1_Addr < 0 || Config.AIDI2_Addr < 0)
{ {
return 13; return Config.Big_TrayWidth;
} }
else else
{ {
if (Get13Height() > 0) if (GetBigHeight() > 0)
{ {
return 13; return Config.Big_TrayWidth;
} }
return 7; return smallWidth;
} }
} }
public int GetHeight() public int GetHeight()
{ {
if (Config.Default_TrayWidth.Equals(7)) if (Config.Default_TrayWidth.Equals(smallWidth))
{ {
return Get7Height(); return GetSmallHeight();
} }
else if (Config.Default_TrayWidth.Equals(13)) else if (Config.Default_TrayWidth.Equals(Config.Big_TrayWidth))
{ {
return Get13Height(); return GetBigHeight();
} }
else else
{ {
int value = Get13Height(); int value = GetBigHeight();
if (value > 0) if (value > 0)
{ {
return value; return value;
} }
else else
{ {
return Get7Height(); return GetSmallHeight();
} }
} }
} }
private int Get7Height() private int GetSmallHeight()
{ {
if (Config.AIDI1_Addr < 0 || Config.AIDI2_Addr < 0) if (Config.AIDI1_Addr < 0 || Config.AIDI2_Addr < 0)
{ {
return 0; return 0;
} }
int result = 0; int result = 0;
if (Config.Default_TrayWidth.Equals(7).Equals(false)&&IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW)) if (Config.Default_TrayWidth.Equals(smallWidth).Equals(false)&&IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{ {
return result; return result;
} }
...@@ -1639,14 +1653,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -1639,14 +1653,14 @@ namespace OnlineStore.DeviceLibrary
} }
private int Get13Height() private int GetBigHeight()
{ {
if (Config.AIDI3_Addr < 0||Config.AIDI4_Addr<0) if (Config.AIDI3_Addr < 0||Config.AIDI4_Addr<0)
{ {
return 0; return 0;
} }
int result = 0; int result = 0;
if (Config.Default_TrayWidth.Equals(13).Equals(false) && IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW)) if (Config.Default_TrayWidth.Equals(Config.Big_TrayWidth).Equals(false) && IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{ {
return result; return result;
} }
......
...@@ -560,6 +560,12 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -560,6 +560,12 @@ namespace OnlineStore.LoadCSVLibrary
/// /// </summary> /// /// </summary>
[ConfigProAttribute("AI_ConvertPosition")] [ConfigProAttribute("AI_ConvertPosition")]
public int AI_ConvertPosition { get; set; } public int AI_ConvertPosition { get; set; }
/// <summary>
/// PRO,大盘宽度(13寸或15寸),Big_TrayWidth,15,,,,,,,
/// /// </summary>
[ConfigProAttribute("Big_TrayWidth")]
public int Big_TrayWidth { get; set; }
private Dictionary<string, string> CodeSizeMap =null ; private Dictionary<string, string> CodeSizeMap =null ;
private static char codeSpilt= '#'; private static char codeSpilt= '#';
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!