#ifndef LOGIC_LOCAL_DEF_H
#define LOGIC_LOCAL_DEF_H
#include "logic_compdef.h"
//部分继电器
enum VarID_Logic {
    Reserve_LogicVar_ID = 50000,

    Var_AllSystem_Vacumm_TimeLimit_ID,      //全局真空
    Var_AllSystem_Vacumm_BreakTimeLimit_ID,//全局破真空时间限制
    Var_AllSystem_CellExistCheckTime_ID,
    Var_AllSystem_CurChID_ID,
    Var_AllSystem_CellSize_ID,
    Var_AllSystem_LaserState_ID,
    Var_AllSystem_LightState_ID,
    Var_AllSystem_SafeDoorConfig_ID,
    Var_AllSystem_FullScreen_ID,
    Var_AllSystem_EnableSoftKeyboard_ID,
    Var_AllSystem_StyleSheet_Type_ID,	//颜色风格
    Var_AllSystem_Language_Type_ID, 	//多语言0 中文 1英文
    Var_CheckBox_EnableCheck,       //使能首片检测
    Var_MaxCycle_Count,						//最大Cycle次数
    Var_Process_WaferCheckType, //Wafer检查类型 0不使用 1首片 2每片
    Var_Enable_FixLaserPathAngle, //使能固定光路路径角度
    Var_XY_AngleOffset, //< X,Y轴夹角
    Var_Enable_JigCheck, //使能Jig检测

    Var_MWorkTable_Load_X_ID = 50100,       //上料位置
    Var_MWorkTable_Load_Y_ID,
    Var_MWorkTable_Load_Z_ID,
    Var_MWorkTable_Load_W_ID,
    Var_MWorkTable_Unload_X_ID,     //下料位置
    Var_MWorkTable_Unload_Y_ID,
    Var_MWorkTable_Unload_Z_ID,
    Var_MWorkTable_Unload_W_ID,
    Var_MWorkTable_Manual_LoadX_ID, //手动上料位
    Var_MWorkTable_Manual_LoadY_ID,
    Var_WorkTable_Offset_Threshold,
    Var_WorkTable_Offset_EnableOffset, //使能平台偏移
    Var_MWorkTable_Unload_W_OFFSET_ID,	//下料旋转偏移,为了晶圆反向W轴需要的偏移


    Var_MWorkTable_FoucsPos_ID,     //相机调焦参数
    Var_MWorkTable_CaliSpd_ID,      //调焦速度
    Var_MWorkTable_CaliSpdMin_ID,   //调焦速度低
    Var_MWorkTable_CaliRange_ID,    //调焦范围
    Var_MWorkTable_CaliRangeMin_ID, //调焦范围小

    Var_Cass_Slot_Count = 50200,           //槽数
    Var_Cass_Slot_Step,            //槽间距
    Var_ClawPos_CheckBox_ID,        //手动单片料盒夹抓位，检测料盒抓取位
    Var_Cass_FirstClawPos_ID,       //首片夹爪位
    Var_Cass_FirstScanPos_ID,       //首片扫描位
    Var_Cass_UnloadOffset_ID,       //下料偏移
    Var_Cass_CassUpPos_ID,          //料盒上升位置

    Var_Rail_Scan_Pos_ID,           //扫描时轨道打开位置

    Var_Cass_ScanPosStart,			    //扫描起点
    Var_Cass_ScanPosEnd,			    //扫描终点
    Var_Cass_ScanSensorOffset,		    //两个传感器的偏差，2-1
    Var_Cass_WaferThickness,		    //片厚

    Var_Process_ScanSpeed,					//扫片速度
    Var_Process_WPOverrlapped_ThickLimit1,	//叠片判定最小阈值，通过厚度进行判定
    Var_Process_WPOverrlapped_ThickLimit2,	//叠片判定最小阈值，通过厚度进行判定
    Var_Process_WPMalposed_ThickLimit,		//错位判定最小阈值，两个传感器的差值
    Var_Process_UserTwoSensor,				//是否使用两个传感器扫描
    Var_Process_DelayCompensation,			//延迟补偿
    Var_Process_WaferExistsRange,			//判定范围

    Var_Process_Claw_PosWait = 50300,              //夹爪等待位
    Var_Process_Claw_PosCassOutReady,	//抓出前的准备位置
    Var_Process_Claw_PosCassOut,           //夹爪料盒抓取位
    Var_Process_Claw_PosCheckBoxOut,       //夹爪检测料盒抓取位
    Var_Process_Claw_PosWaferExistCheck,   //出料口检查上面是否有晶圆
    Var_Process_Claw_PosPutRail,		    //清洗台下料时的位置，使用统一的位置即可,不需要
    Var_Process_Claw_PosPushReadyUnload,	//清洗台下料时的位置，推之前的位置，可以与Var_Process_Claw_PosLocationPushPrepare位置一致


    Var_Process_Claw_PosScanBarcode,	//扫码枪读取位置
    Var_Process_Claw_PosLocationReady,  //拉到规整准备位置,晶圆拉到的位置
    Var_Process_Claw_PosLocationPushPrepare,    //规整推之前的位置,这里轴升降不与晶圆干涉
    Var_Process_Claw_PosLocation,		//夹抓规整位置



    Var_Process_Claw_Offset_DisCassUnLoad,          //料盒下料偏移
    Var_Process_Claw_Offset_DisCheckBoxUnLoad,      //检测料盒下料偏移 unused
    Var_Process_Claw_Offset_DisClawLocation,        //规整时夹抓向后偏移 unused

    Var_Process_Claw_PosHCoat,        //中转水平涂覆位
    Var_Process_Claw_PosHClean,       //中转水平清洗位
    Var_Process_Claw_PosRailNear,       //夹爪近轨道放置位
    Var_Process_Claw_PosRailFar,       //夹抓远轨道放置位

    Var_Process_Trans_CylinderMove_TimeOut = 50400,
    Var_Process_Trans_StepSleepTime,
    Var_Process_Trans_PosVWait,        //中转垂直等待位,也是安全位置
    Var_Process_Trans_PosPickupWafer,        //中转轴夹抓，取晶圆的位置 中转垂直抓取位
    Var_Process_Trans_PosPutdownWafer,


    Var_Process_Trans_PosRailNearReady,     //中转垂直近轨道准备位置
    Var_Process_Trans_PosRailNear,          //中转垂直近轨道取放料位置

    Var_Process_Trans_PosRailFarReady,      //中转垂直远轨道准备位置
    Var_Process_Trans_PosRailFar,           //中转垂直远轨道取放料位置

    Var_Process_Trans_PosTransVCoat,        //中转垂直涂覆位置
    Var_Process_Trans_PosTransVClean,       //中转垂直清洗位置

    Var_Process_Trans_PosTransHLock,		//夹抓从规整台抓取晶圆的位置
    Var_Process_Trans_GrapVOffset,          //中转垂直抓取取料时向上偏移值，中能为正 UNUSED
    Var_Process_Trans_PosVCoatFinish,		//转移轴，从涂覆台提起准备位置
    Var_Process_Trans_PosVCoatFinishLow,		//第一阶段慢速取晶圆位置
    Var_Process_Trans_PosVCleanFinish,			//

    Var_Process_RailNear_PosOpen = 50500,           //规整开位置
    Var_Process_RailNear_PosClose,          //规整关位置
    Var_Process_RailNear_PosOpenMax,        //规整开最大位置

    Var_Process_RailFar_PosOpen,           //远轨道开位置
    Var_Process_RailFar_PosClose,          //远轨道关位置
    Var_Process_RailFar_PosOpenMax,        //远轨道开最大位置

    Var_Process_Trans_PosRailCloseReady,    //轨道闭合的位置，较闭合位置稍大一点，较ClosePull更小一点
    Var_Process_Trans_PosRailClosePull,     //拉晶圆的打得不够开的位置，远离料盒位置
    Var_Process_Trans_PosRailOpenPull,      //拉晶圆时打得更开的位置，靠近料盒位置打开得多一点， 
    //                                      //OpenMax<Open<OpenPull<ClosePull<CloseReady<Close

    Var_Process_Load_PosVWait = 50600,          //上料中转垂直等待位,也是安全位置
    Var_Process_Load_PosVRail,          //上料中转轴夹抓，抓放的位置 中转垂直抓取位
    Var_Process_Load_PosVWT,		    //平台放料位置

    Var_Process_Load_PosHCoat,          //中转垂直涂覆位置
    Var_Process_Load_PosHWT,            //上料水平平台位置
    Var_Process_Load_PosHWait,		//上料水平等待位置
    Var_Process_Load_PosVCoatFinish,			//上料轴，从涂覆台提起准备位置
    Var_Process_Load_PosVCoatFinishLow,			//上料轴,第一阶段慢速取晶圆位置

    Var_Process_Unload_PosVWait = 50700,        //下料中转垂直等待位,也是安全位置
    Var_Process_Unload_PosVRail,        //下料中转轴夹抓，抓放的位置 中转垂直抓取位
    Var_Process_Unload_PosVWT,          //平台垂直取料位

    Var_Process_Unload_PosHClean,       //中转垂直涂覆位置
    Var_Process_Unload_PosHWT,          //下料水平平台位置
    Var_Process_Unload_PosHWait,		//下料水平等待位置


    Var_CoatClean_Spindle_Move_TimeOut = 50800, //主轴运动超时时间
    Var_Coat_Nozzel_ShutSleep_ID,   //关闭阀门后延时
    Var_CoatClean_Single_Wait_Time,
    Var_Coat_Clean_Arm_WaitPos_ID,  //清洗手臂准备位置
    Var_Coat_Clean_Arm_EagePos_ID,  //清洗手臂边缘位置
    Var_Coat_Clean_Arm_CenterPos_ID,//清洗手臂中心位置
    Var_Coat_Clean_Arm_RingPos_ID,  //清洗铁环位置
    Var_Coat_Clean_Arm_PerparePos_ID,//清洗准备位置

    Var_Coat_Arm_WaitPos_ID,    //手臂等待位置
    Var_Coat_Arm_EagePos_ID,    //手臂清洗的边缘
    Var_Coat_Arm_CenterPos_ID,  //手臂中心位置
    Var_Coat_Arm_PerparePos_ID, //涂敷准备位置

    Var_Coat_Spay_Num_ID,       //涂敷胶量
    Var_Coat_Spay_Pre_Num_ID,   //预喷胶量
    Var_Coat_Spay_Spd_ID,       //涂敷喷胶速度
    Var_Coat_Spay_ZeroOffset_ID,    //涂敷喷胶原点
    Var_Coat_Arm_Speed_ID,      //清洗摆臂速度

    Var_Coat_Spindle_InitPos_ID,    //主轴初始角度位置
    Var_Coat_Bubble_Thres_ID,       //气泡报警阈值

    Var_Coat_M_CenterSpeed_ID,      //CoatM中心速度
    Var_Coat_M_EageSpeed_ID,        //CoatM边界速度
    Var_Coat_M_CenterWaitTime_ID,   //CoatM中心等待时间

    Var_Coat_Protect_OpenPos_ID,    //防水帘E4打开位置
    Var_Coat_Protect_ClosePos_ID,   //防水帘E4
    Var_Process_Coat_TotalVolume,		//总涂胶量

    Var_Coat_Bump_Max_ID,					//最大吸胶量
    Var_Coat_Spay_Pre_WaitTime,				//预喷胶等待时间
    Var_Coat_ReplaceFluidVolume,			//更换涂覆液需要排空量
    Var_Coat_Clean_ProtectionBlockPos,		//清洁保护块的位置

    Var_CoatVolume_TareValue,			    //皮重
    Var_CoatVolume_GlueDensity,				//密度
    Var_CoatVolume_AlarmVolume,				//报警阈值
    Var_CoatVolume_WarningVolume,			//提醒阈值
    Var_CoatVolume_ReplaceDate,				//更换日期
    Var_CoatVolume_InvalidDays,				//失效天数
    Var_CoatVolume_AlarmDiffVolume,			//涂覆报警阈值


    Var_Clean_Arm_Spd = 51000,          //摆臂速度
    Var_Clean_Arm_WaitPos_ID,   //手臂等待位置
    Var_Clean_Arm_Edge_Pos,     //手臂清洗的边缘
    Var_Clean_Arm_Center_Pos,   //手臂清洗地的中心位置
    Var_Clean_Arm_PerparePos_ID,
    Var_Clean_Spindle_InitPos_ID,   //主轴初始位置
    Var_Clean_Protect_OpenPos_ID,   //F2//防水帘打开位置
    Var_Clean_Protect_ClosePos_ID,  //F2//防水帘关闭位置
    Var_Process_Trans_CleanGetWaferWaitTimeMs,	//清洗台下料时等待多少ms

    Var_KerfCheck_H_Rangemax = 51100,
    Var_KerfCheck_H_Rangemin,
    Var_KerfCheck_H_Threshold,		//找线的灰度阈值
    Var_KerfCheck_H_Direct_x,
    Var_KerfCheck_H_Mount,
    Var_KerfCheck_H_Minlength,		//找到切割道的最小宽度
    Var_KerfCheck_H_Maxlength,		//找到切割道的最大宽度

    Var_Process_Kerf_BeforeSearchSleep_ID = 51200,
    Var_Process_Kerf_AfterSearchSleep_ID,
    Var_Process_Kerf_PosOffset_ID,
    Var_Process_Kerf_EnableAutoThres_ID,
    Var_Process_Kerf_AutoThresRange_ID,
    Var_Process_Kerf_AutoThresStep_ID,
    Var_Process_Kerf_MinOffsetThres_ID,     //!< 最小偏移阈值
    Var_Process_Kerf_MaxOffsetThres_ID,     //!< 最大偏移阈值
    Var_Process_Kerf_EnableAutoCompensation, //!< 启用自动补偿

    Var_Process_LaserFoucsCali_LineLength_ID = 51300,
    Var_Process_LaserFoucsCali_StepZ_ID,
    Var_Process_LaserFoucsCali_Count_ID,
    Var_Process_LaserFoucsCali_GapDis_ID,
    Var_Process_LaserFoucsCali_LaserFreq_ID,
    Var_Process_LaserFoucsCali_LaserPower_ID,
    Var_Process_LaserFoucsCali_SpeedX_ID,
    Var_Process_LaserFoucsCali_AccRate_ID,
    Var_Process_LaserFoucsCali_JerkRate_ID,
    Var_Process_LaserFoucsCali_LaserEpulse_ID,  //划线时的Epulse
    //Var_Process_LaserFoucsCali_LaserBeamWidth_ID,   //划线时的线宽

    Var_Process_LaserPowerCali_XPos = 51400,
    Var_Process_LaserPowerCali_YPos,
    Var_Process_LaserPowerCali_ZPos,
    Var_Process_LaserPowerCali_Step,				//功率测量步长(次数)
    Var_Process_LaserPowerCali_MeasTime,			//测量前等待时间 
    Var_Process_LaserPowerCali_StableTime,			//等待稳定时间 
    Var_Process_LaserPowerCali_StableThres,			//稳定阈值
    Var_Process_LaserPowerCali_PowerCheck_Thres,    //功率复检偏差
    Var_Process_PowerChekDate,		        //功率复检的时间
    Var_Process_PowerCheckType,				//功率检测类型 0不使用 1 首片 2每片 3按频率 4按时间间隔
    Var_Process_PowerCheckTimeInterval,		//功率检测时间间隔
    Var_Process_PowerCheckFreq,				//功率复检频率
    Var_Process_LaserPowerCali_PowerCheck_ThresPercent, //功率复检偏差百分比
    Var_Process_LaserPowerCali_G2Start,
    Var_Process_LaserPowerCali_G2End,


    Var_Process_Level_MaxLevelCount = 51500,
    Var_Process_Level_MaxSearchCount,
    Var_Process_Level_OffsetThres,		//点2调平阈值
    Var_Process_Level_AngleThres,		//调平角度阈值
    Var_Process_Level_ROIParent,
    Var_Process_Level_LevelParent,      //调平缩进比例
    Var_Process_Level_MidStepOffset,    //中点偏移比例
    Var_Process_Level_BaseOffsetMax,
    Var_Process_Level_BaseOffsetMin,
    Var_Process_Level_ModelTestCount,   //模板测试次数
    Var_Process_Level_BeforeSearchSleep,	//搜索前延时
    Var_Process_Level_AfterSearchSleep,
    Var_Process_Level_EnableAutoFoucs,
    Var_Process_Level_MidOffsetThres,   //中点偏移阈值，初步调平时的阈值
    Var_Process_Level_AngleOffset,		//旋转调平补偿值 不需要，默认应该为0
    Var_Process_Align_AFirst,
    Var_Process_Align_AStep,
    Var_Process_Align_BFirst,
    Var_Process_Align_BStep,

    Var_ProductSide_TemplateOffsetSideALowX,
    Var_ProductSide_TemplateOffsetSideALowY,
    Var_ProductSide_TemplateOffsetSideBLowX,
    Var_ProductSide_TemplateOffsetSideBLowY,
    Var_Process_ProductSide_CutStartA,
    Var_Process_ProductSide_CutEndA,
    Var_Process_ProductSide_CutStartB,
    Var_Process_ProductSide_CutEndB,

    Var_Process_LevelParamDouble_Reserved5,
    Var_Process_LevelParamDouble_Reserved6,
    Var_Process_LevelParamDouble_Reserved7,
    Var_Process_LevelParamDouble_Reserved8,
    Var_Process_LevelParamDouble_Reserved9,
    Var_Process_LevelParamDouble_Reserved10,

    Var_Process_ModelEnableLowOffset,
    Var_Process_Enable_Align_Check,
    Var_Process_EnableHalfcut_Check,
    Var_Process_LevelParamInt_Reserved8,
    Var_Process_LevelParamInt_Reserved9,
    Var_Process_LevelParamInt_Reserved10,

    Var_Process_Locate_LocateNum = 51600,
    Var_Process_Locate_MaxDiameterError,
    Var_Process_Locate_TowardOut,
    Var_Process_Locate_SearchStep,
    Var_Process_Locate_SearchCount,		//!< 每个位置定位搜索次数
    Var_Process_Locate_StopSleep,		//!< 稳定延时
    Var_Process_Locate_LightDirect,		//!< 定位直光
    Var_Process_Locate_LightSide,		//!< 定位斜光
    Var_Location_Exposure,              //!< 定位使用的亮度
    Var_Location_Gain,                  //!< 定位使用的增益
    Var_Process_Locate_CenterX,         //!< 定位时的基准中心X
    Var_Process_Locate_CenterY,         //!< 定位时的基准中心Y
    Var_Process_Locate_TurnAngle,       //!< 背光定位时W的基础角度

    Var_LaserPath_PChangeAngle_ID = 51700,  //!< P1 角度
    Var_LaserPath_PowerMaxAngle_ID,         //!< 最大功率角度
    Var_LaserPath_DIndexZeroAngle_ID,       //!< DIndex0点角度
    Var_LaserPath_DIndexMax_ID,             //!< DIndex最大值
    Var_LaserPath_5050ZeroAngle_ID,         //!< 5050初始角度
    Var_LaserPath_5050CalcuStep_ID,         //!< 5050角度步距
    Var_LaserPath_SIndexZeroAngle_ID,       //!< 挡板初始角度
    Var_LaserPath_SIndexMax_ID,             //!< 挡板最大角度
    Var_LaserPath_HairOffsetThres_ID,       //!< 光路偏移补偿最大值
    Var_LaserPath_Use5050Vector_ID,         //!< 是否使用点检数据计算功率
    Var_LaserPath_PowerHomeOffsetAngle,     //!< 衰减器回原点后偏移
    Var_LaserPath_Homed,                    //!< 衰减器是否已经回原
    Var_LaserPath_InitAngle,		//初始角度，接近使用功率的角度
    Var_LaserPath_AdjsutRate,		//功率补偿系数，默认为1,功率点检后恢复为1
    Var_Process_LaserOffset,				//激光偏移

    Var_LaserPath_UseFixSetting,       //! 使用固定的设定值
    Var_LaserPath_Angle1,               //! 设定固定值1
    Var_LaserPath_Angle2,               //! 设定固定值2
    Var_LaserPath_UseFixPowerSetting,
    Var_LaserPath_PowerSet,


    Var_LaserPower_MeasRate,		//功率测量系数，默认为1
    Var_Process_PowerCali_Type,
    Var_LaserPower_Temperature,			//功率器温度
    Var_LaserUseTimeWarning,			//换点操作提醒值
    Var_LaserUseTimeErr,				//换点操作报警值

    Var_Process_LaserChekDate,			//激光偏移复检的时间
    Var_Process_LaserCheckType,					//激光偏移检测类型 0不使用 1 首片 2每片 3按频率 4按时间间隔
    Var_Process_LaserCheckTimeInterval,			//激光偏移检测时间间隔
    Var_Process_LaserCheckFreq,					//激光偏移复检频率

    Var_Process_LaserLightBeam_XPos,
    Var_Process_LaserLightBeam_YPos,
    Var_Process_LaserLightBeam_ZPos,

    Var_Gripper_Power,      //! 卡抓力度
    Var_Gripper_Home_Direct,
    Var_Gripper_Home_State,

    //固定频率和Epulse
    Var_LaserPath_UseFixFreq,
    Var_LaserPath_FixFreqValue,
    Var_LaserPath_UseFixEpulse,
    Var_LaserPath_FixEpulseValue,
    Var_LaserPath_UseFixGripper,    //使用固定卡抓位置
    Var_LaserPath_FixGripperPos,

    Var_GateStartDelay, //划线前延时us
    Var_GateEndDelay,   //划线后延时us
    Var_LensFLow_VolumeCheck_WaitTime,//!< 光路流量检测等待时间
    Var_LensFlow_Volume_MinThres, //!< 光路流量最小值
    Var_LensFlow_Volume_MaxThres, //!< 光路流量最大值

    Var_MProduct_FlatPos_ID = 51800,	//平边位置Top,Right,Bottom,Left
    Var_MProduct_FlatLength_ID,	//平边长度
    Var_MProduct_CutType_ID,	//加工类型 0 Line_Cycle,Side_Cycle 0往复一道切割
    Var_MProduct_SizeType_ID,
    Var_MProduct_MeasureDiameter,			//测量尺寸
    Var_MProduct_FirstCutb_ID,
    Var_MProduct_FilmThick_ID,          //!膜厚
    Var_MProduct_EnableAlignment_ID,
    Var_MProduct_ID,					//产品识别码QString


    Var_ProductSide_SideStep = 51900,       //步进距离
    Var_ProductSide_CutStreet,          //切割道宽度
    Var_ProductSide_StepDotLine,        //点划线步进
    Var_ProductSide_SolidDotLine,       //实线长度
    Var_ProductSide_InitAngle,          //初始角度
    Var_ProductSide_TemplateOffsetX,    //模板偏移X
    Var_ProductSide_TemplateOffsetY,    //模板偏移Y

    Var_Process_LaserKerf_AreaCenterX = 52000,		//中心位置，激光样准块
    Var_Process_LaserKerf_AreaCenterY,
    Var_Process_LaserKerf_AreaValidWidth,			//有效区域的宽度
    Var_Process_LaserKerf_AreaType,					//0 圆形 1矩形
    Var_Process_LaserKerf_OuterErosionDistance,		//外部区域缩减
    Var_Process_LaserKerf_InnerErosionDistance,		//内部区域缩减
    Var_Process_LaserKerf_AreaCellDiameter,			//每个小区域的尺寸
    Var_Process_LaserKerf_ZFocusThickness,			//焦点位置
    Var_Process_LaserKerf_WorkTableYOffset,			//平台误差补偿

    Var_Process_LaserKerf_LineLength,				//划线长度
    Var_Process_LaserKerf_LineStep,
    Var_Process_LaserKerf_CheckPower,				//功率
    Var_Process_LaserKerf_CheckFreq,				//频率
    Var_Process_LaserKerf_Speed,

    Var_Process_LaserKerf_FocusLightDirect,			//直光对焦时的参数
    Var_Process_LaserKerf_FocusLightCircle,			//斜光
    Var_Process_LaserKerf_FocusExposure,
    Var_Process_LaserKerf_FocusGain,

    Var_Process_LaserKerf_CheckEpulse,      //Epulse频率
    Var_Process_LaserKerf_CheckBeamWidth,   //线宽

    Var_Process_KerfParm_LightDirect = 52100,				//直光
    Var_Process_KerfParm_LightCircle,				//斜光
    Var_Process_KerfParm_Exposure,					//检测时的参数
    Var_Process_KerfParm_Gain,
    Var_Process_KerfParm_MinRange,			//最小范围
    Var_Process_KerfParm_MaxRange,
    Var_Process_KerfParm_MinWidth,			//最小线宽
    Var_Process_KerfParm_MaxWidth,
    Var_Process_KerfParm_MinOffset,			//最大线宽
    Var_Process_KerfParm_MaxOffset,
    Var_Process_KerfParm_PixelThreshold,			//最大线宽
    Var_Process_KerfParm_BinThresold,

    Var_Calibration_POSX = 52200,		//定位的位置X坐标，以X6相机为基准
    Var_Calibration_POSY,
    Var_Calibration_OffsetX,		//模型识别到的位置偏移 X Y 
    Var_Calibration_OffsetY,
    Var_Calibration_Angle,			//模型识别到的角度
    Var_Calibration_Adjust_Threshold, //调整阈值
    Var_Calibration_POSZ,
    Var_Distance_Measure_Thickness,


    Var_MES_ClientIP = 52400,			//IP和端口
    Var_MES_ClientPort,
    Var_MES_DeviceID,
    Var_MES_MDLN,				//设备名称

    Var_MES_EnableComm,
    Var_MES_ControlMode,

    Var_MES_SoftVersion,
    Var_MES_IsPassive,		//是否被动模式
    Var_MES_EnableLog,
    Var_MES_AllowHostDownload,
    Var_MES_RecipeRoot,

    Var_MES_Timeout1,
    Var_MES_Timeout2,
    Var_MES_Timeout3,
    Var_MES_Timeout4,
    Var_MES_Timeout5,
    Var_MES_Timeout6,
    Var_MES_Timeout7,

    Var_Gem_LinkTest_TimeOut_ID,

    Var_MES_URL = 55000,
    Var_MES_Host,
    Var_MES_Path,

};

enum VarMsg_Logic {
    VarMsg_Logic_Reserve = 60000,

    //////////////////////定位
    VarMsg_Locate_Process_ID,
    VarMsg_Locate_Process_Before_ID,
    VarMsg_Locate_Single_ID,
    VarMsg_Locate_Search_Single_ID,
    VarMsg_Locate_Process_After_ID,

    //////////////////////调平
    VarMsg_Align_Process_ID,
    VarMsg_Align_Process_Before_ID,
    VarMsg_Align_Search_ID,
    VarMsg_Align_SearchFail_ID,
    VarMsg_Align_AlignFail_ID,

    /// 单点旋转调平
    VarMsg_Align_Rotate_ID,
    VarMsg_Align_R_MoveSearch_ID,
    /// 单点旋转调平结束

    /// 左点和中点调平
    VarMsg_Main_Align_Near_ID,
    VarMsg_Align_Pt1_MoveSearch_ID,
    VarMsg_Align_PtMid_MoveSearch_ID,
    /// 左点和中点调平结束

    /// 左点和右点调平
    VarMsg_Align_Far_ID,
    VarMsg_Align_Pt2_MoveSearch_ID,
    /// 左点和右点调平结束

    /// 基准点设定
    VarMsg_Align_Base_ID,
    VarMsg_Align_PtBase_MoveSearch_ID,
    VarMsg_Align_Process_After_ID,

    //调平检查
    VarMsg_Align_Check_ID,
    ///
    //////////////////////调平结束/////////////

    /////////加工
    VarMsg_Cut_Process_Before_ID,
    VarMsg_Cut_Process_ID,
    VarMsg_Cut_Process_After_ID,
    VarMsg_Cut_Layer_ID,
    VarMsg_Kerf_Process_ID,
    VarMsg_Cut_Finish_ID,

    ///////加工结束

    //功率矫正
    VarMsg_PowerCali_PowerRange_ID,
    VarMsg_PowerCali_PowerPChange_ID,
    VarMsg_PowerCali_PowerMax_ID,
    //功率矫正结束

    //上下料

    VarMsg_Transfer_CheckState,		//检查状态
    VarMsg_Transfer_Step,			//单步操作

    VarMsg_Transfer_ResetPos,
    VarMsg_Transfer_UnLoadAll,

    VarMsg_Transfer_StateCheck,

    VarMsg_Transfer_StartCoat,
    VarMsg_Transfer_StartClean,
    VarMsg_Transfer_StartCut,

    VarMsg_Transfer_Finish,
    VarMsg_Transfer_Sequence,
    VarMsg_Transfer_Component,
    VarMsg_Abort_Finish,

    VarMsg_Auto_StartCoat,		//自动涂敷过程
    VarMsg_Auto_StartClean,		//自动清洗过程
    VarMsg_Auto_StartCut,
    VarMsg_Manual_StartCut,			//手动切割
    VarMsg_Recover_StartCutCH1,
    VarMsg_Recover_StartCutCH2,

    //上下料结束

    //清洗涂敷

    VarMsg_CoatClean_BeforeAll,
    VarMsg_CoatClean_Step,
    VarMsg_CoatClean_AfterAll,

    VarMsg_CoatClean_Wait,

    VarMsg_CoatClean_Finished,

    VarMsg_Coat_BumpTest,   //吸胶
    VarMsg_Coat_SpayTest,   //喷胶
                            //清洗涂敷结束

                            //系统消息
    VarMsg_System_ChangeCh,
    VarMsg_System_ChangeSide,
    //系统消息结束

    //复位消息
    VarMsg_Home,
    VarMsg_Home_step,
    VarMsg_Home_Finish,

    VarMsg_All_Home,
    VarMsg_All_Home_step,
    VarMsg_All_Home_Finish,
    //复位消息结束


    VarMsg_Gem_TCP_Connect,
    VarMsg_Gem_TCP_Select,

    VarMsg_Gem_Select,
    VarMsg_Gem_Test,
    VarMsg_Gem_Listen,
    VarMsg_Gem_Send,
    VarMsg_Gem_LinkTest,

    VarMsg_Calibration = 60100,   //定位校正

    VarMsg_Coat_ReplaceFluid = 60200, //更换涂覆液

                                      //预切割并进行刀痕检测
    VarMsg_Kerf_LaserCali_Process_ID = 60300,
    //调试直接生成切割道
    VarMsg_Debug_Align_Process_ID,
    //定位完暂停
    VarMsg_Locate_Process_PauseAfter_ID,
    //调平完暂停
    VarMsg_Align_Process_PauseAfter_ID,
    //暂停后恢复
    VarMsg_Resume_Process_Main_ID,

    //功率复检
    VarMsg_PowerCheck_ID,
    VarMsg_PowerCheck_ALL_ID,

    //平台厚度检测
    VarMsg_PlatformCheck_ID,

    //半切刀痕检测
    VarMsg_Kerf_HalfCut_Process_ID,

    //重做切割
    VarMsg_RestartAutoCut,
    VarMsg_RestartAutoCoat,
    VarMsg_RestartAutoClean,

    //取消自动过程中的操作
    VarMSg_AbortAutoCut,
    VarMsg_AbortAutoCoat,
    VarMsg_AbortAutoClean,
    VarMsg_AbortAutoTrans,

	VarMsg_PowerCali_BeamRange_ID,
};

enum VarState_Logic {
    //定位
    VarState_Logic_Reserve = 70000,
    VarState_Locate_Process_ID,
    VarState_Locate_Single_ID,
    //调平
    VarState_Align_Process_ID,

    /// 单点旋转调平
    VarState_Align_Rotate_ID,
    VarState_Align_R_MoveSearch_ID,
    /// 单点旋转调平结束

    /// 左点和中点调平
    VarState_Align_Near_ID,
    VarState_Align_Pt1_MoveSearch_ID,
    VarState_Align_PtMid_MoveSearch_ID,
    /// 左点和中点调平结束

    /// 左点和右点调平
    VarState_Align_Far_ID,
    VarState_Align_Pt2_MoveSearch_ID,
    /// 左点和中点调平结束

    /// 基准点设定
    VarState_Align_Base_ID,
    VarState_Align_PtBase_MoveSearch_ID,

    VarState_Align_Check_ID,
    ///
    //////////////////////调平结束/////////////

    /////////加工
    VarState_Cut_Process_ID,
    ///////加工结束
    ///
    /////////Kerf
    VarState_Kerf_Process_ID,
    VarState_Kerf_LaserCheck_Process_ID,
    VarState_Kerf_HalfCut_Process_ID,

    //功率矫正
    VarState_PowerCali_ID,
    //功率复检
    VarState_PowerCheck_ID,
    //定位校正
    VarState_Calibration_ID,

    //平台精度检测
    VarState_PlatformCheck_ID,

    //上下料
    VarState_Transfer_Count_ID,
    //上下料结束

    //清洗涂敷
    VarState_Coat_Step,
    VarState_Clean_Step,
    VarState_CleanTable_Step,

    VarState_Spay_ID,
    VarState_Bump_ID,
    VarState_ReplaceFluid_ID,

    //清洗涂敷结束

    //基本状态
    VarState_Idle_Coat,
    VarState_Idle_Clean,
    VarState_Idle_IO,
    VarState_Idle_Main,
    VarState_Idle_Transfer,
    VarState_Idle_Schedular,

    VarState_Semi_Coat,
    VarState_Semi_Clean,
    VarState_Semi_Main,
    VarState_Semi_Transfer,
    VarState_Semi_Schedular,

    VarState_Wait_Coat,
    VarState_Wait_Clean,
    VarState_Wait_Main,
    VarState_Wait_Transfer,
    VarState_Wait_Schedular,


    VarState_Work_CoatClean,
    VarState_Work_Main,
    VarState_Work_Transfer,


    //基本状态结束

    //复位
    VarState_Home_Count,
    //复位结束


    //GEM
    VarState_Idle_GEM,
    VarState_Wait_GEM,
    //GEM结束
    VarState_LogicMax

};


#endif //LOGIC_LOCAL_DEF_H
