123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348 |
- #ifndef DENGDAI_DIANJIAO_H
- #define DENGDAI_DIANJIAO_H
- #if FU_CHEN_MACHINE == 1
- extern void DDDJ_InitAction(void);
- extern void DDDJ_Action(void);
- #define DDDJ_VAVLE_ERROR_TIME 3000
- #define DDDJ_MOTOR_ALARM_TIME 5000
- //故障代码列表
- #define DDDJ_NO_ALARM 0
- #define X_ORIGIN_ALARM 1
- #define Y_ORIGIN_ALARM 2
- #define Z_ORIGIN_ALARM 3
- #define U_ORIGIN_ALARM 4
- #define V_ORIGIN_ALARM 5
- #define W_ORIGIN_ALARM 6
- #define DDDJ_TOTAL_ALARM 7
- #define DDDJ_YL_ORIGIN_ALARM 8
- #define DDDJ_CYG_ORIGIN_ALARM 9
- #define DDDJ_JYG_ORIGIN_ALARM 10
- #define DDDJ_DYG_ORIGIN_ALARM 11
- #define DDDJ_QL_ORIGIN_ALARM 12
- #define DDDJ_NO_RESET_ALARM 13
- #define DDDJ_NO_WLSTOP_ALARM 14
- //8位无符号变量
- #define ALL_Reset_Flag cCharBuff19
- #define X_Reset_Flag cCharBuff20
- #define Y_Reset_Flag cCharBuff21
- #define Z_Reset_Flag cCharBuff22
- #define U_Reset_Flag cCharBuff23
- #define V_Reset_Flag cCharBuff24
- #define W_Reset_Flag cCharBuff25
- #define X_SOFT_PLIMIT cCharBuff26
- #define X_SOFT_NLIMIT cCharBuff27
- #define Y_SOFT_PLIMIT cCharBuff28
- #define Y_SOFT_NLIMIT cCharBuff29
- #define Z_SOFT_PLIMIT cCharBuff30
- #define Z_SOFT_NLIMIT cCharBuff31
- #define U_SOFT_PLIMIT cCharBuff32
- #define U_SOFT_NLIMIT cCharBuff33
- #define V_SOFT_PLIMIT cCharBuff34
- #define V_SOFT_NLIMIT cCharBuff35
- #define W_SOFT_PLIMIT cCharBuff36
- #define W_SOFT_NLIMIT cCharBuff37
- #define DDDJ_CW_TIME cCharBuff1//插钩允许标志
- #define DDDJ_CCW_TIME cCharBuff2//装钩允许标志
- #define DDDJ_GP_HEAT_FLAG cCharBuff3
- #define DDDJ_XDG_YL_FLAG cCharBuff4//下档钩有料
- #define DDDJ_ZYJ_EN_FLAG cCharBuff5//装衣架使能
- #define DDDJ_ZYJ_YL_FLAG cCharBuff6//装衣架使能
- #define DDDJ_WorkCnt cCharBuff7
- #define DDDJ_Fristwork cCharBuff8
- #define DDDJ_FDAI_FLAG cCharBuff9
- #define DDDJ_XM_UP_FLAG cCharBuff10
- #define DDDJ_SJCHECK_TIME cCharBuff15
- #define DDDJ_DUANLIAN_ALARM_FLAG cCharBuff16//短链报警标志
- #define DDDJ_CHUANGLIAN_ALARM_FLAG cCharBuff17//长链报警标志
- #define DDDJ_Manu_CS_FLAG cCharBuff18
- #define DDDJ_AlARM_STOP_FLAG cCharBuff19
- //16位无符号变量
- #define XRunResetOStep cStepMByte20
- #define YRunResetOStep cStepMByte21
- #define ZRunResetOStep cStepMByte22
- #define URunResetOStep cStepMByte23
- #define VRunResetOStep cStepMByte24
- #define WRunResetOStep cStepMByte25
- #define DDDJ_AutoStep cStepMByte
- #define DDDJ_ZLTStep cStepMByte1
- #define DDDJ_LPDJStep cStepMByte2
- #define DDDJ_CYGStep cStepMByte4
- #define DDDJ_cXMOTORStep cStepMByte5
- #define DDDJ_cYMOTORStep cStepMByte6
- #define DDDJ_cZMOTORStep cStepMByte7
- #define DDDJ_cGPJRStep cStepMByte8
- //32位无符号变量
- #define ReSetXOUT_TIME cDelayTime20
- #define ReSetYOUT_TIME cDelayTime21
- #define ReSetZOUT_TIME cDelayTime22
- #define ReSetUOUT_TIME cDelayTime23
- #define ReSetVOUT_TIME cDelayTime24
- #define ReSetWOUT_TIME cDelayTime25
- #define ReSetXDelay cDelayTime26
- #define ReSetYDelay cDelayTime27
- #define ReSetZDelay cDelayTime28
- #define ReSetUDelay cDelayTime29
- #define ReSetVDelay cDelayTime30
- #define ReSetWDelay cDelayTime31
- #define DDDJ_AutoDelay cDelayTime1
- #define DDDJ_ZLTDelay cDelayTime2
- #define DDDJ_LPDJDelay cDelayTime3
- #define DDDJ_ZJDelay cDelayTime4
- #define DDDJ_CYGDelay cDelayTime5
- #define DDDJ_cXMOTORDelay cDelayTime6
- #define DDDJ_cYMOTORDelay cDelayTime7
- #define DDDJ_cZMOTORDelay cDelayTime8
- #define DDDJ_cGPJRDelay cDelayTime9
- #define DDDJ_cWLJCDelay cDelayTime10
- //32位有符号变量
- #define DDDJ_XSAVEPOS cDword32Buff1
- #define DDDJ_CHECK_GY_LENGTH cDword32Buff2
- #define DDDJ_CHECK_GY_OLDLENGTH cDword32Buff3
- #define DDDJ_CHECK_LD_LENGTH cDword32Buff4
- #define DDDJ_CHECK_LD_OLDLENGTH cDword32Buff5
- #define ZHANUMBER_ADDR 99
- #define ALARM_ADDR 100
- #define SPEED_ADDR 101
- #define SETTOTAL_ADDR 102
- #define TOTAL_ADDR 104
- #define NOWTOTAL_ADDR 106
- #define PARAM_X_LOCAL (long *)&user_datas[108]
- #define PARAM_Y_LOCAL (long *)&user_datas[110]
- #define PARAM_Z_LOCAL (long *)&user_datas[112]
- #define PARAM_U_LOCAL (long *)&user_datas[114]
- #define PARAM_V_LOCAL (long *)&user_datas[116]
- #define PARAM_W_LOCAL (long *)&user_datas[118]
- #define ALL_TOTAL_ADDR 130
- #define DATE_TOTAL_ADDR 132
- #define DIR_P 1
- #define DIR_N 0
- #define MOTOR_EN 1
- #define MOTOR_DISEN 0
- //1~19
- #define PARAM_XCYCLE_PULSE user_datas[0]//0 转一圈脉冲数
- #define PARAM_XCYCLE_LENGTH user_datas[1]//1 转一圈拖带多长
- #define PARAM_YCYCLE_PULSE user_datas[2]//0 转一圈脉冲数
- #define PARAM_YCYCLE_LENGTH user_datas[3]//1 转一圈拖带多长
- #define PARAM_ZCYCLE_PULSE user_datas[4]//0 转一圈脉冲数
- #define PARAM_ZCYCLE_LENGTH user_datas[5]//1 转一圈拖带多长
- #define PARAM_UCYCLE_PULSE user_datas[6]//0 转一圈脉冲数
- #define PARAM_UCYCLE_LENGTH user_datas[7]//1 转一圈拖带多长
- #define PARAM_VCYCLE_PULSE user_datas[8]//0 转一圈脉冲数
- #define PARAM_VCYCLE_LENGTH user_datas[9]//1 转一圈拖带多长
- #define PARAM_WCYCLE_PULSE user_datas[10]//0 转一圈脉冲数
- #define PARAM_WCYCLE_LENGTH user_datas[11]//1 转一圈拖带多长
- #define PARAM_XREST_SPEED user_datas[12]//X轴复位速度
- #define PARAM_YREST_SPEED user_datas[13]//X轴复位速度
- #define PARAM_ZREST_SPEED user_datas[14]//Z轴复位速度
- #define PARAM_UREST_SPEED user_datas[15]//X轴复位速度
- #define PARAM_VREST_SPEED user_datas[16]//X轴复位速度
- #define PARAM_WREST_SPEED user_datas[17]//Z轴复位速度
- #define PARAM_XPOWERON_RST user_datas[18]// X轴上电复位
- #define PARAM_YPOWERON_RST user_datas[19]//Y轴上电复位
- #define PARAM_ZPOWERON_RST user_datas[20]//Z轴上电复位
- #define PARAM_UPOWERON_RST user_datas[21]// X轴上电复位
- #define PARAM_VPOWERON_RST user_datas[22]//Y轴上电复位
- #define PARAM_WPOWERON_RST user_datas[23]//Z轴上电复位
- #define PARAM_XMAX_LENGTH user_datas[24]//X轴最大长度
- #define PARAM_YMAX_LENGTH user_datas[25]//Y轴最大长度
- #define PARAM_ZMAX_LENGTH user_datas[26]//Z轴最大长度
- #define PARAM_UMAX_LENGTH user_datas[27]//X轴最大长度
- #define PARAM_VMAX_LENGTH user_datas[28]//Y轴最大长度
- #define PARAM_WMAX_LENGTH user_datas[29]//Z轴最大长度
- #define PARAM_XMIN_LENGTH (short *)&user_datas[30]//X轴最大长度
- #define PARAM_YMIN_LENGTH (short *)&user_datas[31]//Y轴最大长度
- #define PARAM_ZMIN_LENGTH (short *)&user_datas[32]//Z轴最大长度
- #define PARAM_UMIN_LENGTH (short *)&user_datas[33]//X轴最大长度
- #define PARAM_VMIN_LENGTH (short *)&user_datas[34]//Y轴最大长度
- #define PARAM_WMIN_LENGTH (short *)&user_datas[35]//Z轴最大长度
- //50~?
- #define DDDJ_PARAM_TTP_H_TIME user_datas[50]//送料感应原点后走长度
- #define DDDJ_PARAM_TTP_R_TIME user_datas[51]//送料间隔长度
- #define DDDJ_PARAM_JTP_H_TIME user_datas[52]//送料间隔长度
- #define DDDJ_PARAM_JTP_R_TIME user_datas[53]//压线到位时间
- #define DDDJ_PARAM_XZTP_H_TIME user_datas[54]
- #define DDDJ_PARAM_XZTP_R_TIME user_datas[55]//横档到位
- #define DDDJ_PARAM_TPUD_H_TIME user_datas[56]//固化时间
- #define DDDJ_PARAM_TPUD_R_TIME user_datas[57]//固化时间
- #define DDDJ_PARAM_DTP_H_TIME user_datas[58]//固化时间
- #define DDDJ_PARAM_DTP_R_TIME user_datas[59]//固化时间
- #define DDDJ_PARAM_YDD_H_TIME user_datas[60]//固化时间
- #define DDDJ_PARAM_YDD_R_TIME user_datas[61]//固化时间
- #define DDDJ_PARAM_JDD_H_TIME user_datas[62]//固化时间
- #define DDDJ_PARAM_JDD_R_TIME user_datas[63]//固化时间
- #define DDDJ_PARAM_ZJ_TIME user_datas[64]//固化时间
- //70
- #define DDDJ_PARAM_TD_KS_LOCAL user_datas[70]//拖带开始位置
- #define DDDJ_PARAM_TD_L_LENGTH user_datas[71]//拖带长度
- #define DDDJ_PARAM_TD_DW_LENGTH user_datas[72]//拖带定位长度
- #define DDDJ_PARAM_TD_H_SPEED user_datas[73]//拖带定位长度
- #define DDDJ_PARAM_TD_L_SPEED user_datas[74]//拖带定位长度
- #define DDDJ_PARAM_TP_FZ_LOCAL user_datas[75]//托盘放置
- #define DDDJ_PARAM_TP_DJ_LOCAL user_datas[76]//拖带点胶
- #define DDDJ_PARAM_TP_YJ_LOCAL user_datas[77]//托盘压胶位置
- #define DDDJ_PARAM_TP_H_SPEED user_datas[78]//拖带定位长度
- #define DDDJ_PARAM_TP_L_SPEED user_datas[79]//拖带定位长度
- //80
- #define DDDJ_PARAM_SXJG_LOCAL user_datas[80]//收线间隔
- #define DDDJ_PARAM_START_LOCAL user_datas[81]//起始位置
- #define DDDJ_PARAM_JG_SPEED user_datas[82]//间隔速度
- #define DDDJ_PARAM_JG_NUM user_datas[83]//收线慢速
- #define DDDJ_PARAM_TP_SPACE_LENGTH user_datas[84]//拖带间隔
- #define DDDJ_PARAM_TP_SPACE_NUM user_datas[85]//拖带间隔数量
- //输入定义
- #define DDDJ_X_ORIGIN_IN M0386 //X02插钩电机原点
- #define DDDJ_Y_ORIGIN_IN M0387 //X03下料电机原点
- #define DDDJ_Z_ORIGIN_IN M0388 //X04 推料点胶原点
- #define DDDJ_U_ORIGIN_IN_UP (M0389 && !OLDM389) //X05 推料点胶原点
- //输入定义
- #define EMGSTOP_IN M0384 //X00 急停
- #define STOP_IN M0384 //X01停止
- #define STOP_IN_UP (M0384 && !OLDM384)
- #define STOP_IN_DW (!M0384 && OLDM384)
- #define START_IN M0385 //X01启动
- #define START_IN_UP (M0385 && !OLDM385)
- #define DDDJ_DT_GYING_IN M0390 //X05夹钩原点
- #define DDDJ_DT_GYING_IN_UP (M0390 && !OLDM390)
- #define DDDJ_DT_GYING_IN_DW (!M0390 && OLDM390)
- #define DDDJ_X_SALARM_IN M0397 //X15插钩伺服告警
- #define DDDJ_Y_SALARM_IN M0398 //X16插钩伺服告警
- #define DDDJ_Z_SALARM_IN M0399 //X17 收料电机原点
- //输出定义
- #define DDDJ_LSLSN_OUT M0304 //Y00
- #define DDDJ_LSLQH_OUT M0305 //Y01
- //
- //
- #define DDDJ_TTP_VAVLE M0306 //Y02
- #define DDDJ_JTP_VAVLE M0307 //Y03
- #define DDDJ_TPXZ_VAVLE M0308 //Y04
- #define DDDJ_TPSJ_VAVLE M0309 //Y05
- #define DDDJ_DTP_VAVLE M0310 //Y06
- #define DDDJ_ZJ_VAVLE M0311 //Y07
- #define DDDJ_YDD_VAVLE M0312 //Y10
- #define DDDJ_JDD_VAVLE M0313 //Y11
- #define DDDJ_ALARM_OUT M0323 //Y23 报警输出
- #define DDDJ_RUNNING_OUT M0324 //Y24 运行输出
- //M0~M4全局固定使用
- #define bRunning M0000
- #define bStart M0001
- #define bStop M0002
- #define bAlarmStop M0003
- #define bClearTotal M0004
- #define bClerNowTotal M0005
- #define bClearAllTOTAL M0006
- #define bOnceStart M0007
- #define bTestMode M0008
- #define bClearDateTOTAL M0009
- #define DDDJ_All_REST M0010
- #define DDDJ_All_RESTING M0011
- #define DDDJ_bLPStart M0012
- #define DDDJ_bLPRunning M0013
- #define DDDJ_bAuto_TEST M0016
- #define DDDJ_bHAND_Rsting M0017
- #define DDDJ_bZS_REST M0018
- #define DDDJ_bZS_Rsting M0019
- #define DDDJ_bFristQD M0020
- #define DDDJ_bFristQDing M0021
- #define DDDJ_bClearHDLT M0022
- #define DDDJ_bClearHDLTing M0023
- #define DDDJ_bManu_CTM M0024
- #define DDDJ_bManu_CTMing M0025
- #define DDDJ_bManu_ZLT M0026
- #define DDDJ_bManu_ZLTing M0027
- #define DDDJ_bXZ_SWC M0028
- #define DDDJ_bXZ_SWO M0029
- #define bXMotor_P M0030
- #define bXMotor_N M0031
- #define bYMotor_P M0032
- #define bYMotor_N M0033
- #define bZMotor_P M0034
- #define bZMotor_N M0035
- #define bUMotor_P M0036
- #define bUMotor_N M0037
- #define bVMotor_P M0038
- #define bVMotor_N M0039
- #define bWMotor_P M0040
- #define bWMotor_N M0041
- #define bXREST M0042
- #define bXRsting M0043
- #define bYREST M0044
- #define bYRsting M0045
- #define bZREST M0046
- #define bZRsting M0047
- #define bUREST M0048
- #define bURsting M0049
- #define bVREST M0050
- #define bVRsting M0051
- #define bWREST M0052
- #define bWRsting M0053
- #define DDDJ_bLPDJ M0060
- #define DDDJ_bHeat M0061
- #define DDDJ_bM62 M0062
- #define DDDJ_bM63 M0063
- #define DDDJ_bM64 M0064
- #define DDDJ_bM65 M0065
- #define DDDJ_bM66 M0066
- #define DDDJ_bM67 M0067
- #define DDDJ_bM68 M0068
- #define DDDJ_bM69 M0069
- #define DDDJ_bQL M0070
- #define DDDJ_bYL M0071
- #define DDDJ_bJZ M0072
- #define DDDJ_bCYG M0073
- #endif
- #endif
|