#ifndef QUEDUAN_CHUANTOU_JT_H #define QUEDUAN_CHUANTOU_JT_H #if JUN_TENG_MACHINE extern void QDCT_InitAction(void); extern void QDCT_Action(void); extern void QDCT_ExtiActionX31(void); extern void QDCT_SetAlarmCode(unsigned alarm_code); #define QDCT_DIR_P 0 #define QDCT_DIR_N 1 #define QDCT_MOTOR_EN 0 #define QDCT_MOTOR_DISEN 1 #define QDCT_VAVLE_ERROR_TIME 3000 #define QDCT_MOTOR_ALARM_TIME 5000 //故障代码列表 #define QDCT_NO_ALARM 0 #define QDCT_NO_ZIPPER_ALARM 1 #define QDCT_LT_ALARM 2 #define QDCT_XQ_ORIGIN_ALARM 3 #define QDCT_XQ_LIMIT_ALARM 4 #define QDCT_JD_ALARM 5 #define QDCT_DEC_ALARM 6 #define QDCT_GO_LIMIT_ALARM 7 #define QDCT_BACK_LIMIT_ALARM 8 #define QDCT_LTCZ_ALARM 9 #define QDCT_COUNT_ALARM 10 #define QDCT_XM_LIMIT_ALARM 13 #define QDCT_XQ_ALARM 14 #define QDCT_TOTAL_ALARM 16 #define QDCT_XM_ORIGIN_ALARM 17 #define QDCT_SQ_ORIGIN_ALARM 19 #define QDCT_SL_ALARM 20 #define QDCT_HSL_LIMIT_ALARM 22 #define QDCT_HSL_ORIGIN_ALARM 23 #define QDCT_JD_LEFT_ALARM 24 #define QDCT_JD_RIGHT_ALARM 25 #define QDCT_JLT_ALARM 26 #define QDCT_ZLT_ALARM 27 #define QDCT_START_NO_ZIPPER_ALARM 30 #define QDCT_START_JLT_ALARM 31 #define QDCT_START_LTCZ_ALARM 32 #define QDCT_START_GL_ORIGIN_ALARM 33 #define QDCT_START_SL_LIMIT_ALARM 34 #define QDCT_START_SQ_ORIGIN_ALARM 35 #define QDCT_START_XQ_ORIGIN_ALARM 36 #define QDCT_START_SM_ORIGIN_ALARM 37 #define QDCT_EX_ALARM 40 #define QDCT_SQ_LIMIT_ALARM 41 #define QDCT_KD_ALARM 42 #define QDCT_SE_BIAO_ALARM 43 #define QDCT_AutoStep cStepMByte #define QDCT_ZhuangLiaoStep cStepMByte1 #define QDCT_MotorStep cStepMByte3 #define QDCT_JiaLianStep cStepMByte4 #define QDCT_XiaQieStep cStepMByte5 #define QDCT_ZhenDongStep cStepMByte6 #define QDCT_SongLiaoStep cStepMByte7 #define QDCT_XiaQieDelay cDelayTime1 #define QDCT_ZhuangLiaoDelay cDelayTime2 #define QDCT_MotorDelay cDelayTime4 #define QDCT_AutoDelay cDelayTime5 #define QDCT_TableDelay cDelayTime6 #define QDCT_ZhenDongDelay cDelayTime7 #define QDCT_KL_Delay cDelayTime8 #define QDCT_JD_Delay cDelayTime9 #define QDCT_SL_Delay cDelayTime10 #define QDCT_TOTAL_ADDR 8 #define QDCT_NOWTOTAL_ADDR 10 #define QDCT_SETTOTAL_ADDR 12 #define QDCT_SPEED_ADDR 14 #define QDCT_ALARM_ADDR 100 #define QDCT_PARAM_CYCLE_PULSE user_datas[0]//0 转一圈脉冲数 #define QDCT_PARAM_CYCLE_LENGTH user_datas[1]//1 转一圈拖带多长 #define QDCT_PARAM_TABLE_TIME (user_datas[2]*10)//台面电机工作时间 #define QDCT_PARAM_GO_LOWSPEED user_datas[3] //夹带前进低速 #define QDCT_PARAM_TABLE_NUM user_datas[4] #define QDCT_PARAM_SET_ZIPPER_LENGTH (user_datas[16] | user_datas[17] << 16)//拉链长度 #define QDCT_PARAM_PUTIN_LENGTH user_datas[18] //传入长度 #define QDCT_PARAM_JJGO_SPEED user_datas[20] //前进高速 #define QDCT_PARAM_JJFZ_LENGTH user_datas[21] //后退反转速度 #define QDCT_PARAM_JJBACK_SPEED user_datas[22] //后退速度 #define QDCT_PARAM_PUTIN_SPEED user_datas[23] //穿入速度 #define QDCT_PARAM_CUT_BACK_LENGTH user_datas[24] //剩余多长松夹子 #define QDCT_PARAM_SJZ_LENGTH user_datas[25] //切断后后退长度 #define QDCT_PARAM_CUT_DELAY (user_datas[26]*10) //延迟下切 #define QDCT_PARAM_CUTBACK_DELAY (user_datas[27]*10) //切断后延时后退 #define QDCT_PARAM_CUTBACK_SPEED user_datas[28] //切断后后退速度 #define QDCT_PARAM_KL_TIME (user_datas[30]*10) //开链时间 #define QDCT_PARAM_FZ_DELAY (user_datas[34]*10) //延时反转 #define QDCT_PARAM_ZD_WORKNUM user_datas[36] #define QDCT_PARAM_ZD_WORK_TIME (user_datas[37]*10) //振动盘工作时间 #define QDCT_PARAM_KL_DELAY (user_datas[40]*10) #define QDCT_PARAM_JD_DELAY (user_datas[41]*10) //延时夹带 #define QDCT_PARAM_ZD_MODE user_datas[42] //振动盘工作模式 0为连续1为间歇工作 #define QDCT_PARAM_CYCLE_DELAY (user_datas[43]*10) //延时启动拉带 #define QDCT_PARAM_FIRST_SPEED user_datas[44] //第一条慢速度 #define QDCT_PARAM_GO_LOWSPEED_LENGTH user_datas[45] //前进慢速长度 #define QDCT_PARAM_CZ_CHECK_DELAY (user_datas[46]*10) //延时检测拉头触针 #define QDCT_PARAM_LOCK_TIME 0// (user_datas[47]*10) //锁拉头时间 #define QDCT_PARAM_ON_BACK_LENGTH user_datas[50] //压感应时后退长度 #define QDCT_BACK_LOWSPEED_LENGTH user_datas[53] //后退慢速长度后退钩针模式才用 #define QDCT_ZFC_MODE user_datas[51] //正反穿模式 #define QDCT_TL_LENGTH user_datas[54] //推链长度 #define QDCT_ZHA_NO user_datas[55] //扎数 #define QDCT_ZHA_STOP_TIME (user_datas[56]*10) //扎数到停止时间 #define QDCT_BACK_LOWSPEED user_datas[58] #define QDCT_SEBIAO_MODE user_datas[59] #define QDCT_SEBIAO_LENGTH user_datas[60] #define QDCT_REMAIN_CHECK_LENGTH user_datas[61] #define QDCT_PARAM_MAX_BACK_LENGTH user_datas[62] #define QDCT_PARAM_OFFSET_LENGTH user_datas[63] #define QDCT_PARAM_PUTIN_SPEED_LENGTH user_datas[64] #define QDCT_PARAN_SJ_TIME user_datas[65] #define QDCT_PARAM_PUTIN_START_LENGTH user_datas[66] #define QDCT_PARAM_SL_BACKDELAY (user_datas[67]*10) #define QDCT_PARAM_FZ_LENGTH user_datas[68] #define QDCT_PARAM_DELAY_BACK (user_datas[69]*10) #define QDCT_PARAM_XM_START_TIME user_datas[70] #define QDCT_PARAM_FIRSTSPEED user_datas[71] #define QDCT_PARAM_CHANGE_LT user_datas[72] #define QDCT_PARAM_PUTIN_LOW_SPEED user_datas[73] #define QDCT_PARAM_PUTIN_LOW_SPEED_LENGTH user_datas[74] #define QDCT_PARAM_DELAY_JLT (user_datas[75]*10) #define QDCT_PARAM_START_SPEED user_datas[76] #define QDCT_PARAM_ACC_PULSE user_datas[77] #define QDCT_PARAM_DEC_PULSE user_datas[78] #define QDCT_PARAM_LOWSPEED_LENGTH user_datas[79] #define QDCT_PARAM_CNT_ENABLE_LENGTH user_datas[80] #define QDCT_SEBIAO_HIGH_SPEED user_datas[105] #define QDCT_SEBIAO_LOW_SPEED user_datas[106] #define QDCT_SEBIAO_ERROR_LENGHT user_datas[107] #define QDCT_SEBIAO_BACK_LSPEED_LENGTH user_datas[108] #define QDCT_SEBIAO_BACK_DW_SPEED user_datas[109] #define QDCT_PARAM_BACK_ALARM_MODE 1 //后退为感应后限 #define QDCT_PARAM_TL_ENABLE 0 #define START_IN X00 #define START_IN_UP (X00 && !OLDX00) #define STOP_IN X01 #define STOP_IN_UP (X01 && !OLDX01) #define STOP_IN_DW (!X01 && OLDX01) #define QDCT_JLT_IN X02 #define QDCT_JZ_LEFT_IN X03 #define QDCT_JZ_RIGHT_IN X04 #define QDCT_GO_LIMIT_IN X05 #define QDCT_GO_LIMIT_IN_UP (X05 && !OLDX05) #define QDCT_GO_DEC_IN X06 #define QDCT_GO_DEC_IN_UP (X06 && !OLDX06) #define QDCT_GO_DEC_IN_DW (!X06 && OLDX06) #define QDCT_BACK_LIMIT_IN X07 #define QDCT_BACK_LIMIT_IN_UP (X07 && !OLDX07) #define QDCT_LTCZ_IN X10 #define QDCT_HSL_ORIGIN_IN X11 #define QDCT_HSL_LIMIT_IN X12 #define QDCT_HSL_LIMIT_IN_DW (!X12 && OLDX12) #define QDCT_SL_LIMIT_IN X13 #define QDCT_XM_LIMIT_IN X14 #define QDCT_XM_ORIGIN_IN X15 #define QDCT_SQ_LIMIT_IN X16 #define QDCT_SB_IN X17 #define QDCT_XQ_LIMIT_IN X20 #define QDCT_LT_IN X30 #define QDCT_LT_IN_UP (X30 && !OLDX30) #define QDCT_LT_IN_DW (!X30 && OLDX30) #define QDCT_NO_ZIPPER_CHECK_IN X31 #define QDCT_KA_DAI_IN !X32 #define QDCT_XQ_ORIGIN_IN X33 #define QDCT_COUNT_IN X34 #define QDCT_SQ_OUT Y00 #define QDCT_XQ_OUT Y01 #define QDCT_XM_OUT Y02 #define QDCT_JD_OUT Y03 #define QDCT_SL_OUT Y04 #define QDCT_JLT_OUT Y05 #define QDCT_HSL_OUT Y06 #define QDCT_KL_OUT Y07 #define QDCT_ZDP_OUT Y10 #define QDCT_SLT_OUT Y11 #define QDCT_SZ_OUT Y12 #define QDCT_TB_OUT Y13 #define QDCT_TL_OUT Y14 //M0~M4全局固定使用 /* #define bRunning M0000 #define bStart M0001 #define bStop M0002 #define bAlarmStop M0003 #define bClearTotal M0004 */ #define QDCT_bClerNowTotal M0005 #define QDCT_bQianDianDW M0006 #define QDCT_bGeiLT M0007 #define QDCT_bZhuangLiao M0008 #define QDCT_bQieDuan M0009 #define QDCT_bOnceStart M0010 #define QDCT_bTuiLT M0013 #define QDCT_bZuangLT M0014 #define QDCT_bHeMo M0015 #define QDCT_bChuanLT M0016 #define QDCT_bSaveWorkState M0017 #define QDCT_bWorkMode M0018 #define QDCT_bAlarmStop M0019 #define QDCT_bTable M0020 #define QDCT_bSongLT M0021 #define QDCT_bManXQ M0051 #define QDCT_bManXM M0052 #define QDCT_bMotorGo M0053 #define QDCT_bMotorBack M0054 #define QDCT_bManSQ M0055 #define QDCT_bManJD M0056 #define QDCT_bManSL M0057 #define QDCT_bManHSL M0058 #define QDCT_bManZD M0059 #define QDCT_bManKL M0060 #define QDCT_bManSLT M0061 #define QDCT_bManJLT M0062 #define QDCT_bManSZ M0063 #endif #endif