123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- #ifndef __XDHELIAN_H__
- #define __XDHELIAN_H__
- #if FJ_YING_XING_MACHINE
- extern void HL_InitAction(void);
- extern void HL_ManualAction(void);
- extern void HL_Action(void);
- #define HL_MOTOR_DISEN 1
- #define HL_MOTOR_EN 0
- #define HL_DIR_P 0
- #define HL_DIR_N 1
- #define HL_ALARM_ADDR 100
- #define HL_TOTAL_ADDR 76
- #define HL_PROSPEED_ADDR 78
- #define HL_VAVLE_ALARM_TIME 3000
- //故障代码列表
- #define HL_NO_ALARM 0
- #define HL_KD_ALARM 1
- #define HL_GUOLIAN_ALARM 2
- #define HL_SM_LIMIT_ALARM 3
- #define HL_XM_LIMIT_ALARM 4
- #define HL_BB_LIMIT_ALARM 5
- #define HL_DK_LIMIT_ALARM 6
- #define HL_DK_ORIGIN_ALARM 7
- #define HL_CCX_LIMIT_ALARM 9
- #define HL_CCX_ORIGIN_ALARM 10
- #define HL_TFK_LIMIT_ALARM 11
- #define HL_TFK_ORIGIN_ALARM 12
- #define HL_JD_LIMIT_ALARM 13
- #define HL_HM_BACK_ALARM 14
- #define HL_MotorStep cStepMByte
- #define HL_AutoStep cStepMByte1
- #define HL_HLStep cStepMByte2
- #define HL_ManDKStep cStepMByte3
- #define HL_AutoDelay cDelayTime1
- #define HL_MotorDelay cDelayTime2
- #define HL_CheckDelay cDelayTime3
- #define HL_HLDelay cDelayTime4
- #define HL_PARAM_SET_TOTAL (user_datas[2] | user_datas[3] << 16)
- #define HL_PARAM_MOTOR_ALARM_TIME (user_datas[4] * 10)
- #define HL_PARAM_HIGH_SPEED user_datas[5]
- #define HL_PARAM_LOW_SPEED user_datas[6]
- #define HL_PARAM_DELAY_STOP user_datas[7]
- #define HL_PARAM_CYCLE_DELAY (user_datas[8] * 10)
- #define HL_PARAM_DELAY_HM (user_datas[9] * 10)
- #define HL_PARAM_DELAY_TFK (user_datas[10] * 10)
- #define HL_PARAM_DELAY_JD (user_datas[11] * 10)
- #define HL_PARAM_DELAY_CCX (user_datas[12] * 10)
- #define HL_PARAM_DELAY_CHECK_CCX (user_datas[13] * 10)
- #define HL_PARAM_DELAY_BACK_DK_UP (user_datas[14] * 10)
- #define HL_PARAM_CCX_LENGTH user_datas[15]
- #define HL_PARAM_DELAY_TFK_BACK (user_datas[16] * 10)
- #define HL_PARAM_DELAY_DK (user_datas[17] * 10)
- #define HL_PARAM_DELAY_STOP2 user_datas[18]
- #define HL_PARAM_DELAY_BB_BACK (user_datas[19] * 10)
- #define HL_PARAM_DELAY_BB (user_datas[20] * 10)
- #define HL_PARAM_DELAY_HM_BACK user_datas[21]
- #define HL_PARAM_OFFSET_LENGTH user_datas[22]
- #define HL_PARAM_FILTER_TIMES user_datas[23]
- #define DISPLAY_DATA0 user_datas[121]
- #define DISPLAY_DATA1 user_datas[122]
- #define DISPLAY_DATA2 user_datas[123]
- #define DISPLAY_DATA3 user_datas[124]
- #define DISPLAY_DATA4 user_datas[125]
- #define DISPLAY_DATA5 user_datas[126]
- #define DISPLAY_DATA6 user_datas[127]
- #define DISPLAY_DATA7 user_datas[128]
- #define START_IN X00
- #define START_IN_UP (X00 && !OLDX00)
- #define STOP_IN X01
- #define STOP_IN_UP (X01 && !OLDX01)
- #define HL_GUO_LIAN_IN X02
- #define HL_GUO_LIAN_IN_UP (X02 && !OLDX02)
- #define HL_GUO_LIAN_IN_DW (!X02 && OLDX02)
- #define HL_SM_LIMIT_IN X04
- #define HL_XM_LIMIT_IN X05
- #define HL_BB_LIMIT_IN X06
- #define HL_DK_ORIGIN_IN X10
- #define HL_DK_LIMIT_IN X07
- #define HL_JD_LIMIT_IN X11
- #define HL_CCX_LIMIT_IN X12
- #define HL_CCX_ORIGIN_IN X13
- #define HL_TFK_LIMIT_IN X15
- #define HL_TFK_ORIGIN_IN X14
- #define HL_KA_DAI_IN X16
- #define HL_SL_UP_LIMIT X17
- #define HL_SL_DW_LIMIT X20
- #define HL_HM_VAVLE Y00
- #define HL_TFK_VAVLE Y01
- #define HL_BB_VAVLE Y02
- #define HL_DK_VAVLE Y03
- #define HL_JD_VAVLE Y04
- #define HL_CCX_VAVLE Y05
- #define HL_SZ_OUT Y06
- #define HL_SL_MOTOR Y11
- //M0~M4 Actioon.h全局使用
- #define HL_bHM M0005
- #define HL_bTFK M0006
- #define HL_bBB M0007
- #define HL_bJD M0009
- #define HL_bCCX M0010
- #define HL_bDK M0011
- #define HL_bSL M0014
- #define HL_bMotor M0015
- #define HL_bStart M0016
- #define HL_bRunning M0017
- #define HL_bStop M0018
- #define HL_bAlarmStop M0019
- #define HL_bSingStart M0020
- #define HL_bAdd M0021
- #define HL_bSetWorkData M0022
- #define HL_bDec M0023
- #define HL_bDW M0024
- #define HL_bZCX M0025
- #define HL_bHL M0026
- #endif
- #endif
|