123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- #ifndef __JHJIAOYADINCUN_H__
- #define __JHJIAOYADINCUN_H__
- #if CHANG_SHENG_GEI_LI_MACHINE==1
- #define JHJY_DIR_P 1
- #define JHJY_DIR_N 0
- #define JYDC_DC_GD_MODE 0
- #define JYDC_DC_SB_MODE 1
- #define JYDC_DC_BMQ_MODE 2
- #define JYDC_DC_GZ_MODE 3
- extern unsigned short CCJ_STARTFLAG;
- extern unsigned long Cur_CC_Num;
- extern unsigned char Link_TB_FLG,Link_TB_Set;
- extern unsigned char link_DC_OVER_FLG;
- extern void JYDC_InitAction(void);
- extern void JYDC_ManualAction(void);
- extern void JYDC_Action(void);
- extern void JYDC_ExtiActionX30(unsigned char up_down);
- extern void JYDC_ExtiActionX31(void);
- #define SET_LEN_ADDR 6
- #define SET_LEN_ADDR_JY 4 //对就齿数地址 32位
- #define CUR_LEN_ADDR_JY 8
- #define CLR_PULSE_DELAY 100
- #define MAXSPEED 150
- #define JYDC_ALARM_ADDR 100
- #define JYDC_TOTAL_ADDR 0
- #define JYDC_PROSPEED_ADDR 78
- //故障代码列表
- #define JYDC_NO_ALARM 0
- #define JYDC_TOTAL_ALARM 1
- #define JYDC_KADAI_ALARM 2
- #define JYDC_XIACHONG_ARRIVE_ALARM 3
- #define JYDC_COUNT_ALARM 4
- #define JYDC_START_XIACHONG_ALARM 5
- #define JYDC_SEBIAO_ALARM 6
- #define NO_TOOTHCOUT_TIME 10*user_datas[81] //多久没感应到数齿信号异常
- #define SET_ACCDEC 10
- #define JYDC_cAutoStep cStepMByte
- #define JYDC_cXiaChongStep cStepMByte1
- #define JYDC_ManualStep cStepMByte2
- #define JYDC_cMotorStep cStepMByte3
- #define JYDC_cCSStopStep cStepMByte4//按齿数暂停
- #define JYDC_cGZDW_CNT cCharBuff1
- //32位无符号
- #define JYDC_cAutoDelay cDelayTime2
- #define JYDC_ChuiQiDelay cDelayTime3
- #define JYDC_XiChiChuiQiDelay cDelayTime4
- #define JYDC_cMotorDelay cDelayTime5
- #define JYDC_CURJY_SET cDelayTime7
- #define JYDC_ShuChiStopDelay cDelayTime8
- #define JYDC_XiaChongDelay cDelayTime9
- #define JYDC_CRUKONGWEILENGTH cUDword32Buff6
- //32位有符号变量;
- #define JYDC_CURENCODELENGTH cDword32Buff1
- #define JYDC_LENGTHCMP cDword32Buff2
- #define JYDC_dwEncPos cDword32Buff3
- #define JYDC_ENCODEPULSE cDword32Buff4
- //
- #define SET_ZIPPER_LENGTH (user_datas[6] | user_datas[7] << 16)
- #define JYDC_SET_TOTAL (user_datas[2] | user_datas[3] << 16)
- #define JYDC_PARAM_REVICHISHU (user_datas[4] | user_datas[5] << 16)//user_datas[26] 变为32位
- #define JYDC_PARAM_CHUIQI_TIME user_datas[30]
- // #define CUR_LEN_JY ( user_datas[8] | user_datas[9]<<16)//user_datas[8]变为32位
- #define JYDC_PARAM_SET_SPEED user_datas[11]
- #define JYDC_PARAM_LOW_SPEED user_datas[25]
- //#define JYDC_PARAM_REVICHISHU user_datas[26]
- #define JYDC_PARAM_KONG_WEI_LENGTH user_datas[27] //除齿长度
- #define JYDC_PARAM_LOW_LENGTH user_datas[29]
- #define JYDC_PARAM_XC_ALARM_TIME (10*user_datas[16])//JYDC_Param->XC_AlarmTime //下冲最长时间
- #define JYDC_PARAM_SHACHE_DELAY_TIME (10 * user_datas[13])//JYDC_Param->ShaCheDelayTime //下冲最长时间
- #define JYDC_PARAM_SHACHE_TIME (user_datas[38]*10) //JYDC_Param->ShaCheTime //刹车时间
- #define CUIQI_TIME user_datas[30]//JYDC_Param->CuiQiTime //吹气时间
- #define XIACONG_DELAY_TIME (10*user_datas[17])//JYDC_Param->XC_DelayTime //下冲最长时间
- #define SET_ZIPPER_LENGTH_INCH (user_datas[31] | user_datas[32] << 16)
- #define JYDC_PARAM_CYCLE_DELAY (10*user_datas[33])
- #define JYDC_COUNT_DIR user_datas[34] // 数齿信号方向
- #define JYDC_DC_MODE 0//user_datas[35]//色标模式,0为普通1为色标模式
- #define JYDC_SEBIAO_DELAY user_datas[36]//色标模式延迟下冲齿数
- #define JYDC_XICHI_MOTOR_MODE user_datas[86]//0为自动的时候不用铣齿电机,1为使用
- #define JYDC_FZ_MODE user_datas[39]//1为有反转
- #define JYDC_HLEVEL_TIME user_datas[40]//高电平检测时间
- #define JYDC_LLEVEL_TIME user_datas[41]//低电平检测时间
- #define JYDC_FILTER 10
- #define JYDC_CYCLE_PULSE 3200//user_datas[39]
- #define JYDC_CYCLE_LENGTH 2990//user_datas[39]
- //#define JYDC_CYCLE_PULSE user_datas[42]
- //#define JYDC_CYCLE_LENGTH user_datas[43]
- #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 MODE_SELECT user_datas[51]
- #define JY_JIZHUN_CISHU user_datas[23] //基准齿数
- #define JY_JIZHUN_LEN user_datas[24] //基准长度
- #define SET_DAOKOU_JY user_datas[28] //机械模具刀口
- //3#
- #define JY_JIZHUN_CISHU1 user_datas[52] //基准齿数
- #define JY_JIZHUN_LEN1 user_datas[53] //基准长度
- #define SET_DAOKOU_JY1 user_datas[54] //机械模具刀口
- //5#
- #define JY_JIZHUN_CISHU2 user_datas[55] //基准齿数
- #define JY_JIZHUN_LEN2 user_datas[56] //基准长度
- #define SET_DAOKOU_JY2 user_datas[57] //机械模具刀口
- //8#
- #define JY_JIZHUN_CISHU3 user_datas[58] //基准齿数
- #define JY_JIZHUN_LEN3 user_datas[59] //基准长度
- #define SET_DAOKOU_JY3 user_datas[60] //机械模具刀口
- //特殊刀模
- #define JY_JIZHUN_CISHU4 user_datas[61] //基准齿数
- #define JY_JIZHUN_LEN4 user_datas[62] //基准长度
- #define SET_DAOKOU_JY4 user_datas[63] //机械模具刀口
- #define SET_STOP_PLUS user_datas[87] //停止脉冲数
- #define JYDC_START_IN M0384//x00
- #define JYDC_START_IN_UP (M0384 && !OLDM384)
- #define JYDC_STOP_IN M0385//x01
- #define JYDC_STOP_IN_UP (M0385 && !OLDM385)
- #define JYDC_STOP_IN_DW (!M0385 && OLDM385)
- #define JYDC_ManXiaChong_UP (M0386 && !OLDM386)//x02
- #define JYDC_KaDai_IN M0387//x03
- #define JYDC_Wait_IN (M0394)//X12
- #define JYDC_Wait_IN_UP (M0394 && !OLDM394)
- #define JYDC_Wait_IN_DW (!M0394 && OLDM394)
- #define JYDC_XiaChong_IN M0396//x14
- #define JYDC_XiaChong_IN_UP (M0396 && !OLDM396)
- #define JYDC_XiaChong_IN_DW (!M0396 && OLDM396)
- #define JYDC_ShaChe_VAVLE M0352//Y00
- #define JYDC_ChuiQi_VAVLE M0353//Y01
- #define JYDC_SuoChi_VAVLE M0354//Y02
- #define JYDC_XiaChong_MOTOR M0356//Y04
- #define JYDC_XiChi_MOTOR M0357//Y05
- #define JYDC_XiChiChuiQi_VAVLE M0363
- //M0~M4 Actioon.h全局使用
- #define JYDC_bManSuoChi M0005
- #define JYDC_bTest M0006
- #define JYDC_bManChuiQi M0007
- #define JYDC_bManXiaChong M0008
- #define JYDC_bStart M0009
- #define JYDC_bAddTooth M0010
- #define JYDC_bDecTooth M0011
- #define JYDC_bChangeLength M0016
- #define JYDC_bRunning M0017
- #define JYDC_bStop M0018
- #define JYDC_bSingleOrGroup M0019
- #define JYDC_bManXiChiMotor M0029
- #define JYDC_bSingleONE M0030
- #define JYDC_bAlarmStop M0036
- #define JYDC_bSetInch M0039
- #define JYDC_bSetTooth M0040
- #define JYDC_bManMotor M0041 //手动拖带
- #define JYDC_bManGuaChiMotor M0042
- #define JYDC_Check_HL M0047//检测高低电平
- #define JYDC_Check_HERRO M0048//检测高电平丢脉冲
- #define JYDC_Check_LERRO M0049//检测低电平丢脉冲
- #endif
- #endif
|