GLChuChiJi.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. #ifndef __GLCHUCHIJI_H__
  2. #define __GLCHUCHIJI_H__
  3. #if CHANG_SHENG_GEI_LI_MACHINE==1
  4. extern void CCJ_InitAction(void);
  5. extern void CCJ_DelayAction(void);
  6. extern void CCJ_Action(void);
  7. //80
  8. typedef struct
  9. {
  10. unsigned short res[79];
  11. unsigned short SetSpeed; //80拖带电机速度
  12. unsigned short NoZipperTime; //81没链时间
  13. unsigned short DelayGouZhenTime;//82延时钩针
  14. unsigned short DelayTuiLianTime;//83延时推夹
  15. unsigned short JiaLianTimes; //84夹链次数
  16. unsigned short TuiLianTimes; //85推夹次数
  17. unsigned short XiChiEnable; //86洗齿开关
  18. unsigned short MaoShuaEnable; //87毛刷开关
  19. unsigned short JiaLianHoldTime; //88夹链持续时间
  20. unsigned short TuiLianAlarmTime;//89推夹报警时间
  21. unsigned short CycleDelay; //90循环延时
  22. unsigned long SetTotal; //91产量设定
  23. unsigned short MotorCyclePulse; //93电机细分
  24. unsigned short MotorCycleLength;//94拖带轮周长
  25. unsigned short MotorAccTime; //95电机加速时间
  26. unsigned short MotorDecTime; //96电机减速时间
  27. unsigned short LowSpeed; //97过链感应后低速
  28. } CCJ_ParamStrct;
  29. #define CCJ_PARAM_SET_SPEED user_datas[80]
  30. #define CCJ_PARAM_NO_ZIPPER_TIME user_datas[81]
  31. #define CCJ_PARAM_DELAY_GOU_ZHEN user_datas[82]
  32. #define CCJ_PARAM_DELAY_TUILIAN user_datas[83]
  33. #define CCJ_PARAM_JIALIAN_TIMES user_datas[84]
  34. #define CCJ_PARAM_TUILIAN_TIMES user_datas[85]
  35. #define CCJ_PARAM_XICHI_ENABLE user_datas[86]
  36. #define CCJ_PARAM_MAOSHUA_ENABLE user_datas[87]
  37. #define CCJ_PARAM_JIALIAN_HOLD_TIME user_datas[88]
  38. #define CCJ_PARAM_TUILIAN_ALARM_TIME user_datas[89]
  39. #define CCJ_PARAM_CYCLE_TIME user_datas[90]
  40. #define CCJ_PARAM_SET_LOW_SPEED user_datas[97]
  41. #define CCJ_PARAM_CHUI_QI_TIME user_datas[98]
  42. #define CCJ_PARAM_YaDai_Enable user_datas[79]
  43. #define CCJ_ERRORTIME 5000
  44. #define CCJ_ALARM_ADDR 100
  45. #define CCJ_TOTAL_ADDR 0
  46. #define CCJ_SET_TOTAL_ADDR 5
  47. #define CCJ_NO_ALARM 0
  48. #define CCJ_JIALIAN_ORIGIN_ALARM 11
  49. #define CCJ_TUIJIA_ORIGIN_ALARM 12
  50. #define CCJ_GOUZHEN_IN_ALARM 13
  51. #define CCJ_START_ALARM 14
  52. #define CCJ_JIALIAN_ALARM 15
  53. #define CCJ_TUICHI_ALARM 16
  54. #define CCJ_NO_ZIPPER_ALARM 17
  55. #define CCJ_bRunning M0020
  56. #define CCJ_bStop M0018
  57. #define CCJ_bManStop M0022
  58. #define CCJ_bStart M0023
  59. #define CCJ_bManGouZhen M0024
  60. #define CCJ_bManJiaLian M0025
  61. #define CCJ_bManTuiLian M0026
  62. #define CCJ_bMaoShuaMotor M0027
  63. #define CCJ_bManXiChi M0028
  64. #define CCJ_bSingleXiChi M0031
  65. #define CCJ_bSongZhou M0032
  66. #define CCJ_bChuiQi M0033
  67. #define CCJ_bAlarmStop M0035
  68. #define CCJ_bTest M0038
  69. #define CCJ_bYaDai M0045
  70. #define CCJ_MotorStep cStepMByte10
  71. #define CCJ_AutoStep cStepMByte11
  72. #define CCJ_AutoDelay cDelayTime10
  73. #define CCJ_MotorDelay cDelayTime11
  74. #define CCJ_ChuiQiDelay cDelayTime12
  75. #define CCJ_AutoDelay1 cDelayTime13
  76. #define CCJ_START_IN M0384//x00
  77. #define CCJ_START_IN_UP (M0384 && !OLDM384)
  78. #define CCJ_STOP_IN M0385//x01
  79. #define CCJ_STOP_IN_UP (M0385 && !OLDM385)
  80. #define CCJ_GuoLian_IN !M0388//X04
  81. #define CCJ_GuoLian_IN_DW (M0388 && !OLDM388)
  82. #define CCJ_GuoLian_FAST_IN M0388
  83. #define CCJ_GouZhen_IN M0389//X05
  84. #define CCJ_GouZhen_FAST_IN M0389
  85. #define CCJ_JiaLian_IN M0390//X06
  86. #define CCJ_JiaLian_ORIGIN_IN M0391//X07
  87. #define CCJ_TuiLian_IN M0392//X10
  88. #define CCJ_TuiLian_ORIGIN_IN M0393//X11
  89. #define CCJ_Wait_IN M0395//X13
  90. #define CCJ_Wait_IN_UP (M0395 && !OLDM395)
  91. #define CCJ_Wait_IN_DW (!M0395 && OLDM395)
  92. #define CCJ_ChuDaiStop_IN M0397
  93. #define CCJ_ChuiQi M0355
  94. #define CCJ_ChuiQi_VAVLE M0355//Y03
  95. #define CCJ_MaoShua_MOTOR M0358//Y06
  96. #define CCJ_GouZhen_VAVLE M0359//Y07
  97. #define CCJ_JiaLian_VAVLE M0360//Y10
  98. #define CCJ_TuiLian_VAVLE M0361//Y11
  99. #define CCJ_SongZhou M0362//Y12
  100. #define CCJ_YaDai_VAVLE M0364//Y14
  101. #define CCJ_XiChi_MOTOR M0365//Y15
  102. //#define CCJ_ChuiLian_VAVLE Y03
  103. extern unsigned char CCJ_SingOneFlg ;
  104. #endif
  105. #endif