#ifndef __XDJINSHUDINCUN_H__ #define __XDJINSHUDINCUN_H__ #if FJ_YING_XING_MACHINE extern void JSDC_InitAction(void); extern void JSDC_NiLongXiuCiJiAction(void); extern void JSDC_ExtiActionX20(void); #define JSDC_ALARM_ADDR 100 #define JSDC_ZIPPER_LENGTH_ADDR 17 #define JSDC_TOTAL_ADDR 76 #define JSDC_PROSPEED_ADDR 78 #define JSDC_SERVER_EN 0 #define JSDC_SERVER_DISEN 1 #define JSDC_SC_EN 1 #define JSDC_SC_DISEN 0 #define JSDC_XC_SERVER_EN 1 #define JSDC_XC_SERVER_DISEN 0 #define JSDC_DIR_P 1 #define JSDC_DIR_N 0 #define JSDC_DC_GZ_MODE 0 #define JSDC_DC_BMQ_MODE 1 #define JSDC_DC_SF_MODE 2 #define JSDC_DC_SB_MODE 3 #define JSDC_NO_ALARM 0 #define JSDC_TOTAL_ALARM 1 #define JSDC_XIA_CHONG_ALARM 2 #define JSDC_KA_DAI_ALARM 3 #define JSDC_XC_ALARM 4 #define JSDC_NO_ZIPPER_ALARM 5 #define JSDC_NO_GOUZHEN_ALARM 7 #define JSDC_LFZ_ORIGIN_ALARM 8 #define JSDC_LFZ_LIMIT_ALARM 9 #define JSDC_RFZ_ORIGIN_ALARM 10 #define JSDC_RFZ_LIMIT_ALARM 11 #define JSDC_LONG_TIME_NO_ZIPPER_ALARM 12 #define JSDC_NO_SEBIAO_ALARM 13 #define JSDC_SEBIAO_ZIPPER_LENGTH_ALARM 14 #define JSDC_MOTOR_ALALRM_TIME 20000 #define FenZhengErrorTime 500 #define JSDC_ERRORTIME 3000 //出错时间 #define JSDC_PARAM_XIAZHI_TIME (user_datas[0]*10) #define JSDC_PARAM_CHUIQI_TIME (user_datas[1]*10) #define JSDC_PARAM_CHAOSHENG_TIME (user_datas[2]*10) #define JSDC_PARAM_INCH_MODE user_datas[3] #define JSDC_PARAM_SC_DELAY user_datas[4] #define JSDC_PARAM_XC_DELAY (user_datas[5]*10) #define JSDC_PARAM_SET_SPEED user_datas[8] #define JSDC_PARAM_LOW_SPEED user_datas[9] #define JSDC_PARAM_LOWSPEED_LENGTH user_datas[10] #define JSDC_XiaMode user_datas[44] //0 普通下止 1 超声下止 #define JSDC_GuoLianMode user_datas[12] #define JSDC_PARAM_DAOKOU_LENGTH user_datas[13] #define JSDC_PARAM_DAILUN_LENGTH user_datas[11] #define JSDC_SET_ZIPPER_LENGTH (user_datas[15] | (user_datas[16] << 16)) #define JSDC_SET_REVISE_ZIPPER_LENGTH user_datas[17] #define JSDC_SET_ZIPPER_LENGTH_INCH (user_datas[18] | (user_datas[19] << 16)) #define JSDC_SET_REVISE_ZIPPER_LENGTH_INCH user_datas[20] #define JSDC_DC_MODE user_datas[62] //0勾针 1步进/伺服 2色标 3编码器 #define JSDC_CS_ENABLE user_datas[44] //0不使用下止 1使用下止 #define JSDC_DEC_MODE user_datas[21] //0为感应减速模式,1为数控减速模式 #define JSDC_SET_TOTAL (user_datas[84] | (user_datas[85] << 16)) #define JSDC_GOU_ZHEN_MODE user_datas[24] // 0为普通勾针 1为活动勾针 #define JSDC_GuoLianCheckMode user_datas[25] // 超声下止模式下,过链感应有效电平配置1为翻转电平 #define JSDC_PARAM_XIAZHI_DELAY_TIME user_datas[26] #define JSDC_XiaChongMotorMode user_datas[27] //0为交流1为步进/伺服 #define JSDC_XiaChongSpeed user_datas[29] #define JSDC_XiaChongLowSpeed 10 #define JSDC_MOTOR_MODE user_datas[30] //0步进松轴电平1伺服松轴电平 #define JSDC_PARAM_DELAY_CHUIQI_TIME (user_datas[31]*10) #define JSDC_PARAM_FIRST_SPEED user_datas[32] #define JSDC_PARAM_GZ_RESET_MODE user_datas[33] //勾针复位方式 0为自动1为数控 #define JSDC_PARAM_CYCLE_PULSE user_datas[34] #define JSDC_PARAM_KONG_WEI_LENGTH user_datas[35] #define JSDC_PARAM_SEBIAO_TQ_LENGTH user_datas[46] #define JSDC_PARAM_SEBIAO_DW_LENGTH user_datas[47] #define JSDC_PARAM_GZ_LENGTH user_datas[48] #define JSDC_PARAM_GZ_DELAY (user_datas[49]*10) #define JSDC_PARAM_MOTOR_ALARM_TIME (user_datas[50]*10) #define JSDC_PARAM_R_FZ_DELAY (user_datas[51]*10) #define JSDC_PARAM_L_FZ_DELAY (user_datas[52]*10) #define JSDC_PARAM_MOTOR_DELAY (user_datas[53]*10) #define JSDC_PARAM_SC_MODE user_datas[54] #define JSDC_PARAM_AUTO_CHECK_MODE 1//1为自动测长0为手动输入长度 #define JSDC_PARAM_DELAY_XC (user_datas[56]*10) #define JSDC_PARAM_SB_HIGH_SPEED user_datas[57] #define JSDC_PARAM_SB_LOW_SPEED user_datas[58] #define JSDC_PARAM_SB_OFFSET_SPEED user_datas[59] #define JSDC_ERROR_LENGTH user_datas[60] #define JSDC_BM_LENGTH user_datas[12] #define JSDC_DELAY_STOP_SD (user_datas[61]*10) #define DISPLAY_DATA0 user_datas[121] #define DISPLAY_DATA1 user_datas[122] #define DISPLAY_DATA2 user_datas[123] #define DISPLAY_DATA3 user_datas[124] #define DISPLAY_DATA4 user_datas[125] #define DISPLAY_DATA5 user_datas[126] #define DISPLAY_DATA6 user_datas[127] #define DISPLAY_DATA7 user_datas[128] #define JSDC_bStart M0000 #define JSDC_bClear M0001 #define JSDC_bXiaZhi M0002 #define JSDC_bXiaChong M0003 #define JSDC_bStop M0004 #define JSDC_bLeftFenZhen M0005 #define JSDC_bRightFenZhen M0006 #define JSDC_bDotXiaChong M0007 #define JSDC_bDotXiaChongDisplay M0008 #define JSDC_bGouZhen M0009 #define JSDC_bAddLength M0010 #define JSDC_bDecLength M0011 #define JSDC_bSetDCMode M0012 #define JSDC_bChuiQi M0013 #define JSDC_bChangeLength M0014 #define JSDC_bClearAlarm M0015 #define JSDC_bChangeGouZhenMode M0016 #define JSDC_bChangeXiaZhiMode M0017 #define JSDC_bChuDai M0018 #define JSDC_bDingWei M0019 #define JSDC_bNext M0020 #define JSDC_bJiaoDao M0021 #define JSDC_bSaveWorkData M0022 #define JSDC_bAlarmStop M0023 #define JSDC_bRunning M0024 #define JSDC_bTestMotor M0025 #define JSDC_bSetLength M0026 #define JSDC_cAutoStep cStepMByte #define JSDC_cMotorStep cStepMByte1 #define JSDC_cXiaChongStep cStepMByte2 #define JSDC_cLeftFenZhenStep cStepMByte3 #define JSDC_cJiaoDaoStep cStepMByte5 #define JSDC_cChuiQiStep cStepMByte6 #define JSDC_cSDStep cStepMByte7 #define JSDC_cAutoDelay cDelayTime1 #define JSDC_cChuiQiDelay cDelayTime2 #define JSDC_cXiaZhiDelay cDelayTime3 #define JSDC_cGouZhenTime cDelayTime4 #define JSDC_cBudaiCheckDelay cDelayTime5 #define JSDC_cFenZhenLeftDelay cDelayTime6 #define JSDC_cSDDelay cDelayTime7 #define JSDC_cKaDaiDelay cDelayTime8 #define JSDC_cXiaChongDelay cDelayTime9 #define JSDC_cMotorDelay cDelayTime11 #define START_IN X00 #define START_IN_UP (X00 && !OLDX00) #define STOP_IN X01 #define STOP_IN_UP (X01 && !OLDX01) #define JSDC_SD_LIMIT_UP_IN_UP (X02 && !OLDX02) #define JSDC_SD_LIMIT_UP_IN_DW (!X02 && OLDX02) #define JSDC_SD_LIMIT_UP_IN X02 #define JSDC_KaDai_IN X03 #define JSDC_KaDai_IN_UP (X03 && !OLDX03) #define JSDC_XiaChong_IN X04 #define JSDC_XiaChong_IN_UP (X04 && !OLDX04) #define JSDC_XiaChong_IN_DW (!X04 && OLDX04) #define JSDC_LeftFenZhen_IN X07 #define JSDC_LeftFenZhen_IN_UP (X07 && !OLDX07) #define JSDC_CQ_IN X11 #define JSDC_CQ_IN_UP (X11 && !OLDX11) #define JSDC_GouZhen_IN X15 #define JSDC_XC_ShaChe Y00 #define JSDC_XiaChong_MOTOR Y01 #define JSDC_LeftFenZhen_VAVLE Y02 #define JSDC_GouZhen_VAVLE Y04 #define JSDC_ChuiQi_VAVLE Y05 #define JSDC_SZ_OUT Y07 #define JSDC_SD_MOTOR Y10 #endif #endif