#ifndef __FXWCHUAN_TOU_JI_H__ #define __FXWCHUAN_TOU_JI_H__ #if FU_XIAO_WEI_MACHINE extern void ChuanTou_Action(void); extern void ChuanTou_InitAction(void); #define CT_DIR_P 1 #define CT_DIR_N 0 #define CT_Y_DIR_P 1 #define CT_Y_DIR_N 0 #define CT_MOTOR_DISEN 1 #define CT_MOTOR_EN 0 #define CT_MOTOR_Y_DISEN 1 #define CT_MOTOR_Y_EN 0 /* * 警告类型 警告编号 */ #define CT_NO_ALARM 0 /* 没警告*/ #define CT_NO_ZIPPER_ALARM 1 /* 没拉链,自动停机*/ #define CT_KA_DAI_ALARM 2 /* 卡带异常*/ #define CT_SL_LIMIT_ALARM 3 #define CT_SL_ORIGIN_ALARM 4 #define CT_HSL_LIMIT_ALARM 5 #define CT_XM_ORIGIN_ALARM 6 /* 下模下限位*/ #define CT_HSL_ORIGIN_ALARM 7 #define CT_TOTAL_ALARM 8 #define CT_TL_ALARM 9 #define CT_DZ_ALARM 10 #define CT_JD_ORIGIN_ALARM 11 #define CT_DEC_ALARM 12 #define CT_BL_ALARM 17 #define CT_SM_ALARM 18 #define CT_LENGTH_LONG_ALARM 19 #define CT_LENGTH_SHORT_ALARM 20 #define CT_CR_ORIGIN_ALARM 21 #define CT_FD_IN_ALARM 22 #define CT_CR_LIMIT_ALARM 23 #define CT_OUT_ALARM 24 #define VAVLE_ALARM_TIME 3000 #define MOTOR_ALARM_TIME 5000 #define CT_TOTAL_ADDR 76 #define CT_ALARM_ADDR 100 #define CT_PROSPEED_ADDR 78 #define CT_PARAM_ZIPPER_LENGTH (user_datas[1] | (user_datas[2] >> 16)) #define CT_PARAM_SET_TOTAL (user_datas[74] | (user_datas[75] >> 16)) #define CT_PARAM_SL_DELAY_BACK (user_datas[3] * 10) #define CT_PARAM_LOCK_TIME (user_datas[4] * 10) #define CT_PARAM_GJ_TIME (user_datas[5] * 10) #define CT_PARAM_HSPEED (user_datas[6]) #define CT_PARAM_LSPEED (user_datas[7]) #define CT_PARAM_STOP_LENGTH (user_datas[8]) #define CT_PARAM_MOTOR_ALARM_TIME (user_datas[9] * 10) #define CT_PARAM_CYCLE_LENGTH user_datas[10] #define CT_PARAM_CYCLE_PULSE user_datas[11] #define CT_PARAM_CYCLE_DELAY (user_datas[12] * 10) #define CT_PARAM_FD_DELAY (user_datas[13] * 10) #define CT_PARAM_XM_BACK_DELAY user_datas[14] #define CT_PARAM_CR_BACK_DELAY (user_datas[15] * 10) #define CT_PARAM_XM_DELAY (user_datas[16] * 10) #define CT_PARAM_MAX_LENGTH (user_datas[17] * 100) #define CT_PARAM_ZDP_TIME (user_datas[18] * 10) #define CT_PARAM_CR_SPEED user_datas[19] #define CT_PARAM_CR_DELAY user_datas[20] #define CT_PARAM_HL_ENABLE user_datas[30] #define CT_PARAM_START_SWITCH_MODE user_datas[31] #define CT_PARAM_SL_MODE user_datas[32] #define CT_PARAM_GZ_MODE user_datas[33] #define CT_PARAM_ZDP_MODE user_datas[34] #define CT_PARAM_CR_MODE user_datas[35] // 0为气缸模式 1为电机模式 #define CT_AutoDelay cDelayTime1 #define CT_MotorDelay cDelayTime2 #define CT_HeMuDelay cDelayTime3 #define CT_SL_Delay cDelayTime4 #define CT_HSL_Delay cDelayTime5 #define CT_ZL_Delay cDelayTime6 #define CT_XM_BACK_Delay cDelayTime7 #define CT_CLT_Delay cDelayTime8 #define CT_ZDP_Delay cDelayTime9 #define CT_AlarmDelay cDelayTime10 #define CT_AutoStep cStepMByte #define CT_MotorStep cStepMByte1 #define CT_HeMuStep cStepMByte2 #define CT_SL_Step cStepMByte3 #define CT_HSL_Step cStepMByte4 #define CT_ZL_Step cStepMByte5 #define CT_CLT_Step cStepMByte6 #define CT_ZD_Step cStepMByte7 #define CT_START_IN X00 #define CT_START_IN_UP (X00 && !OLDX00) #define CT_STOP_IN X01 #define CT_STOP_IN_UP (X01 && !OLDX01) #define CT_MANUAL_FD_IN X02 #define CT_MANUAL_FD_IN_UP (X02 && !OLDX02) #define CT_MANUAL_CR_IN X03 #define CT_MANUAL_CR_IN_UP (X03 && !OLDX03) #define CT_ALARM_IN X04 #define CT_FD_IN X05 #define CT_FD_IN_DW (!X05 && OLDX05) #define CT_DZ_IN X06 #define CT_XM_ORIGIN_IN X07 #define CT_SL_ORIGIN_IN X10 #define CT_SL_LIMIT_IN X11 #define CT_CR_ORIGIN_IN X12 #define CT_CR_ORIGIN_IN_DW (!X12 && OLDX12) #define CT_CR_LIMIT_IN X13 #define CT_ZDP_IN X14 #define CT_ZDP_IN_UP (X14 && !OLDX14) #define CT_ZDP_IN_DW (!X14 && OLDX14) #define CT_MANUAL_TL_IN X15 #define CT_MANUAL_TL_IN_UP (X15 && !OLDX15) #define CT_GUO_LIAN_IN X17 #define CT_GUO_LIAN_IN_UP (X17 && !OLDX17) #define CT_GUO_LIAN_IN_DW (!X17 && OLDX17) #define CT_HSL_LIMIT_IN X14 #define CT_HSL_ORIGIN_IN X15 #define CT_FD_VAVLE Y00 #define CT_XM_VAVLE Y01 #define CT_SL_VAVEL Y02 #define CT_QYD_VAVLE Y03 #define CT_HL_VAVLE Y04 #define CT_HYD_VAVLE Y05 #define CT_CR_VAVLE Y07 #define CT_ZDP_OUT Y10 #define CT_HSL_VAVLE Y12 #define CT_SZ_OUT Y13 #define CT_CRDR_OUT Y14 //M0~M4全局固定使用 /* #define bRunning M0000 #define bStart M0001 #define bStop M0002 #define bAlarmStop M0003 #define bClearTotal M0004 */ #define CT_bFD M0006 #define CT_bXM M0007 #define CT_bQYD M0008 #define CT_bHYD M0009 #define CT_bSL M0010 #define CT_bZL M0011 #define CT_bCR M0012 #define CT_bHL M0013 #define CT_bCT_XM M0014 #define CT_bDW M0015 #define CT_bAuto_ZL M0016 #define CT_bHM M0017 #define CT_bSingle M0018 #define CT_bHSL M0019 #define CT_bMotor M0020 #define CT_bCLT M0021 #define CT_bZDP M0022 #endif #endif