123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- #ifndef __TY_HM_DING_ZHI_JI_H__
- #define __TY_HM_DING_ZHI_JI_H__
- #if TONG_YONG_MACHINE | BRUCE_MACHINE
- extern void HMDZ_Action(void);
- extern void HMDZ_InitAction(void);
- #define HMDZ_DIR_P 1
- #define HMDZ_DIR_N 0
- #define HMDZ_YDIR_P 1
- #define HMDZ_YDIR_N 0
- #define HMDZ_TOTAL_ADDR 76
- #define HMDZ_ALARM_ADDR 100
- #define HMDZ_PROSPEED_ADDR 78
- /*
- * 警告类型 警告编号
- */
- #define HMDZ_NO_ALARM 0
- #define HMDZ_MOTOR_ORIGIN_ALARM 1
- #define HMDZ_WL_CHECK_ALARM 2
- #define HMDZ_RS_LIMIT_ALARM 3
- #define HMDZ_DL_LIMIT_ALARM 4
- #define HMDZ_DL_ORIGIN_ALARM 5
- #define HMDZ_QS_LIMIT_ALARM 6
- #define HMDZ_QS_ORIGIN_ALARM 7
- #define HMDZ_TS_LIMIT_ALARM 8
- #define HMDZ_TS_ORIGIN_ALARM 9
- #define HMDZ_SS_LIMIT_ALARM 10
- #define HMDZ_SS_ORIGIN_ALARM 11
- #define HMDZ_SG_LIMIT_ALARM 12
-
- #define VAVLE_ALARM_TIME 3000
- #define MOTOR_ALARM_TIME 5000
- #define HMDZ_PARAM_YL_DELAY (user_datas[0]*10)
- #define HMDZ_PARAM_DL_DELAY (user_datas[1]*10)
- #define HMDZ_PARAM_SS_DELAY (user_datas[2]*10)
- #define HMDZ_PARAM_SS_BACK_DELAY (user_datas[3]*10)
- #define HMDZ_PARAM_RS_MOTOR_DELAY (user_datas[4]*10)
- #define HMDZ_PARAM_RS_MOTOR_STOP_DELAY (user_datas[5]*10)
- #define HMDZ_PARAM_TS_DELAY (user_datas[6]*10)
- #define HMDZ_PARAM_QS_DELAY (user_datas[7]*10)
- #define HMDZ_PARAM_QS_BACK_DELAY (user_datas[8]*10)
- #define HMDZ_PARAM_CL_BACK_DELAY (user_datas[9]*10)
-
- #define HMDZ_PARAM_RS_MOTOR_SPEED user_datas[20]
- #define HMDZ_PARAM_RS_MOTOR_ACC user_datas[21]
- #define HMDZ_PARAM_RS_MOTOR_DEC user_datas[22]
- #define HMDZ_PARAM_RS_MOTOR_START_SPEED user_datas[23]
-
- #define HMDZ_PARAM_TL_MODE 0
- #define HMDZ_PARAM_ON_BACK_LENGTH 2000
- #define HMDZ_AutoDelay cDelayTime1
- #define HMDZ_MotorDelay cDelayTime2
- #define HMDZ_XiaQieDelay cDelayTime3
- #define HMDZ_KaDaiDelay cDelayTime4
- #define HMDZ_CSDelay cDelayTime5
- #define HMDZ_TBDelay cDelayTime6
- #define HMDZ_TFKDelay cDelayTime7
- #define HMDZ_TLDelay cDelayTime8
- #define HMDZ_CheckDelay cDelayTime9
- #define HMDZ_AlarmDelay cDelayTime10
- #define HMDZ_SJDelay cDelayTime11
-
- #define HMDZ_AutoStep cStepMByte
- #define HMDZ_MotorStep cStepMByte1
- #define HMDZ_XiaQieStep cStepMByte2
- #define HMDZ_YuanDianStep cStepMByte3
- #define HMDZ_TuiLianStep cStepMByte4
- #define HMDZ_CheckLengthStep cStepMByte5
- #define HMDZ_BinLianStep cStepMByte6
- //超声花边切输入输出
- #define HMDZ_START_IN X00
- #define HMDZ_START_IN_UP (X00 && !OLDX00)
- #define HMDZ_STOP_IN X01
- #define HMDZ_STOP_IN_UP (X01 && !OLDX01)
- #define HMDZ_MOTOR_ORIGIN_IN X02 // 电机原点
- #define HMDZ_WL_CHECK_IN X03 // 物料检测
- #define HMDZ_RS_LIMIT_IN X04 // 绕丝到位
- #define HMDZ_DL_LIMIT_IN X05 // 顶料到位
- #define HMDZ_DL_ORIGIN_IN X06 // 顶料退到位
- #define HMDZ_QS_LIMIT_IN X07 // 切丝到位
- #define HMDZ_QS_ORIGIN_IN X10 // 切丝退到位
- #define HMDZ_TS_LIMIT_IN X11 // 推丝到位
- #define HMDZ_TS_ORIGIN_IN X12 // 推丝退到位
- #define HMDZ_SS_LIMIT_IN X13 // 送丝到位
- #define HMDZ_SS_ORIGIN_IN X14 // 送丝退到位
- #define HMDZ_SG_LIMIT_IN X15 // 丝杆到位
-
- #define HMDZ_SS_VAVLE Y01 // 送丝
- #define HMDZ_DL_VAVLE Y02 // 顶料
- #define HMDZ_QS_VAVEL Y03 // 切丝
- #define HMDZ_TS_VAVLE Y04 // 推丝
- #define HMDZ_JL_VAVLE Y05 // 进料
- #define HMDZ_YL_VAVLE Y06 // 压料
- #define HMDZ_CL_VAVLE Y07 // 吹料
- #define HMDZ_SZ_OUT Y10 // 松轴
- #define HMDZ_bRunning M0000
- #define HMDZ_bStart M0001
- #define HMDZ_bStop M0002
- #define HMDZ_bAlarmStop M0003
- #define HMDZ_bClearTotal M0004
- #define HMDZ_bSS M0006
- #define HMDZ_bDL M0007
- #define HMDZ_bQS M0008
- #define HMDZ_bTS M0009
- #define HMDZ_bJL M0010
- #define HMDZ_bYL M0011
- #define HMDZ_bCL M0012
- #define HMDZ_bGoMotor M0013
- #define HMDZ_bBackMotor M0014
-
- #endif
- #endif
|