123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- #ifndef __XSMXC_NILONG_STEP_JI_H__
- #define __XSMXC_NILONG_STEP_JI_H__
- #if XIN_SHENG_MACHINE
- extern void MXC_InitAction(void);
- extern void MXC_NiLongXiuCiJiAction(void);
- extern void MXC_ExtiActionX31(void);
- #define MXC_ALARM_ADDR 100
- #define MXC_ZIPPER_LENGTH_ADDR 17
- #define MXC_TOTAL_ADDR 76
- #define MXC_PROSPEED_ADDR 78
- #define MXC_NO_ALARM 0
- #define MXC_START_ALARM 1
- #define MXC_XIA_CHONG_ALARM 2
- #define MXC_KA_DAI_ALARM 3
- #define MXC_XC_ALARM 5
- #define MXC_FEN_ZHEN_ALARM 6
- #define MXC_NO_ZIPPER_ALARM 7
- #define MXC_NO_SEBIAO_ALARM 8
- #define MXC_NO_GOUZHEN_ALARM 9
- #define MXC_GU_DING_GOUZHEN_ALARM 10
- #define MXC_TOTAL_ALARM 11
- #define FenZhengErrorTime 5000
- #define ERRORTIME 2000 //出错时间
- #define MXC_PARAM_XIAZHI_TIME (user_datas[0]*10)
- #define MXC_PARAM_CHUIQI_TIME (user_datas[1]*10)
- #define MXC_PARAM_CHAOSHENG_TIME (user_datas[2]*10)
- #define MXC_PARAM_SC_DELAY (user_datas[3])
- #define MXC_PARAM_XC_DELAY (user_datas[5]*10)
- #define MXC_PARAM_SET_SPEED user_datas[8]
- #define MXC_PARAM_LOW_SPEED user_datas[9]
- #define MXC_PARAM_LOWSPEED_LENGTH user_datas[10]
- #define MXC_XiaMode user_datas[11] //0 普通下止 1 超声下止
- #define MXC_GuoLianMode user_datas[12]
- #define MXC_FenZSelect user_datas[34]
- #define MXC_PARAM_DAOKOU_LENGTH user_datas[13]
- #define MXC_PARAM_DAILUN_LENGTH user_datas[14]
- #define MXC_SET_ZIPPER_LENGTH (user_datas[15] | (user_datas[16] << 16))
- #define MXC_SET_REVISE_ZIPPER_LENGTH (user_datas[17] | (user_datas[18] << 16))
- #define MXC_DC_MODE user_datas[19] //0勾针 1步进/伺服 2色标
- #define MXC_XIA_ZHI_ENABLE user_datas[20] //0不使用下止 1使用下止
- #define MXC_GOU_ZHEN_DEC_MODE user_datas[21] //0为感应减速模式,1为数控减速模式
- #define MXC_SET_TOTAL (user_datas[22] | (user_datas[23] << 16))
- #define MXC_GOU_ZHEN_MODE user_datas[24] // 0为普通勾针 1为活动勾针
- #define MXC_GuoLianCheckMode user_datas[25] // 超声下止模式下,过链感应有效电平配置1为翻转电平
- #define MXC_PARAM_XIAZHI_DELAY_TIME user_datas[26]
- #define MXC_XiaChongMotorMode user_datas[27] //0为下冲短暂刹车1为长时间刹车
- #define MXC_XiaChongSpeed user_datas[29]
- #define MXC_XiaChongLowSpeed 10
- #define MXC_MOTOR_MODE user_datas[30] //0步进松轴电平1伺服松轴电平
- #define MXC_PARAM_DELAY_CHUIQI_TIME (user_datas[31]*10)
- #define MXC_PARAM_FIRST_SPEED user_datas[32]
- #define MXC_PARAM_GZ_RESET_MODE user_datas[33] //勾针复位方式 0为自动1为数控
- #define MXC_PARAM_SEBIAO_TQ_LENGTH user_datas[46]
- #define MXC_PARAM_SEBIAO_DW_LENGTH user_datas[47]
- #define MXC_PARAM_GZ_LENGTH user_datas[48]
- #define MXC_PARAM_GZ_DELAY (user_datas[49]*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 MXC_bStart M0000
- #define MXC_bClear M0001
- #define MXC_bXiaZhi M0002
- #define MXC_bXiaChong M0003
- #define MXC_bStop M0004
- #define MXC_bLeftFenZhen M0005
- #define MXC_bRightFenZhen M0006
- #define MXC_bDotXiaChong M0007
- #define MXC_bDotXiaChongDisplay M0008
- #define MXC_bGouZhen M0009
- #define MXC_bAddLength M0010
- #define MXC_bDecLength M0011
- #define MXC_bSetDCMode M0012
- #define MXC_bChuiQi M0013
- #define MXC_bChangeLength M0014
- #define MXC_bClearAlarm M0015
- #define MXC_bChangeGouZhenMode M0016
- #define MXC_bChangeXiaZhiMode M0017
- #define MXC_bChuDai M0018
- #define MXC_bDingWei M0019
- #define MXC_bNext M0020
- #define MXC_bJiaoDao M0021
- #define MXC_bSaveWorkData M0022
- #define MXC_bAlarmStop M0023
- #define MXC_cAutoStep cStepMByte
- #define MXC_cMotorStep cStepMByte1
- #define MXC_cXiaChongStep cStepMByte2
- #define MXC_cLeftFenZhenStep cStepMByte3
- #define MXC_cRightFenZhenStep cStepMByte4
- #define MXC_cJiaoDaoStep cStepMByte5
- #define MXC_cChuiQiStep cStepMByte6
- #define MXC_cAutoDelay cDelayTime1
- #define MXC_cChuiQiDelay cDelayTime2
- #define MXC_cXiaZhiDelay cDelayTime3
- #define MXC_cGouZhenTime cDelayTime4
- #define MXC_cBudaiCheckDelay cDelayTime5
- #define MXC_cFenZhenLeftDelay cDelayTime6
- #define MXC_cFenZhenRightDelay cDelayTime7
- #define MXC_cKaDaiDelay cDelayTime8
- #define MXC_cXiaChongDelay cDelayTime9
- #define START_IN X00
- #define START_IN_UP (X00 && !OLDX00)
- #define STOP_IN X01
- #define STOP_IN_UP (X01 && !OLDX01)
- #define MXC_ManXiaChong_UP (X02 && !OLDX02)
- #define MXC_GouZhen_IN X03
- #define MXC_GouZhen_IN_UP (X03 && !OLDX03)
- #define MXC_Dec_IN X04
- #define MXC_KaDai_IN X05
- #define MXC_KaDai_IN_UP (X05 && !OLDX05)
- #define MXC_LeftFenZhen_Origin_IN X06
- #define MXC_LeftFenZhen_IN X07
- #define MXC_XiaChong_IN X10
- #define MXC_XiaChong_IN_UP (X10 && !OLDX10)
- #define MXC_RightFenZhen_Origin_IN X11
- #define MXC_RighttFenZhen_IN X12
- #define MXC_DingChuPian_IN X13
- #define MXC_DingChuPian_IN_DW (!X13 && !OLDX13)
- #define MXC_Zipper_IN X14
- #define MXC_GuoLian_IN X15
- #define MXC_GuoLian_IN_UP (X15 && !OLDX15)
- #define MXC_GuoLian_IN_DW (!X15 && OLDX15)
- #define MXC_XiaZhi_IN X16
- #define MXC_XiaZhi_IN_UP (X16 && !OLDX16)
- #define MXC_XiaZhi_IN_DW (!X16 && OLDX16)
- #define MXC_SeBiao_IN X17
- #define MXC_SeBiao_IN_UP (X17 && !OLDX17)
- #define MXC_SeBiao_IN_DW (!X17 && OLDX17)
- #define MXC_FenDai_IN X20
- #define MXC_FenDai_IN_UP (!X20 && OLDX20)
- #define MXC_LIHE_VAVLE Y00
- #define MXC_XC_SongZhou Y01
- #define MXC_ChuiQi_VAVLE Y02
- #define MXC_XiaZhi_VAVLE Y03
- #define MXC_LeftFenZhen_VAVLE Y04
- #define MXC_GouZhen_VAVLE Y05
- #define MXC_RightFenZhen_VAVLE Y06
- #define MXC_XiaChong_MOTOR Y07
- #define MXC_XiChiChuiQi Y10
- #define MXC_JiaoDao_OUT Y11
- #define MXC_ChuDai_VAVLE Y11
- #define MXC_XiaZhi_MOTOR Y12
- #define MXC_TuoDaiSongZhou Y13
- #define MXC_FenDai_VAVLE Y13
- #define MXC_GuDingGouZhen Y14
- #define MXC_ChaoSheng Y15
- #endif
- #endif
|