Commit 41366583 张东亮

超级配置分组显示

1 个父辈 09290e65
......@@ -95,9 +95,9 @@ namespace OnlineStore.Common
public static ASTemperateParam QueryData()
{
//修正值, 配置中写负数 -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);
List<double> data = queryData();
if (data.Count.Equals(2))
......
......@@ -11,7 +11,7 @@ namespace OnlineStore.Common
public class SMF
{
public static string DeviceType = "MIMO_G2";
static string _server = Setting_Init.http_server;
static string _server = Setting_Init.App_http_server;
static string server
{
get
......
{
"HIKIPCamera": [
{
"Name": "cam1",
"IP": "192.168.105.25",
"User": "admin",
"Password": "Acc123456",
"Port": 8000
}
]
}
\ 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
......@@ -153,10 +153,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Config\general.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Config\CameraA.json">
<None Include="Config\Config.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
......
......@@ -22,9 +22,9 @@ namespace DeviceLibrary
{
public class CodeManager
{
public static string CodeType = Setting_Init.CodeType;
private static int QRCodeCount = Setting_Init.QRCodeCount;
private static int CodeTimeOut = Setting_Init.CodeTimeOut;
public static string CodeType = Setting_Init.Camera_CodeType;
private static int QRCodeCount = Setting_Init.Camera_QRCodeCount;
private static int CodeTimeOut = Setting_Init.Camera_CodeTimeOut;
public static List<string> cameraNameList = new List<string>();
public static List<string> codeTypeList = new List<string>();
public static List<string> hikNameList = new List<string>();
......@@ -584,7 +584,7 @@ namespace DeviceLibrary
public static string GetCodeParamFilePath(string codePath)
{
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");
if (File.Exists(filePath))
{
......
......@@ -254,7 +254,7 @@ namespace DeviceLibrary
if (!axisBean.IsBusy)
{
LogUtil.info("恢复继续下降");
LogUtil.info($"{axisBean.AxisName} 恢复继续下降");
LiftDown(null);
}
return false;
......
......@@ -25,8 +25,8 @@ namespace DeviceLibrary
_storeStatus = value;
}
}
static string server = Setting_Init.http_server;
static string CID = Setting_Init.CID;
static string server = Setting_Init.App_http_server;
static string CID = Setting_Init.App_CID;
int StoreID = 1;
string StoreName = "";
......@@ -123,7 +123,7 @@ namespace DeviceLibrary
operation.op = 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 单盘入库
operation.data.Add("singleIn", "true");
......@@ -351,8 +351,8 @@ namespace DeviceLibrary
}
ServerCommStr = $"Send:{JsonHelper.SerializeObject(lineOperation)}\r\n Recv:{JsonHelper.SerializeObject(resultOperation)}";
}
finally
{
finally
{
Monitor.Exit(serverclock);
}
}
......@@ -501,7 +501,7 @@ namespace DeviceLibrary
{
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)
{
......@@ -696,7 +696,26 @@ namespace DeviceLibrary
if (isSingleOut)
RobotManage.mainMachine.AddSingleStoreTask(posId, plateW, plateH);
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;
......
......@@ -159,7 +159,7 @@ namespace DeviceLibrary
case MoveStep.StoreTS06:
MoveInfo.NextMoveStep(MoveStep.StoreTS07);
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}】");
break;
case MoveStep.StoreTS07:
......@@ -187,7 +187,7 @@ namespace DeviceLibrary
{
Msg.add("", MsgLevel.info, ErrInfo.X09_Clear);
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);
else
MoveInfo.NextMoveStep(MoveStep.StoreTS10);
......@@ -206,7 +206,7 @@ namespace DeviceLibrary
case MoveStep.StoreFIX02:
MoveInfo.NextMoveStep(MoveStep.StoreFIX03);
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}】");
break;
case MoveStep.StoreFIX03:
......@@ -219,7 +219,7 @@ namespace DeviceLibrary
break;
case MoveStep.StoreFIX04:
if (Setting_Init.Func_CheckReelLocInFix)
if (Setting_Init.Enable_CheckReelLocInFix)
{
MoveInfo.NextMoveStep(MoveStep.StoreFIX04_01_InoutBackToP1);
InOut_Axis.AbsMove(MoveInfo, Config.InOut_P1, Config.InOut_P1_speed);
......@@ -278,7 +278,7 @@ namespace DeviceLibrary
case MoveStep.StoreFIX04_05_DownToFixLow:
MoveInfo.NextMoveStep(MoveStep.StoreFIX04_06_InoutToPos);
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}】");
break;
case MoveStep.StoreFIX04_06_InoutToPos:
......@@ -352,7 +352,7 @@ namespace DeviceLibrary
case MoveStep.StoreTS12:
MoveInfo.NextMoveStep(MoveStep.StoreTS13);
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}】");
break;
case MoveStep.StoreTS13:
......
......@@ -50,6 +50,10 @@ namespace DeviceLibrary
/// </summary>
public int PlateW { get; set; }
/// <summary>
/// 是否时单盘入/出的料
/// </summary>
public bool IsSingleInOut { get; set; }
/// <summary>
/// 是否是入料NG料
/// </summary>
public bool IsNg = false;
......@@ -151,7 +155,7 @@ namespace DeviceLibrary
int reelhighdiff = 0;
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);
......@@ -189,7 +193,7 @@ namespace DeviceLibrary
}
int reelhighdiff = 0;
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_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;
......
......@@ -33,7 +33,7 @@ namespace DeviceLibrary
CurrentPosIndex = poslist.FindIndex(x => x.PositionNum == posname);
AutoInOutTest = true;
StopAutoInOut = false;
//AIOTMoveInfo.NewMove(MoveStep.Wait);
AIOTMoveInfo.NextMoveStep(MoveStep.AIOTest_Start);
return true;
}
public void StopAutoInOutTest()
......@@ -55,14 +55,13 @@ namespace DeviceLibrary
switch (AIOTMoveInfo.MoveStep)
{
case MoveStep.Wait:
//if (IsAIOTestReelIsReady)
//{
// AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn01);
// AIOTMoveInfo.log($"入库料盘已准备好");
//}
break;
case MoveStep.AIOTest_Start:
AIOTMoveInfo.NextMoveStep(MoveStep.AIOTest_01_CloseFlip);
OpenSingleDoor(AIOTMoveInfo);
CloseFlipDoor(AIOTMoveInfo);
AIOTMoveInfo.log($"关闭翻板门");
AIOTMoveInfo.log($"打开单料门、关闭翻板门");
break;
case MoveStep.AIOTest_01_CloseFlip:
AIOTMoveInfo.NextMoveStep(MoveStep.AIOTest_02_Pause1);
......@@ -128,72 +127,72 @@ namespace DeviceLibrary
return;
}
break;
case MoveStep.StoreIn01:
//AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn02);
//var ac = poslist[CurrentPosIndex];
//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))
//{
// AIOTMoveInfo.log($"料仓周转启动失败");
// AutoInOutTest = false;
// StopAutoInOut = true;
// return;
//}
//AIOTMoveInfo.log($"开始转运料盘第一盘");
break;
case MoveStep.StoreIn02:
//if (boxTransport.IsTakedReel)
//{
// AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn03);
// ReelTaked();
// AIOTMoveInfo.log($"第一盘料盘已取走");
//}
//else
//{
// Msg.add(crc.GetString(L.wait_reel_transfer, "单料口等待料盘离开."), MsgLevel.info);
//}
break;
case MoveStep.StoreIn03:
//if (Setting_Init.Device_AIOTest_DirectGetReel)
//{
// AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn04);
// CloseFlipDoor(AIOTMoveInfo);
// AIOTMoveInfo.log($"合拢翻转板,准备料盘");
//}
//else if (IsAIOTestReelIsReady)
//{
// AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn04);
// AIOTMoveInfo.log($"入库料盘已准备好");
//}
break;
case MoveStep.StoreIn04:
//if (boxTransport.IsComplateOrFree)
//{
// AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn05);
// AIOTMoveInfo.log($"第一盘料盘已到达目的地");
// if (CurrentPosIndex - 1 < 0 || StopAutoInOut)
// {
// AIOTMoveInfo.log($"已达到最后一个库位:{CurrentPosIndex},或手动停止{StopAutoInOut},自动出入库停止,将料盘送至出口");
// AIOTMoveInfo.NextMoveStep(MoveStep.StoreOut10);
// CloseFlipDoor(AIOTMoveInfo);
// return;
// }
// if (Setting_Init.Device_AIOTest_DirectGetReel)
// {
// RobotManage.UserPause("暂停放入第二盘", true);
// }
// AIOTMoveInfo.log($"开始转运料盘第二盘");
// ac = poslist[CurrentPosIndex - 1];
// reel = new ReelParam("auto", ac.BagWidth, ac.BagHigh);
// if (!boxTransport.Start(new BoxStorePosition(Config, StoreSide.NGDoor, reel), new BoxStorePosition(Config, ac, reel), StoreMoveType.InStore))
// {
// AIOTMoveInfo.log($"料仓周转启动失败");
// AutoInOutTest = false;
// StopAutoInOut = true;
// return;
// }
//}
break;
//case MoveStep.StoreIn01:
// //AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn02);
// //var ac = poslist[CurrentPosIndex];
// //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))
// //{
// // AIOTMoveInfo.log($"料仓周转启动失败");
// // AutoInOutTest = false;
// // StopAutoInOut = true;
// // return;
// //}
// //AIOTMoveInfo.log($"开始转运料盘第一盘");
// break;
//case MoveStep.StoreIn02:
// //if (boxTransport.IsTakedReel)
// //{
// // AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn03);
// // ReelTaked();
// // AIOTMoveInfo.log($"第一盘料盘已取走");
// //}
// //else
// //{
// // Msg.add(crc.GetString(L.wait_reel_transfer, "单料口等待料盘离开."), MsgLevel.info);
// //}
// break;
//case MoveStep.StoreIn03:
// //if (Setting_Init.Device_AIOTest_DirectGetReel)
// //{
// // AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn04);
// // CloseFlipDoor(AIOTMoveInfo);
// // AIOTMoveInfo.log($"合拢翻转板,准备料盘");
// //}
// //else if (IsAIOTestReelIsReady)
// //{
// // AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn04);
// // AIOTMoveInfo.log($"入库料盘已准备好");
// //}
// break;
//case MoveStep.StoreIn04:
// //if (boxTransport.IsComplateOrFree)
// //{
// // AIOTMoveInfo.NextMoveStep(MoveStep.StoreIn05);
// // AIOTMoveInfo.log($"第一盘料盘已到达目的地");
// // if (CurrentPosIndex - 1 < 0 || StopAutoInOut)
// // {
// // AIOTMoveInfo.log($"已达到最后一个库位:{CurrentPosIndex},或手动停止{StopAutoInOut},自动出入库停止,将料盘送至出口");
// // AIOTMoveInfo.NextMoveStep(MoveStep.StoreOut10);
// // CloseFlipDoor(AIOTMoveInfo);
// // return;
// // }
// // if (Setting_Init.Device_AIOTest_DirectGetReel)
// // {
// // RobotManage.UserPause("暂停放入第二盘", true);
// // }
// // AIOTMoveInfo.log($"开始转运料盘第二盘");
// // ac = poslist[CurrentPosIndex - 1];
// // reel = new ReelParam("auto", ac.BagWidth, ac.BagHigh);
// // if (!boxTransport.Start(new BoxStorePosition(Config, StoreSide.NGDoor, reel), new BoxStorePosition(Config, ac, reel), StoreMoveType.InStore))
// // {
// // AIOTMoveInfo.log($"料仓周转启动失败");
// // AutoInOutTest = false;
// // StopAutoInOut = true;
// // return;
// // }
// //}
// break;
case MoveStep.StoreIn05:
if (boxTransport.IsTakedReel)
{
......
......@@ -37,20 +37,20 @@ namespace DeviceLibrary
Current_Temperate = temp.Temperate;
//var tempIsOK = Current_Temperate < ServerCM.Max_Temperature;
var humiNeedStart = Current_Humidity > ServerCM.Max_Humidity - Setting_Init.Device_HumidityStartOffser;
var humiNeedStop = Current_Humidity < ServerCM.Max_Humidity - Setting_Init.Device_HumidityEndOffser;
var humiNeedStart = Current_Humidity > ServerCM.Max_Humidity - Setting_Init.App_HumidityStartOffser;
var humiNeedStop = Current_Humidity < ServerCM.Max_Humidity - Setting_Init.App_HumidityEndOffser;
if (humiNeedStart && !airisopen)
{
IOMove(IO_Type.NitrogenValve, IO_VALUE.HIGH);
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)
{
IOMove(IO_Type.NitrogenValve, IO_VALUE.LOW);
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;
......
......@@ -31,7 +31,7 @@ namespace DeviceLibrary
public bool isAlarm { get; set; } = false;
public RunStatus runStatus { get; set; } = RunStatus.Stop;
public Robot_Config Config { get; set; }
public bool UserPause { get; set; } = false;
public volatile bool UserPause = false;
public MoveInfo ResetMoveInfo;
......@@ -78,7 +78,7 @@ namespace DeviceLibrary
/// <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)
{
Config = _config;
......@@ -144,21 +144,21 @@ namespace DeviceLibrary
RobotManage.Config.DOList.Remove(IO_Type.StringDoor_Open);
RobotManage.Config.DOList.Remove(IO_Type.StringDoor_Close);
var sf = "";
if (Setting_Init.Device_IO_X08IsStringDoor_SafetyLightCurtains)
if (Setting_Init.StringDoor_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 = Setting_Init.Device_StringDoor_DownOverTimeMS;
StringDoor.UpOverTimeMS = Setting_Init.Device_StringDoor_UpOverTimeMS;
StringDoor.DownOverTimeMS = Setting_Init.StringDoor_DownOverTimeMS;
StringDoor.UpOverTimeMS = Setting_Init.StringDoor_UpOverTimeMS;
StringDoor.ResumeWaitTimeSec = 5;
LogUtil.info("加载料串门类型为:步进");
}
else
LogUtil.info("加载料串门类型为:气缸");
if (!Setting_Init.Device_IO_X08IsStringDoor_SafetyLightCurtains)
if (!Setting_Init.StringDoor_X08IsStringDoor_SafetyLightCurtains)
{
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.RightDoorClose_Check);
......@@ -183,7 +183,7 @@ namespace DeviceLibrary
};
//BoxTransport_InOutEndProcessEvent;
//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); });
IOMonitor.RegisterIO(IO_Type.SuddenStop_BTN, Config, IO_VALUE.LOW, SuddenStop_BTN, 2500, 100);
......@@ -257,7 +257,6 @@ namespace DeviceLibrary
/// 整机启动变量,设置为false后将退出线程,只在停止时调用
/// </summary>
bool mstart = true;
DateTime showTime = DateTime.Now;
public void Run()
{
mstart = true;
......@@ -283,7 +282,7 @@ namespace DeviceLibrary
StringProcess();
ClampProcess();
boxTransport.Process();
if (RobotManage.mainMachine.AutoInOutTest)
if (AutoInOutTest)
AutoInOutTestProcess();
else
StoreProcess();
......@@ -301,12 +300,7 @@ namespace DeviceLibrary
finally
{
var m = Msg.get();
if ((DateTime.Now - showTime).TotalMilliseconds > 800)
{
ProcessMsgEvent?.Invoke(m);
showTime = DateTime.Now;
}
ProcessMsgEvent?.Invoke(m);
ServerCM.ProcessMsg(m);
StoreStatus currnetstoreStatus = StoreStatus.None;
if (m.Find((aa) => aa.msgLevel == MsgLevel.alarm) == null)
......@@ -377,7 +371,7 @@ namespace DeviceLibrary
public void OpenSingleDoor(MoveInfo moveInfo)
{
if(!RobotManage.DisableSingleDoor)
if (!RobotManage.DisableSingleDoor)
{
SingleDoor.ToHigh(moveInfo);
}
......@@ -413,7 +407,7 @@ namespace DeviceLibrary
{
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))
{
......@@ -436,8 +430,6 @@ namespace DeviceLibrary
}
}
if (!Setting_Init.Device_Disable_StringDoor)
StringDoorClose(null);
break;
case MoveStep.H02_HomeReset_01:
......@@ -445,7 +437,7 @@ namespace DeviceLibrary
ResetMoveInfo.log("进出轴,批量轴回原,料串检测杆退回避让端");
InOut_Axis.HomeMove(ResetMoveInfo, 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);
Msg.add("", MsgLevel.info, ErrInfo.X09_Clear);
//SingleDoor.ToLow(ResetMoveInfo);
......@@ -463,7 +455,7 @@ namespace DeviceLibrary
Middle_Axis.HomeMove(ResetMoveInfo, forceHome);
UpDown_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);
break;
case MoveStep.H04_HomeReset:
......@@ -526,7 +518,7 @@ namespace DeviceLibrary
ResetMoveInfo.NextMoveStep(MoveStep.H13_HomeReset);
ResetMoveInfo.log("打开NG口门");
//CylinderMove(null, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.HIGH);
// SingleDoor.ToHigh(null);
// SingleDoor.ToHigh(null);
OpenSingleDoor(null);
break;
case MoveStep.H13_HomeReset:
......@@ -559,7 +551,7 @@ namespace DeviceLibrary
{
//ResetMoveInfo.NextMoveStep(MoveStep.H14_HomeReset);
//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", "等待取走单口料盘"));
}
else
......@@ -633,7 +625,7 @@ namespace DeviceLibrary
}
else if ((RobotManage.HasReelInFixPos(out ReelParam reelParam))
&& 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))
{
var pos = BoxStorePosition.GetFixPos(Config, reelParam);
......@@ -690,7 +682,7 @@ namespace DeviceLibrary
// }
// 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) &&
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
if (lastStringSafetyStatus)
{
lastStringSafetyStatus = false;
StringDoor.Pause();
StringDoorPause();
}
if (stringdoorSafetyProcStrategy == 0)
{
......@@ -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))
{
......@@ -770,8 +762,7 @@ namespace DeviceLibrary
AxisBean.StopMultiAxis(AxisBean.List);
MoveInfo.List.ForEach((m) => { m.CanWhileCount = 5; });
SafetyDevice.PauseAll();
StringDoor.Pause();
StringDoorPause();
if (runStatus == RunStatus.HomeReset)
{
ResetMoveInfo.NewMove(MoveStep.H01_HomeReset);
......
......@@ -263,7 +263,7 @@ namespace DeviceLibrary
ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_02);
ClampMoveInfo.log("打开单料口门");
//CylinderMove(null, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.HIGH);
// SingleDoor.ToHigh(null);
// SingleDoor.ToHigh(null);
OpenSingleDoor(null);
CodeManager.TestHasRight = true;
break;
......@@ -302,7 +302,7 @@ namespace DeviceLibrary
{
//ClampMoveInfo.LastSetpTime = DateTime.Now;
//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", "等待取走单口料盘"));
}
else
......@@ -340,7 +340,7 @@ namespace DeviceLibrary
ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_06);
ClampMoveInfo.log("关门NG口门");
//CylinderMove(ClampMoveInfo, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.LOW);
// SingleDoor.ToLow(ClampMoveInfo);
// SingleDoor.ToLow(ClampMoveInfo);
CloseSingleDoor(ClampMoveInfo);
OpenFlipDoor(ClampMoveInfo);
}
......@@ -352,6 +352,8 @@ namespace DeviceLibrary
case MoveStep.NGOUT_06:
ClampMoveInfo.NextMoveStep(MoveStep.Wait);
break;
#region 单盘入库
case MoveStep.SingleIn:
ClampMoveInfo.NextMoveStep(MoveStep.SingleIn_01);
ClampMoveInfo.log("开始单盘入库, 合拢托盘");
......@@ -361,8 +363,8 @@ namespace DeviceLibrary
ClampMoveInfo.NextMoveStep(MoveStep.SingleInReady);
ClampMoveInfo.log("开始单盘入库, 打开紧急料口");
//CylinderMove(ClampMoveInfo, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.HIGH);
// SingleDoor.ToHigh(ClampMoveInfo);
OpenSingleDoor(ClampMoveInfo);
// SingleDoor.ToHigh(ClampMoveInfo);
OpenSingleDoor(ClampMoveInfo);
break;
case MoveStep.SingleInReady:
Msg.add(crc.GetString(L.wait_put_reel_into_ngdoor, "等待放入单盘入库料盘"), MsgLevel.warning);
......@@ -370,11 +372,11 @@ namespace DeviceLibrary
case MoveStep.SingleInRun:
ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_09);
//CylinderMove(ClampMoveInfo, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.LOW);
// SingleDoor.ToLow(ClampMoveInfo);
// SingleDoor.ToLow(ClampMoveInfo);
CloseSingleDoor(ClampMoveInfo);
ClampMoveInfo.MoveParam.PlateW = 7;
ClampMoveInfo.MoveParam.PlateH = 100;
ClampMoveInfo.MoveParam.PlateW = Setting_Init.SingleInOut_ReelWidth;
ClampMoveInfo.MoveParam.PlateH = Setting_Init.SingleInOut_ReelHeight;
ClampMoveInfo.MoveParam.IsSingleInOut = true;
h = NGDoor_Tray_Test_Reel;
if (!h.HasValue)
{
......@@ -389,6 +391,8 @@ namespace DeviceLibrary
ClampMoveInfo.NextMoveStep(MoveStep.Wait);
}
break;
#endregion
default:
ClampMoveInfo.log($"未找到对应步骤:{ClampMoveInfo.MoveStep}");
break;
......@@ -399,7 +403,7 @@ namespace DeviceLibrary
get
{
if (Setting_Init.CamTestReel_Ability)
return CodeManager.TestHasReel(CodeManager.hikNameList[0],out _,out _);
return CodeManager.TestHasReel(CodeManager.hikNameList[0], out _, out _);
else
return IOValue(IO_Type.NGDoor_Tray_Check).Equals(IO_VALUE.HIGH);
}
......@@ -470,7 +474,7 @@ namespace DeviceLibrary
List<CodeInfo> LastCodeList;
LastCodeList = CodeManager.CameraScan(CodeManager.hikNameList);
if (LastCodeList.Count==0)
if (LastCodeList.Count == 0)
LastCodeList = CodeManager.CameraScan(CodeManager.hikNameList);
//BoxParam labelParam = new BoxParam();
//labelParam.codeInfos = new List<CodeInfo>(LastCodeList);
......
......@@ -20,11 +20,11 @@ namespace DeviceLibrary
if (ClampMoveInfo.MoveStep == MoveStep.Wait)
{
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()
{
LogUtil.info("请求下降出库料串");
......@@ -32,7 +32,7 @@ namespace DeviceLibrary
var clampstep = RobotManage.mainMachine.ClampMoveInfo.MoveStep;
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, "开始释放料串");
}
if (step == MoveStep.StringReadyPut)
......@@ -70,7 +70,7 @@ namespace DeviceLibrary
}
}
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()
......@@ -81,7 +81,6 @@ namespace DeviceLibrary
StringMoveInfo.LastSetpTime = DateTime.Now;
StringMoveInfo.IsInWait = true;
if (!Setting_Init.Device_Disable_StringDoor)
StringDoorOpen(StringMoveInfo);
return crc.GetString(L.begin_open_string_door, "开始打开料串门");
......@@ -91,7 +90,7 @@ namespace DeviceLibrary
public string doCloseBatchDoor()
{
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))
{
......@@ -105,8 +104,7 @@ namespace DeviceLibrary
//RobotManage.mainMachine.StringMoveInfo.NextMoveStep(RobotManage.mainMachine.StringMoveInfo.MoveStep);
StringMoveInfo.LastSetpTime = DateTime.Now;
StringMoveInfo.IsInWait = true;
if (!Setting_Init.Device_Disable_StringDoor)
StringDoorClose(StringMoveInfo);
StringDoorClose(StringMoveInfo);
return crc.GetString(L.begin_close_string_door, "开始关闭料串门");
}
}
......
......@@ -22,6 +22,12 @@ namespace DeviceLibrary
OutStoreJobList.Enqueue(jobInfo);
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)
{
JobInfo jobInfo = new JobInfo("", posId, plateW, plateH);
......
......@@ -12,6 +12,7 @@ namespace DeviceLibrary
Wait,
WaitErr,
//库位测试
AIOTest_Start,
AIOTest_01_CloseFlip,
AIOTest_02_Pause1,
AIOTest_03_FirstReady,
......
......@@ -14,6 +14,11 @@ namespace DeviceLibrary
{
public static class RobotManage
{
/// <summary>
/// 数据加载完成
/// </summary>
public static event LoadFinish DataInitEvent;
public static MainMachine mainMachine;
public static Robot_Config Config;
//public static StoreType StoreType = ConfigHelper.Config.Get<StoreType>("StoreType",StoreType.TypeA);
......@@ -22,11 +27,11 @@ namespace DeviceLibrary
public static bool InoutDebugMode = false;
public static bool DisableUpdownProtect
{
get => Setting_Init.Device_DisableUpdownProtect;
get => Setting_Init.Disable_UpdownProtect;
}
public static bool DisableSingleDoor
{
get => Setting_Init.Device_DisableSingleDoor;
get => Setting_Init.Disable_SingleDoor;
}
public delegate void LoadFinish(bool state, string msg);
public static event LoadFinish LoadFinishEvent;
......@@ -98,10 +103,10 @@ namespace DeviceLibrary
// IsLoadOk = false;
// msg += errmsg + "\r\n";
//}
if (!HumitureController.Init(Setting_Init.Device_Humiture_Port))
if (!HumitureController.Init(Setting_Init.App_Humiture_Port))
{
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);
//if (!IOManager.ConnectionIOList(new List<string>()))
......@@ -217,7 +222,7 @@ namespace DeviceLibrary
reelParam = null;
try
{
string fix = Setting_Init.FixBuffInfo;
string fix = Setting_Init.Buffer_FixBuffInfo;
if (!string.IsNullOrEmpty(fix))
{
reelParam = JsonHelper.DeserializeJsonToObject<ReelParam>(fix);
......@@ -233,11 +238,11 @@ namespace DeviceLibrary
public static void PutReelInFixPos(ReelParam reelParam)
{
if (mainMachine.AutoInOutTest) return;
Setting_Init.FixBuffInfo = JsonHelper.SerializeObject(reelParam);
Setting_Init.Buffer_FixBuffInfo = JsonHelper.SerializeObject(reelParam);
}
public static void ClearReelInFixPos()
{
Setting_Init.FixBuffInfo = "";
Setting_Init.Buffer_FixBuffInfo = "";
}
#endregion
}
......
......@@ -29,7 +29,7 @@ namespace DeviceLibrary
CheckForIllegalCrossThreadCalls = false;
crc.OpenResourceLog = true;
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)
......@@ -251,6 +251,7 @@ namespace DeviceLibrary
colorsList.Add(Color.BlueViolet);
colorsList.Add(Color.Firebrick);
colorsList.Add(Color.Coral);
colorsList.Add(Color.Aqua);
}
color = colorsList[SelIndex];
......
......@@ -26,7 +26,7 @@ namespace TheMachine
crc.OpenResourceLog = true;
InitializeComponent();
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.LanguageChangeEvent += Crc_LanguageChangeEvent;
crc.CurrLanguage = Crc_GetLanguageEvent();
......@@ -47,7 +47,7 @@ namespace TheMachine
private string Crc_GetLanguageEvent()
{
return Setting_Init.Device_Default_Language;
return Setting_Init.App_Default_Language;
}
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
......@@ -93,7 +93,7 @@ namespace TheMachine
msgcol.Width = 530;
ColumnHeader timecol = new ColumnHeader();
timecol.Text = $"时间";
timecol.Width = 150;
timecol.Width = 180;
listView1.Columns.Add(emptycol);
listView1.Columns.Add(timecol);
listView1.Columns.Add(msgcol);
......@@ -123,10 +123,11 @@ namespace TheMachine
#endregion
LogUtil.info("开始初始化");
cb_EnableBuzzer.Checked = Setting_Init.Device_EnableBuzzer;
cb_EnableBuzzer.Checked = Setting_Init.Enable_Buzzer;
AlarmBuzzer.BuzzerStateChange += AlarmBuzzer_BuzzerStateChange;
RobotManage.DataInitEvent += RobotManage_DataInitEvent;
RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent;
if (!Setting_Init.Device_DisableLogWindow)
if (!Setting_Init.Disable_LogWindow)
AddForm("tab_log", crc.GetString(L.tab_log, "日志"), lc);
RobotManage.UserPauseSet += RobotManage_UserPauseSet;
......@@ -272,7 +273,19 @@ namespace TheMachine
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)
{
if (this.InvokeRequired)
......@@ -286,6 +299,7 @@ namespace TheMachine
启用调试模式ToolStripMenuItem.Enabled = true;
pnl.Enabled = true;
tabc.Enabled = true;
LogUtil.info($"初始化完成:{state},{msg}");
if (state)
{
CodeManager.LoadCamera(true);
......@@ -534,7 +548,7 @@ namespace TheMachine
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;
}
......@@ -675,19 +689,19 @@ namespace TheMachine
private void 简体中文ToolStripMenuItem_Click(object sender, EventArgs e)
{
Config.Set("Device_Default_Language", crc.China);
Setting_Init.App_Default_Language = crc.China;
crc.LanguageChange();
}
private void 日本语ToolStripMenuItem_Click(object sender, EventArgs e)
{
Config.Set("Device_Default_Language", crc.Japan);
Setting_Init.App_Default_Language = crc.Japan;
crc.LanguageChange();
}
private void englishToolStripMenuItem_Click(object sender, EventArgs e)
{
Config.Set("Device_Default_Language", crc.English);
Setting_Init.App_Default_Language = crc.English;
crc.LanguageChange();
}
#region 窗口管理
......
......@@ -28,7 +28,7 @@ namespace TheMachine
//CodeManager.TestHasReel("", out string a, out string b);
//return;
if (Setting_Init.Func_CheckReelLocInFix)
if (Setting_Init.Enable_CheckReelLocInFix)
DeviceLibrary.VisionHelper.CheckAndRunServer();
_ = new Mutex(true, Application.ProductName, out bool ret);
......
......@@ -110,7 +110,7 @@ namespace TheMachine
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)
......
......@@ -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}]");
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)
{
MessageBox.Show(crc.GetString("not_allow", "禁止") + ":\r\n("
......
......@@ -26,7 +26,7 @@ namespace TheMachine
private string Crc_GetLanguageEvent()
{
return Setting_Init.Device_Default_Language;
return Setting_Init.App_Default_Language;
}
private void Crc_LanguageChangeEvent(object sender, EventArgs e)
......
......@@ -47,7 +47,7 @@ namespace TheMachine
public uc_boxdebug()
{
InitializeComponent();
Setting_Init.Device_DisableUpdownProtect = false;
Setting_Init.Disable_UpdownProtect = false;
}
public void Init()
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!