#ifndef __CHUCHIJI_H__ #define __CHUCHIJI_H__ #if HAI_HUA_MACHINE extern void CCJ_InitAction(void); extern void CCJ_DelayAction(void); extern void CCJ_Action(void); //80 typedef struct { unsigned short res[80]; unsigned short SetSpeed; //80拖带电机速度 unsigned short NoZipperTime; //81没链时间 unsigned short DelayGouZhenTime;//82延时钩针 unsigned short DelayTuiLianTime;//83延时推夹 unsigned short JiaLianTimes; //84夹链次数 unsigned short TuiLianTimes; //85推夹次数 unsigned short XiChiEnable; //86洗齿开关 unsigned short MaoShuaEnable; //87毛刷开关 unsigned short JiaLianHoldTime; //88夹链持续时间 unsigned short TuiLianAlarmTime;//89推夹报警时间 unsigned short CycleDelay; //90循环延时 unsigned long SetTotal; //91产量设定 unsigned short MotorCyclePulse; //93电机细分 unsigned short MotorCycleLength;//94拖带轮周长 unsigned short MotorAccTime; //95电机加速时间 unsigned short MotorDecTime; //96电机减速时间 unsigned short LowSpeed; //97过链感应后低速 } CCJ_ParamStrct; #define CCJ_PARAM_SET_SPEED user_datas[80] #define CCJ_PARAM_NO_ZIPPER_TIME user_datas[81] #define CCJ_PARAM_DELAY_GOU_ZHEN user_datas[82] #define CCJ_PARAM_DELAY_TUILIAN user_datas[83] #define CCJ_PARAM_JIALIAN_TIMES user_datas[84] #define CCJ_PARAM_TUILIAN_TIMES user_datas[85] #define CCJ_PARAM_XICHI_ENABLE user_datas[86] #define CCJ_PARAM_MAOSHUA_ENABLE user_datas[87] #define CCJ_PARAM_JIALIAN_HOLD_TIME user_datas[88] #define CCJ_PARAM_TUILIAN_ALARM_TIME user_datas[89] #define CCJ_PARAM_CYCLE_TIME user_datas[90] #define CCJ_PARAM_SET_LOW_SPEED user_datas[97] #define CCJ_PARAM_CHUI_QI_TIME user_datas[98] #define CCJ_ERRORTIME 5000 #define CCJ_ALARM_ADDR 100 #define CCJ_TOTAL_ADDR 0 #define CCJ_SET_TOTAL_ADDR 5 #define CCJ_NO_ALARM 0 #define CCJ_JIALIAN_ORIGIN_ALARM 11 #define CCJ_TUIJIA_ORIGIN_ALARM 12 #define CCJ_GOUZHEN_IN_ALARM 13 #define CCJ_START_ALARM 14 #define CCJ_JIALIAN_ALARM 15 #define CCJ_TUICHI_ALARM 16 #define CCJ_NO_ZIPPER_ALARM 17 #define CCJ_bRunning M0020 #define CCJ_bStop M0021 #define CCJ_bManStop M0022 #define CCJ_bStart M0023 #define CCJ_bManGouZhen M0024 #define CCJ_bManJiaLian M0025 #define CCJ_bManTuiLian M0026 #define CCJ_bMaoShuaMotor M0027 #define CCJ_bManXiChi M0028 #define CCJ_bSingleXiChi M0031 #define CCJ_bSongZhou M0032 #define CCJ_bChuiQi M0033 #define CCJ_bTest M0038 #define CCJ_bAlarmStop M0035 #define CCJ_MotorStep cStepMByte6 #define CCJ_AutoStep cStepMByte5 #define CCJ_AutoDelay cDelayTime6 #define CCJ_MotorDelay cDelayTime7 #define CCJ_ChuiQiDelay cDelayTime8 #define START_IN X00 #define START_IN_UP (X00 && !OLDX00) #define STOP_IN X01 #define STOP_IN_UP (X01 && !OLDX01) #define CCJ_KaDai_IN X06 #define CCJ_GuoLian_IN X04 #define CCJ_GuoLian_IN_DW (!X04 && OLDX04) #define CCJ_GuoLian_FAST_IN X04 #define CCJ_GouZhen_IN X05 #define CCJ_GouZhen_FAST_IN X05 #define CCJ_JiaLian_IN X06 #define CCJ_JiaLian_ORIGIN_IN X07 #define CCJ_TuiLian_IN X10 #define CCJ_TuiLian_ORIGIN_IN X11 #define CCJ_Auto_UP_IN (X15 && !OLDX15) #define CCJ_ChuDaiStop_IN X16 #define CCJ_ChuDai_IN_UP (X13 && !OLDX13) #define CCJ_ChuDai_IN_DW (!X13 && OLDX13) #define CCJ_ChuDai_IN (X13) #define ALARM_LED Y04 #define CCJ_ChuiQi Y03 #define CCJ_MaoShua_MOTOR Y06 #define CCJ_GouZhen_VAVLE Y07 #define CCJ_JiaLian_VAVLE Y10 #define CCJ_TuiLian_VAVLE Y11 #define CCJ_ChuiQi_VAVLE Y03 #define CCJ_XiChi_MOTOR Y05 #define CCJ_SongZhou Y12 //#define CCJ_ChuiLian_VAVLE Y03 #endif #endif