YXJinShuDinCun.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. #ifndef __XYJINSHUDINCUN_H__
  2. #define __XYJINSHUDINCUN_H__
  3. #if FJ_YING_XING_MACHINE==1
  4. extern void JSDC_InitAction(void);
  5. extern void JSDC_NiLongXiuCiJiAction(void);
  6. extern void JSDC_ExtiActionX20(void);
  7. #define JSDC_ALARM_ADDR 100
  8. #define JSDC_ZIPPER_LENGTH_ADDR 17
  9. #define JSDC_TOTAL_ADDR 76
  10. #define JSDC_PROSPEED_ADDR 78
  11. #define JSDC_DIR_P 1
  12. #define JSDC_DIR_N 0
  13. #define JSDC_NO_ALARM 0
  14. #define JSDC_TOTAL_ALARM 1 //到达预设数量
  15. #define JSDC_XIA_CHONG_ALARM 2 // 下冲异常
  16. #define JSDC_KA_DAI_ALARM 3 //卡带感应异常
  17. #define JSDC_XC_ALARM 4 //下冲感应异常
  18. #define JSDC_NO_ZIPPER_ALARM 5 //无尺寸
  19. #define JSDC_NO_GOUZHEN_ALARM 7 //勾针
  20. #define JSDC_LFZ_ORIGIN_ALARM 8
  21. #define JSDC_LFZ_LIMIT_ALARM 9
  22. #define JSDC_RFZ_ORIGIN_ALARM 10
  23. #define JSDC_RFZ_LIMIT_ALARM 11
  24. #define JSDC_LONG_TIME_NO_ZIPPER_ALARM 12 //长时间没有感应到拉链
  25. #define JSDC_NO_SEBIAO_ALARM 13
  26. #define JSDC_SEBIAO_ZIPPER_LENGTH_ALARM 14 //色标尺寸异常
  27. #define JSDC_MOTOR_ALALRM_TIME 20000
  28. #define JSDC_ERRORTIME 3000 //出错时间
  29. #define JSDC_PARAM_CHUIQI_TIME (user_datas[1]*10) // 吹气时间
  30. #define JSDC_TDCQ_TIME (user_datas[2]*10) //拖带吹气时间
  31. #define JSDC_PARAM_DELAY_CHUIQI_TIME (user_datas[3]*10)//延时吹气
  32. #define JSDC_SET_TOTAL user_datas[4] //设置数量
  33. #define JSDC_PARAM_DAOKOU_LENGTH user_datas[13] //刀口长度
  34. #define JSDC_SET_ZIPPER_LENGTH (user_datas[15] | (user_datas[16] << 16))
  35. #define JSDC_SET_REVISE_ZIPPER_LENGTH user_datas[17]
  36. //8位变量
  37. #define JSDC_bRunning cCharBuff1
  38. #define JSDC_bAlarmStop cCharBuff2
  39. #define JSDC_cAutoStep cStepMByte
  40. #define JSDC_cMotorStep cStepMByte1
  41. #define JSDC_cXiaChongStep cStepMByte2
  42. #define JSDC_cLeftFenZhenStep cStepMByte3
  43. #define JSDC_cJiaoDaoStep cStepMByte5
  44. #define JSDC_cChuiQiStep cStepMByte6
  45. #define JSDC_cSDStep cStepMByte7
  46. #define JSDC_cValveStep cStepMByte8
  47. #define JSDC_cAutoDelay cDelayTime1
  48. #define JSDC_cChuiQiDelay cDelayTime2
  49. #define JSDC_cXiaZhiDelay cDelayTime3
  50. #define JSDC_cGouZhenTime cDelayTime4
  51. #define JSDC_cBudaiCheckDelay cDelayTime5
  52. #define JSDC_cFenZhenLeftDelay cDelayTime6
  53. #define JSDC_cSDDelay cDelayTime7
  54. #define JSDC_cKaDaiDelay cDelayTime8
  55. #define JSDC_cXiaChongDelay cDelayTime9
  56. #define JSDC_cMotorDelay cDelayTime11
  57. #define JSDC_cValveDelay cDelayTime12
  58. //输入
  59. #define JSDC_STOP_IN M0384 //X00停止
  60. #define JSDC_STOP_IN_UP (M0384 && !OLDM384)
  61. #define JSDC_SeBiao_IN M0385 //X01色标
  62. #define JSDC_GouZhen_IN M0386 //X02勾针
  63. #define JSDC_ManualXC_IN M0387 //X03手动下冲
  64. #define JSDC_ManualXC_IN_UP (M0387 && !OLDM387)
  65. #define JSDC_START_IN M0388 //X04 启动
  66. #define JSDC_START_IN_UP (M0388 && !OLDM388)
  67. #define JSDC_XiaChong_ORIGIN M0389 //X05下冲原位
  68. #define JSDC_BuDai_IN M0390 //X06 布袋感应
  69. #define JSDC_LeftXC_IN M0391//X07 左分针到位
  70. #define JSDC_RightXC_IN M0392//X10 右分针到位
  71. #define JSDC_LeftXC_ORIGIN M0393//X11 左分针原位
  72. #define JSDC_RightXC_ORIGIN M0394//X12 右分针原位
  73. #define JSDC_KaDai_IN M0395 //X13卡带感应
  74. #define JSDC_KaDai_IN_UP (M0395 && !OLDM395)
  75. //输出
  76. #define JSDC_SZ_OUT M0353 // Y01电机使能
  77. #define JSDC_LeftXC_VAVLE M0354 // Y02 左选齿气阀
  78. #define JSDC_RightXC_VAVLE M0355 // Y03 右选齿气阀
  79. #define JSDC_ChuiQi_VAVLE M0356 // Y04 吹气气阀
  80. #define JSDC_GouZhen_VAVLE M0357 // Y05 勾针气阀
  81. #define JSDC_XiaChong_MOTOR M0358 // Y06 下冲电机
  82. #define JSDC_SeBiao_VAVLE M0359 // Y07 色标感应区分色线
  83. #define JSDC_DingDaoBaoHu_VAVLE M0360 // Y10 顶刀保护
  84. //M位地址位操作
  85. #define JSDC_bStart M0001
  86. #define JSDC_bStop M0002
  87. #define JSDC_bMotorSZ M0005//电机使能
  88. #define JSDC_bLeftXuanChi M0006 //手动左选齿气阀
  89. #define JSDC_bRightXuanChi M0007 //手动右选齿气阀
  90. #define JSDC_bChuiQi M0008 //手动吹气
  91. #define JSDC_bGouZhen M0009 //手动勾针
  92. #define JSDC_bXiaChong M0010 //手动下冲
  93. #define JSDC_bSeBiao M0011 //手动色标感应
  94. #define JSDC_bDingZhen M0012 //手动顶针
  95. #define JSDC_Single M0013 //单循环
  96. #define JSDC_bAddLength M0014 //加尺寸
  97. #define JSDC_bDecLength M0015 //减尺寸
  98. #endif
  99. #endif