Commit 41366583 张东亮

超级配置分组显示

1 个父辈 09290e65
...@@ -14,34 +14,56 @@ namespace OnlineStore.Common ...@@ -14,34 +14,56 @@ namespace OnlineStore.Common
{ {
[MyConfigComment("当前默认语言")] [MyConfigComment("当前默认语言")]
public static MyConfig<string> Device_Default_Language = "zh-CN"; public static MyConfig<string> App_Default_Language = "zh-CN";
[MyConfigComment("系统启动时自动启动料仓,=1时自动启动,并隐藏窗口,=0时不需要")] [MyConfigComment("系统启动时自动启动料仓,=1时自动启动,并隐藏窗口,=0时不需要")]
public static MyConfig<int> App_AutoRun = 0; public static MyConfig<int> App_AutoRun = 0;
[MyConfigComment("系统主界面标题")] [MyConfigComment("系统主界面标题")]
public static MyConfig<string> App_Title = "SMD BOX MIMO G2"; public static MyConfig<string> App_Title = "SMD BOX MIMO G2";
/// <summary> [MyConfigComment("湿度修正值,写负数 -5等于减5")]
/// 摄像机名称 public static MyConfig<int> App_humidityadjust = 0;
/// </summary> [MyConfigComment("湿度修正最低值,防止修正过头")]
public static string CameraName = "CameraName"; public static MyConfig<int> App_humiditylimited = 0;
[MyConfigComment("SMF服务器地址")]
public static MyConfig<string> App_http_server = "http://localhost/smf-core";
[MyConfigComment("料仓CID")]
public static MyConfig<string> App_CID = "01";
[MyConfigComment("温湿度串口号")]
public static MyConfig<string> App_Humiture_Port = "COM1";
[MyConfigComment("启动吹气的湿度偏移值,即当前湿度+偏移量>最大温湿度时吹气")]
public static MyConfig<double> App_HumidityStartOffser = 1;
[MyConfigComment("停止吹气的湿度偏移值,即当前湿度+偏移量<最大温湿度时停止吹气")]
public static MyConfig<double> App_HumidityEndOffser = 10;
///// <summary>
///// 摄像机名称
///// </summary>
[MyConfigComment("相机名称")]
public static MyConfig<string> Camera_CameraName = "CameraName";
[MyConfigComment("条码类型")] [MyConfigComment("条码类型")]
public static MyConfig<string> CodeType = "QR Code"; public static MyConfig<string> Camera_CodeType = "QR Code";
[MyConfigComment("条码解码参数路径")] [MyConfigComment("条码解码参数路径")]
public static MyConfig<string> CodeParamPath = ""; public static MyConfig<string> Camera_CodeParamPath = "";
[MyConfigComment("筛选条码数量")] [MyConfigComment("筛选条码数量")]
public static MyConfig<int> QRCodeCount = 3; public static MyConfig<int> Camera_QRCodeCount = 3;
[MyConfigComment("解码的超时时间")] [MyConfigComment("解码的超时时间")]
public static MyConfig<int> CodeTimeOut = 1000; public static MyConfig<int> Camera_CodeTimeOut = 1000;
/// <summary> /// <summary>
/// 校准库位的料盘信息 /// 校准库位的料盘信息
/// </summary> /// </summary>
[MyConfigComment("校准库位的料盘信息")] [MyConfigComment("校准库位的料盘信息")]
public static MyConfig<string> FixBuffInfo = ""; public static MyConfig<string> Buffer_FixBuffInfo = "";
[MyConfigComment("进出轴运动负载阈值")] [MyConfigComment("进出轴运动负载阈值")]
public static MyConfig<float> Device_InOutMaxLoadRate = 50; public static MyConfig<float> LoadRateLimit_InOutMaxLoadRate = 50;
[MyConfigComment("提升轴运动负载阈值")] [MyConfigComment("提升轴运动负载阈值")]
public static MyConfig<float> Device_BatchMaxLoadRate = 50; public static MyConfig<float> LoadRateLimit_BatchMaxLoadRate = 50;
[MyConfigComment("管理员密码")] [MyConfigComment("管理员密码")]
public static MyConfig<string> User_AdminPassword = "123456"; public static MyConfig<string> User_AdminPassword = "123456";
[MyConfigComment("启用管理员密码")] [MyConfigComment("启用管理员密码")]
...@@ -49,38 +71,40 @@ namespace OnlineStore.Common ...@@ -49,38 +71,40 @@ namespace OnlineStore.Common
#region 料盘高度计算参数 #region 料盘高度计算参数
[MyConfigComment("启用自定义厚度计算策略")] [MyConfigComment("启用自定义厚度计算策略")]
public static MyConfig<bool> Switch_UseCustHeightList = false; public static MyConfig<bool> CalHeight_EnableCustHeightList = false;
/// <summary> /// <summary>
/// 宽度15料盘,厚度自减mm /// 宽度15料盘,厚度自减mm
/// </summary> /// </summary>
[MyConfigComment("宽度15料盘,厚度自减mm")] [MyConfigComment("宽度15料盘,厚度自减mm")]
public static MyConfig<int> Param_CalHeight_Width15HeightSubVal = 2; public static MyConfig<int> CalHeight_Width15HeightSubVal = 2;
/// <summary> /// <summary>
/// 宽度13料盘,厚度自减mm /// 宽度13料盘,厚度自减mm
/// </summary> /// </summary>
[MyConfigComment("宽度13料盘,厚度自减mm")] [MyConfigComment("宽度13料盘,厚度自减mm")]
public static MyConfig<int> Param_CalHeight_Width13HeightSubVal = 1; public static MyConfig<int> CalHeight_Width13HeightSubVal = 1;
[MyConfigComment("如果计算出的厚度小于指定值,都归类为8mm")] [MyConfigComment("如果计算出的厚度小于指定值,都归类为8mm")]
public static MyConfig<int> Param_CalHeight_Height8MaxVal = 12; public static MyConfig<int> CalHeight_Height8MaxVal = 12;
[MyConfigComment("自定义厚度列表")] [MyConfigComment("自定义厚度列表")]
public static MyConfig<string[]> Param_CalHeight_HeightList = new string[] { "12=12#16", "16=16#24", "24=24#32", "32=32#44", "44=44#56", "56=56#60" }; public static MyConfig<string[]> CalHeight_HeightList = new string[] { "12=12#16", "16=16#24", "24=24#32", "32=32#44", "44=44#56", "56=56#60" };
#endregion #endregion
[MyConfigComment("出库厚度检测下偏差的值")] [MyConfigComment("出库厚度检测下偏差的值")]
public static MyConfig<int> OutstoreHeightCheckLowerDeviation = 5; public static MyConfig<int> Outstore_HeightCheckLowerDeviation = 5;
[MyConfigComment("出库厚度检测上偏差的值")] [MyConfigComment("出库厚度检测上偏差的值")]
public static MyConfig<int> OutstoreHeightCheckUpperDeviation = 3; public static MyConfig<int> Outstore_HeightCheckUpperDeviation = 3;
[MyConfigComment("出库料盘定位信号对射触发位置高度偏差")] [MyConfigComment("料盘最大厚度,用于出库,最后一盘位置小于该高厚度则将下降")]
public static MyConfig<int> ReelCheckTriggerDeviation = 5; public static MyConfig<int> Outstore_ReelMaxHeightMM = 60;
[MyConfigComment("出库时,是否启用定位旋转气缸检测料盘")]
public static MyConfig<bool> OutStore_StringReelCheck = false;
[MyConfigComment("是否禁止单盘入库")] [MyConfigComment("出库料盘定位信号对射触发位置高度偏差")]
public static MyConfig<bool> DisableSingleReelIn = false; public static MyConfig<int> ReelCheckTriggerDeviation = 5;
[MyConfigComment("是否启用上料提升轴的料叉检测")] [MyConfigComment("没有出库任务, 料串在待机点取释放料串")]
public static MyConfig<bool> Swicth_BatchFixCheck = false; public static MyConfig<bool> StringStandbyAtBottom = true;
[MyConfigComment("空料串到P2点与料盘定位信号补偿值")]
public static MyConfig<int> OffsetEmptyToTrayCheck = 10;
[MyConfigComment("料串门光栅触发处理方式:0-设备急停;1-仅料串门停止")]
public static MyConfig<int> StringDoor_SafetyLightCurtainsProcStrategy = 1;
[MyConfigComment("是否启用AGV")] [MyConfigComment("是否启用AGV")]
public static MyConfig<bool> AGV_Enable = false; public static MyConfig<bool> AGV_Enable = false;
...@@ -93,15 +117,7 @@ namespace OnlineStore.Common ...@@ -93,15 +117,7 @@ namespace OnlineStore.Common
[MyConfigComment("AGV节点名称")] [MyConfigComment("AGV节点名称")]
public static MyConfig<string> AGV_NodeName = "MIMO"; public static MyConfig<string> AGV_NodeName = "MIMO";
[MyConfigComment("库位高低点最大相差的值")] #region 视觉检查NG平台
public static MyConfig<int> UpDownAxis_Position_MaxRange = 30000;
[MyConfigComment("湿度修正值,写负数 -5等于减5")]
public static MyConfig<int> Device_humidityadjust = 0;
[MyConfigComment("湿度修正最低值,防止修正过头")]
public static MyConfig<int> Device_humiditylimited = 0;
[MyConfigComment("是否使用一维码检测料盘在NG平台")] [MyConfigComment("是否使用一维码检测料盘在NG平台")]
public static MyConfig<bool> CamTestReel_useBarcode = false; public static MyConfig<bool> CamTestReel_useBarcode = false;
[MyConfigComment("NG平台一维码检测料盘:一维码的内容")] [MyConfigComment("NG平台一维码检测料盘:一维码的内容")]
...@@ -111,7 +127,6 @@ namespace OnlineStore.Common ...@@ -111,7 +127,6 @@ namespace OnlineStore.Common
public static MyConfig<int> CamTestReel_barcodeThreshold = 2; public static MyConfig<int> CamTestReel_barcodeThreshold = 2;
[MyConfigComment("是否打开NG平台检测料盘调试")] [MyConfigComment("是否打开NG平台检测料盘调试")]
public static MyConfig<bool> CamTestReel_debug = false; public static MyConfig<bool> CamTestReel_debug = false;
[MyConfigComment("NG平台颜色检测料盘:总的覆盖数量")] [MyConfigComment("NG平台颜色检测料盘:总的覆盖数量")]
public static MyConfig<int> CamTestReel_totalcover = 69577; public static MyConfig<int> CamTestReel_totalcover = 69577;
[MyConfigComment("NG平台颜色检测料盘:色相H的最低值")] [MyConfigComment("NG平台颜色检测料盘:色相H的最低值")]
...@@ -130,71 +145,69 @@ namespace OnlineStore.Common ...@@ -130,71 +145,69 @@ namespace OnlineStore.Common
public static MyConfig<bool> CamTestReel_Ability = false; public static MyConfig<bool> CamTestReel_Ability = false;
[MyConfigComment("NG平台颜色检测料盘:阈值设置,小于该值认为有料")] [MyConfigComment("NG平台颜色检测料盘:阈值设置,小于该值认为有料")]
public static MyConfig<double> CamTestReel_threshold = 0.6; public static MyConfig<double> CamTestReel_threshold = 0.6;
#endregion
[MyConfigComment("是否单进单出")]
public static MyConfig<bool> Device_SingleInSingleOut = false;
[MyConfigComment("SMF服务器地址")]
public static MyConfig<string> http_server = "";
[MyConfigComment("料仓CID")]
public static MyConfig<string> CID = "";
[MyConfigComment("温湿度串口号")]
public static MyConfig<string> Device_Humiture_Port = "CMO1";
[MyConfigComment("屏蔽升降轴保护")] [MyConfigComment("屏蔽升降轴保护")]
public static MyConfig<bool> Device_DisableUpdownProtect = true; public static MyConfig<bool> Disable_UpdownProtect = true;
[MyConfigComment("屏蔽单料门")] [MyConfigComment("屏蔽单料门")]
public static MyConfig<bool> Device_DisableSingleDoor = false; public static MyConfig<bool> Disable_SingleDoor = false;
[MyConfigComment("屏蔽料串门")] [MyConfigComment("屏蔽料串门")]
public static MyConfig<bool> Device_Disable_StringDoor = false; public static MyConfig<bool> Disable_StringDoor = false;
[MyConfigComment("是否启用在校准库位检查料盘功能")]
public static MyConfig<bool> Func_CheckReelLocInFix = false;
[MyConfigComment("关闭日志窗口")] [MyConfigComment("关闭日志窗口")]
public static MyConfig<bool> Device_DisableLogWindow = true; public static MyConfig<bool> Disable_LogWindow = true;
[MyConfigComment("屏蔽门安全检查")]
public static MyConfig<bool> Disable_DoorSafeCheck = false;
[MyConfigComment("是否禁止单盘入库,禁用时服务端不显示单盘入库按钮")]
public static MyConfig<bool> Disable_SingleReelIn = false;
[MyConfigComment("是否启用上料提升轴的料叉检测")]
public static MyConfig<bool> Enable_BatchFixCheck = false;
[MyConfigComment("是否启用在校准库位检查料盘功能")]
public static MyConfig<bool> Enable_CheckReelLocInFix = false;
[MyConfigComment("启用蜂鸣器")] [MyConfigComment("启用蜂鸣器")]
public static MyConfig<bool> Device_EnableBuzzer = true; public static MyConfig<bool> Enable_Buzzer = true;
[MyConfigComment("是否使用校准库位")]
public static MyConfig<bool> Enable_Fixpos = false;
[MyConfigComment("是否启用单盘入库,启用则可指定尺寸,在单料口入库")]
public static MyConfig<bool> Enable_SingleInSingleOut = false;
[MyConfigComment("是否启用手动关单料门")]
public static MyConfig<bool> Enable_SingleDoor_ManualClose = false;
[MyConfigComment("料盘最大厚度,用于出库,最后一盘位置小于该高厚度则将下降")]
public static MyConfig<int> ReelMaxHeightMM = 60;
[MyConfigComment("没有出库任务, 料串在待机点取释放料串")]
public static MyConfig<bool> Device_String_StandbyAtBottom = true;
[MyConfigComment("出库时,是否启用定位旋转气缸检测料盘")]
public static MyConfig<bool> Device_OutStoreStringReelCheck = false;
[MyConfigComment("压紧轴回原失败重试最大次数")] [MyConfigComment("压紧轴回原失败重试最大次数")]
public static MyConfig<int> Comp_Axis_HomeResetTimes = 999; public static MyConfig<int> Comp_Axis_HomeResetTimes = 999;
[MyConfigComment("大于7寸料盘高度补偿(mm),进而调整压紧轴压紧点")]
public static MyConfig<int> Comp_1315_ReelHeight_Compensation = 0;
[MyConfigComment("是否使用校准库位")]
public static MyConfig<bool> Device_Use_Fixpos = false;
[MyConfigComment("X08 AGV到位信号是否是料串门光栅")] [MyConfigComment("X08 AGV到位信号是否是料串门光栅")]
public static MyConfig<bool> Device_IO_X08IsStringDoor_SafetyLightCurtains = false; public static MyConfig<bool> StringDoor_X08IsStringDoor_SafetyLightCurtains = false;
[MyConfigComment("料串门关闭延时,到位信号亮后延时一定时间再停止")] [MyConfigComment("料串门关闭延时,到位信号亮后延时一定时间再停止")]
public static MyConfig<int> Device_StringDoor_DownOverTimeMS = 0; public static MyConfig<int> StringDoor_DownOverTimeMS = 0;
[MyConfigComment("料串门打开延时,到位信号亮后延时一定时间再停止")] [MyConfigComment("料串门打开延时,到位信号亮后延时一定时间再停止")]
public static MyConfig<int> Device_StringDoor_UpOverTimeMS = 0; public static MyConfig<int> StringDoor_UpOverTimeMS = 0;
[MyConfigComment("料串门光栅触发处理方式:0-设备急停;1-仅料串门停止")]
public static MyConfig<int> StringDoor_SafetyLightCurtainsProcStrategy = 1;
[MyConfigComment("屏蔽门安全检查")]
public static MyConfig<bool> Device_Disable_DoorSafeCheck = false;
[MyConfigComment("是否启用手动关单料门")] [MyConfigComment("库位高低点最大相差的值")]
public static MyConfig<bool> Device_ManualCloseSingleDoor = false; public static MyConfig<int> Protection_ReelUpDownAxis_MaxRange = 30000;
[MyConfigComment("入库料盘拿走后,料串下降一段距离")] [MyConfigComment("入库料盘拿走后,料串下降一段距离")]
public static MyConfig<int> Batch_ReelGetedDownMM = 8; public static MyConfig<int> Batch_ReelGetedDownMM = 8;
[MyConfigComment("大于7寸料盘高度补偿(mm),进而调整压紧轴压紧点")]
public static MyConfig<int> Device_1315_ReelHeight_Compensation = 0;
[MyConfigComment("启动吹气的湿度偏移值,即当前湿度+偏移量>最大温湿度时吹气")]
public static MyConfig<double> Device_HumidityStartOffser = 1;
[MyConfigComment("停止吹气的湿度偏移值,即当前湿度+偏移量<最大温湿度时停止吹气")]
public static MyConfig<double> Device_HumidityEndOffser = 10; [MyConfigComment("是否启用指定尺寸执行单盘出库,如治具只能单盘出,无法放到料串情况")]
[MyConfigComment("空料串到P2点与料盘定位信号补偿值")] public static MyConfig<bool> SingleInOut_EnableSpecfiedSize = false;
public static MyConfig<int> OffsetEmptyToTrayCheck = 10; [MyConfigComment("单盘出入库的指定尺寸-宽度")]
public static MyConfig<int> SingleInOut_ReelWidth = 7;
[MyConfigComment("单盘出入库的指定尺寸-高度")]
public static MyConfig<int> SingleInOut_ReelHeight = 20;
} }
} }
...@@ -95,9 +95,9 @@ namespace OnlineStore.Common ...@@ -95,9 +95,9 @@ namespace OnlineStore.Common
public static ASTemperateParam QueryData() public static ASTemperateParam QueryData()
{ {
//修正值, 配置中写负数 -5等于减5 //修正值, 配置中写负数 -5等于减5
var humidityadjust = Setting_Init.Device_humidityadjust; var humidityadjust = Setting_Init.App_humidityadjust;
//最低值,防止修正过头 //最低值,防止修正过头
var humiditylimited = Setting_Init.Device_humiditylimited; var humiditylimited = Setting_Init.App_humiditylimited;
ASTemperateParam param = new ASTemperateParam(0, 0); ASTemperateParam param = new ASTemperateParam(0, 0);
List<double> data = queryData(); List<double> data = queryData();
if (data.Count.Equals(2)) if (data.Count.Equals(2))
......
...@@ -11,7 +11,7 @@ namespace OnlineStore.Common ...@@ -11,7 +11,7 @@ namespace OnlineStore.Common
public class SMF public class SMF
{ {
public static string DeviceType = "MIMO_G2"; public static string DeviceType = "MIMO_G2";
static string _server = Setting_Init.http_server; static string _server = Setting_Init.App_http_server;
static string server static string server
{ {
get get
......
{
"HIKIPCamera": [
{
"Name": "cam1",
"IP": "192.168.105.25",
"User": "admin",
"Password": "Acc123456",
"Port": 8000
}
]
}
\ No newline at end of file \ No newline at end of file
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速时间,减速时间,原点低速度,原点高速,原点加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,,旋转机构,Middle_Axis,0,HC,,60000,0,0,0,10000,0,10,700,0,0
AXIS,,升降机构,UpDown_Axis,1,HC,,20000,0,0,0,40000,0,10,700,0,0
AXIS,,进出机构,InOut_Axis,2,HC,,100000,0,0,0,40000,0,10,700,0,0
AXIS,,压紧机构,Comp_Axis,3,HC,,40000,0,0,0,30000,0,10,700,0,0
AXIS,,上料提升机构,Batch_Axis,4,HC,,40000,0,0,0,20000,0,10,700,0,0
AXIS,,取料机构,Clamp_Axis,5,HC,,40000,0,0,0,30000,0,10,700,0,0
AXIS,,左翻转托盘,FlipDoor_L_Axis,6,HC,,40000,0,0,0,30000,0,10,700,0,0
AXIS,,右翻转托盘,FlipDoor_R_Axis,7,HC,,40000,0,0,0,30000,0,10,700,0,0
AXIS,,料串口折叠门,StringDoor_Axis,8,HC,,40000,0,0,0,30000,0,10,700,0,0
,,,,,,,,,,,,,,,,
PRO,50,IO信号超时时间(秒),IOSingle_TimerOut,5,,,,,,,,,,,,
PRO,0,气压检测超时,AirCheckSeconds,5,,,,,,,,,,,,
PRO,50,最后一盘料补充高度mm,LastTrayAddHeight,3,,,,,,,,,,,,
PRO,50,翻转托盘行程,FlipDoorLength,20000,,,20000,,,,,,,,,
PRO,50,折叠门行程,StringDoorLength,75000,,,200000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,10,旋转机构待机点P1,Middle_P1,168460,,,50000,,,,,,,,,
PRO,10,旋转机构单料口P2,Middle_P2,168460,,,50000,,,,,,,,,
PRO,10,旋转机构料串P3,Middle_P3,168460,,,80000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,11,升降轴待机点P1,UpDown_P1,1006626,,,500000,,,,,,,,,
PRO,11,升降轴单料口高点P2,UpDown_P2,1051119,,,280000,,,,,,,,,
PRO,11,升降轴单料口低点P3,UpDown_P3,1015409,,,280000,,,,,,,,,
PRO,11,升降轴料串放料高点P3,UpDown_P4,682777,,,280000,,,,,,,,,
PRO,11,升降轴料串放料低点P4,UpDown_P5,659963,,,280000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,12,进出机构待机点P1,InOut_P1,0,,,500000,,,,,,,,,
PRO,12,进出机构单料口P2,InOut_P2,234184,,,500000,,,,,,,,,
PRO,12,进出机构料串放料P3,InOut_P3,234184,,,500000,,,,,,,,,
PRO,12,进出机构13/15寸料串放料P4,InOut_P4,234184,,,500000,,,,,,,,,
PRO,12,进出机构13/15寸单料口P5,InOut_P5,234184,,,500000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,13,压紧机构待机点P1,Comp_P1,12190,,,280000,,,,,,,,,
PRO,13,压紧机构8mm盘压紧点P2,Comp_P2,46000,,,280000,,,,,,,,,
PRO,13,压紧机构每毫米脉冲,Comp_PoToMM,1000,,,,,,,,,,,,
PRO,13,压紧机构库位高点偏移MM,Comp_PH_MM,14,,,,,,,,,,,,
PRO,13,压紧机构压紧点偏移mm,Comp_PL_MM,0,,,,,,,,,,,,
PRO,0,压紧机构压紧点集合P2,Comp_P2_List,8=44201;12=38557;16=34550;20=30540;24=26030,,,800000,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,14,上料提升机构待机点P1,Batch_P1,0,,,30000,,,,,,,,,
PRO,14,上料提升机构上料高点P2,Batch_P2,715329,,,30000,,,,,,,,,
PRO,14,上料提升机构高度转换系数,Batch_PoToMM,2300,,,,,,,,,,,,
PRO,14,接触料盘后下降mm,Batch_DetectDownMM,15,,,,,,,,,,,,
PRO,14,出库时初始下降mm,Batch_OutStoreDownMM,30,,,,,,,,,,,,
PRO,14,出库时每盘料补偿mm,Batch_OutPlateDownMM,4,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
PRO,15,取料机构待机点P1,Clamp_P1,0,,,200000,,,,,,,,,
PRO,15,取料机构料串取料P2,Clamp_P2,596495,,,200000,,,,,,,,,
PRO,15,取料机构单料口8mm放料P3,Clamp_P3,270518,,,200000,,,,,,,,,
PRO,15,取料机构高度转换系数,Clamp_PoToMM,1000,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,
DI,0,急停,SuddenStop_BTN,0,HC,X00,,,,,,,,,,
DI,0,复位,Reset_BTN,1,HC,X01,,,,,,,,,,
DI,0,自动启动,AutoRun_Single,2,HC,X02,,,,,,,,,,
DI,0,气压检测,Airpressure_Check,3,HC,X03,,,,,,,,,,
DI,0,仓门口安全光栅,SafetyLightCurtains,4,HC,X04,,,,,,,,,,
DI,0,左侧防护门关闭,LeftDoorClose_Check,5,HC,X05,,,,,,,,,,
DI,0,右侧防护门关闭,RightDoorClose_Check,6,HC,X06,,,,,,,,,,
DI,0,后侧防护门关闭,BackDoorClose_Check,7,HC,X07,,,,,,,,,,
DI,0,AGV到位信号,AGV_OnPosition,8,HC,X08,,,,,,,,,,
DI,0,进料线体前端料串检测,StringFront_Check,9,HC,X09,,,,,,,,,,
DI,0,进料线体末端料串检测,StringBack_Check,10,HC,X10,,,,,,,,,,
DI,0,进料线体料串固定上升端,StringFix_Top,11,HC,X11,,,,,,,,,,
DI,0,进料线体料串固定下降端,StringFix_Bottom,12,HC,X12,,,,,,,,,,
DI,0,上料定位料盘检测,TrayCheck,13,HC,X13,,,,,,,,,,
DI,0,上料定位旋转气缸定位端,StringPosChecker_Work,14,HC,X14,,,,,,,,,,
DI,0,上料定位旋转气缸避让端,StringPosChecker_Home,15,HC,X15,,,,,,,,,,
DI,0,上料机构折叠门打开端,StringDoor_Open,16,HC,X16,,,,,,,,,,
DI,0,上料机构折叠门关闭端,StringDoor_Close,17,HC,X17,,,,,,,,,,
DI,0,7寸料盘检测,WidthCheck_7,18,HC,X18,,,,,,,,,,
DI,0,13寸料盘检测,WidthCheck_13,19,HC,X19,,,,,,,,,,
DI,0,15寸料盘检测,WidthCheck_15,20,HC,X20,,,,,,,,,,
DI,0,料口翻板旋转端(右侧),ReelFlipDoor_R_Home,21,HC,X21,,,,,,,,,,
DI,0,料口翻板水平端(右侧),ReelFlipDoor_R_Work,22,HC,X22,,,,,,,,,,
DI,0,夹爪气缸夹紧端,Clamping_Work,23,HC,X23,,,,,,,,,,
DI,0,夹爪气缸放松端,Clamping_Relax,24,HC,X24,,,,,,,,,,
DI,0,料口翻板旋转端(左侧),ReelFlipDoor_L_Home,25,HC,X25,,,,,,,,,,
DI,0,料口翻板水平端(左侧),ReelFlipDoor_L_Work,26,HC,X26,,,,,,,,,,
DI,0,单料口门上升端,NGDoor_Open,27,HC,X27,,,,,,,,,,
DI,0,单料口门下降端,NGDoor_Close,28,HC,X28,,,,,,,,,,
DI,0,单料口料盘检测,NGDoor_Tray_Check,29,HC,X29,,,,,,,,,,
DI,0,料叉机构料盘检测,TrayCheck_Fixture,30,HC,X30,,,,,,,,,,
DI,0,上料提升轴料叉检测,Laser_Location,31,HC,X31,,,,,,,,,,
,,,,,,,,,,,,,,,,
DO,0,自动指示灯,Run_Led,0,HC,Y00,,,,,,,,,,
DO,0,故障指示灯,Alarm_Led,1,HC,Y01,,,,,,,,,,
DO,0,待机指示灯,Standby_Led,2,HC,Y02,,,,,,,,,,
DO,0,报警蜂鸣器,Alarm_Buzzer,3,HC,Y03,,,,,,,,,,
DO,0,门禁功能屏蔽,DoorSafe_Disable,4,HC,Y04,,,,,,,,,,
DO,0,设备照明开启,Device_Led,5,HC,Y05,,,,,,,,,,
DO,0,相机光源开启,Camera_Led,6,HC,Y06,,,,,,,,,,
DO,0,氮气阀门开启,NitrogenValve,7,HC,Y07,,,,,,,,,,
DO,0,进料线体正转,LineRun,8,HC,Y08,,,,,,,,,,
DO,0,进料线体反转,LineRev,9,HC,Y09,,,,,,,,,,
DO,0,单料口门上升,NGDoor_Open,10,HC,Y10,,,,,,,,,,
DO,0,单料口门下降,NGDoor_Close,11,HC,Y11,,,,,,,,,,
DO,0,进料线体料串固定上升,StringFix_Top,12,HC,Y12,,,,,,,,,,
DO,0,进料线体料串固定下降,StringFix_Bottom,13,HC,Y13,,,,,,,,,,
DO,0,上料机构折叠门打开,StringDoor_Open,14,HC,Y14,,,,,,,,,,
DO,0,上料机构折叠门关闭,StringDoor_Close,15,HC,Y15,,,,,,,,,,
DO,0,夹爪气缸夹紧,Clamping_Work,16,HC,Y16,,,,,,,,,,
DO,0,夹爪气缸放松,Clamping_Relax,17,HC,Y17,,,,,,,,,,
DO,0,上料定位旋转气缸定位,StringPosChecker_Work,18,HC,Y18,,,,,,,,,,
DO,0,上料定位旋转气缸避让,StringPosChecker_Home,19,HC,Y19,,,,,,,,,,
DO,0,料口翻板旋转,ReelFlipDoor_Home,20,HC,Y20,,,,,,,,,,
DO,0,料口翻板水平,ReelFlipDoor_Work,21,HC,Y21,,,,,,,,,,
DO,0,上料机构折叠门刹车解除,StringDoor_Axis_Break,22,HC,Y22,,,,,,,,,,
<?xml version="1.0" encoding="UTF-8"?>
<config ver="10">
<item key="App_Title" ver="10" value="SMD-BOX-XLC" />
<item key="EnableBuzzer" ver="10" value="False" />
</config>
\ No newline at end of file \ No newline at end of file
...@@ -153,10 +153,7 @@ ...@@ -153,10 +153,7 @@
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Config\general.config"> <None Include="Config\Config.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Config\CameraA.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="packages.config" /> <None Include="packages.config" />
......
...@@ -22,9 +22,9 @@ namespace DeviceLibrary ...@@ -22,9 +22,9 @@ namespace DeviceLibrary
{ {
public class CodeManager public class CodeManager
{ {
public static string CodeType = Setting_Init.CodeType; public static string CodeType = Setting_Init.Camera_CodeType;
private static int QRCodeCount = Setting_Init.QRCodeCount; private static int QRCodeCount = Setting_Init.Camera_QRCodeCount;
private static int CodeTimeOut = Setting_Init.CodeTimeOut; private static int CodeTimeOut = Setting_Init.Camera_CodeTimeOut;
public static List<string> cameraNameList = new List<string>(); public static List<string> cameraNameList = new List<string>();
public static List<string> codeTypeList = new List<string>(); public static List<string> codeTypeList = new List<string>();
public static List<string> hikNameList = new List<string>(); public static List<string> hikNameList = new List<string>();
...@@ -584,7 +584,7 @@ namespace DeviceLibrary ...@@ -584,7 +584,7 @@ namespace DeviceLibrary
public static string GetCodeParamFilePath(string codePath) public static string GetCodeParamFilePath(string codePath)
{ {
string appPath = Application.StartupPath; string appPath = Application.StartupPath;
string path = Path.Combine(appPath,Setting_Init.CodeParamPath); string path = Path.Combine(appPath,Setting_Init.Camera_CodeParamPath);
string filePath = Path.Combine(path, codePath + ".dcm"); string filePath = Path.Combine(path, codePath + ".dcm");
if (File.Exists(filePath)) if (File.Exists(filePath))
{ {
......
...@@ -254,7 +254,7 @@ namespace DeviceLibrary ...@@ -254,7 +254,7 @@ namespace DeviceLibrary
if (!axisBean.IsBusy) if (!axisBean.IsBusy)
{ {
LogUtil.info("恢复继续下降"); LogUtil.info($"{axisBean.AxisName} 恢复继续下降");
LiftDown(null); LiftDown(null);
} }
return false; return false;
......
...@@ -25,8 +25,8 @@ namespace DeviceLibrary ...@@ -25,8 +25,8 @@ namespace DeviceLibrary
_storeStatus = value; _storeStatus = value;
} }
} }
static string server = Setting_Init.http_server; static string server = Setting_Init.App_http_server;
static string CID = Setting_Init.CID; static string CID = Setting_Init.App_CID;
int StoreID = 1; int StoreID = 1;
string StoreName = ""; string StoreName = "";
...@@ -123,7 +123,7 @@ namespace DeviceLibrary ...@@ -123,7 +123,7 @@ namespace DeviceLibrary
operation.op = 1; operation.op = 1;
operation.data = new Dictionary<string, string>() { { "code", code }, { "boxId", StoreID.ToString() }, { "doorReelSignal", "1" } }; operation.data = new Dictionary<string, string>() { { "code", code }, { "boxId", StoreID.ToString() }, { "doorReelSignal", "1" } };
if (reel.PlateH == 100 && Setting_Init.Device_SingleInSingleOut) if (reel.PlateH == Setting_Init.SingleInOut_ReelHeight && Setting_Init.Enable_SingleInSingleOut)
{ {
//singleIn 单盘入库 //singleIn 单盘入库
operation.data.Add("singleIn", "true"); operation.data.Add("singleIn", "true");
...@@ -351,8 +351,8 @@ namespace DeviceLibrary ...@@ -351,8 +351,8 @@ namespace DeviceLibrary
} }
ServerCommStr = $"Send:{JsonHelper.SerializeObject(lineOperation)}\r\n Recv:{JsonHelper.SerializeObject(resultOperation)}"; ServerCommStr = $"Send:{JsonHelper.SerializeObject(lineOperation)}\r\n Recv:{JsonHelper.SerializeObject(resultOperation)}";
} }
finally finally
{ {
Monitor.Exit(serverclock); Monitor.Exit(serverclock);
} }
} }
...@@ -501,7 +501,7 @@ namespace DeviceLibrary ...@@ -501,7 +501,7 @@ namespace DeviceLibrary
{ {
map[ParamDefine.confirmReelOut] = ParamDefine.enable; map[ParamDefine.confirmReelOut] = ParamDefine.enable;
} }
if (!Setting_Init.DisableSingleReelIn) if (!Setting_Init.Disable_SingleReelIn)
{ {
if (RobotManage.mainMachine.StringType == MainMachine.StringTypeE.Out || RobotManage.mainMachine.StringMoveInfo.MoveStep == MoveStep.Wait) if (RobotManage.mainMachine.StringType == MainMachine.StringTypeE.Out || RobotManage.mainMachine.StringMoveInfo.MoveStep == MoveStep.Wait)
{ {
...@@ -696,7 +696,26 @@ namespace DeviceLibrary ...@@ -696,7 +696,26 @@ namespace DeviceLibrary
if (isSingleOut) if (isSingleOut)
RobotManage.mainMachine.AddSingleStoreTask(posId, plateW, plateH); RobotManage.mainMachine.AddSingleStoreTask(posId, plateW, plateH);
else else
RobotManage.mainMachine.AddOutStoreTask(posId, plateW, plateH); {
if (Setting_Init.SingleInOut_EnableSpecfiedSize)
{
if (Setting_Init.SingleInOut_ReelHeight == plateH
&& Setting_Init.SingleInOut_ReelWidth == plateW)
{
RobotManage.mainMachine.AddSingleStoreTask(posId, plateW, plateH);
}
else
{
RobotManage.mainMachine.AddOutStoreTask(posId, plateW, plateH);
}
}
else
{
RobotManage.mainMachine.AddOutStoreTask(posId, plateW, plateH);
}
}
} }
} }
TimeSpan span = DateTime.Now - time; TimeSpan span = DateTime.Now - time;
......
...@@ -159,7 +159,7 @@ namespace DeviceLibrary ...@@ -159,7 +159,7 @@ namespace DeviceLibrary
case MoveStep.StoreTS06: case MoveStep.StoreTS06:
MoveInfo.NextMoveStep(MoveStep.StoreTS07); MoveInfo.NextMoveStep(MoveStep.StoreTS07);
InOut_Axis.AbsMove(MoveInfo, From.InOut_P2, Config.InOut_P2_speed); InOut_Axis.AbsMove(MoveInfo, From.InOut_P2, Config.InOut_P2_speed);
InOut_Axis.MonitorAxisLoadRate(Setting_Init.Device_InOutMaxLoadRate); InOut_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_InOutMaxLoadRate);
MoveInfo.log($"{storeMoveType}:进出轴去取料点P2【{From.InOut_P2}】【{Config.InOut_P2_speed}】"); MoveInfo.log($"{storeMoveType}:进出轴去取料点P2【{From.InOut_P2}】【{Config.InOut_P2_speed}】");
break; break;
case MoveStep.StoreTS07: case MoveStep.StoreTS07:
...@@ -187,7 +187,7 @@ namespace DeviceLibrary ...@@ -187,7 +187,7 @@ namespace DeviceLibrary
{ {
Msg.add("", MsgLevel.info, ErrInfo.X09_Clear); Msg.add("", MsgLevel.info, ErrInfo.X09_Clear);
IgnoreX09 = false; IgnoreX09 = false;
if (To.posid == BoxStorePosition.strings && Setting_Init.Device_Use_Fixpos && Fix != null) if (To.posid == BoxStorePosition.strings && Setting_Init.Enable_Fixpos && Fix != null)
MoveInfo.NextMoveStep(MoveStep.StoreFIX01); MoveInfo.NextMoveStep(MoveStep.StoreFIX01);
else else
MoveInfo.NextMoveStep(MoveStep.StoreTS10); MoveInfo.NextMoveStep(MoveStep.StoreTS10);
...@@ -206,7 +206,7 @@ namespace DeviceLibrary ...@@ -206,7 +206,7 @@ namespace DeviceLibrary
case MoveStep.StoreFIX02: case MoveStep.StoreFIX02:
MoveInfo.NextMoveStep(MoveStep.StoreFIX03); MoveInfo.NextMoveStep(MoveStep.StoreFIX03);
InOut_Axis.AbsMove(MoveInfo, Fix.InOut_P2, Config.InOut_P2_speed); InOut_Axis.AbsMove(MoveInfo, Fix.InOut_P2, Config.InOut_P2_speed);
InOut_Axis.MonitorAxisLoadRate(Setting_Init.Device_InOutMaxLoadRate); InOut_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_InOutMaxLoadRate);
MoveInfo.log($"{storeMoveType}:进出轴去取料点【{Fix.InOut_P2}】【{Config.InOut_P2_speed}】"); MoveInfo.log($"{storeMoveType}:进出轴去取料点【{Fix.InOut_P2}】【{Config.InOut_P2_speed}】");
break; break;
case MoveStep.StoreFIX03: case MoveStep.StoreFIX03:
...@@ -219,7 +219,7 @@ namespace DeviceLibrary ...@@ -219,7 +219,7 @@ namespace DeviceLibrary
break; break;
case MoveStep.StoreFIX04: case MoveStep.StoreFIX04:
if (Setting_Init.Func_CheckReelLocInFix) if (Setting_Init.Enable_CheckReelLocInFix)
{ {
MoveInfo.NextMoveStep(MoveStep.StoreFIX04_01_InoutBackToP1); MoveInfo.NextMoveStep(MoveStep.StoreFIX04_01_InoutBackToP1);
InOut_Axis.AbsMove(MoveInfo, Config.InOut_P1, Config.InOut_P1_speed); InOut_Axis.AbsMove(MoveInfo, Config.InOut_P1, Config.InOut_P1_speed);
...@@ -278,7 +278,7 @@ namespace DeviceLibrary ...@@ -278,7 +278,7 @@ namespace DeviceLibrary
case MoveStep.StoreFIX04_05_DownToFixLow: case MoveStep.StoreFIX04_05_DownToFixLow:
MoveInfo.NextMoveStep(MoveStep.StoreFIX04_06_InoutToPos); MoveInfo.NextMoveStep(MoveStep.StoreFIX04_06_InoutToPos);
InOut_Axis.AbsMove(MoveInfo, Fix.InOut_P2, Config.InOut_P2_speed); InOut_Axis.AbsMove(MoveInfo, Fix.InOut_P2, Config.InOut_P2_speed);
InOut_Axis.MonitorAxisLoadRate(Setting_Init.Device_InOutMaxLoadRate); InOut_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_InOutMaxLoadRate);
MoveInfo.log($"{storeMoveType}:进出轴去取料点P2【{Fix.InOut_P2}】【{Config.InOut_P2_speed}】"); MoveInfo.log($"{storeMoveType}:进出轴去取料点P2【{Fix.InOut_P2}】【{Config.InOut_P2_speed}】");
break; break;
case MoveStep.StoreFIX04_06_InoutToPos: case MoveStep.StoreFIX04_06_InoutToPos:
...@@ -352,7 +352,7 @@ namespace DeviceLibrary ...@@ -352,7 +352,7 @@ namespace DeviceLibrary
case MoveStep.StoreTS12: case MoveStep.StoreTS12:
MoveInfo.NextMoveStep(MoveStep.StoreTS13); MoveInfo.NextMoveStep(MoveStep.StoreTS13);
InOut_Axis.AbsMove(MoveInfo, To.InOut_P2, Config.InOut_P2_speed); InOut_Axis.AbsMove(MoveInfo, To.InOut_P2, Config.InOut_P2_speed);
InOut_Axis.MonitorAxisLoadRate(Setting_Init.Device_InOutMaxLoadRate); InOut_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_InOutMaxLoadRate);
MoveInfo.log($"{storeMoveType}:进出轴去取料点P2【{To.InOut_P2}】【{Config.InOut_P2_speed}】"); MoveInfo.log($"{storeMoveType}:进出轴去取料点P2【{To.InOut_P2}】【{Config.InOut_P2_speed}】");
break; break;
case MoveStep.StoreTS13: case MoveStep.StoreTS13:
......
...@@ -50,6 +50,10 @@ namespace DeviceLibrary ...@@ -50,6 +50,10 @@ namespace DeviceLibrary
/// </summary> /// </summary>
public int PlateW { get; set; } public int PlateW { get; set; }
/// <summary> /// <summary>
/// 是否时单盘入/出的料
/// </summary>
public bool IsSingleInOut { get; set; }
/// <summary>
/// 是否是入料NG料 /// 是否是入料NG料
/// </summary> /// </summary>
public bool IsNg = false; public bool IsNg = false;
...@@ -151,7 +155,7 @@ namespace DeviceLibrary ...@@ -151,7 +155,7 @@ namespace DeviceLibrary
int reelhighdiff = 0; int reelhighdiff = 0;
if (reel.PlateW > 7) if (reel.PlateW > 7)
reelhighdiff = Setting_Init.Device_1315_ReelHeight_Compensation; reelhighdiff = Setting_Init.Comp_1315_ReelHeight_Compensation;
Comp_PL = Config.Comp_P2 - Config.Comp_PoToMM * (reel.PlateH - 8+ reelhighdiff) - (reel.PlateH > 8 ? Config.Comp_PoToMM * Config.Comp_PL_MM : 0); Comp_PL = Config.Comp_P2 - Config.Comp_PoToMM * (reel.PlateH - 8+ reelhighdiff) - (reel.PlateH > 8 ? Config.Comp_PoToMM * Config.Comp_PL_MM : 0);
...@@ -189,7 +193,7 @@ namespace DeviceLibrary ...@@ -189,7 +193,7 @@ namespace DeviceLibrary
} }
int reelhighdiff = 0; int reelhighdiff = 0;
if (reel.PlateW > 7) if (reel.PlateW > 7)
reelhighdiff = Setting_Init.Device_1315_ReelHeight_Compensation; reelhighdiff = Setting_Init.Comp_1315_ReelHeight_Compensation;
Comp_PH = Config.Comp_P2 - Config.Comp_PoToMM * (reel.PlateH - 8 + Config.Comp_PH_MM+ ConfigHelper.Config.Get("Device_NGDoor_Compensation", 20)); Comp_PH = Config.Comp_P2 - Config.Comp_PoToMM * (reel.PlateH - 8 + Config.Comp_PH_MM+ ConfigHelper.Config.Get("Device_NGDoor_Compensation", 20));
Comp_PL = Config.Comp_P2 - Config.Comp_PoToMM * (reel.PlateH - 8+ reelhighdiff) - (reel.PlateH > 8 ? Config.Comp_PoToMM * Config.Comp_PL_MM : 0); Comp_PL = Config.Comp_P2 - Config.Comp_PoToMM * (reel.PlateH - 8+ reelhighdiff) - (reel.PlateH > 8 ? Config.Comp_PoToMM * Config.Comp_PL_MM : 0);
Comp_PH = Comp_PH < 0 ? 0 : Comp_PH; Comp_PH = Comp_PH < 0 ? 0 : Comp_PH;
......
...@@ -33,7 +33,7 @@ namespace DeviceLibrary ...@@ -33,7 +33,7 @@ namespace DeviceLibrary
CurrentPosIndex = poslist.FindIndex(x => x.PositionNum == posname); CurrentPosIndex = poslist.FindIndex(x => x.PositionNum == posname);
AutoInOutTest = true; AutoInOutTest = true;
StopAutoInOut = false; StopAutoInOut = false;
//AIOTMoveInfo.NewMove(MoveStep.Wait); AIOTMoveInfo.NextMoveStep(MoveStep.AIOTest_Start);
return true; return true;
} }
public void StopAutoInOutTest() public void StopAutoInOutTest()
...@@ -55,14 +55,13 @@ namespace DeviceLibrary ...@@ -55,14 +55,13 @@ namespace DeviceLibrary
switch (AIOTMoveInfo.MoveStep) switch (AIOTMoveInfo.MoveStep)
{ {
case MoveStep.Wait: case MoveStep.Wait:
//if (IsAIOTestReelIsReady)
//{ break;
// AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn01); case MoveStep.AIOTest_Start:
// AIOTMoveInfo.log($"入库料盘已准备好");
//}
AIOTMoveInfo.NextMoveStep(MoveStep.AIOTest_01_CloseFlip); AIOTMoveInfo.NextMoveStep(MoveStep.AIOTest_01_CloseFlip);
OpenSingleDoor(AIOTMoveInfo);
CloseFlipDoor(AIOTMoveInfo); CloseFlipDoor(AIOTMoveInfo);
AIOTMoveInfo.log($"关闭翻板门"); AIOTMoveInfo.log($"打开单料门、关闭翻板门");
break; break;
case MoveStep.AIOTest_01_CloseFlip: case MoveStep.AIOTest_01_CloseFlip:
AIOTMoveInfo.NextMoveStep(MoveStep.AIOTest_02_Pause1); AIOTMoveInfo.NextMoveStep(MoveStep.AIOTest_02_Pause1);
...@@ -128,72 +127,72 @@ namespace DeviceLibrary ...@@ -128,72 +127,72 @@ namespace DeviceLibrary
return; return;
} }
break; break;
case MoveStep.StoreIn01: //case MoveStep.StoreIn01:
//AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn02); // //AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn02);
//var ac = poslist[CurrentPosIndex]; // //var ac = poslist[CurrentPosIndex];
//var reel = new ReelParam("auto", ac.BagWidth, ac.BagHigh); // //var reel = new ReelParam("auto", ac.BagWidth, ac.BagHigh);
//if (!boxTransport.Start(new BoxStorePosition(Config, StoreSide.NGDoor, reel), new BoxStorePosition(Config, ac, reel), StoreMoveType.InStore)) // //if (!boxTransport.Start(new BoxStorePosition(Config, StoreSide.NGDoor, reel), new BoxStorePosition(Config, ac, reel), StoreMoveType.InStore))
//{ // //{
// AIOTMoveInfo.log($"料仓周转启动失败"); // // AIOTMoveInfo.log($"料仓周转启动失败");
// AutoInOutTest = false; // // AutoInOutTest = false;
// StopAutoInOut = true; // // StopAutoInOut = true;
// return; // // return;
//} // //}
//AIOTMoveInfo.log($"开始转运料盘第一盘"); // //AIOTMoveInfo.log($"开始转运料盘第一盘");
break; // break;
case MoveStep.StoreIn02: //case MoveStep.StoreIn02:
//if (boxTransport.IsTakedReel) // //if (boxTransport.IsTakedReel)
//{ // //{
// AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn03); // // AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn03);
// ReelTaked(); // // ReelTaked();
// AIOTMoveInfo.log($"第一盘料盘已取走"); // // AIOTMoveInfo.log($"第一盘料盘已取走");
//} // //}
//else // //else
//{ // //{
// Msg.add(crc.GetString(L.wait_reel_transfer, "单料口等待料盘离开."), MsgLevel.info); // // Msg.add(crc.GetString(L.wait_reel_transfer, "单料口等待料盘离开."), MsgLevel.info);
//} // //}
break; // break;
case MoveStep.StoreIn03: //case MoveStep.StoreIn03:
//if (Setting_Init.Device_AIOTest_DirectGetReel) // //if (Setting_Init.Device_AIOTest_DirectGetReel)
//{ // //{
// AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn04); // // AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn04);
// CloseFlipDoor(AIOTMoveInfo); // // CloseFlipDoor(AIOTMoveInfo);
// AIOTMoveInfo.log($"合拢翻转板,准备料盘"); // // AIOTMoveInfo.log($"合拢翻转板,准备料盘");
//} // //}
//else if (IsAIOTestReelIsReady) // //else if (IsAIOTestReelIsReady)
//{ // //{
// AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn04); // // AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn04);
// AIOTMoveInfo.log($"入库料盘已准备好"); // // AIOTMoveInfo.log($"入库料盘已准备好");
//} // //}
break; // break;
case MoveStep.StoreIn04: //case MoveStep.StoreIn04:
//if (boxTransport.IsComplateOrFree) // //if (boxTransport.IsComplateOrFree)
//{ // //{
// AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn05); // // AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn05);
// AIOTMoveInfo.log($"第一盘料盘已到达目的地"); // // AIOTMoveInfo.log($"第一盘料盘已到达目的地");
// if (CurrentPosIndex - 1 < 0 || StopAutoInOut) // // if (CurrentPosIndex - 1 < 0 || StopAutoInOut)
// { // // {
// AIOTMoveInfo.log($"已达到最后一个库位:{CurrentPosIndex},或手动停止{StopAutoInOut},自动出入库停止,将料盘送至出口"); // // AIOTMoveInfo.log($"已达到最后一个库位:{CurrentPosIndex},或手动停止{StopAutoInOut},自动出入库停止,将料盘送至出口");
// AIOTMoveInfo.NextMoveStep(MoveStep.StoreOut10); // // AIOTMoveInfo.NextMoveStep(MoveStep.StoreOut10);
// CloseFlipDoor(AIOTMoveInfo); // // CloseFlipDoor(AIOTMoveInfo);
// return; // // return;
// } // // }
// if (Setting_Init.Device_AIOTest_DirectGetReel) // // if (Setting_Init.Device_AIOTest_DirectGetReel)
// { // // {
// RobotManage.UserPause("暂停放入第二盘", true); // // RobotManage.UserPause("暂停放入第二盘", true);
// } // // }
// AIOTMoveInfo.log($"开始转运料盘第二盘"); // // AIOTMoveInfo.log($"开始转运料盘第二盘");
// ac = poslist[CurrentPosIndex - 1]; // // ac = poslist[CurrentPosIndex - 1];
// reel = new ReelParam("auto", ac.BagWidth, ac.BagHigh); // // reel = new ReelParam("auto", ac.BagWidth, ac.BagHigh);
// if (!boxTransport.Start(new BoxStorePosition(Config, StoreSide.NGDoor, reel), new BoxStorePosition(Config, ac, reel), StoreMoveType.InStore)) // // if (!boxTransport.Start(new BoxStorePosition(Config, StoreSide.NGDoor, reel), new BoxStorePosition(Config, ac, reel), StoreMoveType.InStore))
// { // // {
// AIOTMoveInfo.log($"料仓周转启动失败"); // // AIOTMoveInfo.log($"料仓周转启动失败");
// AutoInOutTest = false; // // AutoInOutTest = false;
// StopAutoInOut = true; // // StopAutoInOut = true;
// return; // // return;
// } // // }
//} // //}
break; // break;
case MoveStep.StoreIn05: case MoveStep.StoreIn05:
if (boxTransport.IsTakedReel) if (boxTransport.IsTakedReel)
{ {
......
...@@ -37,20 +37,20 @@ namespace DeviceLibrary ...@@ -37,20 +37,20 @@ namespace DeviceLibrary
Current_Temperate = temp.Temperate; Current_Temperate = temp.Temperate;
//var tempIsOK = Current_Temperate < ServerCM.Max_Temperature; //var tempIsOK = Current_Temperate < ServerCM.Max_Temperature;
var humiNeedStart = Current_Humidity > ServerCM.Max_Humidity - Setting_Init.Device_HumidityStartOffser; var humiNeedStart = Current_Humidity > ServerCM.Max_Humidity - Setting_Init.App_HumidityStartOffser;
var humiNeedStop = Current_Humidity < ServerCM.Max_Humidity - Setting_Init.Device_HumidityEndOffser; var humiNeedStop = Current_Humidity < ServerCM.Max_Humidity - Setting_Init.App_HumidityEndOffser;
if (humiNeedStart && !airisopen) if (humiNeedStart && !airisopen)
{ {
IOMove(IO_Type.NitrogenValve, IO_VALUE.HIGH); IOMove(IO_Type.NitrogenValve, IO_VALUE.HIGH);
airisopen = true; airisopen = true;
LogUtil.info($"开始吹气,当前最大湿度:{Current_Humidity} > {ServerCM.Max_Humidity}-{Setting_Init.Device_HumidityStartOffser}."); LogUtil.info($"开始吹气,当前最大湿度:{Current_Humidity} > {ServerCM.Max_Humidity}-{Setting_Init.App_HumidityStartOffser}.");
} }
else if (humiNeedStop && airisopen) else if (humiNeedStop && airisopen)
{ {
IOMove(IO_Type.NitrogenValve, IO_VALUE.LOW); IOMove(IO_Type.NitrogenValve, IO_VALUE.LOW);
airisopen = false; airisopen = false;
LogUtil.info($"关闭吹气,当前最大湿度:{Current_Humidity} < {ServerCM.Max_Humidity}-{Setting_Init.Device_HumidityEndOffser}."); LogUtil.info($"关闭吹气,当前最大湿度:{Current_Humidity} < {ServerCM.Max_Humidity}-{Setting_Init.App_HumidityEndOffser}.");
} }
} }
bool lastTHoutRangeStatus = false; bool lastTHoutRangeStatus = false;
......
...@@ -31,7 +31,7 @@ namespace DeviceLibrary ...@@ -31,7 +31,7 @@ namespace DeviceLibrary
public bool isAlarm { get; set; } = false; public bool isAlarm { get; set; } = false;
public RunStatus runStatus { get; set; } = RunStatus.Stop; public RunStatus runStatus { get; set; } = RunStatus.Stop;
public Robot_Config Config { get; set; } public Robot_Config Config { get; set; }
public bool UserPause { get; set; } = false; public volatile bool UserPause = false;
public MoveInfo ResetMoveInfo; public MoveInfo ResetMoveInfo;
...@@ -78,7 +78,7 @@ namespace DeviceLibrary ...@@ -78,7 +78,7 @@ namespace DeviceLibrary
/// <summary> /// <summary>
/// 是否启用上料提升轴的料叉检测 /// 是否启用上料提升轴的料叉检测
/// </summary> /// </summary>
public bool EnableBatchFixCheck { get { return Setting_Init.Swicth_BatchFixCheck; } } public bool EnableBatchFixCheck { get { return Setting_Init.Enable_BatchFixCheck; } }
public MainMachine(Robot_Config _config) public MainMachine(Robot_Config _config)
{ {
Config = _config; Config = _config;
...@@ -144,21 +144,21 @@ namespace DeviceLibrary ...@@ -144,21 +144,21 @@ namespace DeviceLibrary
RobotManage.Config.DOList.Remove(IO_Type.StringDoor_Open); RobotManage.Config.DOList.Remove(IO_Type.StringDoor_Open);
RobotManage.Config.DOList.Remove(IO_Type.StringDoor_Close); RobotManage.Config.DOList.Remove(IO_Type.StringDoor_Close);
var sf = ""; var sf = "";
if (Setting_Init.Device_IO_X08IsStringDoor_SafetyLightCurtains) if (Setting_Init.StringDoor_X08IsStringDoor_SafetyLightCurtains)
sf = IO_Type.AGV_OnPosition; sf = IO_Type.AGV_OnPosition;
StringDoor = new LiftMonitor(IO_Type.StringDoor_Open, IO_Type.StringDoor_Close, sf, IO_Type.StringDoor_Axis_Break, new AxisBean(Config.StringDoor_Axis, Name), Config.StringDoorLength, Config.StringDoorLength_speed, 0, "折叠门"); StringDoor = new LiftMonitor(IO_Type.StringDoor_Open, IO_Type.StringDoor_Close, sf, IO_Type.StringDoor_Axis_Break, new AxisBean(Config.StringDoor_Axis, Name), Config.StringDoorLength, Config.StringDoorLength_speed, 0, "折叠门");
StringDoor.DownOverTimeMS = Setting_Init.Device_StringDoor_DownOverTimeMS; StringDoor.DownOverTimeMS = Setting_Init.StringDoor_DownOverTimeMS;
StringDoor.UpOverTimeMS = Setting_Init.Device_StringDoor_UpOverTimeMS; StringDoor.UpOverTimeMS = Setting_Init.StringDoor_UpOverTimeMS;
StringDoor.ResumeWaitTimeSec = 5; StringDoor.ResumeWaitTimeSec = 5;
LogUtil.info("加载料串门类型为:步进"); LogUtil.info("加载料串门类型为:步进");
} }
else else
LogUtil.info("加载料串门类型为:气缸"); LogUtil.info("加载料串门类型为:气缸");
if (!Setting_Init.Device_IO_X08IsStringDoor_SafetyLightCurtains) if (!Setting_Init.StringDoor_X08IsStringDoor_SafetyLightCurtains)
{ {
RobotManage.Config.DIList.Remove(IO_Type.AGV_OnPosition); RobotManage.Config.DIList.Remove(IO_Type.AGV_OnPosition);
} }
if (Setting_Init.Device_Disable_DoorSafeCheck) if (Setting_Init.Disable_DoorSafeCheck)
{ {
RobotManage.Config.DIList.Remove(IO_Type.LeftDoorClose_Check); RobotManage.Config.DIList.Remove(IO_Type.LeftDoorClose_Check);
RobotManage.Config.DIList.Remove(IO_Type.RightDoorClose_Check); RobotManage.Config.DIList.Remove(IO_Type.RightDoorClose_Check);
...@@ -183,7 +183,7 @@ namespace DeviceLibrary ...@@ -183,7 +183,7 @@ namespace DeviceLibrary
}; };
//BoxTransport_InOutEndProcessEvent; //BoxTransport_InOutEndProcessEvent;
//ProcessMsgEvent += MainMachine_ProcessMsgEvent; //ProcessMsgEvent += MainMachine_ProcessMsgEvent;
Setting_Init.Device_Disable_StringDoor = false; //Setting_Init.Disable_StringDoor = false;
AlarmBuzzer.SetOnOffAction(() => { IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.HIGH); }, () => { IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.LOW); }); AlarmBuzzer.SetOnOffAction(() => { IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.HIGH); }, () => { IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.LOW); });
IOMonitor.RegisterIO(IO_Type.SuddenStop_BTN, Config, IO_VALUE.LOW, SuddenStop_BTN, 2500, 100); IOMonitor.RegisterIO(IO_Type.SuddenStop_BTN, Config, IO_VALUE.LOW, SuddenStop_BTN, 2500, 100);
...@@ -257,7 +257,6 @@ namespace DeviceLibrary ...@@ -257,7 +257,6 @@ namespace DeviceLibrary
/// 整机启动变量,设置为false后将退出线程,只在停止时调用 /// 整机启动变量,设置为false后将退出线程,只在停止时调用
/// </summary> /// </summary>
bool mstart = true; bool mstart = true;
DateTime showTime = DateTime.Now;
public void Run() public void Run()
{ {
mstart = true; mstart = true;
...@@ -283,7 +282,7 @@ namespace DeviceLibrary ...@@ -283,7 +282,7 @@ namespace DeviceLibrary
StringProcess(); StringProcess();
ClampProcess(); ClampProcess();
boxTransport.Process(); boxTransport.Process();
if (RobotManage.mainMachine.AutoInOutTest) if (AutoInOutTest)
AutoInOutTestProcess(); AutoInOutTestProcess();
else else
StoreProcess(); StoreProcess();
...@@ -301,12 +300,7 @@ namespace DeviceLibrary ...@@ -301,12 +300,7 @@ namespace DeviceLibrary
finally finally
{ {
var m = Msg.get(); var m = Msg.get();
if ((DateTime.Now - showTime).TotalMilliseconds > 800) ProcessMsgEvent?.Invoke(m);
{
ProcessMsgEvent?.Invoke(m);
showTime = DateTime.Now;
}
ServerCM.ProcessMsg(m); ServerCM.ProcessMsg(m);
StoreStatus currnetstoreStatus = StoreStatus.None; StoreStatus currnetstoreStatus = StoreStatus.None;
if (m.Find((aa) => aa.msgLevel == MsgLevel.alarm) == null) if (m.Find((aa) => aa.msgLevel == MsgLevel.alarm) == null)
...@@ -377,7 +371,7 @@ namespace DeviceLibrary ...@@ -377,7 +371,7 @@ namespace DeviceLibrary
public void OpenSingleDoor(MoveInfo moveInfo) public void OpenSingleDoor(MoveInfo moveInfo)
{ {
if(!RobotManage.DisableSingleDoor) if (!RobotManage.DisableSingleDoor)
{ {
SingleDoor.ToHigh(moveInfo); SingleDoor.ToHigh(moveInfo);
} }
...@@ -413,7 +407,7 @@ namespace DeviceLibrary ...@@ -413,7 +407,7 @@ namespace DeviceLibrary
{ {
ResetMoveInfo.log("复位时没有料串"); ResetMoveInfo.log("复位时没有料串");
} }
else if (!Setting_Init.Device_IO_X08IsStringDoor_SafetyLightCurtains) else if (!Setting_Init.StringDoor_X08IsStringDoor_SafetyLightCurtains)
{ {
if (IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.HIGH))
{ {
...@@ -436,8 +430,6 @@ namespace DeviceLibrary ...@@ -436,8 +430,6 @@ namespace DeviceLibrary
} }
} }
if (!Setting_Init.Device_Disable_StringDoor)
StringDoorClose(null); StringDoorClose(null);
break; break;
case MoveStep.H02_HomeReset_01: case MoveStep.H02_HomeReset_01:
...@@ -445,7 +437,7 @@ namespace DeviceLibrary ...@@ -445,7 +437,7 @@ namespace DeviceLibrary
ResetMoveInfo.log("进出轴,批量轴回原,料串检测杆退回避让端"); ResetMoveInfo.log("进出轴,批量轴回原,料串检测杆退回避让端");
InOut_Axis.HomeMove(ResetMoveInfo, forceHome); InOut_Axis.HomeMove(ResetMoveInfo, forceHome);
Batch_Axis.HomeMove(null, forceHome); Batch_Axis.HomeMove(null, forceHome);
Batch_Axis.MonitorAxisLoadRate(Setting_Init.Device_BatchMaxLoadRate); Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate);
CylinderMove(ResetMoveInfo, IO_Type.StringPosChecker_Home, IO_Type.StringPosChecker_Work, IO_VALUE.LOW); CylinderMove(ResetMoveInfo, IO_Type.StringPosChecker_Home, IO_Type.StringPosChecker_Work, IO_VALUE.LOW);
Msg.add("", MsgLevel.info, ErrInfo.X09_Clear); Msg.add("", MsgLevel.info, ErrInfo.X09_Clear);
//SingleDoor.ToLow(ResetMoveInfo); //SingleDoor.ToLow(ResetMoveInfo);
...@@ -463,7 +455,7 @@ namespace DeviceLibrary ...@@ -463,7 +455,7 @@ namespace DeviceLibrary
Middle_Axis.HomeMove(ResetMoveInfo, forceHome); Middle_Axis.HomeMove(ResetMoveInfo, forceHome);
UpDown_Axis.HomeMove(ResetMoveInfo, forceHome); UpDown_Axis.HomeMove(ResetMoveInfo, forceHome);
Batch_Axis.HomeMove(ResetMoveInfo, forceHome); Batch_Axis.HomeMove(ResetMoveInfo, forceHome);
Batch_Axis.MonitorAxisLoadRate(Setting_Init.Device_BatchMaxLoadRate); Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate);
//OpenFlipDoor(ResetMoveInfo); //OpenFlipDoor(ResetMoveInfo);
break; break;
case MoveStep.H04_HomeReset: case MoveStep.H04_HomeReset:
...@@ -526,7 +518,7 @@ namespace DeviceLibrary ...@@ -526,7 +518,7 @@ namespace DeviceLibrary
ResetMoveInfo.NextMoveStep(MoveStep.H13_HomeReset); ResetMoveInfo.NextMoveStep(MoveStep.H13_HomeReset);
ResetMoveInfo.log("打开NG口门"); ResetMoveInfo.log("打开NG口门");
//CylinderMove(null, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.HIGH); //CylinderMove(null, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.HIGH);
// SingleDoor.ToHigh(null); // SingleDoor.ToHigh(null);
OpenSingleDoor(null); OpenSingleDoor(null);
break; break;
case MoveStep.H13_HomeReset: case MoveStep.H13_HomeReset:
...@@ -559,7 +551,7 @@ namespace DeviceLibrary ...@@ -559,7 +551,7 @@ namespace DeviceLibrary
{ {
//ResetMoveInfo.NextMoveStep(MoveStep.H14_HomeReset); //ResetMoveInfo.NextMoveStep(MoveStep.H14_HomeReset);
//ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); //ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (Setting_Init.Device_ManualCloseSingleDoor) if (Setting_Init.Enable_SingleDoor_ManualClose)
RobotManage.UserPause(crc.GetString("please_take_ngdoor_reel", "等待取走单口料盘")); RobotManage.UserPause(crc.GetString("please_take_ngdoor_reel", "等待取走单口料盘"));
} }
else else
...@@ -633,7 +625,7 @@ namespace DeviceLibrary ...@@ -633,7 +625,7 @@ namespace DeviceLibrary
} }
else if ((RobotManage.HasReelInFixPos(out ReelParam reelParam)) else if ((RobotManage.HasReelInFixPos(out ReelParam reelParam))
&& boxTransport.IsComplateOrFree && boxTransport.IsComplateOrFree
&& ClampMoveInfo.MoveStep == MoveStep.Wait && Setting_Init.Device_Use_Fixpos && ClampMoveInfo.MoveStep == MoveStep.Wait && Setting_Init.Enable_Fixpos
&& IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW)) && IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW))
{ {
var pos = BoxStorePosition.GetFixPos(Config, reelParam); var pos = BoxStorePosition.GetFixPos(Config, reelParam);
...@@ -690,7 +682,7 @@ namespace DeviceLibrary ...@@ -690,7 +682,7 @@ namespace DeviceLibrary
// } // }
// Msg.add(crc.GetString(L.SafetyLight_is_block, "安全光栅被遮挡") + (ok ? ignorestring : ""), MsgLevel.warning); // Msg.add(crc.GetString(L.SafetyLight_is_block, "安全光栅被遮挡") + (ok ? ignorestring : ""), MsgLevel.warning);
//} //}
if (Setting_Init.Device_IO_X08IsStringDoor_SafetyLightCurtains) if (Setting_Init.StringDoor_X08IsStringDoor_SafetyLightCurtains)
{ {
//IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.LOW) && //IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.LOW) &&
if (IOValue(IO_Type.AGV_OnPosition).Equals(IO_VALUE.LOW) && IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.AGV_OnPosition).Equals(IO_VALUE.LOW) && IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.LOW))
...@@ -699,7 +691,7 @@ namespace DeviceLibrary ...@@ -699,7 +691,7 @@ namespace DeviceLibrary
if (lastStringSafetyStatus) if (lastStringSafetyStatus)
{ {
lastStringSafetyStatus = false; lastStringSafetyStatus = false;
StringDoor.Pause(); StringDoorPause();
} }
if (stringdoorSafetyProcStrategy == 0) if (stringdoorSafetyProcStrategy == 0)
{ {
...@@ -719,7 +711,7 @@ namespace DeviceLibrary ...@@ -719,7 +711,7 @@ namespace DeviceLibrary
} }
} }
} }
if (!Setting_Init.Device_Disable_DoorSafeCheck) if (!Setting_Init.Disable_DoorSafeCheck)
{ {
if (IOValue(IO_Type.LeftDoorClose_Check).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.LeftDoorClose_Check).Equals(IO_VALUE.LOW))
{ {
...@@ -770,8 +762,7 @@ namespace DeviceLibrary ...@@ -770,8 +762,7 @@ namespace DeviceLibrary
AxisBean.StopMultiAxis(AxisBean.List); AxisBean.StopMultiAxis(AxisBean.List);
MoveInfo.List.ForEach((m) => { m.CanWhileCount = 5; }); MoveInfo.List.ForEach((m) => { m.CanWhileCount = 5; });
SafetyDevice.PauseAll(); SafetyDevice.PauseAll();
StringDoor.Pause(); StringDoorPause();
if (runStatus == RunStatus.HomeReset) if (runStatus == RunStatus.HomeReset)
{ {
ResetMoveInfo.NewMove(MoveStep.H01_HomeReset); ResetMoveInfo.NewMove(MoveStep.H01_HomeReset);
......
...@@ -263,7 +263,7 @@ namespace DeviceLibrary ...@@ -263,7 +263,7 @@ namespace DeviceLibrary
ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_02); ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_02);
ClampMoveInfo.log("打开单料口门"); ClampMoveInfo.log("打开单料口门");
//CylinderMove(null, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.HIGH); //CylinderMove(null, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.HIGH);
// SingleDoor.ToHigh(null); // SingleDoor.ToHigh(null);
OpenSingleDoor(null); OpenSingleDoor(null);
CodeManager.TestHasRight = true; CodeManager.TestHasRight = true;
break; break;
...@@ -302,7 +302,7 @@ namespace DeviceLibrary ...@@ -302,7 +302,7 @@ namespace DeviceLibrary
{ {
//ClampMoveInfo.LastSetpTime = DateTime.Now; //ClampMoveInfo.LastSetpTime = DateTime.Now;
//ClampMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000)); //ClampMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (Setting_Init.Device_ManualCloseSingleDoor) if (Setting_Init.Enable_SingleDoor_ManualClose)
RobotManage.UserPause(crc.GetString("please_take_ngdoor_reel", "等待取走单口料盘")); RobotManage.UserPause(crc.GetString("please_take_ngdoor_reel", "等待取走单口料盘"));
} }
else else
...@@ -340,7 +340,7 @@ namespace DeviceLibrary ...@@ -340,7 +340,7 @@ namespace DeviceLibrary
ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_06); ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_06);
ClampMoveInfo.log("关门NG口门"); ClampMoveInfo.log("关门NG口门");
//CylinderMove(ClampMoveInfo, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.LOW); //CylinderMove(ClampMoveInfo, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.LOW);
// SingleDoor.ToLow(ClampMoveInfo); // SingleDoor.ToLow(ClampMoveInfo);
CloseSingleDoor(ClampMoveInfo); CloseSingleDoor(ClampMoveInfo);
OpenFlipDoor(ClampMoveInfo); OpenFlipDoor(ClampMoveInfo);
} }
...@@ -352,6 +352,8 @@ namespace DeviceLibrary ...@@ -352,6 +352,8 @@ namespace DeviceLibrary
case MoveStep.NGOUT_06: case MoveStep.NGOUT_06:
ClampMoveInfo.NextMoveStep(MoveStep.Wait); ClampMoveInfo.NextMoveStep(MoveStep.Wait);
break; break;
#region 单盘入库
case MoveStep.SingleIn: case MoveStep.SingleIn:
ClampMoveInfo.NextMoveStep(MoveStep.SingleIn_01); ClampMoveInfo.NextMoveStep(MoveStep.SingleIn_01);
ClampMoveInfo.log("开始单盘入库, 合拢托盘"); ClampMoveInfo.log("开始单盘入库, 合拢托盘");
...@@ -361,8 +363,8 @@ namespace DeviceLibrary ...@@ -361,8 +363,8 @@ namespace DeviceLibrary
ClampMoveInfo.NextMoveStep(MoveStep.SingleInReady); ClampMoveInfo.NextMoveStep(MoveStep.SingleInReady);
ClampMoveInfo.log("开始单盘入库, 打开紧急料口"); ClampMoveInfo.log("开始单盘入库, 打开紧急料口");
//CylinderMove(ClampMoveInfo, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.HIGH); //CylinderMove(ClampMoveInfo, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.HIGH);
// SingleDoor.ToHigh(ClampMoveInfo); // SingleDoor.ToHigh(ClampMoveInfo);
OpenSingleDoor(ClampMoveInfo); OpenSingleDoor(ClampMoveInfo);
break; break;
case MoveStep.SingleInReady: case MoveStep.SingleInReady:
Msg.add(crc.GetString(L.wait_put_reel_into_ngdoor, "等待放入单盘入库料盘"), MsgLevel.warning); Msg.add(crc.GetString(L.wait_put_reel_into_ngdoor, "等待放入单盘入库料盘"), MsgLevel.warning);
...@@ -370,11 +372,11 @@ namespace DeviceLibrary ...@@ -370,11 +372,11 @@ namespace DeviceLibrary
case MoveStep.SingleInRun: case MoveStep.SingleInRun:
ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_09); ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_09);
//CylinderMove(ClampMoveInfo, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.LOW); //CylinderMove(ClampMoveInfo, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.LOW);
// SingleDoor.ToLow(ClampMoveInfo); // SingleDoor.ToLow(ClampMoveInfo);
CloseSingleDoor(ClampMoveInfo); CloseSingleDoor(ClampMoveInfo);
ClampMoveInfo.MoveParam.PlateW = 7; ClampMoveInfo.MoveParam.PlateW = Setting_Init.SingleInOut_ReelWidth;
ClampMoveInfo.MoveParam.PlateH = 100; ClampMoveInfo.MoveParam.PlateH = Setting_Init.SingleInOut_ReelHeight;
ClampMoveInfo.MoveParam.IsSingleInOut = true;
h = NGDoor_Tray_Test_Reel; h = NGDoor_Tray_Test_Reel;
if (!h.HasValue) if (!h.HasValue)
{ {
...@@ -389,6 +391,8 @@ namespace DeviceLibrary ...@@ -389,6 +391,8 @@ namespace DeviceLibrary
ClampMoveInfo.NextMoveStep(MoveStep.Wait); ClampMoveInfo.NextMoveStep(MoveStep.Wait);
} }
break; break;
#endregion
default: default:
ClampMoveInfo.log($"未找到对应步骤:{ClampMoveInfo.MoveStep}"); ClampMoveInfo.log($"未找到对应步骤:{ClampMoveInfo.MoveStep}");
break; break;
...@@ -399,7 +403,7 @@ namespace DeviceLibrary ...@@ -399,7 +403,7 @@ namespace DeviceLibrary
get get
{ {
if (Setting_Init.CamTestReel_Ability) if (Setting_Init.CamTestReel_Ability)
return CodeManager.TestHasReel(CodeManager.hikNameList[0],out _,out _); return CodeManager.TestHasReel(CodeManager.hikNameList[0], out _, out _);
else else
return IOValue(IO_Type.NGDoor_Tray_Check).Equals(IO_VALUE.HIGH); return IOValue(IO_Type.NGDoor_Tray_Check).Equals(IO_VALUE.HIGH);
} }
...@@ -470,7 +474,7 @@ namespace DeviceLibrary ...@@ -470,7 +474,7 @@ namespace DeviceLibrary
List<CodeInfo> LastCodeList; List<CodeInfo> LastCodeList;
LastCodeList = CodeManager.CameraScan(CodeManager.hikNameList); LastCodeList = CodeManager.CameraScan(CodeManager.hikNameList);
if (LastCodeList.Count==0) if (LastCodeList.Count == 0)
LastCodeList = CodeManager.CameraScan(CodeManager.hikNameList); LastCodeList = CodeManager.CameraScan(CodeManager.hikNameList);
//BoxParam labelParam = new BoxParam(); //BoxParam labelParam = new BoxParam();
//labelParam.codeInfos = new List<CodeInfo>(LastCodeList); //labelParam.codeInfos = new List<CodeInfo>(LastCodeList);
......
...@@ -20,11 +20,11 @@ namespace DeviceLibrary ...@@ -20,11 +20,11 @@ namespace DeviceLibrary
if (ClampMoveInfo.MoveStep == MoveStep.Wait) if (ClampMoveInfo.MoveStep == MoveStep.Wait)
{ {
ClampMoveInfo.NewMove(MoveStep.SingleIn); ClampMoveInfo.NewMove(MoveStep.SingleIn);
return crc.GetString(L.begin_singlein ,"开始单盘入库"); return crc.GetString(L.begin_singlein, "开始单盘入库");
} }
return crc.GetString(L.Clamp_Axis_running_cant_singlein,"取料机构运转中,无法单盘入库"); return crc.GetString(L.Clamp_Axis_running_cant_singlein, "取料机构运转中,无法单盘入库");
} }
public string doTakeOutReel() public string doTakeOutReel()
{ {
LogUtil.info("请求下降出库料串"); LogUtil.info("请求下降出库料串");
...@@ -32,7 +32,7 @@ namespace DeviceLibrary ...@@ -32,7 +32,7 @@ namespace DeviceLibrary
var clampstep = RobotManage.mainMachine.ClampMoveInfo.MoveStep; var clampstep = RobotManage.mainMachine.ClampMoveInfo.MoveStep;
if (step == MoveStep.StringReadyGet && clampstep >= MoveStep.ReelClamp_GetHeight) if (step == MoveStep.StringReadyGet && clampstep >= MoveStep.ReelClamp_GetHeight)
{ {
RobotManage.mainMachine.StringMoveInfo.NextMoveStep(MoveStep.StringOut_01); RobotManage.mainMachine.StringMoveInfo.NextMoveStep(MoveStep.StringOut_01);
return crc.GetString(L.string_begin_release, "开始释放料串"); return crc.GetString(L.string_begin_release, "开始释放料串");
} }
if (step == MoveStep.StringReadyPut) if (step == MoveStep.StringReadyPut)
...@@ -70,7 +70,7 @@ namespace DeviceLibrary ...@@ -70,7 +70,7 @@ namespace DeviceLibrary
} }
} }
LogUtil.info($"取料机构当前没有在等待单盘入库:{ClampMoveInfo.MoveStep}"); LogUtil.info($"取料机构当前没有在等待单盘入库:{ClampMoveInfo.MoveStep}");
return crc.GetString(L.not_in_single_prosses, "当前没有在等待单盘入库:")+ClampMoveInfo.MoveStep; return crc.GetString(L.not_in_single_prosses, "当前没有在等待单盘入库:") + ClampMoveInfo.MoveStep;
} }
public string doOpenBatchDoor() public string doOpenBatchDoor()
...@@ -81,7 +81,6 @@ namespace DeviceLibrary ...@@ -81,7 +81,6 @@ namespace DeviceLibrary
StringMoveInfo.LastSetpTime = DateTime.Now; StringMoveInfo.LastSetpTime = DateTime.Now;
StringMoveInfo.IsInWait = true; StringMoveInfo.IsInWait = true;
if (!Setting_Init.Device_Disable_StringDoor)
StringDoorOpen(StringMoveInfo); StringDoorOpen(StringMoveInfo);
return crc.GetString(L.begin_open_string_door, "开始打开料串门"); return crc.GetString(L.begin_open_string_door, "开始打开料串门");
...@@ -91,7 +90,7 @@ namespace DeviceLibrary ...@@ -91,7 +90,7 @@ namespace DeviceLibrary
public string doCloseBatchDoor() public string doCloseBatchDoor()
{ {
LogUtil.info("请求关闭批量料门"); LogUtil.info("请求关闭批量料门");
if (!Setting_Init.Device_IO_X08IsStringDoor_SafetyLightCurtains) if (!Setting_Init.StringDoor_X08IsStringDoor_SafetyLightCurtains)
{ {
if (IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.HIGH))
{ {
...@@ -105,8 +104,7 @@ namespace DeviceLibrary ...@@ -105,8 +104,7 @@ namespace DeviceLibrary
//RobotManage.mainMachine.StringMoveInfo.NextMoveStep(RobotManage.mainMachine.StringMoveInfo.MoveStep); //RobotManage.mainMachine.StringMoveInfo.NextMoveStep(RobotManage.mainMachine.StringMoveInfo.MoveStep);
StringMoveInfo.LastSetpTime = DateTime.Now; StringMoveInfo.LastSetpTime = DateTime.Now;
StringMoveInfo.IsInWait = true; StringMoveInfo.IsInWait = true;
if (!Setting_Init.Device_Disable_StringDoor) StringDoorClose(StringMoveInfo);
StringDoorClose(StringMoveInfo);
return crc.GetString(L.begin_close_string_door, "开始关闭料串门"); return crc.GetString(L.begin_close_string_door, "开始关闭料串门");
} }
} }
......
...@@ -22,6 +22,12 @@ namespace DeviceLibrary ...@@ -22,6 +22,12 @@ namespace DeviceLibrary
OutStoreJobList.Enqueue(jobInfo); OutStoreJobList.Enqueue(jobInfo);
LogUtil.info($"添加出库任务队列: {posId},当前任务数量: {OutStoreJobList.Count}"); LogUtil.info($"添加出库任务队列: {posId},当前任务数量: {OutStoreJobList.Count}");
} }
/// <summary>
/// 添加单盘出库
/// </summary>
/// <param name="posId"></param>
/// <param name="plateW"></param>
/// <param name="plateH"></param>
public void AddSingleStoreTask(string posId, int plateW, int plateH) public void AddSingleStoreTask(string posId, int plateW, int plateH)
{ {
JobInfo jobInfo = new JobInfo("", posId, plateW, plateH); JobInfo jobInfo = new JobInfo("", posId, plateW, plateH);
......
...@@ -76,7 +76,7 @@ namespace DeviceLibrary ...@@ -76,7 +76,7 @@ namespace DeviceLibrary
return false; return false;
} }
StringStateE LastStringState { get => ConfigHelper.Config.Get("Status_LastStringState", StringStateE.None); set => ConfigHelper.Config.Set("Status_LastStringState", value); } StringStateE LastStringState { get => ConfigHelper.Config.Get("Buffer_LastStringState", StringStateE.None); set => ConfigHelper.Config.Set("Status_LastStringState", value); }
bool newreel = true; bool newreel = true;
bool downCheck1 = false; bool downCheck1 = false;
bool downCheck2 = false; bool downCheck2 = false;
...@@ -106,7 +106,7 @@ namespace DeviceLibrary ...@@ -106,7 +106,7 @@ namespace DeviceLibrary
if (!Batch_Axis.IsInPosition(Config.Batch_P1)) if (!Batch_Axis.IsInPosition(Config.Batch_P1))
{ {
Batch_Axis.AbsMove(StringMoveInfo, Config.Batch_P1, Config.Batch_P1_speed); Batch_Axis.AbsMove(StringMoveInfo, Config.Batch_P1, Config.Batch_P1_speed);
Batch_Axis.MonitorAxisLoadRate(Setting_Init.Device_BatchMaxLoadRate); Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate);
} }
} }
if (IOValue(IO_Type.StringBack_Check).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.StringBack_Check).Equals(IO_VALUE.HIGH))
...@@ -137,7 +137,7 @@ namespace DeviceLibrary ...@@ -137,7 +137,7 @@ namespace DeviceLibrary
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_01a); StringMoveInfo.NextMoveStep(MoveStep.StringLoad_01a);
StringMoveInfo.log($"批量轴到待机点"); StringMoveInfo.log($"批量轴到待机点");
Batch_Axis.AbsMove(StringMoveInfo, Config.Batch_P1, Config.Batch_P1_speed); Batch_Axis.AbsMove(StringMoveInfo, Config.Batch_P1, Config.Batch_P1_speed);
Batch_Axis.MonitorAxisLoadRate(Setting_Init.Device_BatchMaxLoadRate); Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate);
Line.LineRun("n", false, 2); Line.LineRun("n", false, 2);
break; break;
case MoveStep.StringLoad_01a: case MoveStep.StringLoad_01a:
...@@ -181,7 +181,7 @@ namespace DeviceLibrary ...@@ -181,7 +181,7 @@ namespace DeviceLibrary
return; return;
} }
} }
if (Setting_Init.Device_Disable_StringDoor || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH)) if (Setting_Init.Disable_StringDoor || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH))
{ {
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_02b); StringMoveInfo.NextMoveStep(MoveStep.StringLoad_02b);
StringMoveInfo.log($"批量轴高速到顶部检测点"); StringMoveInfo.log($"批量轴高速到顶部检测点");
...@@ -201,7 +201,7 @@ namespace DeviceLibrary ...@@ -201,7 +201,7 @@ namespace DeviceLibrary
BatchAxisToTagLow(StringMoveInfo); BatchAxisToTagLow(StringMoveInfo);
break; break;
case MoveStep.StringLoad_03: case MoveStep.StringLoad_03:
if (Setting_Init.Device_Disable_StringDoor || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH)) if (Setting_Init.Disable_StringDoor || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH))
{ {
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_04); StringMoveInfo.NextMoveStep(MoveStep.StringLoad_04);
StringMoveInfo.log($"批量轴到顶部检测点"); StringMoveInfo.log($"批量轴到顶部检测点");
...@@ -229,7 +229,7 @@ namespace DeviceLibrary ...@@ -229,7 +229,7 @@ namespace DeviceLibrary
{ {
StringMoveInfo.log($"料串检测为空"); StringMoveInfo.log($"料串检测为空");
StringState = StringStateE.OutStore; StringState = StringStateE.OutStore;
if (Setting_Init.Device_String_StandbyAtBottom && OutStoreJobList.Count == 0 && ServerCM.queueTaskCount <= 0 && boxTransport.IsComplateOrFree) if (Setting_Init.StringStandbyAtBottom && OutStoreJobList.Count == 0 && ServerCM.queueTaskCount <= 0 && boxTransport.IsComplateOrFree)
{ {
SetReelHeight(GetHeight(ClampMoveInfo)); SetReelHeight(GetHeight(ClampMoveInfo));
StringMoveInfo.log($"当前空料串, 并且没有出库任务, 料串下降待机"); StringMoveInfo.log($"当前空料串, 并且没有出库任务, 料串下降待机");
...@@ -261,7 +261,7 @@ namespace DeviceLibrary ...@@ -261,7 +261,7 @@ namespace DeviceLibrary
{ {
tpos2 = 0; tpos2 = 0;
} }
int maxReelHeight = Setting_Init.ReelMaxHeightMM; int maxReelHeight = Setting_Init.Outstore_ReelMaxHeightMM;
int minPos1 = tpos2 - Config.Batch_PoToMM * maxReelHeight; int minPos1 = tpos2 - Config.Batch_PoToMM * maxReelHeight;
if (StringState == StringStateE.OutStore && minPos1 < 0) if (StringState == StringStateE.OutStore && minPos1 < 0)
{ {
...@@ -270,7 +270,7 @@ namespace DeviceLibrary ...@@ -270,7 +270,7 @@ namespace DeviceLibrary
StringMoveInfo.log($"料串已满可以送出,提升轴当前={Batch_Axis.GetAclPosition()},最小脉冲值={minPos1}"); StringMoveInfo.log($"料串已满可以送出,提升轴当前={Batch_Axis.GetAclPosition()},最小脉冲值={minPos1}");
} }
Batch_Axis.AbsMove(StringMoveInfo, tpos2, Config.Batch_P1_speed); Batch_Axis.AbsMove(StringMoveInfo, tpos2, Config.Batch_P1_speed);
Batch_Axis.MonitorAxisLoadRate(Setting_Init.Device_BatchMaxLoadRate); Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate);
break; break;
case MoveStep.StringLoad_05: case MoveStep.StringLoad_05:
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_06); StringMoveInfo.NextMoveStep(MoveStep.StringLoad_06);
...@@ -284,7 +284,7 @@ namespace DeviceLibrary ...@@ -284,7 +284,7 @@ namespace DeviceLibrary
StringMoveInfo.log($"料串有盘上升{Config.Batch_DetectDownMM + 2}mm"); StringMoveInfo.log($"料串有盘上升{Config.Batch_DetectDownMM + 2}mm");
var tpos4 = Batch_Axis.GetAclPosition() + Config.Batch_PoToMM * (Config.Batch_DetectDownMM + 2); var tpos4 = Batch_Axis.GetAclPosition() + Config.Batch_PoToMM * (Config.Batch_DetectDownMM + 2);
Batch_Axis.AbsMove(StringMoveInfo, tpos4, Config.Batch_P1_speed); Batch_Axis.AbsMove(StringMoveInfo, tpos4, Config.Batch_P1_speed);
Batch_Axis.MonitorAxisLoadRate(Setting_Init.Device_BatchMaxLoadRate); Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate);
CylinderMove(StringMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW); CylinderMove(StringMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW);
//OpenFlipDoor(StringMoveInfo); //OpenFlipDoor(StringMoveInfo);
StringType = StringTypeE.In; StringType = StringTypeE.In;
...@@ -299,7 +299,7 @@ namespace DeviceLibrary ...@@ -299,7 +299,7 @@ namespace DeviceLibrary
} }
StringMoveInfo.log($"料串出库模式,下降{Config.Batch_OutStoreDownMM}mm,={tpos2},{Batch_Axis.GetAclPosition()}"); StringMoveInfo.log($"料串出库模式,下降{Config.Batch_OutStoreDownMM}mm,={tpos2},{Batch_Axis.GetAclPosition()}");
Batch_Axis.AbsMove(StringMoveInfo, tpos2, Config.Batch_P1_speed); Batch_Axis.AbsMove(StringMoveInfo, tpos2, Config.Batch_P1_speed);
Batch_Axis.MonitorAxisLoadRate(Setting_Init.Device_BatchMaxLoadRate); Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate);
StringType = StringTypeE.Out; StringType = StringTypeE.Out;
} }
break; break;
...@@ -316,7 +316,7 @@ namespace DeviceLibrary ...@@ -316,7 +316,7 @@ namespace DeviceLibrary
} }
RealPulse = Batch_Axis.GetAclPosition() - tpos2; RealPulse = Batch_Axis.GetAclPosition() - tpos2;
Batch_Axis.AbsMove(StringMoveInfo, tpos2, Config.Batch_P1_speed); Batch_Axis.AbsMove(StringMoveInfo, tpos2, Config.Batch_P1_speed);
Batch_Axis.MonitorAxisLoadRate(Setting_Init.Device_BatchMaxLoadRate); Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate);
break; break;
case MoveStep.StringReelGet_01: case MoveStep.StringReelGet_01:
StringMoveInfo.log($"料已取走,开始测高"); StringMoveInfo.log($"料已取走,开始测高");
...@@ -331,12 +331,12 @@ namespace DeviceLibrary ...@@ -331,12 +331,12 @@ namespace DeviceLibrary
if (tpos1 < 0) if (tpos1 < 0)
tpos1 = 0; tpos1 = 0;
Batch_Axis.AbsMove(StringMoveInfo, tpos1, Config.Batch_P1_speed); Batch_Axis.AbsMove(StringMoveInfo, tpos1, Config.Batch_P1_speed);
Batch_Axis.MonitorAxisLoadRate(Setting_Init.Device_BatchMaxLoadRate); Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate);
break; break;
case MoveStep.StringReadyPut: case MoveStep.StringReadyPut:
Msg.add(crc.GetString(L.string_ready_for_put, "料串放料准备就绪"), MsgLevel.info); Msg.add(crc.GetString(L.string_ready_for_put, "料串放料准备就绪"), MsgLevel.info);
StringMoveInfo.log($"料串放料准备就绪"); StringMoveInfo.log($"料串放料准备就绪");
if (Setting_Init.Device_String_StandbyAtBottom && ServerCM.queueTaskCount <= 0 && boxTransport.IsComplateOrFree && OutStoreJobList.Count <= 0) if (Setting_Init.StringStandbyAtBottom && ServerCM.queueTaskCount <= 0 && boxTransport.IsComplateOrFree && OutStoreJobList.Count <= 0)
{ {
StringMoveInfo.log($"当前没有出库任务, 料串下降待机"); StringMoveInfo.log($"当前没有出库任务, 料串下降待机");
StringMoveInfo.NextMoveStep(MoveStep.StringOut_01); StringMoveInfo.NextMoveStep(MoveStep.StringOut_01);
...@@ -344,7 +344,7 @@ namespace DeviceLibrary ...@@ -344,7 +344,7 @@ namespace DeviceLibrary
break; break;
case MoveStep.StringReelPut: case MoveStep.StringReelPut:
LastStringState = StringStateE.OutStore; LastStringState = StringStateE.OutStore;
if (Setting_Init.Device_OutStoreStringReelCheck) if (Setting_Init.OutStore_StringReelCheck)
{ {
StringMoveInfo.NextMoveStep(MoveStep.StringReelPut_03); StringMoveInfo.NextMoveStep(MoveStep.StringReelPut_03);
StringMoveInfo.log($"检测阻挡工作"); StringMoveInfo.log($"检测阻挡工作");
...@@ -354,7 +354,7 @@ namespace DeviceLibrary ...@@ -354,7 +354,7 @@ namespace DeviceLibrary
var tpos = Batch_Axis.GetAclPosition() - Config.Batch_PoToMM * (StringMoveInfo.MoveParam.PlateH + Config.Batch_OutPlateDownMM); var tpos = Batch_Axis.GetAclPosition() - Config.Batch_PoToMM * (StringMoveInfo.MoveParam.PlateH + Config.Batch_OutPlateDownMM);
if (tpos < 0) if (tpos < 0)
tpos = 0; tpos = 0;
maxReelHeight = Setting_Init.ReelMaxHeightMM; maxReelHeight = Setting_Init.Outstore_ReelMaxHeightMM;
if (tpos < Config.Batch_P2 * 0.3 && !downCheck1) if (tpos < Config.Batch_P2 * 0.3 && !downCheck1)
{ {
StringMoveInfo.log($"料串下降到30%位置,重新上升"); StringMoveInfo.log($"料串下降到30%位置,重新上升");
...@@ -372,7 +372,7 @@ namespace DeviceLibrary ...@@ -372,7 +372,7 @@ namespace DeviceLibrary
StringMoveInfo.NextMoveStep(MoveStep.StringReadyPut); StringMoveInfo.NextMoveStep(MoveStep.StringReadyPut);
StringMoveInfo.log($"料盘放入料串,下降{StringMoveInfo.MoveParam.PlateH}+{3}mm"); StringMoveInfo.log($"料盘放入料串,下降{StringMoveInfo.MoveParam.PlateH}+{3}mm");
Batch_Axis.AbsMove(StringMoveInfo, tpos, Config.Batch_P1_speed); Batch_Axis.AbsMove(StringMoveInfo, tpos, Config.Batch_P1_speed);
Batch_Axis.MonitorAxisLoadRate(Setting_Init.Device_BatchMaxLoadRate); Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate);
} }
else if (!downCheck3) else if (!downCheck3)
{ {
...@@ -407,8 +407,8 @@ namespace DeviceLibrary ...@@ -407,8 +407,8 @@ namespace DeviceLibrary
var heightcheck = (LastOutDownPosition - Batch_Axis.GetAclPosition()) / Config.Batch_PoToMM; var heightcheck = (LastOutDownPosition - Batch_Axis.GetAclPosition()) / Config.Batch_PoToMM;
StringMoveInfo.log($"LastOutDownPosition={LastOutDownPosition},CurrentPosition={Batch_Axis.GetAclPosition()},heightcheck={heightcheck}"); StringMoveInfo.log($"LastOutDownPosition={LastOutDownPosition},CurrentPosition={Batch_Axis.GetAclPosition()},heightcheck={heightcheck}");
int height = StringMoveInfo.MoveParam.PlateH + 3; int height = StringMoveInfo.MoveParam.PlateH + 3;
int outstoreHeightCheckLowDevia = Setting_Init.OutstoreHeightCheckLowerDeviation; int outstoreHeightCheckLowDevia = Setting_Init.Outstore_HeightCheckLowerDeviation;
int outstoreHeightCheckUpDevia = Setting_Init.OutstoreHeightCheckUpperDeviation; int outstoreHeightCheckUpDevia = Setting_Init.Outstore_HeightCheckUpperDeviation;
if (heightcheck <= Setting_Init.ReelCheckTriggerDeviation) if (heightcheck <= Setting_Init.ReelCheckTriggerDeviation)
{ {
Msg.add(crc.GetString(L.outstore_abnormal_reel, "出库时料盘未成功放入料串,请检查"), MsgLevel.alarm); Msg.add(crc.GetString(L.outstore_abnormal_reel, "出库时料盘未成功放入料串,请检查"), MsgLevel.alarm);
...@@ -422,7 +422,7 @@ namespace DeviceLibrary ...@@ -422,7 +422,7 @@ namespace DeviceLibrary
break; break;
case MoveStep.StringReelPut_05: case MoveStep.StringReelPut_05:
LastOutDownPosition = Batch_Axis.GetAclPosition(); LastOutDownPosition = Batch_Axis.GetAclPosition();
maxReelHeight = Setting_Init.ReelMaxHeightMM; maxReelHeight = Setting_Init.Outstore_ReelMaxHeightMM;
var tpos3 = Batch_Axis.GetAclPosition() - Config.Batch_PoToMM * Config.Batch_OutPlateDownMM; var tpos3 = Batch_Axis.GetAclPosition() - Config.Batch_PoToMM * Config.Batch_OutPlateDownMM;
if (tpos3 < 0) if (tpos3 < 0)
tpos3 = 0; tpos3 = 0;
...@@ -436,7 +436,7 @@ namespace DeviceLibrary ...@@ -436,7 +436,7 @@ namespace DeviceLibrary
StringMoveInfo.NextMoveStep(MoveStep.StringOut_01); StringMoveInfo.NextMoveStep(MoveStep.StringOut_01);
StringState = StringStateE.Full; StringState = StringStateE.Full;
Batch_Axis.AbsMove(StringMoveInfo, Config.Batch_P1, Config.Batch_P1_speed); Batch_Axis.AbsMove(StringMoveInfo, Config.Batch_P1, Config.Batch_P1_speed);
Batch_Axis.MonitorAxisLoadRate(Setting_Init.Device_BatchMaxLoadRate); Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate);
StringMoveInfo.log($"料串已满可以送出,提升轴当前={tpos3},最小脉冲值={minPos}"); StringMoveInfo.log($"料串已满可以送出,提升轴当前={tpos3},最小脉冲值={minPos}");
} }
break; break;
...@@ -444,7 +444,7 @@ namespace DeviceLibrary ...@@ -444,7 +444,7 @@ namespace DeviceLibrary
StringMoveInfo.NextMoveStep(MoveStep.StringOut_02); StringMoveInfo.NextMoveStep(MoveStep.StringOut_02);
StringMoveInfo.log($"料串下降到P1点"); StringMoveInfo.log($"料串下降到P1点");
Batch_Axis.AbsMove(StringMoveInfo, Config.Batch_P1, Config.Batch_P1_speed); Batch_Axis.AbsMove(StringMoveInfo, Config.Batch_P1, Config.Batch_P1_speed);
Batch_Axis.MonitorAxisLoadRate(Setting_Init.Device_BatchMaxLoadRate); Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate);
CylinderMove(StringMoveInfo, IO_Type.StringPosChecker_Home, IO_Type.StringPosChecker_Work, IO_VALUE.LOW); CylinderMove(StringMoveInfo, IO_Type.StringPosChecker_Home, IO_Type.StringPosChecker_Work, IO_VALUE.LOW);
StringMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg(crc.GetString("Res0010", "料串正在下降"), MsgLevel.info)); StringMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg(crc.GetString("Res0010", "料串正在下降"), MsgLevel.info));
break; break;
...@@ -480,7 +480,7 @@ namespace DeviceLibrary ...@@ -480,7 +480,7 @@ namespace DeviceLibrary
} }
break; break;
case MoveStep.StringOut_05: case MoveStep.StringOut_05:
if (Setting_Init.Device_Disable_StringDoor || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH)) if (Setting_Init.Disable_StringDoor || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH))
{ {
StringMoveInfo.NextMoveStep(MoveStep.Wait); StringMoveInfo.NextMoveStep(MoveStep.Wait);
StringMoveInfo.log($"折叠门已关闭"); StringMoveInfo.log($"折叠门已关闭");
...@@ -491,7 +491,7 @@ namespace DeviceLibrary ...@@ -491,7 +491,7 @@ namespace DeviceLibrary
} }
break; break;
case MoveStep.StringOut_06: case MoveStep.StringOut_06:
if (Setting_Init.Device_Disable_StringDoor || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH)) if (Setting_Init.Disable_StringDoor || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH))
{ {
StringMoveInfo.NextMoveStep(MoveStep.Wait); StringMoveInfo.NextMoveStep(MoveStep.Wait);
StringMoveInfo.log($"料串未拿走,直接关门"); StringMoveInfo.log($"料串未拿走,直接关门");
...@@ -574,7 +574,7 @@ namespace DeviceLibrary ...@@ -574,7 +574,7 @@ namespace DeviceLibrary
moveInfo.WaitList.Add(WaitResultInfo.WaitBatchAxisMove(Config.Batch_Axis, targetP2, targetSpeed)); moveInfo.WaitList.Add(WaitResultInfo.WaitBatchAxisMove(Config.Batch_Axis, targetP2, targetSpeed));
Config.Batch_Axis.TargetPosition = targetP2; Config.Batch_Axis.TargetPosition = targetP2;
Batch_Axis.AbsMove(null, targetP2, targetSpeed); Batch_Axis.AbsMove(null, targetP2, targetSpeed);
Batch_Axis.MonitorAxisLoadRate(Setting_Init.Device_BatchMaxLoadRate); Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate);
//开始检测信号 //开始检测信号
Batch_Axis.BatchAxisStartCheck(IO_Type.TrayCheck, IO_VALUE.HIGH); Batch_Axis.BatchAxisStartCheck(IO_Type.TrayCheck, IO_VALUE.HIGH);
} }
...@@ -592,7 +592,7 @@ namespace DeviceLibrary ...@@ -592,7 +592,7 @@ namespace DeviceLibrary
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck, IO_VALUE.LOW)); moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck, IO_VALUE.LOW));
Config.Batch_Axis.TargetPosition = targetP1; Config.Batch_Axis.TargetPosition = targetP1;
Batch_Axis.AbsMove(null, targetP1, targetSpeed); Batch_Axis.AbsMove(null, targetP1, targetSpeed);
Batch_Axis.MonitorAxisLoadRate(Setting_Init.Device_BatchMaxLoadRate); Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate);
//开始检测信号 //开始检测信号
Batch_Axis.BatchAxisStartCheck(IO_Type.TrayCheck, IO_VALUE.LOW); Batch_Axis.BatchAxisStartCheck(IO_Type.TrayCheck, IO_VALUE.LOW);
} }
...@@ -600,9 +600,9 @@ namespace DeviceLibrary ...@@ -600,9 +600,9 @@ namespace DeviceLibrary
string LastCode = ""; string LastCode = "";
private int GetHeight(MoveInfo moveInfo) private int GetHeight(MoveInfo moveInfo)
{ {
int w15SubVal = Setting_Init.Param_CalHeight_Width15HeightSubVal; int w15SubVal = Setting_Init.CalHeight_Width15HeightSubVal;
int w13SubVal = Setting_Init.Param_CalHeight_Width13HeightSubVal; int w13SubVal = Setting_Init.CalHeight_Width13HeightSubVal;
int w8MaxVal = Setting_Init.Param_CalHeight_Height8MaxVal; int w8MaxVal = Setting_Init.CalHeight_Height8MaxVal;
int LastHeight = 0; int LastHeight = 0;
int AxisChangeValue = Config.Batch_PoToMM; int AxisChangeValue = Config.Batch_PoToMM;
//计算高度 //计算高度
...@@ -638,11 +638,11 @@ namespace DeviceLibrary ...@@ -638,11 +638,11 @@ namespace DeviceLibrary
} }
else else
{ {
if (Setting_Init.Switch_UseCustHeightList) if (Setting_Init.CalHeight_EnableCustHeightList)
{ {
try try
{ {
string[] heights = Setting_Init.Param_CalHeight_HeightList; string[] heights = Setting_Init.CalHeight_HeightList;
foreach (var item in heights) foreach (var item in heights)
{ {
string[] s1 = item.Split('='); string[] s1 = item.Split('=');
...@@ -710,6 +710,11 @@ namespace DeviceLibrary ...@@ -710,6 +710,11 @@ namespace DeviceLibrary
} }
public void StringDoorOpen(MoveInfo moveInfo) public void StringDoorOpen(MoveInfo moveInfo)
{ {
if (Setting_Init.Disable_StringDoor)
{
LogUtil.info($"料串门已屏蔽,不打开");
return;
}
if (StringDoor != null) if (StringDoor != null)
{ {
StringDoor.LiftUp(moveInfo); StringDoor.LiftUp(moveInfo);
...@@ -721,6 +726,11 @@ namespace DeviceLibrary ...@@ -721,6 +726,11 @@ namespace DeviceLibrary
} }
public void StringDoorClose(MoveInfo moveInfo) public void StringDoorClose(MoveInfo moveInfo)
{ {
if(Setting_Init.Disable_StringDoor)
{
LogUtil.info($"料串门已屏蔽,不关闭");
return;
}
if (StringDoor != null) if (StringDoor != null)
{ {
StringDoor.LiftDown(moveInfo); StringDoor.LiftDown(moveInfo);
...@@ -729,8 +739,15 @@ namespace DeviceLibrary ...@@ -729,8 +739,15 @@ namespace DeviceLibrary
{ {
CylinderMove(moveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.LOW); CylinderMove(moveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.LOW);
} }
}
public void StringDoorPause()
{
if (Setting_Init.Disable_StringDoor)
{
LogUtil.info($"料串门已屏蔽,不暂停");
return;
}
StringDoor.Pause();
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -12,6 +12,7 @@ namespace DeviceLibrary ...@@ -12,6 +12,7 @@ namespace DeviceLibrary
Wait, Wait,
WaitErr, WaitErr,
//库位测试 //库位测试
AIOTest_Start,
AIOTest_01_CloseFlip, AIOTest_01_CloseFlip,
AIOTest_02_Pause1, AIOTest_02_Pause1,
AIOTest_03_FirstReady, AIOTest_03_FirstReady,
......
...@@ -14,6 +14,11 @@ namespace DeviceLibrary ...@@ -14,6 +14,11 @@ namespace DeviceLibrary
{ {
public static class RobotManage public static class RobotManage
{ {
/// <summary>
/// 数据加载完成
/// </summary>
public static event LoadFinish DataInitEvent;
public static MainMachine mainMachine; public static MainMachine mainMachine;
public static Robot_Config Config; public static Robot_Config Config;
//public static StoreType StoreType = ConfigHelper.Config.Get<StoreType>("StoreType",StoreType.TypeA); //public static StoreType StoreType = ConfigHelper.Config.Get<StoreType>("StoreType",StoreType.TypeA);
...@@ -22,11 +27,11 @@ namespace DeviceLibrary ...@@ -22,11 +27,11 @@ namespace DeviceLibrary
public static bool InoutDebugMode = false; public static bool InoutDebugMode = false;
public static bool DisableUpdownProtect public static bool DisableUpdownProtect
{ {
get => Setting_Init.Device_DisableUpdownProtect; get => Setting_Init.Disable_UpdownProtect;
} }
public static bool DisableSingleDoor public static bool DisableSingleDoor
{ {
get => Setting_Init.Device_DisableSingleDoor; get => Setting_Init.Disable_SingleDoor;
} }
public delegate void LoadFinish(bool state, string msg); public delegate void LoadFinish(bool state, string msg);
public static event LoadFinish LoadFinishEvent; public static event LoadFinish LoadFinishEvent;
...@@ -98,10 +103,10 @@ namespace DeviceLibrary ...@@ -98,10 +103,10 @@ namespace DeviceLibrary
// IsLoadOk = false; // IsLoadOk = false;
// msg += errmsg + "\r\n"; // msg += errmsg + "\r\n";
//} //}
if (!HumitureController.Init(Setting_Init.Device_Humiture_Port)) if (!HumitureController.Init(Setting_Init.App_Humiture_Port))
{ {
IsLoadOk = false; IsLoadOk = false;
msg += crc.GetString(L.tempnhum_sensor_init_fail, $"温湿度传感器初始化失败,端口:") + $"{Setting_Init.Device_Humiture_Port}\n"; msg += crc.GetString(L.tempnhum_sensor_init_fail, $"温湿度传感器初始化失败,端口:") + $"{Setting_Init.App_Humiture_Port}\n";
} }
//Thread.Sleep(1000); //Thread.Sleep(1000);
//if (!IOManager.ConnectionIOList(new List<string>())) //if (!IOManager.ConnectionIOList(new List<string>()))
...@@ -217,7 +222,7 @@ namespace DeviceLibrary ...@@ -217,7 +222,7 @@ namespace DeviceLibrary
reelParam = null; reelParam = null;
try try
{ {
string fix = Setting_Init.FixBuffInfo; string fix = Setting_Init.Buffer_FixBuffInfo;
if (!string.IsNullOrEmpty(fix)) if (!string.IsNullOrEmpty(fix))
{ {
reelParam = JsonHelper.DeserializeJsonToObject<ReelParam>(fix); reelParam = JsonHelper.DeserializeJsonToObject<ReelParam>(fix);
...@@ -233,11 +238,11 @@ namespace DeviceLibrary ...@@ -233,11 +238,11 @@ namespace DeviceLibrary
public static void PutReelInFixPos(ReelParam reelParam) public static void PutReelInFixPos(ReelParam reelParam)
{ {
if (mainMachine.AutoInOutTest) return; if (mainMachine.AutoInOutTest) return;
Setting_Init.FixBuffInfo = JsonHelper.SerializeObject(reelParam); Setting_Init.Buffer_FixBuffInfo = JsonHelper.SerializeObject(reelParam);
} }
public static void ClearReelInFixPos() public static void ClearReelInFixPos()
{ {
Setting_Init.FixBuffInfo = ""; Setting_Init.Buffer_FixBuffInfo = "";
} }
#endregion #endregion
} }
......
...@@ -29,7 +29,7 @@ namespace DeviceLibrary ...@@ -29,7 +29,7 @@ namespace DeviceLibrary
CheckForIllegalCrossThreadCalls = false; CheckForIllegalCrossThreadCalls = false;
crc.OpenResourceLog = true; crc.OpenResourceLog = true;
crc.LanguageChangeEvent += Crc_LanguageChangeEvent; crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
crc.CurrLanguage = Setting_Init.Device_Default_Language; crc.CurrLanguage = Setting_Init.App_Default_Language;
} }
private void Crc_LanguageChangeEvent(object sender, EventArgs e) private void Crc_LanguageChangeEvent(object sender, EventArgs e)
...@@ -251,6 +251,7 @@ namespace DeviceLibrary ...@@ -251,6 +251,7 @@ namespace DeviceLibrary
colorsList.Add(Color.BlueViolet); colorsList.Add(Color.BlueViolet);
colorsList.Add(Color.Firebrick); colorsList.Add(Color.Firebrick);
colorsList.Add(Color.Coral); colorsList.Add(Color.Coral);
colorsList.Add(Color.Aqua);
} }
color = colorsList[SelIndex]; color = colorsList[SelIndex];
......
...@@ -26,7 +26,7 @@ namespace TheMachine ...@@ -26,7 +26,7 @@ namespace TheMachine
crc.OpenResourceLog = true; crc.OpenResourceLog = true;
InitializeComponent(); InitializeComponent();
this.FormClosing += Form1_FormClosing; this.FormClosing += Form1_FormClosing;
this.Text =Setting_Init.App_Title + " " + Setting_Init.CID; this.Text =Setting_Init.App_Title + " " + Setting_Init.App_CID;
crc.GetLanguageEvent += Crc_GetLanguageEvent; crc.GetLanguageEvent += Crc_GetLanguageEvent;
crc.LanguageChangeEvent += Crc_LanguageChangeEvent; crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
crc.CurrLanguage = Crc_GetLanguageEvent(); crc.CurrLanguage = Crc_GetLanguageEvent();
...@@ -47,7 +47,7 @@ namespace TheMachine ...@@ -47,7 +47,7 @@ namespace TheMachine
private string Crc_GetLanguageEvent() private string Crc_GetLanguageEvent()
{ {
return Setting_Init.Device_Default_Language; return Setting_Init.App_Default_Language;
} }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) private void Form1_FormClosing(object sender, FormClosingEventArgs e)
...@@ -93,7 +93,7 @@ namespace TheMachine ...@@ -93,7 +93,7 @@ namespace TheMachine
msgcol.Width = 530; msgcol.Width = 530;
ColumnHeader timecol = new ColumnHeader(); ColumnHeader timecol = new ColumnHeader();
timecol.Text = $"时间"; timecol.Text = $"时间";
timecol.Width = 150; timecol.Width = 180;
listView1.Columns.Add(emptycol); listView1.Columns.Add(emptycol);
listView1.Columns.Add(timecol); listView1.Columns.Add(timecol);
listView1.Columns.Add(msgcol); listView1.Columns.Add(msgcol);
...@@ -123,10 +123,11 @@ namespace TheMachine ...@@ -123,10 +123,11 @@ namespace TheMachine
#endregion #endregion
LogUtil.info("开始初始化"); LogUtil.info("开始初始化");
cb_EnableBuzzer.Checked = Setting_Init.Device_EnableBuzzer; cb_EnableBuzzer.Checked = Setting_Init.Enable_Buzzer;
AlarmBuzzer.BuzzerStateChange += AlarmBuzzer_BuzzerStateChange; AlarmBuzzer.BuzzerStateChange += AlarmBuzzer_BuzzerStateChange;
RobotManage.DataInitEvent += RobotManage_DataInitEvent;
RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent; RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent;
if (!Setting_Init.Device_DisableLogWindow) if (!Setting_Init.Disable_LogWindow)
AddForm("tab_log", crc.GetString(L.tab_log, "日志"), lc); AddForm("tab_log", crc.GetString(L.tab_log, "日志"), lc);
RobotManage.UserPauseSet += RobotManage_UserPauseSet; RobotManage.UserPauseSet += RobotManage_UserPauseSet;
...@@ -272,7 +273,19 @@ namespace TheMachine ...@@ -272,7 +273,19 @@ namespace TheMachine
LogUtil.info("MainMachine_ProcessMsgEvent:" + e.ToString()); LogUtil.info("MainMachine_ProcessMsgEvent:" + e.ToString());
} }
} }
private void RobotManage_DataInitEvent(bool state, string msg)
{
if (this.InvokeRequired)
{
this.Invoke((EventHandler)delegate
{
RobotManage_DataInitEvent(state, msg);
});
return;
}
}
private void RobotManage_LoadFinishEvent(bool state, string msg) private void RobotManage_LoadFinishEvent(bool state, string msg)
{ {
if (this.InvokeRequired) if (this.InvokeRequired)
...@@ -286,6 +299,7 @@ namespace TheMachine ...@@ -286,6 +299,7 @@ namespace TheMachine
启用调试模式ToolStripMenuItem.Enabled = true; 启用调试模式ToolStripMenuItem.Enabled = true;
pnl.Enabled = true; pnl.Enabled = true;
tabc.Enabled = true; tabc.Enabled = true;
LogUtil.info($"初始化完成:{state},{msg}");
if (state) if (state)
{ {
CodeManager.LoadCamera(true); CodeManager.LoadCamera(true);
...@@ -534,7 +548,7 @@ namespace TheMachine ...@@ -534,7 +548,7 @@ namespace TheMachine
private void cb_EnableBuzzer_CheckedChanged(object sender, EventArgs e) private void cb_EnableBuzzer_CheckedChanged(object sender, EventArgs e)
{ {
Config.Set("Device_EnableBuzzer", cb_EnableBuzzer.Checked); Setting_Init.Enable_Buzzer= cb_EnableBuzzer.Checked;
AlarmBuzzer.Enable = cb_EnableBuzzer.Checked; AlarmBuzzer.Enable = cb_EnableBuzzer.Checked;
} }
...@@ -675,19 +689,19 @@ namespace TheMachine ...@@ -675,19 +689,19 @@ namespace TheMachine
private void 简体中文ToolStripMenuItem_Click(object sender, EventArgs e) private void 简体中文ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
Config.Set("Device_Default_Language", crc.China); Setting_Init.App_Default_Language = crc.China;
crc.LanguageChange(); crc.LanguageChange();
} }
private void 日本语ToolStripMenuItem_Click(object sender, EventArgs e) private void 日本语ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
Config.Set("Device_Default_Language", crc.Japan); Setting_Init.App_Default_Language = crc.Japan;
crc.LanguageChange(); crc.LanguageChange();
} }
private void englishToolStripMenuItem_Click(object sender, EventArgs e) private void englishToolStripMenuItem_Click(object sender, EventArgs e)
{ {
Config.Set("Device_Default_Language", crc.English); Setting_Init.App_Default_Language = crc.English;
crc.LanguageChange(); crc.LanguageChange();
} }
#region 窗口管理 #region 窗口管理
......
...@@ -28,7 +28,7 @@ namespace TheMachine ...@@ -28,7 +28,7 @@ namespace TheMachine
//CodeManager.TestHasReel("", out string a, out string b); //CodeManager.TestHasReel("", out string a, out string b);
//return; //return;
if (Setting_Init.Func_CheckReelLocInFix) if (Setting_Init.Enable_CheckReelLocInFix)
DeviceLibrary.VisionHelper.CheckAndRunServer(); DeviceLibrary.VisionHelper.CheckAndRunServer();
_ = new Mutex(true, Application.ProductName, out bool ret); _ = new Mutex(true, Application.ProductName, out bool ret);
......
...@@ -110,7 +110,7 @@ namespace TheMachine ...@@ -110,7 +110,7 @@ namespace TheMachine
private void cb_tempsensorport_SelectedIndexChanged(object sender, EventArgs e) private void cb_tempsensorport_SelectedIndexChanged(object sender, EventArgs e)
{ {
HumitureController.Init(Setting_Init.Device_Humiture_Port); HumitureController.Init(Setting_Init.App_Humiture_Port);
} }
private void timer1_Tick(object sender, EventArgs e) private void timer1_Tick(object sender, EventArgs e)
......
...@@ -303,7 +303,7 @@ namespace TheMachine ...@@ -303,7 +303,7 @@ namespace TheMachine
MessageBox.Show(crc.GetString("not_allow", "禁止") + ":\r\n" + crc.GetString("UpDownAxis_IHPosition_P3", "升降轴库位入料高点P3") + $"[{_aCStorePosition.UpDownAxis_IHPosition_P3}]" + "<" + crc.GetString("UpDownAxis_ILPosition_P4", "升降轴库位入料低点P4") + $"[{_aCStorePosition.UpDownAxis_ILPosition_P4}]"); MessageBox.Show(crc.GetString("not_allow", "禁止") + ":\r\n" + crc.GetString("UpDownAxis_IHPosition_P3", "升降轴库位入料高点P3") + $"[{_aCStorePosition.UpDownAxis_IHPosition_P3}]" + "<" + crc.GetString("UpDownAxis_ILPosition_P4", "升降轴库位入料低点P4") + $"[{_aCStorePosition.UpDownAxis_ILPosition_P4}]");
return; return;
} }
int maxDiff = Setting_Init.UpDownAxis_Position_MaxRange; int maxDiff = Setting_Init.Protection_ReelUpDownAxis_MaxRange;
if ((_aCStorePosition.UpDownAxis_IHPosition_P3 - _aCStorePosition.UpDownAxis_ILPosition_P4) > maxDiff) if ((_aCStorePosition.UpDownAxis_IHPosition_P3 - _aCStorePosition.UpDownAxis_ILPosition_P4) > maxDiff)
{ {
MessageBox.Show(crc.GetString("not_allow", "禁止") + ":\r\n(" MessageBox.Show(crc.GetString("not_allow", "禁止") + ":\r\n("
......
...@@ -26,7 +26,7 @@ namespace TheMachine ...@@ -26,7 +26,7 @@ namespace TheMachine
private string Crc_GetLanguageEvent() private string Crc_GetLanguageEvent()
{ {
return Setting_Init.Device_Default_Language; return Setting_Init.App_Default_Language;
} }
private void Crc_LanguageChangeEvent(object sender, EventArgs e) private void Crc_LanguageChangeEvent(object sender, EventArgs e)
......
...@@ -47,7 +47,7 @@ namespace TheMachine ...@@ -47,7 +47,7 @@ namespace TheMachine
public uc_boxdebug() public uc_boxdebug()
{ {
InitializeComponent(); InitializeComponent();
Setting_Init.Device_DisableUpdownProtect = false; Setting_Init.Disable_UpdownProtect = false;
} }
public void Init() public void Init()
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!