#ifndef __JCWYHUA_XIAN_JI_H__ #define __JCWYHUA_XIAN_JI_H__ #if JIA_CHENG_WEI_YE_MACHINE extern void HuaXian_Action(void); extern void HuaXian_InitAction(void); #define HX_DIR_P 1 #define HX_DIR_N 0 #define HX_TOTAL_ADDR 76 #define HX_ALARM_ADDR 100 #define HX_PROSPEED_ADDR 78 /* * 警告类型 警告编号 */ #define HX_NO_ALARM 0 /* 没警告*/ #define HX_NO_ZIPPER_ALARM 1 /* 没拉链,自动停机*/ #define HX_KA_DAI_ALARM 2 /* 卡带异常*/ #define HX_DW_UP_ALARM 3 /* 上模上限位*/ #define HX_DW_DOWN_ALARM 4 /* 上模下限位*/ #define HX_HX_LIMIT 5 /* 下模上限位*/ #define HX_HX_ORIGIN 6 /* 下模下限位*/ #define HX_TOTAL_ALARM 7 #define HX_GZ_ALARM 8 #define HX_GZ_OUT_ALARM 9 #define VAVLE_ALARM_TIME 3000 #define MOTOR_ALARM_TIME 5000 #define HX_PARAM_ZIPPER_LENGTH (user_datas[1] | (user_datas[2] >> 16)) #define HX_PARAM_SET_TOTAL (user_datas[74] | (user_datas[75] >> 16)) #define HX_PARAM_HIGH_SPEED user_datas[3] #define HX_PARAM_LOW_SPEED user_datas[4] #define HX_PARAM_CYCLE_PULSE user_datas[5] #define HX_PARAM_CYCLE_LENGTH user_datas[6] #define HX_PARAM_DELAY_STOP_LENGTH user_datas[7] #define HX_PARAM_DELAY_DELAY_START (user_datas[8]*10) #define HX_PARAM_DELAY_GZ (user_datas[9]*10) #define HX_PARAM_SL_LENGTH (user_datas[10]*10) #define HX_PARAM_DELAY_DOWN (user_datas[11]*10) #define HX_PARAM_DELAY_HX (user_datas[12]*10) #define HX_PARAM_DELAY_DOWNBACK (user_datas[13]*10) #define HX_PARAM_DELAY_HXBACK (user_datas[14]*10) #define HX_PARAM_MOTOR_ALARM_TIME (user_datas[15]*10) #define HX_PARAM_HX_TIMES user_datas[16] #define HX_AutoDelay cDelayTime1 #define HX_MotorDelay cDelayTime2 #define HX_AlarmDelay cDelayTime3 #define HX_HXDelay cDelayTime4 #define HX_AutoStep cStepMByte #define HX_MotorStep cStepMByte1 #define HX_HuaXianStep cStepMByte2 #define START_IN X00 #define START_IN_UP (X00 && !OLDX00) #define STOP_IN X01 #define STOP_IN_UP (X01 && !OLDX01) #define HX_GUO_LIAN_IN X03 #define HX_GUO_LIAN_IN_UP (X03 && !OLDX03) #define HX_GUO_LIAN_IN_DW (!X03 && OLDX03) #define HX_GOUZHEN_IN X04 #define HX_DOWN_UP_IN X05 #define HX_DOWN_DOWN_IN X06 #define HX_HX_LIMIT_IN X07 #define HX_HX_ORIGIN_IN X10 #define HX_DOWN_VAVLE Y02 #define HX_HX_VAVLE Y03 #define HX_GZ_VAVLE Y04 #define HX_SZ_OUT Y07 //M0~M4全局固定使用 /* #define bRunning M0000 #define bStart M0001 #define bStop M0002 #define bAlarmStop M0003 #define bClearTotal M0004 */ #define HX_bDown M0006 #define HX_bHX M0007 #define HX_bClearTotal M0008 #define HX_bGZ M0009 #define HX_bSingle M0010 #define HX_bHXRun M0011 #define HX_bGoMotor M0013 #define HX_bBackMotor M0014 #endif #endif