Commit b59586fd 张东亮

超级配置加注释

1 个父辈 721b49e4
......@@ -13,10 +13,12 @@ namespace OnlineStore.Common
public class Setting_Init
{
[MyConfigComment("当前默认语言")]
public static MyConfig<string> Device_Default_Language = "zh-CN";
[MyConfigComment("系统启动时自动启动料仓,=1时自动启动,并隐藏窗口,=0时不需要")]
public static MyConfig<int> App_AutoRun = 0;
[MyConfigComment("系统主界面标题")]
public static MyConfig<string> App_Title = "MIMO G2";
public static MyConfig<string> App_Title = "SMD BOX MIMO G2";
/// <summary>
/// 摄像机名称
/// </summary>
......@@ -124,13 +126,15 @@ namespace OnlineStore.Common
public static MyConfig<int> CamTestReel_SL = 20;
[MyConfigComment("NG平台颜色检测料盘:饱和度S的最大值")]
public static MyConfig<int> CamTestReel_SH = 100;
[MyConfigComment("启用NG平台检测功能")]
public static MyConfig<bool> CamTestReel_Ability = false;
[MyConfigComment("NG平台颜色检测料盘:阈值设置,小于该值认为有料")]
public static MyConfig<double> CamTestReel_threshold = 0.6;
[MyConfigComment("是否单进单出")]
public static MyConfig<bool> Device_SingleInSingleOut = false;
[MyConfigComment("SMF服务器地址")]
public static MyConfig<string> http_server = "";
......@@ -144,6 +148,53 @@ namespace OnlineStore.Common
public static MyConfig<bool> Device_DisableSingleDoor = false;
[MyConfigComment("屏蔽料串门")]
public static MyConfig<bool> Device_Disable_StringDoor = false;
[MyConfigComment("是否启用在校准库位检查料盘功能")]
public static MyConfig<bool> Func_CheckReelLocInFix = false;
[MyConfigComment("关闭日志窗口")]
public static MyConfig<bool> Device_DisableLogWindow = true;
[MyConfigComment("启用蜂鸣器")]
public static MyConfig<bool> Device_EnableBuzzer = true;
[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("压紧轴回原失败重试最大次数")]
public static MyConfig<int> Comp_Axis_HomeResetTimes = 999;
[MyConfigComment("是否使用校准库位")]
public static MyConfig<bool> Device_Use_Fixpos = false;
[MyConfigComment("X08 AGV到位信号是否是料串门光栅")]
public static MyConfig<bool> Device_IO_X08IsStringDoor_SafetyLightCurtains = false;
[MyConfigComment("料串门关闭延时,到位信号亮后延时一定时间再停止")]
public static MyConfig<int> Device_StringDoor_DownOverTimeMS = 0;
[MyConfigComment("料串门打开延时,到位信号亮后延时一定时间再停止")]
public static MyConfig<int> Device_StringDoor_UpOverTimeMS = 0;
[MyConfigComment("屏蔽门安全检查")]
public static MyConfig<bool> Device_Disable_DoorSafeCheck = false;
[MyConfigComment("是否启用手动关单料门")]
public static MyConfig<bool> Device_ManualCloseSingleDoor = false;
[MyConfigComment("入库料盘拿走后,料串下降一段距离")]
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("空料串到P2点与料盘定位信号补偿值")]
public static MyConfig<int> OffsetEmptyToTrayCheck = 10;
}
}
......@@ -439,7 +439,7 @@ namespace DeviceLibrary
}
}
double calc = maskcout / (double)roi.CoverCount;
logtxt += $" 检测到Roi[{i}]覆盖面积计数:maskcout:{maskcout}/{roi.CoverCount}={calc}<{threshold},result:{calc <= threshold}\r\n";
logtxt += $" 检测到Roi[{i}]覆盖面积计数:maskcout:{maskcout}/{roi.CoverCount}={calc}<{threshold},result:{(calc <= threshold? "有料" : "无料")}\r\n";
if (calc <= threshold)
{
hasReel = true;
......
......@@ -24,7 +24,7 @@ namespace DeviceLibrary
AxisBean Comp_Axis;
MoveInfo MoveInfo;
public string ErrMsgTxt = "";
int Comp_Axis_HomeResetTimes = ConfigHelper.Config.Get($"Comp_Axis_HomeResetTimes", 999);
int Comp_Axis_HomeResetTimes = Setting_Init.Comp_Axis_HomeResetTimes;
public bool IgnoreX09 = false;
public event Action<string, StoreMoveType, bool> InOutEndProcessEvent;
......@@ -187,7 +187,7 @@ namespace DeviceLibrary
{
Msg.add("", MsgLevel.info, ErrInfo.X09_Clear);
IgnoreX09 = false;
if (To.posid == BoxStorePosition.strings && ConfigHelper.Config.Get("Device_Use_Fixpos", false) && Fix != null)
if (To.posid == BoxStorePosition.strings && Setting_Init.Device_Use_Fixpos && Fix != null)
MoveInfo.NextMoveStep(MoveStep.StoreFIX01);
else
MoveInfo.NextMoveStep(MoveStep.StoreTS10);
......@@ -219,7 +219,7 @@ namespace DeviceLibrary
break;
case MoveStep.StoreFIX04:
if (ConfigHelper.Config.Get("Func_CheckReelLocInFix", false))
if (Setting_Init.Func_CheckReelLocInFix)
{
MoveInfo.NextMoveStep(MoveStep.StoreFIX04_01_InoutBackToP1);
InOut_Axis.AbsMove(MoveInfo, Config.InOut_P1, Config.InOut_P1_speed);
......@@ -393,7 +393,11 @@ namespace DeviceLibrary
MoveInfo.log($"{storeMoveType}:库位测试模式,上下轴,旋转不返回待机点");
break;
}
if(RobotManage.InoutDebugMode)
{
MoveInfo.log($"{storeMoveType}:库位测试模式,上下轴,旋转不返回待机点");
break;
}
if (To.posid == BoxStorePosition.strings)
{
UpDown_Axis.AbsMove(MoveInfo, Config.UpDown_P5, Config.UpDown_P1_speed);
......@@ -408,7 +412,7 @@ namespace DeviceLibrary
Middle_Axis.AbsMove(MoveInfo, Config.Middle_P1, Config.Middle_P1_speed);
if (Comp_Axis_HomeResetTimes <= 0)
{
Comp_Axis_HomeResetTimes = ConfigHelper.Config.Get<int>("Comp_Axis_HomeResetTimes");
Comp_Axis_HomeResetTimes = Setting_Init.Comp_Axis_HomeResetTimes;
Comp_Axis.HomeMove(MoveInfo);
MoveInfo.log($"{storeMoveType}:Comp_Axis到达最大次数开始回原");
}
......
......@@ -151,7 +151,7 @@ namespace DeviceLibrary
int reelhighdiff = 0;
if (reel.PlateW > 7)
reelhighdiff = ConfigHelper.Config.Get("Device_1315_ReelHeight_Compensation", 0);
reelhighdiff = Setting_Init.Device_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);
......@@ -189,7 +189,7 @@ namespace DeviceLibrary
}
int reelhighdiff = 0;
if (reel.PlateW > 7)
reelhighdiff = ConfigHelper.Config.Get("Device_1315_ReelHeight_Compensation", 0);
reelhighdiff = Setting_Init.Device_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_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;
......
......@@ -37,20 +37,20 @@ namespace DeviceLibrary
Current_Temperate = temp.Temperate;
//var tempIsOK = Current_Temperate < ServerCM.Max_Temperature;
var humiNeedStart = Current_Humidity > ServerCM.Max_Humidity - ConfigHelper.Config.Get("Device_HumidityStartOffser", 1);
var humiNeedStop = Current_Humidity < ServerCM.Max_Humidity - ConfigHelper.Config.Get("Device_HumidityEndOffser", 10);
var humiNeedStart = Current_Humidity > ServerCM.Max_Humidity - Setting_Init.Device_HumidityStartOffser;
var humiNeedStop = Current_Humidity < ServerCM.Max_Humidity - Setting_Init.Device_HumidityEndOffser;
if (humiNeedStart && !airisopen)
{
IOMove(IO_Type.NitrogenValve, IO_VALUE.HIGH);
airisopen = true;
LogUtil.info($"开始吹气,当前最大湿度:{Current_Humidity} > {ServerCM.Max_Humidity}-{ConfigHelper.Config.Get("Device_HumidityStartOffser", 1)}.");
LogUtil.info($"开始吹气,当前最大湿度:{Current_Humidity} > {ServerCM.Max_Humidity}-{Setting_Init.Device_HumidityStartOffser}.");
}
else if (humiNeedStop && airisopen)
{
IOMove(IO_Type.NitrogenValve, IO_VALUE.LOW);
airisopen = false;
LogUtil.info($"关闭吹气,当前最大湿度:{Current_Humidity} < {ServerCM.Max_Humidity}-{ConfigHelper.Config.Get("Device_HumidityEndOffser", 10)}.");
LogUtil.info($"关闭吹气,当前最大湿度:{Current_Humidity} < {ServerCM.Max_Humidity}-{Setting_Init.Device_HumidityEndOffser}.");
}
}
bool lastTHoutRangeStatus = false;
......
......@@ -13,7 +13,7 @@ namespace DeviceLibrary
{
public partial class MainMachine : IRobot
{
public string Name { get; set; } = "MIMO_G2";
public string Name { get; set; } = "SMD BOX MIMO G2";
private bool _canRunning = true;
public bool canRunning
{
......@@ -144,23 +144,22 @@ namespace DeviceLibrary
RobotManage.Config.DOList.Remove(IO_Type.StringDoor_Open);
RobotManage.Config.DOList.Remove(IO_Type.StringDoor_Close);
var sf = "";
if (ConfigHelper.Config.Get("Device_IO_X08IsStringDoor_SafetyLightCurtains", false))
if (Setting_Init.Device_IO_X08IsStringDoor_SafetyLightCurtains)
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.DownOverTimeMS = ConfigHelper.Config.Get("Device_StringDoor_DownOverTimeMS", 0);
StringDoor.UpOverTimeMS = ConfigHelper.Config.Get("Device_StringDoor_UpOverTimeMS", 0);
StringDoor.DownOverTimeMS = Setting_Init.Device_StringDoor_DownOverTimeMS;
StringDoor.UpOverTimeMS = Setting_Init.Device_StringDoor_UpOverTimeMS;
StringDoor.ResumeWaitTimeSec = 5;
LogUtil.info("加载料串门类型为:步进");
}
else
LogUtil.info("加载料串门类型为:气缸");
if (!ConfigHelper.Config.Get("Device_IO_X08IsStringDoor_SafetyLightCurtains", false))
if (!Setting_Init.Device_IO_X08IsStringDoor_SafetyLightCurtains)
{
RobotManage.Config.DIList.Remove(IO_Type.AGV_OnPosition);
}
if (ConfigHelper.Config.Get("Device_Disable_DoorSafeCheck", false))
if (Setting_Init.Device_Disable_DoorSafeCheck)
{
RobotManage.Config.DIList.Remove(IO_Type.LeftDoorClose_Check);
RobotManage.Config.DIList.Remove(IO_Type.RightDoorClose_Check);
RobotManage.Config.DIList.Remove(IO_Type.BackDoorClose_Check);
......@@ -184,7 +183,7 @@ namespace DeviceLibrary
};
//BoxTransport_InOutEndProcessEvent;
//ProcessMsgEvent += MainMachine_ProcessMsgEvent;
ConfigHelper.Config.Get("Device_Disable_StringDoor", false);
Setting_Init.Device_Disable_StringDoor = false;
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);
......@@ -192,9 +191,7 @@ namespace DeviceLibrary
IOMonitor.RegisterIO(IO_Type.AutoRun_Single, Config, IO_VALUE.HIGH, Run_BTN, 2500, 100);
IOMonitor.RegisterIO(IO_Type.SafetyLightCurtains, Config, IO_VALUE.LOW, DeviceSuddenStop, 1, 1);
LedProcessInit();
ConfigHelper.Config.Get("CamTestReel_Ability", false);
ConfigHelper.Config.Set("CamTestReel_debug", false);
ConfigHelper.Config.Get("Device_1315_ReelHeight_Compensation", 0);
Setting_Init.CamTestReel_debug = false;
initAgv();
ServerCM = new ServerCommunication();
}
......@@ -416,7 +413,7 @@ namespace DeviceLibrary
{
ResetMoveInfo.log("复位时没有料串");
}
else if (!ConfigHelper.Config.Get("Device_IO_X08IsStringDoor_SafetyLightCurtains", false))
else if (!Setting_Init.Device_IO_X08IsStringDoor_SafetyLightCurtains)
{
if (IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.HIGH))
{
......@@ -558,11 +555,11 @@ namespace DeviceLibrary
if (h.Value)
{
Msg.add(crc.GetString(L.x29_higt_has_reel, "系统启动检测到有无信息料盘,等待取走单料口料盘"), MsgLevel.alarm);
if (ConfigHelper.Config.Get("CamTestReel_Ability", false))
if (Setting_Init.CamTestReel_Ability)
{
//ResetMoveInfo.NextMoveStep(MoveStep.H14_HomeReset);
//ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (ConfigHelper.Config.Get("Device_ManualCloseSingleDoor", false))
if (Setting_Init.Device_ManualCloseSingleDoor)
RobotManage.UserPause(crc.GetString("please_take_ngdoor_reel", "等待取走单口料盘"));
}
else
......@@ -636,7 +633,7 @@ namespace DeviceLibrary
}
else if ((RobotManage.HasReelInFixPos(out ReelParam reelParam))
&& boxTransport.IsComplateOrFree
&& ClampMoveInfo.MoveStep == MoveStep.Wait && ConfigHelper.Config.Get("Device_Use_Fixpos", false)
&& ClampMoveInfo.MoveStep == MoveStep.Wait && Setting_Init.Device_Use_Fixpos
&& IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW))
{
var pos = BoxStorePosition.GetFixPos(Config, reelParam);
......@@ -693,7 +690,7 @@ namespace DeviceLibrary
// }
// Msg.add(crc.GetString(L.SafetyLight_is_block, "安全光栅被遮挡") + (ok ? ignorestring : ""), MsgLevel.warning);
//}
if (ConfigHelper.Config.Get("Device_IO_X08IsStringDoor_SafetyLightCurtains", false))
if (Setting_Init.Device_IO_X08IsStringDoor_SafetyLightCurtains)
{
//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))
......@@ -722,7 +719,7 @@ namespace DeviceLibrary
}
}
}
if (!ConfigHelper.Config.Get("Device_Disable_DoorSafeCheck", false))
if (!Setting_Init.Device_Disable_DoorSafeCheck)
{
if (IOValue(IO_Type.LeftDoorClose_Check).Equals(IO_VALUE.LOW))
{
......
......@@ -269,7 +269,7 @@ namespace DeviceLibrary
break;
case MoveStep.NGOUT_02:
ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_03);
if (ConfigHelper.Config.Get("CamTestReel_Ability", false))
if (Setting_Init.CamTestReel_Ability)
{
var h1 = NGDoor_Tray_Test_Reel;
if (!h1.HasValue)
......@@ -298,16 +298,16 @@ namespace DeviceLibrary
if (h.Value)
{
Msg.add(crc.GetString(L.please_take_ngdoor_reel, "等待取走单料口料盘"), MsgLevel.alarm);
if (ConfigHelper.Config.Get("CamTestReel_Ability", false))
if (Setting_Init.CamTestReel_Ability)
{
//ClampMoveInfo.LastSetpTime = DateTime.Now;
//ClampMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (ConfigHelper.Config.Get("Device_ManualCloseSingleDoor", false))
if (Setting_Init.Device_ManualCloseSingleDoor)
RobotManage.UserPause(crc.GetString("please_take_ngdoor_reel", "等待取走单口料盘"));
}
else
{
if (!ConfigHelper.Config.Get("CamTestReel_Ability", false))
if (!Setting_Init.CamTestReel_Ability)
ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_04);
RobotManage.UserPause(crc.GetString("please_take_ngdoor_reel", "等待取走单口料盘"));
}
......@@ -381,7 +381,7 @@ namespace DeviceLibrary
Msg.add(crc.GetString(L.x29_low_no_reel, "检测相机打开失败."), MsgLevel.alarm);
}
else
if (!ConfigHelper.Config.Get("CamTestReel_Ability", false) || h.Value)
if (!Setting_Init.CamTestReel_Ability || h.Value)
{ }
else
{
......@@ -398,7 +398,7 @@ namespace DeviceLibrary
{
get
{
if (ConfigHelper.Config.Get("CamTestReel_Ability", false))
if (Setting_Init.CamTestReel_Ability)
return CodeManager.TestHasReel(CodeManager.hikNameList[0],out _,out _);
else
return IOValue(IO_Type.NGDoor_Tray_Check).Equals(IO_VALUE.HIGH);
......
......@@ -81,7 +81,7 @@ namespace DeviceLibrary
StringMoveInfo.LastSetpTime = DateTime.Now;
StringMoveInfo.IsInWait = true;
if (!ConfigHelper.Config.Get("Device_Disable_StringDoor", false))
if (!Setting_Init.Device_Disable_StringDoor)
StringDoorOpen(StringMoveInfo);
return crc.GetString(L.begin_open_string_door, "开始打开料串门");
......@@ -91,7 +91,7 @@ namespace DeviceLibrary
public string doCloseBatchDoor()
{
LogUtil.info("请求关闭批量料门");
if (!ConfigHelper.Config.Get("Device_IO_X08IsStringDoor_SafetyLightCurtains", false))
if (!Setting_Init.Device_IO_X08IsStringDoor_SafetyLightCurtains)
{
if (IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.HIGH))
{
......@@ -105,7 +105,7 @@ namespace DeviceLibrary
//RobotManage.mainMachine.StringMoveInfo.NextMoveStep(RobotManage.mainMachine.StringMoveInfo.MoveStep);
StringMoveInfo.LastSetpTime = DateTime.Now;
StringMoveInfo.IsInWait = true;
if (!ConfigHelper.Config.Get("Device_Disable_StringDoor", false))
if (!Setting_Init.Device_Disable_StringDoor)
StringDoorClose(StringMoveInfo);
return crc.GetString(L.begin_close_string_door, "开始关闭料串门");
}
......
......@@ -90,7 +90,7 @@ namespace DeviceLibrary
/// <summary>
/// 入库料盘拿走后,料串下降一段距离
/// </summary>
int batchDownDistance = ConfigHelper.Config.Get("Batch_ReelGetedDownMM", 8);
int batchDownDistance = Setting_Init.Batch_ReelGetedDownMM;
int RealPulse = 0;
void StringProcess()
{
......@@ -181,7 +181,7 @@ namespace DeviceLibrary
return;
}
}
if (ConfigHelper.Config.Get("Device_Disable_StringDoor", false) || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH))
if (Setting_Init.Device_Disable_StringDoor || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH))
{
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_02b);
StringMoveInfo.log($"批量轴高速到顶部检测点");
......@@ -201,7 +201,7 @@ namespace DeviceLibrary
BatchAxisToTagLow(StringMoveInfo);
break;
case MoveStep.StringLoad_03:
if (ConfigHelper.Config.Get("Device_Disable_StringDoor", false) || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH))
if (Setting_Init.Device_Disable_StringDoor || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH))
{
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_04);
StringMoveInfo.log($"批量轴到顶部检测点");
......@@ -218,7 +218,7 @@ namespace DeviceLibrary
case MoveStep.StringLoad_04:
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_04b);
//OffsetEmptyToTrayCheck 空料串到P2点与料盘定位信号补偿值
LastOutDownPosition = Batch_Axis.GetAclPosition() + ConfigHelper.Config.Get("OffsetEmptyToTrayCheck", 10) * Config.Batch_PoToMM;
LastOutDownPosition = Batch_Axis.GetAclPosition() + Setting_Init.OffsetEmptyToTrayCheck * Config.Batch_PoToMM;
if (LastStringState == StringStateE.OutStore)
{
StringMoveInfo.log($"恢复上次料串信息为出库料串");
......@@ -229,7 +229,7 @@ namespace DeviceLibrary
{
StringMoveInfo.log($"料串检测为空");
StringState = StringStateE.OutStore;
if (ConfigHelper.Config.Get("Device_String_StandbyAtBottom", true) && OutStoreJobList.Count == 0 && ServerCM.queueTaskCount <= 0 && boxTransport.IsComplateOrFree)
if (Setting_Init.Device_String_StandbyAtBottom && OutStoreJobList.Count == 0 && ServerCM.queueTaskCount <= 0 && boxTransport.IsComplateOrFree)
{
SetReelHeight(GetHeight(ClampMoveInfo));
StringMoveInfo.log($"当前空料串, 并且没有出库任务, 料串下降待机");
......@@ -261,7 +261,7 @@ namespace DeviceLibrary
{
tpos2 = 0;
}
int maxReelHeight = ConfigHelper.Config.Get("ReelMaxHeightMM", 60);
int maxReelHeight = Setting_Init.ReelMaxHeightMM;
int minPos1 = tpos2 - Config.Batch_PoToMM * maxReelHeight;
if (StringState == StringStateE.OutStore && minPos1 < 0)
{
......@@ -336,7 +336,7 @@ namespace DeviceLibrary
case MoveStep.StringReadyPut:
Msg.add(crc.GetString(L.string_ready_for_put, "料串放料准备就绪"), MsgLevel.info);
StringMoveInfo.log($"料串放料准备就绪");
if (ConfigHelper.Config.Get("Device_String_StandbyAtBottom", true) && ServerCM.queueTaskCount <= 0 && boxTransport.IsComplateOrFree && OutStoreJobList.Count <= 0)
if (Setting_Init.Device_String_StandbyAtBottom && ServerCM.queueTaskCount <= 0 && boxTransport.IsComplateOrFree && OutStoreJobList.Count <= 0)
{
StringMoveInfo.log($"当前没有出库任务, 料串下降待机");
StringMoveInfo.NextMoveStep(MoveStep.StringOut_01);
......@@ -344,7 +344,7 @@ namespace DeviceLibrary
break;
case MoveStep.StringReelPut:
LastStringState = StringStateE.OutStore;
if (ConfigHelper.Config.Get("Device_OutStoreStringReelCheck", false))
if (Setting_Init.Device_OutStoreStringReelCheck)
{
StringMoveInfo.NextMoveStep(MoveStep.StringReelPut_03);
StringMoveInfo.log($"检测阻挡工作");
......@@ -354,7 +354,7 @@ namespace DeviceLibrary
var tpos = Batch_Axis.GetAclPosition() - Config.Batch_PoToMM * (StringMoveInfo.MoveParam.PlateH + Config.Batch_OutPlateDownMM);
if (tpos < 0)
tpos = 0;
maxReelHeight = ConfigHelper.Config.Get("ReelMaxHeightMM", 60);
maxReelHeight = Setting_Init.ReelMaxHeightMM;
if (tpos < Config.Batch_P2 * 0.3 && !downCheck1)
{
StringMoveInfo.log($"料串下降到30%位置,重新上升");
......@@ -422,7 +422,7 @@ namespace DeviceLibrary
break;
case MoveStep.StringReelPut_05:
LastOutDownPosition = Batch_Axis.GetAclPosition();
maxReelHeight = ConfigHelper.Config.Get("ReelMaxHeightMM", 60);
maxReelHeight = Setting_Init.ReelMaxHeightMM;
var tpos3 = Batch_Axis.GetAclPosition() - Config.Batch_PoToMM * Config.Batch_OutPlateDownMM;
if (tpos3 < 0)
tpos3 = 0;
......@@ -480,7 +480,7 @@ namespace DeviceLibrary
}
break;
case MoveStep.StringOut_05:
if (ConfigHelper.Config.Get("Device_Disable_StringDoor", false) || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH))
if (Setting_Init.Device_Disable_StringDoor || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH))
{
StringMoveInfo.NextMoveStep(MoveStep.Wait);
StringMoveInfo.log($"折叠门已关闭");
......@@ -491,7 +491,7 @@ namespace DeviceLibrary
}
break;
case MoveStep.StringOut_06:
if (ConfigHelper.Config.Get("Device_Disable_StringDoor", false) || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH))
if (Setting_Init.Device_Disable_StringDoor || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH))
{
StringMoveInfo.NextMoveStep(MoveStep.Wait);
StringMoveInfo.log($"料串未拿走,直接关门");
......
......@@ -11,6 +11,13 @@ namespace DeviceLibrary
{
Wait,
WaitErr,
//库位测试
AIOTest_01_CloseFlip,
AIOTest_02_Pause1,
AIOTest_03_FirstReady,
AIOTest_04_FirstPuted,
AIOTest_05_Pause2,
AIOTest_06_SecondReady,
//回原流程
H01_HomeReset,
H02_HomeReset_01,
......
......@@ -29,7 +29,7 @@ namespace DeviceLibrary
CheckForIllegalCrossThreadCalls = false;
crc.OpenResourceLog = true;
crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
crc.CurrLanguage = ConfigHelper.Config.Get("Device_Default_Language", "zh-CN");
crc.CurrLanguage = Setting_Init.Device_Default_Language;
}
private void Crc_LanguageChangeEvent(object sender, EventArgs e)
......
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
</configSections>
<appSettings>
<add key="CodeType" value="QR Code#Data Matrix ECC 200#barcode"/>
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<add key="CodeParamPath" value="Conifg\"/>
</appSettings>
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="logs/AutoScanAndLabel.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n"/>
</layout>
</appender>
<appender name="HCBOARD" type="log4net.Appender.RollingFileAppender">
<file value="logs/HCBOARD.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n"/>
</layout>
</appender>
<appender name="LngResource" type="log4net.Appender.RollingFileAppender">
<file value="logs/LngResource.log"/>
<param name="Encoding" value="UTF-8"/>
<appendToFile value="true"/>
<rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%m%n"/>
</layout>
</appender>
<logger name="RollingLogFileAppender">
<level value="ALL"/>
<appender-ref ref="RollingLogFileAppender"/>
</logger>
<logger name="HCBOARD" additivity="false">
<level value="ALL"/>
<appender-ref ref="HCBOARD"/>
</logger>
<logger name="LngResource" additivity="false">
<level value="ALL"/>
<appender-ref ref="LngResource"/>
</logger>
<!--<root>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" />
</configSections>
<appSettings>
<add key="CodeType" value="QR Code#Data Matrix ECC 200#barcode" />
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<add key="CodeParamPath" value="Conifg\" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
</appSettings>
<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="logs/MIMO_G2.log" />
<param name="Encoding" value="UTF-8" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyy-MM-dd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n" />
</layout>
</appender>
<appender name="HCBOARD" type="log4net.Appender.RollingFileAppender">
<file value="logs/HCBOARD.log" />
<param name="Encoding" value="UTF-8" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyy-MM-dd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n" />
</layout>
</appender>
<appender name="LngResource" type="log4net.Appender.RollingFileAppender">
<file value="logs/LngResource.log" />
<param name="Encoding" value="UTF-8" />
<appendToFile value="true" />
<rollingStyle value="Date" />
<datePattern value="yyyy-MM-dd" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%m%n" />
</layout>
</appender>
<logger name="RollingLogFileAppender">
<level value="ALL" />
<appender-ref ref="RollingLogFileAppender" />
</logger>
<logger name="HCBOARD" additivity="false">
<level value="ALL" />
<appender-ref ref="HCBOARD" />
</logger>
<logger name="LngResource" additivity="false">
<level value="ALL" />
<appender-ref ref="LngResource" />
</logger>
<!--<root>
<level value="Info" />
<appender-ref ref="RollingLogFileAppender" />
</root>-->
</log4net>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
</startup>
</log4net>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0"/>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
<system.web>
<membership defaultProvider="ClientAuthenticationMembershipProvider">
<providers>
<add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
</providers>
</membership>
<roleManager defaultProvider="ClientRoleProvider" enabled="true">
<providers>
<add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
</providers>
</roleManager>
</system.web>
</configuration>
\ No newline at end of file
......@@ -47,7 +47,7 @@ namespace TheMachine
private string Crc_GetLanguageEvent()
{
return ConfigHelper.Config.Get("Device_Default_Language", "zh-CN");
return Setting_Init.Device_Default_Language;
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
......@@ -123,10 +123,10 @@ namespace TheMachine
#endregion
LogUtil.info("开始初始化");
cb_EnableBuzzer.Checked = Config.Get("Device_EnableBuzzer", true);
cb_EnableBuzzer.Checked = Setting_Init.Device_EnableBuzzer;
AlarmBuzzer.BuzzerStateChange += AlarmBuzzer_BuzzerStateChange;
RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent;
if (!Config.Get("Device_DisableLogWindow", true))
if (!Setting_Init.Device_DisableLogWindow)
AddForm("tab_log", crc.GetString(L.tab_log, "日志"), lc);
RobotManage.UserPauseSet += RobotManage_UserPauseSet;
......
......@@ -28,7 +28,7 @@ namespace TheMachine
//CodeManager.TestHasReel("", out string a, out string b);
//return;
if (ConfigHelper.Config.Get("Func_CheckReelLocInFix", false))
if (Setting_Init.Func_CheckReelLocInFix)
DeviceLibrary.VisionHelper.CheckAndRunServer();
_ = new Mutex(true, Application.ProductName, out bool ret);
......
......@@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("MIMO_G2")]
[assembly: AssemblyTitle("SMD BOX MIMO G2")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("上海挚锦科技有限公司")]
[assembly: AssemblyProduct("MIMO_G2")]
[assembly: AssemblyProduct("SMD BOX MIMO G2")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
......@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
//
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.3.*")]
//[assembly: AssemblyVersion("1.0.*")]
//[assembly: AssemblyFileVersion("1.0.0.0")]
......@@ -7,7 +7,7 @@
<ProjectGuid>{61FDFF14-8BB7-439A-85A0-592E3011F4C4}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>TheMachine</RootNamespace>
<AssemblyName>MIMO_G2</AssemblyName>
<AssemblyName>MIMO_G2_Client</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
......@@ -56,7 +56,9 @@
<HintPath>..\DLL\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
......
......@@ -26,7 +26,7 @@ namespace TheMachine
private string Crc_GetLanguageEvent()
{
return ConfigHelper.Config.Get("Device_Default_Language", "zh-CN");
return Setting_Init.Device_Default_Language;
}
private void Crc_LanguageChangeEvent(object sender, EventArgs e)
......
......@@ -38,18 +38,20 @@
//
// pictureBox1
//
this.pictureBox1.Location = new System.Drawing.Point(2, 3);
this.pictureBox1.Location = new System.Drawing.Point(3, 4);
this.pictureBox1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(407, 305);
this.pictureBox1.Size = new System.Drawing.Size(543, 381);
this.pictureBox1.TabIndex = 0;
this.pictureBox1.TabStop = false;
//
// btn_getpic
//
this.btn_getpic.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btn_getpic.Location = new System.Drawing.Point(670, 419);
this.btn_getpic.Location = new System.Drawing.Point(893, 524);
this.btn_getpic.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btn_getpic.Name = "btn_getpic";
this.btn_getpic.Size = new System.Drawing.Size(194, 30);
this.btn_getpic.Size = new System.Drawing.Size(259, 38);
this.btn_getpic.TabIndex = 1;
this.btn_getpic.Text = "获取并测试";
this.btn_getpic.UseVisualStyleBackColor = true;
......@@ -58,30 +60,34 @@
// btn_save
//
this.btn_save.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btn_save.Location = new System.Drawing.Point(670, 503);
this.btn_save.Location = new System.Drawing.Point(893, 629);
this.btn_save.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.btn_save.Name = "btn_save";
this.btn_save.Size = new System.Drawing.Size(194, 30);
this.btn_save.Size = new System.Drawing.Size(259, 38);
this.btn_save.TabIndex = 1;
this.btn_save.Text = "保存配置";
this.btn_save.UseVisualStyleBackColor = true;
this.btn_save.Click += new System.EventHandler(this.btn_save_Click);
//
// pictureBox2
//
this.pictureBox2.Location = new System.Drawing.Point(421, 3);
this.pictureBox2.Location = new System.Drawing.Point(561, 4);
this.pictureBox2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.Size = new System.Drawing.Size(407, 305);
this.pictureBox2.Size = new System.Drawing.Size(543, 381);
this.pictureBox2.TabIndex = 0;
this.pictureBox2.TabStop = false;
//
// frmHSVdebug
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(914, 556);
this.ClientSize = new System.Drawing.Size(1219, 695);
this.Controls.Add(this.btn_save);
this.Controls.Add(this.btn_getpic);
this.Controls.Add(this.pictureBox2);
this.Controls.Add(this.pictureBox1);
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.Name = "frmHSVdebug";
this.Text = "HSVdebug";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
......
......@@ -20,12 +20,17 @@ namespace TheMachine.UC
private void btn_getpic_Click(object sender, EventArgs e)
{
ConfigHelper.Config.Set("CamTestReel_debug", true);
OnlineStore.Common.Setting_Init.CamTestReel_debug = true;
var result = CodeManager.TestHasReel(CodeManager.hikNameList[0],out string srcimg,out string prcimg);
if (result == null)
return;
}
private void btn_save_Click(object sender, EventArgs e)
{
}
}
}
......@@ -47,7 +47,7 @@ namespace TheMachine
public uc_boxdebug()
{
InitializeComponent();
ConfigHelper.Config.Set("Device_DisableUpdownProtect", false);
Setting_Init.Device_DisableUpdownProtect = false;
}
public void Init()
......
key 中文 Chinese
AboutBox1_AboutBox1_Text MIMO_PLUS
AboutBox1_AboutBox1_Text SMD BOX MIMO G2 SMD BOX MIMO G2
AboutBox1_tableLayoutPanel_labelCompanyName_Text 上海挚锦科技有限公司 Neotel Technology Co., Ltd
AboutBox1_tableLayoutPanel_okButton_Text 确定 OK
......
key 中文 日语
AboutBox1_AboutBox1_Text MIMO_PLUS
AboutBox1_AboutBox1_Text SMD BOX MIMO G2 SMD BOX MIMO G2
AboutBox1_tableLayoutPanel_labelCompanyName_Text 上海挚锦科技有限公司 Neotel
AboutBox1_tableLayoutPanel_okButton_Text 确定 はい
......
key 中文 中文
AboutBox1_AboutBox1_Text MIMO_PLUS MIMO_PLUS
AboutBox1_AboutBox1_Text SMD BOX MIMO G2 SMD BOX MIMO G2
AboutBox1_tableLayoutPanel_labelCompanyName_Text 上海挚锦科技有限公司 上海挚锦科技有限公司
AboutBox1_tableLayoutPanel_okButton_Text 确定 确定
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!