#ifndef LOGIC_IO_DEFINE_214_H
#define LOGIC_IO_DEFINE_214_H

/*!
IO配置
*/
#pragma region INPUT
#define IN_CASSEXISTCHECK12Inch_Left	        0   //!料盒传感器,左
#define IN_CASSEXISTCHECK12Inch_Right         1   //!料盒传感器,右
#define IN_CASSEXISTCHECK8Inch_Left		46	//!8寸料盒传感器,左
#define IN_CASSEXISTCHECK8Inch_Right	63	//!8寸料盒传感器,右
#define IN_SCAN_RIGHT				    2   //!扫描传感器右
#define IN_SCAN_LEFT				    3   //!扫描传感器左
#define IN_CHECKBOX_HAS_WAFER_LEFT		5   //!CheckBox有无晶圆检测左，检测有无晶圆传感器12Inch
#define IN_CHECKBOX_HAS_WAFER_RIGHT     4   //!CheckBox有无晶圆检测，检测有无晶圆传感器8Inch
#define IN_CHECKBOX_DOOR_OPENED			6	//!CheckBox盒 门打开状态，打开时为TRUE
#define IN_WaferOutCass_Front_Cassete		7   //!料框外靠轨道有晶元检测
#define IN_WaferOutCass_Wafer_OutSide	8   //!料框晶元出位检测
#define IN_CLAW_Opend			        10   //!夹爪伸出传感器,即张开、释放Release
#define IN_CLAW_Closed			        9  //!夹爪缩回传感器，即闭合
#define IN_CLAW_ANTICOLLISION		    11	//!夹爪防撞，有信号时正常，没有信号时撞到了或传感器异常

#define IN_CHECK_EXIST_CLAW             12  //!夹爪上检测铁环有无的传感器
//#define IN_CHECK_EXIST_BELOW_RAIL       13  //!轨道下方检测晶圆有无的传感器

#define IN_Rail_NearCass_HasWafer		14  //!近轨道检测传感器1,靠料盒
#define IN_Rail_NearLoc_HasWafer		15  //!近轨道检测传感器2,远离料盒
#define IN_Rail_FarCass_HasWafer        16  //!远轨道检测传感器1,靠料盒
#define IN_Rail_FarLoc_HasWafer         17  //!远轨道检测传感器2,远离料盒


//气压相关
#define IN_MAIN_PRESSURE                18  //!总输入气压
#define IN_WT_WAFER_VACUUM              19  //!平台陶瓷盘真空压力传感器

#define IN_LOAD_VACUUM                  20  //!上料真空压力传感器
#define IN_UNLOAD_VACUUM		        21  //!下料真空压力传感器

#define IN_CLEAN_VACUUM			        22  //!清洗真空状态
#define IN_COAT_VACUUM			        23  //!涂敷真空状态

#define IN_WT_RING_VACUUM		        24  //!刚环真空压力传感器
#define IN_TRANS_VACUUM                 25  //!中转真空压力传感器

#define IN_CLEAN_CURTAIN_CLOSED         26  //!清洗保护罩关闭
#define IN_CLEAN_CURTAIN_OPENED         27  //!清洗保护罩打开

#define IN_COAT_CURTAIN_CLOSED          28  //!涂覆保护罩关闭
#define IN_COAT_CURTAIN_OPENED          29  //!涂覆保护罩打开

#define IN_COAT_ARM_UP_FORWARD		    30  //!涂覆摆臂升起传感器
#define IN_COAT_ARM_DOWN_BACK		    31  //!涂覆摆臂缩回传感器

#define IN_SAFETY_SENSOR_LOAD			33  //!安全限位保护
#define IN_SAFETY_SENSOR_UNLOAD			32  //!安全限位保护
#define IN_SAFETY_SENSOR_CLAW			34  //!安全限位保护

#define IN_WATER_PRESSURE		        35  //!水压传感器
#define IN_WATER_FLOW			        36	//!水流量传感器



#define IN_LIQUID_ALM_CLEAN		        37	//!清洗区漏液
#define IN_LIQUID_ALM_COOLING	        38	//!水冷机漏液
#define IN_LIQUID_ALARM_LASER	        39	//!激光漏液传感器
#define IN_LIQUID_ALARM_COAT		    40	//!涂覆区漏液



#define IN_SAFEDOOR_LEFT			    41  //!安全门左,切割
#define IN_SAFEDOOR_RIGHT			    42  //!安全门右，清洗涂覆
#define IN_SAFEDOOR_Cassete			    43  //!安全门上料区

//#define IN_SAFEDOOR_Cassete			    46  //!检查料料盒8Inch

#define IN_WT_Worktable_Install_Check       50  //!陶瓷盘底坐安装真空检测
#define IN_Z_SAFE_CHECK				    51  //!Z轴安全检测


#define IN_LASER_Shutter_All_Down       53  //!总光闸缩回传感器
#define IN_LASER_Shutter_All_Up	        54  //!总光闸伸出传感器
#define IN_LASER_Shutter_Wide_Down      55  //!Wide光闸缩回传感器
#define IN_LASER_Shutter_Wide_Up	    56  //!Wide光闸伸出传感器
#define IN_LASER_Shutter_Narrow_Down    57  //!Narrow光闸缩回传感器
#define IN_LASER_Shutter_Narrow_Up	    58  //!Narrow光闸伸出传感器

#define IN_CLAW_Collision_Detection_Push	61  //!防撞伸出，如果没信号说明撞到吧
#define IN_CLAW_Collision_Detection_Pull    62  //!防止拉不动


//unused
//#define IN_CLEAN_SPINDLE_UP_FORWARD  34 //!清洗主轴伸出传感器
//#define IN_CLEAN_SPINDLE_DOWN_BACK   35 //!清洗主轴缩回传感器
//
//#define IN_COAT_SPINDLE_UP_FORWARD  41  //!涂覆主轴伸出传感器
//#define IN_COAT_SPINDLE_DOWN_BACK   42  //!涂覆主轴缩回传感器

#pragma endregion INPUT

#pragma region OUTPUT
#define OUT_LOAD_VACUUM                 0       //!上料吸真空电磁阀
#define OUT_LOAD_VACUUM_BREAK           1       //!上料破真空电磁阀
#define OUT_UNLOAD_VACUUM               2       //!下料吸真空电磁阀
#define OUT_UNLOAD_VACUUM_BREAK         3       //!下料破真空电磁阀

#define OUT_WT_WAFER_VACUUM		        4       //!加工台吸真空电磁阀
#define OUT_WT_WAFER_VACUUM_BREAK	    5       //!加工台破真空电磁阀

#define OUT_CLEAN_VACUUM                6       //!清洗主轴吸真空电磁阀
#define OUT_CLEAN_VACUUM_BREAK          7       //!清洗破真空

#define OUT_COAT_VACUUM                 8       //!涂覆主轴吸真空电磁阀
#define OUT_COAT_VACUUM_BREAK           9		//!涂覆主轴破真空电磁阀

#define OUT_WT_RING_VACUUM              10      //!刚环吸真空电磁阀
#define OUT_WT_RING_VACUUM_BREAK	    11      //!刚环破真空电磁阀

#define OUT_TRANSFER_VACUUM             12      //!中转吸真空电磁阀
#define OUT_TRANSFER_VACUUM_BREAK       13      //!中转破真空电磁阀

#define OUT_CLAW_CLOSED				    14      //!夹抓电磁阀,给信号即闭合，夹取物料 

#define OUT_CLEAN_CURTAIN_OPENED        15      //!清洗保护罩关闭
#define OUT_CLEAN_AIR                   16      //清洗吹气阀(清洗摆臂)
#define OUT_CLEAN_TWOFLUID_WATER        17      //清洗二体水阀(清洗摆臂)
#define OUT_CLEAN_TWOFLUID_AIR          18      //清洗二流体气阀(清洗摆臂)
#define OUT_CLEAN_ELECT_AIR			    19	    //!摆臂上的静电气阀(清洗摆臂)

#define OUT_COAT_CURTAIN_OPENED         20      //!涂覆保护罩关闭
#define OUT_COAT_ARM_UP                 21      //!涂敷摆臂升降控制阀(涂覆摆臂)
#define OUT_COAT_TWOFLUID_WATER         22      //!涂覆区二流体水(清洗摆臂)
#define OUT_COAT_TWOFLUID_AIR           23      //!涂覆区二流体气(清洗摆臂)
#define OUT_COAT_ELECT_AIR              24      //!静电清除气阀(清洗摆臂)
#define OUT_COAT_WASHRING_WATER         25      //!洗铁环水阀(清洗摆臂)

#define OUT_COAT_CLEANING_GLUE_WATER    26      //!涂覆区清洗胶水池的水

#define OUT_Shutter_All_Open            28      //!总光闸
#define OUT_Shutter_Wide_Open           29      //!Wide光闸
#define OUT_Shutter_Narrow_Open         30	    //!Narrow总光闸
#define OUT_LASERGATE				    53	    //!没有信号时出光   NOTOE:为0时出光 1时不出光


#define OUT_LENS_Blow_Inner             31      //!切割内吹气
#define OUT_LENS_Blow_Outter            32	    //!切割外吹气
#define OUT_CCD_AIR					    33      //!CCD吹气
#define OUT_CCD_AIR_6X					52      //!6X CCD吹气
#define OUT_LEFTDOOR_UNLOCK			    34	    //!左门(加工区)解锁，为1时解锁
#define OUT_RIGHTDOOR_UNLOCK		    35	    //!右门(清洗涂覆)解锁，为1时解锁

#define OUT_POWER_ELECT_ENTRY		    36      //入口静电消除器供电
#define OUT_ELECT_Entry                 37      //!入口静电阀

#define OUT_RED				            38      //!报警灯
#define OUT_YELLOW			            39      //!黄
#define OUT_BLUE			            40      //!蓝,白
#define	OUT_GREEN			            41      //!绿
#define	OUT_BUZZ			            42      //!蜂鸣

#define OUT_POWER_ELECT_WT              43      //!平台静电供电
#define OUT_ELECT_Wt                    44      //!平台区静电阀
#define OUT_LIGHT                       45      //!日光灯

#define OUT_POWER_ELECT_Other           46      //!其他静电阀供电
#define OUT_ELECT_Clean                 47      //!清洗区静电阀
#define OUT_ELECT_Coat                  48      //!涂覆区静电阀
#define OUT_ELECT_Transfer              49      //!传片静电阀
#define OUT_ELECT_Load                  50      //!上料静电阀
#define OUT_ELECT_Unload                51      //!下料静电阀
#define OUT_WT_BASE_VACUUM              54      //!陶瓷盘底座真空

//UNUSED
//#define OUT_COAT_SPINDLE_UPDOWN         24  //主轴，升降控制阀
//#define OUT_CLEAN_SPINDLE_UPDOWN        31  //清洗主轴阀

//清洗副臂
//#define OUT_CLEAN_TWOFLUID_WATER2        21  //清洗2二体水阀
//#define OUT_CLEAN_TWOFLUID_AIR2          22  //清洗2二流体气阀

#define OUT_POWER_WATER_COOLING		43  //水冷机冷却

#pragma endregion OUTPUT
#endif //LOGIC_IO_DEFINE_214_H
