Commit ac6deef9 LN

增加最大宽度配置

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