FJChuChiJi.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. #ifndef __FJCHUCHIJI_H__
  2. #define __FJCHUCHIJI_H__
  3. #if FU_JIAN_MACHINE
  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[80];
  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_ERRORTIME 5000
  43. #define CCJ_ALARM_ADDR 100
  44. #define CCJ_TOTAL_ADDR 0
  45. #define CCJ_SET_TOTAL_ADDR 5
  46. #define CCJ_NO_ALARM 0
  47. #define CCJ_JIALIAN_ORIGIN_ALARM 11
  48. #define CCJ_TUIJIA_ORIGIN_ALARM 12
  49. #define CCJ_GOUZHEN_IN_ALARM 13
  50. #define CCJ_START_ALARM 14
  51. #define CCJ_JIALIAN_ALARM 15
  52. #define CCJ_TUICHI_ALARM 16
  53. #define CCJ_NO_ZIPPER_ALARM 17
  54. #define CCJ_bRunning M0020
  55. #define CCJ_bStop M0021
  56. #define CCJ_bManStop M0022
  57. #define CCJ_bStart M0023
  58. #define CCJ_bManGouZhen M0024
  59. #define CCJ_bManJiaLian M0025
  60. #define CCJ_bManTuiLian M0026
  61. #define CCJ_bMaoShuaMotor M0027
  62. #define CCJ_bManXiChi M0028
  63. #define CCJ_bSingleXiChi M0031
  64. #define CCJ_bSongZhou M0032
  65. #define CCJ_bChuiQi M0033
  66. #define CCJ_bTest M0038
  67. #define CCJ_bAlarmStop M0035
  68. #define CCJ_MotorStep cStepMByte6
  69. #define CCJ_AutoStep cStepMByte5
  70. #define CCJ_AutoDelay cDelayTime6
  71. #define CCJ_MotorDelay cDelayTime7
  72. #define CCJ_ChuiQiDelay cDelayTime8
  73. #define START_IN X00
  74. #define START_IN_UP (X00 && !OLDX00)
  75. #define STOP_IN X01
  76. #define STOP_IN_UP (X01 && !OLDX01)
  77. #define CCJ_KaDai_IN X06
  78. #define CCJ_GuoLian_IN X04
  79. #define CCJ_GuoLian_IN_DW (!X04 && OLDX04)
  80. #define CCJ_GuoLian_FAST_IN X04
  81. #define CCJ_GouZhen_IN X05
  82. #define CCJ_GouZhen_FAST_IN X05
  83. #define CCJ_JiaLian_IN X06
  84. #define CCJ_JiaLian_ORIGIN_IN X07
  85. #define CCJ_TuiLian_IN X10
  86. #define CCJ_TuiLian_ORIGIN_IN X11
  87. #define CCJ_Auto_UP_IN (X15 && !OLDX15)
  88. #define CCJ_ChuDaiStop_IN X16
  89. #define CCJ_ChuDai_IN_UP (X13 && !OLDX13)
  90. #define CCJ_ChuDai_IN_DW (!X13 && OLDX13)
  91. #define CCJ_ChuDai_IN (X13)
  92. #define ALARM_LED Y04
  93. #define CCJ_ChuiQi Y03
  94. #define CCJ_MaoShua_MOTOR Y06
  95. #define CCJ_GouZhen_VAVLE Y07
  96. #define CCJ_JiaLian_VAVLE Y10
  97. #define CCJ_TuiLian_VAVLE Y11
  98. #define CCJ_ChuiQi_VAVLE Y03
  99. #define CCJ_XiChi_MOTOR Y05
  100. #define CCJ_SongZhou Y12
  101. //#define CCJ_ChuiLian_VAVLE Y03
  102. #endif
  103. #endif