FJMXC_NiLong_StepJi.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. #ifndef __FJMXC_NILONG_STEP_JI_H__
  2. #define __FJMXC_NILONG_STEP_JI_H__
  3. #if FU_JIAN_MACHINE
  4. #define MXC_NO_ALARM 0
  5. #define MXC_START_ALARM 1
  6. #define MXC_XIA_CHONG_ALARM 2
  7. #define MXC_KA_DAI_ALARM 3
  8. #define MXC_FEN_ZHEN_ALARM 6
  9. #define MXC_NO_ZIPPER_ALARM 7
  10. #define MXC_NO_SEBIAO_ALARM 8
  11. #define PARAM_XIAZHI_TIME user_datas[0]
  12. #define PARAM_CHUIQI_TIME user_datas[1]
  13. #define PARAM_CHAOSHENG_TIME user_datas[2]
  14. #define PARAM_START_SPEED user_datas[6]
  15. #define PARAM_SET_SPEED user_datas[8]
  16. #define PARAM_LOW_SPEED user_datas[9]
  17. #define PARAM_LOWSPEED_LENGTH user_datas[10]
  18. #define XiaMode (user_datas[11] & 0x0001) //0 普通下止 1 超声下止
  19. #define ShaCheMode (user_datas[11] & 0x0002) //0 刹车不放开 1放开
  20. #define GouZMode X22||(user_datas[24]) //0 普通勾针 1 隐形勾针
  21. #define GuoLianMode (user_datas[11] & 0x0008)
  22. #define FenZSelect (user_datas[11] & 0x0010)
  23. #define PARAM_DAOKOU_LENGTH user_datas[13]
  24. #define PARAM_DAILUN_LENGTH user_datas[14]
  25. #define MXC_SET_ZIPPER_LENGTH (user_datas[15] | (user_datas[16] << 16))
  26. #define SET_REVISE_ZIPPER_LENGTH (user_datas[17] | (user_datas[18] << 16))
  27. #define DC_MODE user_datas[19] //0勾针 1步进/伺服 2色标
  28. #define XIA_ZHI_ENABLE user_datas[20] //0不使用下止 1使用下止
  29. #define GOU_ZHEN_DEC_MODE user_datas[21]
  30. #define MXC_SET_TOTAL (user_datas[22] | (user_datas[23] << 16))
  31. #define GOU_ZHEN_MODE user_datas[24] // 0为普通勾针 1为活动勾针
  32. #define GuoLianCheckMode user_datas[25]
  33. #define PARAM_XIAZHI_DELAY_TIME user_datas[26]
  34. #define XiaCongMotorMode user_datas[27]
  35. #define MOTOR_MODE user_datas[30]//0步进1伺服
  36. #define PARAM_DELAY_CHUIQI_TIME user_datas[31]
  37. #define PARAM_FIRST_SPEED user_datas[32]
  38. #define PARAM_SEBIAO_TQ_LENGTH user_datas[46]
  39. #define PARAM_SEBIAO_DW_LENGTH user_datas[47]
  40. #define DISPLAY_DATA0 user_datas[121]
  41. #define DISPLAY_DATA1 user_datas[122]
  42. #define DISPLAY_DATA2 user_datas[123]
  43. #define DISPLAY_DATA3 user_datas[124]
  44. #define DISPLAY_DATA4 user_datas[125]
  45. #define DISPLAY_DATA5 user_datas[126]
  46. #define DISPLAY_DATA6 user_datas[127]
  47. #define DISPLAY_DATA7 user_datas[128]
  48. #define MXC_bStart M0000
  49. #define MXC_bClear M0001
  50. #define MXC_bXiaZhi M0002
  51. #define MXC_bXiaChong M0003
  52. #define MXC_bStop M0004
  53. #define MXC_bLeftFenZhen M0005
  54. #define MXC_bRightFenZhen M0006
  55. #define MXC_bDotXiaChong M0007
  56. #define MXC_bDotXiaChongDisplay M0008
  57. #define MXC_bGouZhen M0009
  58. #define MXC_bAddLength M0010
  59. #define MXC_bDecLength M0011
  60. #define MXC_bSetDCMode M0012
  61. #define MXC_bChuiQi M0013
  62. #define MXC_bChangeLength M0014
  63. #define MXC_bClearAlarm M0015
  64. #define MXC_bChangeGouZhenMode M0016
  65. #define MXC_bChangeXiaZhiMode M0017
  66. #define MXC_bChuDai M0018
  67. #define MXC_bDingWei M0019
  68. #define MXC_bNext M0020
  69. #define MXC_bJiaoDao M0021
  70. #define MXC_bSaveWorkData M0022
  71. #define cAutoStep cStepMByte
  72. #define cMotorStep cStepMByte1
  73. #define cXiaChongStep cStepMByte2
  74. #define cLeftFenZhenStep cStepMByte3
  75. #define cRightFenZhenStep cStepMByte4
  76. #define cJiaoDaoStep cStepMByte5
  77. #define cAutoDelay cDelayTime1
  78. #define cChuiQiDelay cDelayTime2
  79. #define cXiaZhiDelay cDelayTime3
  80. #define cKaDaiDelay cDelayTime8
  81. #define START_IN X00
  82. #define START_IN_UP (X00 && !OLDX00)
  83. #define STOP_IN X01
  84. #define STOP_IN_UP (X01 && !OLDX01)
  85. #define MXC_ManXiaChong_UP (X02 && !OLDX02)
  86. #define MXC_GouZhen_IN X03
  87. #define MXC_GouZhen_IN_UP (X03 && !OLDX03)
  88. #define MXC_Dec_IN X04
  89. #define MXC_KaDai_IN X05
  90. #define MXC_KaDai_IN_UP (X05 && !OLDX05)
  91. #define MXC_LeftFenZhen_Origin_IN X06
  92. #define MXC_LeftFenZhen_IN X07
  93. #define MXC_XiaChong_IN X10
  94. #define MXC_XiaChong_IN_UP (X10 && !OLDX10)
  95. #define MXC_RightFenZhen_Origin_IN X11
  96. #define MXC_RighttFenZhen_IN X12
  97. #define MXC_DingChuPian_IN X13
  98. #define MXC_DingChuPian_IN_DW (!X13 && !OLDX13)
  99. #define MXC_Zipper_IN X14
  100. #define MXC_SeBiao_IN X15
  101. #define MXC_XiaZhi_IN X16
  102. #define MXC_XiaZhi_IN_UP (X16 && !OLDX16)
  103. #define MXC_XiaZhi_IN_DW (!X16 && OLDX16)
  104. #define MXC_GuoLian_IN X17
  105. #define MXC_GuoLian_IN_UP (X17 && !OLDX17)
  106. #define MXC_FenDai_IN X20
  107. #define MXC_FenDai_IN_UP (X20 && !OLDX20)
  108. #define MXC_LIHE_VAVLE Y00
  109. #define MXC_XC_SongZhou Y01
  110. #define MXC_ChuiQi_VAVLE Y02
  111. #define MXC_XiaZhi_VAVLE Y03
  112. #define MXC_LeftFenZhen_VAVLE Y04
  113. #define MXC_GouZhen_VAVLE Y05
  114. #define MXC_RightFenZhen_VAVLE Y06
  115. #define MXC_XiaChong_MOTOR Y07
  116. #define MXC_ChaoSheng Y10
  117. #define MXC_JiaoDao_OUT Y11
  118. #define MXC_XiaZhi_MOTOR Y12
  119. #define MXC_FenDai_VAVLE Y13
  120. #define MXC_ChuDai_VAVLE Y14
  121. #define MXC_GuDingGouZhen Y15
  122. #define MXC_XiChiChuiQi Y16
  123. #define MXC_TuoDaiSongZhou Y17
  124. #endif
  125. #endif