Commit 93496598 LN

高度改为7,13,15寸

1 个父辈 8b1af1d0
...@@ -8,82 +8,6 @@ ...@@ -8,82 +8,6 @@
//机器未启动 灭 灭 灭 //机器未启动 灭 灭 灭
//机器设备故障(非温湿度)报警 亮 灭 闪 //机器设备故障(非温湿度)报警 亮 灭 闪
20181213
在RC26联电项目基础上拉取分支,作为RC33珠海料仓项目。
需要修改内容:扫码改为通用扫码类型。
硕科改为实时返回数据的通讯方式。
硕科压紧轴需要增加机构检测信号的处理。
20181221调试
复位时有时旋转轴没有复位,,但是正常到p1点了.
料仓门口的料盘检测信号亮时,才需要判断高度。
伺服回原点时如果原点亮就需要反向走。
启用压紧轴计量检测。
20190108
报警时只需要红灯闪烁。
出库时修改:出料口有料时,出料仍继续。
20190114
增加一维码类型,Barcode,可与二维码一起配置
20190114
改为伺服串联兼容模式
20190116
从RC33珠海料仓拉取分支,作为RC29-33项目,即西安料仓三台,苏州博世料仓二台。
新拉分支:RC-29-ACSingleStore 作为RC29西安料仓三台的代码备份。
分支 :RC-29-32-ACSingleStore 上进行RC32苏州博世两台料仓的内容修改。
20190312
1.测高AI模块BUG修改。
2.出库增加缓存功能,若出库失败也放入缓存。
3.增加启用调试开关。
4.客户端启动时默认状态是复位中。
20190326修改:
伺服若已在原点但未回过原点,需要匀速走1500秒,再回原点
20190410
如果是7*32的料格,升降轴先上升,压紧轴再运动
增加新温控器:妙昕温湿度记录仪文档
20190411
增加相机重新加载功能
增加新的温湿度代码。
20190505
温湿度功能修改,增加温湿度报警显示。
FA开头的二维码,默认为7*32
20190606
进入IO界面需要一直读取测高值。
压紧轴回原点增加自动重复运动功能。
20190730
RC29项目西安料仓扫码需要用zxing才能识别,增加配置
<!--解码方式,0=halcon 解码,1=使用zxing解码-->
<add key="DeCodeType" value="1"/>
西安料仓,有两种料盒,二维码定义如下:
XA 开头的二维码,默认为 13*48
XB 开头的二维码,默认为 13*
20190812修改: StoreConfig增加配置
PRO,默认的料盘宽度(多种尺寸为0),Default_TrayWidth,0,,,,,,,
PRO,特殊二维码尺寸配置,CodeSizeConfig,XA=13x48#XB=13x32#FA=7x32,,,,,,,
二维码特殊尺寸改为可配置。
20190920修改:
1.密码默认值改为配置值。
2.相机名称 未配置时可以自动默认配置。
DeCodeType=解码类型,0=halcon,1=zxing解码 西安料仓解析方式。2=成都料仓 PN;RI; DeCodeType=解码类型,0=halcon,1=zxing解码 西安料仓解析方式。2=成都料仓 PN;RI;
...@@ -160,3 +84,4 @@ PRO,大盘宽度(13寸或15寸),Big_TrayWidth,15,,,,,,, ...@@ -160,3 +84,4 @@ PRO,大盘宽度(13寸或15寸),Big_TrayWidth,15,,,,,,,
SO608项目。
\ No newline at end of file \ No newline at end of file
...@@ -1582,7 +1582,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1582,7 +1582,7 @@ namespace OnlineStore.DeviceLibrary
#region 高度传感器处理 #region 高度传感器处理
private int smallWidth = 7; private int smallWidth = 7;
// 0、1对应7寸盘,2对应13寸,3对应夹具 // 0、1对应7寸盘,2对应13寸,3对应15
public int GetSize() public int GetSize()
{ {
if (Config.Default_TrayWidth > 0) if (Config.Default_TrayWidth > 0)
...@@ -1590,21 +1590,32 @@ namespace OnlineStore.DeviceLibrary ...@@ -1590,21 +1590,32 @@ namespace OnlineStore.DeviceLibrary
//如果配置了默认宽度,使用默认宽度且不能修改 //如果配置了默认宽度,使用默认宽度且不能修改
return Config.Default_TrayWidth; return Config.Default_TrayWidth;
} }
if (Config.AIDI3_Addr < 0 ) if (Config.AIDI3_Addr < 0 || Config.AIDI4_Addr <= 0)
{ {
return smallWidth; return smallWidth;
} }
else if (Config.AIDI1_Addr < 0 || Config.AIDI2_Addr < 0) else if (Config.AIDI1_Addr < 0 || Config.AIDI2_Addr < 0)
{ {
return Config.Big_TrayWidth; if (Get15Height() > 0)
{
return 15;
} }
else else if (Get13Height() > 0)
{ {
if (GetBigHeight() > 0) return 13;
}
}
if (Get15Height() > 0)
{ {
return Config.Big_TrayWidth; return 15;
} }
return smallWidth; else if (Get13Height() > 0)
{
return 13;
}
else
{
return 7;
} }
} }
public int GetHeight() public int GetHeight()
...@@ -1613,21 +1624,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -1613,21 +1624,19 @@ namespace OnlineStore.DeviceLibrary
{ {
return GetSmallHeight(); return GetSmallHeight();
} }
else if (Config.Default_TrayWidth.Equals(Config.Big_TrayWidth))
{
return GetBigHeight();
}
else else
{ {
int value = GetBigHeight(); int h15 = Get15Height();
if (value > 0) if (h15 > 0)
{ {
return value; return h15;
} }
else int h13 = Get13Height();
if (h13 > 0)
{ {
return GetSmallHeight(); return h13;
} }
return GetSmallHeight();
} }
} }
private int GetSmallHeight() private int GetSmallHeight()
...@@ -1637,7 +1646,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1637,7 +1646,7 @@ namespace OnlineStore.DeviceLibrary
return 0; return 0;
} }
int result = 0; int result = 0;
if (Config.Default_TrayWidth.Equals(smallWidth).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;
} }
...@@ -1649,20 +1658,34 @@ namespace OnlineStore.DeviceLibrary ...@@ -1649,20 +1658,34 @@ namespace OnlineStore.DeviceLibrary
} }
private int GetBigHeight() private int Get13Height()
{ {
if (Config.AIDI3_Addr < 0||Config.AIDI4_Addr<0) if (Config.AIDI3_Addr < 0)
{ {
return 0; return 0;
} }
int result = 0; int result = 0;
if (Config.Default_TrayWidth.Equals(Config.Big_TrayWidth).Equals(false) && IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW)) if (IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{ {
return result; return result;
} }
double ai1Value = AIManager.ConvertAI(AIManager.Instance.GetAIValue(Config.AIDevice_IP, Config.AIDI3_Addr), Config.AIDI3_DefaultPosition); double ai1Value = AIManager.ConvertAI(AIManager.Instance.GetAIValue(Config.AIDevice_IP, Config.AIDI3_Addr), Config.AIDI3_DefaultPosition);
double ai2Value = AIManager.ConvertAI(AIManager.Instance.GetAIValue(Config.AIDevice_IP, Config.AIDI4_Addr), Config.AIDI4_DefaultPosition); double Value = Math.Round((ai1Value) / 1, 1);
double Value = Math.Round((ai1Value + ai2Value) / 2, 1); return CalHeight(Value);
}
private int Get15Height()
{
if (Config.AIDI4_Addr < 0)
{
return 0;
}
int result = 0;
if (IOManager.IOValue(IO_Type.TrayCheck_Door).Equals(IO_VALUE.LOW))
{
return result;
}
double ai1Value = AIManager.ConvertAI(AIManager.Instance.GetAIValue(Config.AIDevice_IP, Config.AIDI4_Addr), Config.AIDI4_DefaultPosition);
double Value = Math.Round((ai1Value) / 1, 1);
return CalHeight(Value); return CalHeight(Value);
} }
...@@ -1679,7 +1702,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1679,7 +1702,7 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
result = (int)Math.Floor(1F * (Value ) / 4) * 4; result = (int)Math.Floor(1F * (Value) / 4) * 4;
if (result <= 8) if (result <= 8)
{ {
result = 8; result = 8;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!