123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155 |
- #ifndef __JCWYJINSHUDINCUN_H__
- #define __JCWYJINSHUDINCUN_H__
- #if JIA_CHENG_WEI_YE_MACHINE
- extern void JSDC_InitAction(void);
- extern void JSDC_ManualAction(void);
- extern void JSDC_Action(void);
- extern void JSDC_DelayAction(void);
- extern void JSDC_ExtiActionX30(void);
- extern void JSDC_ExtiActionX31(void);
- #define JSDC_VAVLE_ALARM_TIME 1000
- #define SET_LEN_ADDR 6
- #define SET_LEN_ADDR_JY 26
- #define CLR_PULSE_DELAY 100
- #define MAXSPEED 150
- #define JSDC_ALARM_ADDR 100
- #define JSDC_TOTAL_ADDR 20
- #define JSDC_PROSPEED_ADDR 78
- //故障代码列表
- #define JSDC_NO_ALARM 0
- #define JSDC_TOTAL_ALARM 1
- #define JSDC_KADAI_ALARM 2
- #define JSDC_XIACHONG_LIMIT_ALARM 3
- #define JSDC_XIACHONG_ORIGIN_ALARM 4
- #define JSDC_START_XIACHONG_ALARM 5
- #define JSDC_SEBIAO_ALARM 6
- #define JSDC_NO_ZIPPER_ALARM 7
- #define JSDC_GZ_ALARM 8
- #define JSDC_RFZ_ALARM 9
- #define JSDC_LFZ_ALARM 10
- #define SET_ACCDEC 10
- #define JSDC_DIR_P 0
- #define JSDC_ALALRM_DELAY 100
- #define JSDC_FenZhenStep cStepMByte4
- #define JSDC_XiaChongStep cStepMByte3
- #define JSDC_ManualStep cStepMByte2
- #define JSDC_MotorStep cStepMByte1
- #define JSDC_AutoStep cStepMByte
- #define JSDC_XiaChongDelay cDelayTime1
- #define JSDC_AutoDelay cDelayTime2
- #define JSDC_ChuiQiDelay cDelayTime3
- #define JSDC_AlarmDelay cDelayTime4
- #define JSDC_MotorDelay cDelayTime5
- #define JSDC_FenZhenDelay cDelayTime6
- #define JSDC_LSDDelay cDelayTime7
- #define JSDC_SET_TOTAL (user_datas[2] | user_datas[3] << 16)
- #define JSDC_SET_ZIPPER_LENGTH (user_datas[6] | user_datas[7] << 16)
- #define JSDC_SET_ZIPPER_LENGTH_INCH (user_datas[8] | user_datas[9] << 16)
- #define JSDC_SET_KONGWEI_LENGTH user_datas[10]
- #define JSDC_SET_KONGWEI_LENGTH_INCH user_datas[11]
- #define JSDC_SET_ALL_LENGTH (user_datas[12] | user_datas[13] << 16)
- #define JSDC_SET_ALL_LENGTH_INCH (user_datas[14] | user_datas[15] << 16)
- #define JSDC_NOW_POS (user_datas[16] | user_datas[17] << 16)
- //#define JSDC_CORRECT_LENGTH (user_datas[28] | user_datas[29] << 16)
- #define JSDC_PARAM_SHACHE_TIME (user_datas[18]*10)
- #define JSDC_PARAM_XC_ALARM_TIME (user_datas[19]*10)
- #define JSDC_PARAM_DAOKOU_LENGTH user_datas[20]
- #define JSDC_PARAM_YD_DELAY (user_datas[21]*10)
- #define JSDC_PARAM_LOW_SPEED user_datas[22]
- #define JSDC_PARAM_LOWSPEED_LENGTH user_datas[23]
- #define JSDC_PARAM_HIGH_SPEED user_datas[24]
- #define JSDC_PARAM_CHUIQI_TIME (user_datas[25]*10)
- #define JSDC_PARAM_CYCLE_DELAY (user_datas[26]*10)
- #define JSDC_PARAM_OVER_TIME (user_datas[27]*10)
- #define JSDC_PARAM_SHACHE_DELAY_TIME (user_datas[28]*10)
- #define JSDC_PARAM_GZ_DELAY (user_datas[29]*10)
- #define JSDC_PARAM_LENGTH_MODE user_datas[30] //数控轮方式0为带编码器,1为直接电机定长
- #define JSDC_SEBIAO_MODE user_datas[31] //色标模式,0为普通1为色标模式
- #define JSDC_DC_MODE user_datas[32] //定寸模式,0为勾针1为数控模式
- #define JSDC_SX_ENABLE user_datas[33] //双铣配置,0为取消1为双铣模式
- #define JSDC_SC_MODE user_datas[34] //刹车模式,0为延时1为长期刹车
- #define JSDC_GZ_RESET_MODE user_datas[35] //勾针复位模式,0为自动1为长度复位
- #define JSDC_SEBIAO_DELAY_LENGTH user_datas[36]//色标模式延迟下冲长度
- #define JSDC_GZ_RESET_LENGTH user_datas[37]//勾针复位长度
- #define JSDC_PARAM_CYCLE_PULSE user_datas[38]
- #define JSDC_PARAM_CYCLE_LENGTH user_datas[39]//带轮周长
- #define JSDC_PARAM_CYCLE_BM_LENGTH user_datas[40]//编码器一圈长度
- #define JSDC_PARAM_CYCLE_BM_PULSE user_datas[41]//编码器一圈线数
- #define JSDC_PARAM_LFZ_DELAY (user_datas[42]*10)
- #define JSDC_PARAM_LSD_DELAY (user_datas[43]*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_XC_MODE 1 //0为普通气缸上模1为刹车电机离合下冲
- #define START_IN X00
- #define START_IN_UP (X00 && !OLDX00)
- #define STOP_IN X01
- #define STOP_IN_UP (X01 && !OLDX01)
- #define JSDC_XC_LIMIT_IN X02
- #define JSDC_KaDai_IN X03
- #define JSDC_ManXiaChong_UP (X04 && !OLDX04)
- #define JSDC_DEC_IN X05
- #define JSDC_DEC_IN_UP (X05 && !OLDX05)
- #define JSDC_DEC_IN_DW (!X05 && OLDX05)
- #define JSDC_LFZ_IN X06
- #define JSDC_GZ_IN X07
- #define JSDC_RFZ_IN X10
- #define JSDC_XC_ORIGIN_IN X11
- #define JSDC_XC_ORIGIN_IN_UP (X11 && !OLDX11)
- #define JSDC_ShaChe_VAVLE Y00
- #define JSDC_ChuiQi_VAVLE Y01
- #define JSDC_XiaChong_MOTOR Y02
- #define JSDC_LFZ_VAVLE Y03 //左分针
- #define JSDC_LSD_VAVLE Y04 //左送带
- #define JSDC_RFZ_VAVLE Y05 //右分针
- #define JSDC_GZ_VAVLE Y06
- #define JSDC_RSD_VAVLE Y07 //右送带
- //M0~M4 Actioon.h全局使用
- #define JSDC_bLeftFZ M0005
- #define JSDC_bLSD M0006
- #define JSDC_bRightFZ M0007
- #define JSDC_bGZ M0008
- #define JSDC_bStart M0009
- #define JSDC_bAdd M0010
- #define JSDC_bDec M0011
- #define JSDC_bSetCM M0016
- #define JSDC_bRunning M0017
- #define JSDC_bStop M0018
- #define JSDC_bMotor M0019
- #define JSDC_bXC M0020
- #define JSDC_bCQ M0021
- #define JSDC_bAlarmStop M0036
- #define JSDC_bSetInch M0039
- #endif
- #endif
|