123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- #ifndef __XDCHUAN_TOU_JI_H__
- #define __XDCHUAN_TOU_JI_H__
- #if JIN_HONG_MACHINE==1
- extern void ChuanTou_Action(void);
- extern void ChuanTou_InitAction(void);
- #define CT_DIR_P 1
- #define CT_DIR_N 0
- #define CT_Y_DIR_P 1
- #define CT_Y_DIR_N 0
- #define CT_MOTOR_DISEN 1
- #define CT_MOTOR_EN 0
- /*
- * 警告类型 警告编号
- */
- #define CT_NO_ALARM 0 /* 没警告*/
- #define CT_NO_ZIPPER_ALARM 1 /* 没拉链,自动停机*/
- #define CT_KA_DAI_ALARM 2 /* 卡带异常*/
- #define CT_SL_ORIGIN_ALARM 3
- #define CT_HSL_ORIGIN_ALARM 4
- #define CT_HSL_LIMIT_ALARM 5
- #define CT_XM_ORIGIN_ALARM 6 /* 下模下限位*/
- #define CT_ZIPPER_MAXLENGHT_ALARM 7 /* 拖带最长长度保护,检查拉链是否卡位*/
- #define CT_TOTAL_ALARM 8
- #define CT_DZ_ALARM 10
- #define CT_BL_ALARM 17
- #define CT_CR_ORIGIN_ALARM 21
- #define CT_FD_IN_ALARM 22
- #define CT_HangSongLiao_Out_ALARM 25 //横送料不能输出
- #define CT_SongLiao_VAVLE_Not_ALARM 26 //送料电磁阀不能有输出
- #define CT_JieLiao_VAVLE_Not_ALARM 27 //接料电磁阀不能有输出
- #define CT_XiaMo_VAVLE_Not_ALARM 28 //下模电磁阀不能有输出
- #define CT_LaTuo_Not_ALARM 29 //已经有拉头
- #define CT_TuiJieLiao_ALARM 30 //退接料条件为码勾输出情况下横送料要退回原点
- #define CT_JieLiao_out_ALARM 31 //码勾没输出或横送料在原点才能输出
- #define CT_XiaMo_out_ALARM 32 //横送料在原点才能输出
- #define CT_Guo_Lian_IN_ALARM 33 //拉链在空位上容易爆链
- #define CT_ZhuangLiao_ALARM 34 //装料不成功
- #define CT_HuChi_out_ALARM 35 //护齿输出不能拖带
- #define CT_FenDai_out_ALARM 36 //分带输出不能拖带
- #define CT_HeLian_out_ALARM 37 //护链输出不能拖带
- #define CT_ERROR_out_ALARM 38 //故障输入
- #define CT_FENDAI_JIALITOU_out_ALARM 39 //分带输出不能手动压拉头
- #define CT_FENDAI_LaLianKongWei_ALARM 40 //拉链空位超出预设长度
-
-
-
- #define VAVLE_ALARM_TIME 3000
- #define MOTOR_ALARM_TIME 5000
- #define CT_WORKTOTAL_ADDR 102
- #define CT_TOTAL_ADDR 76
- #define CT_ALARM_ADDR 100
- #define CT_PROSPEED_ADDR 78
- //#define CT_PARAM_SET_TOTAL (user_datas[74] | (user_datas[75] >> 16))
- #define CT_PARAM_CR_LENGTH (user_datas[1] | (user_datas[2] >> 16)) // 穿入长度,2位小数点 CM
- #define CT_PARAM_SL_DELAY_BACK (user_datas[3] * 10) //时间 秒 2位小数 //送料时间
- #define CT_PARAM_JIELIAO_DELAY (user_datas[4] * 10) //时间 秒 2位小数 //延时接料
- #define CT_PARAM_GJ_TIME (user_datas[5] * 10) //时间 秒 2位小数 //延时码勾
- #define CT_PARAM_HSL_BACK_DELAY (user_datas[6]*10) //时间 秒 2位小数 //横送料延时返回
- #define CT_PARAM_HSPEED (user_datas[7]) //拖带的最高速
- #define CT_PARAM_LSPEED (user_datas[8]) //空位速度
- #define CT_PARAM_STOP_LENGTH (user_datas[9]) // 长度CM,2位小数点 //定位长度
- #define CT_PARAM_FD_DELAY (user_datas[10]* 10) //时间 秒 2位小数 //延时分带
- #define CT_PARAM_XM_BACK_DELAY_START (user_datas[11] * 10) //时间 秒 2位小数 //下模返回延时拖带
- #define CT_PARAM_MAX_LENGTH (user_datas[12] * 10) //长度 CM 1位小数 //长链保护长度
- #define CT_PARAM_ZDP_START_TIME (user_datas[13] * 10) //时间 2位小数 //振动盘延时开
- #define CT_PARAM_CR_SPEED user_datas[14] //穿入速度
- #define CT_PARAM_GZ_LENGTH user_datas[15] // 长度,CM 2位小数点 //延迟上勾针
- #define CT_PARAM_TUIHELIAN_DELAY user_datas[16] // 长度,CM 2位小数点 //延时退合链
- #define CT_PARAM_TUIFENGDAI_DELAY user_datas[17] // 长度,CM 2位小数点 //延时退分带
- #define CT_PARAM_ZDP_STOP_TIME (user_datas[18] * 10) //时间 秒 2位小数 //振动盘延时关()
- #define CT_PARAM_DLP_TIME (user_datas[19] * 10) //时间 秒 2位小数 //顶拉片的时间
- #define CT_PARAM_TUIHELIAN_DanShuan_DELAY user_datas[20] // 长度,CM 2位小数点 //双闭模式延时退合链
- #define CT_PARAM_HL_ENABLE user_datas[30] //合链
- #define CT_PARAM_DALIAOPIAN user_datas[31] //自动打拉片
- #define CT_PARAM_SL_MODE user_datas[32] //送料模式(0 横送料, 1老款送料)
- #define CT_PARAM_GZ_MODE user_datas[33] //勾针选择
- #define CT_PARAM_ZDP_MODE user_datas[34] //振动盘
- #define CT_PARAM_HouMa_MODE user_datas[35] // 0位有后码模式 1为无后码模式
- #define CT_PARAM_DanShuan_MODE user_datas[36] // 0单开模式 1双闭模式
- #define CT_PARAM_CYCLE_LENGTH (user_datas[38])// *user_datas[52] // 2985
- #define CT_PARAM_CYCLE_PULSE user_datas[39] //2000 //user_datas[11]
- #define CT_PARAM_HuChi_Time user_datas[40] //穿入时护齿延时退 (原来单位是10MS,变为1MS, 没小数点)
- #define CT_PARAM_HuChi_DELAY user_datas[41] //提前护齿
- #define CT_PARAM_HeLian_HM_DELAY (user_datas[42] * 10) //有后码合链时间
- #define CT_PARAM_HeLian_WHM_DELAY (user_datas[43] * 10) //无后码合链时间
- #define CT_PARAM_KWZDCD_LENTH user_datas[44] //空位后走最大长度
- #define CT_PARAM_HSL_DELAY (user_datas[45] * 10) //延时横送料()
- #define CT_PARAM_bHuChi_mode user_datas[46] //护齿模式 0为正常模式 1为提前输出模式
- #define CT_PARAM_CheckLT_mode_CLT_Over user_datas[47] //自动状态,退下模时是否检测拉头
- #define CT_PARAM_CDBC_LENGTH user_datas[48] //超过定位后下升延处计算停止长度
- #define CT_PARAM_MGJC_DELAY (user_datas[49] * 10) //拉头检测时间
- #define CT_PARAM_CLT_DELAY (user_datas[50] * 10) //延时穿拉头
- #define CT_PARAM_WUHOUMAHL_DELAY (user_datas[51] * 10) //延时合链
- #define CT_AutoDelay cDelayTime1
- #define CT_MotorDelay cDelayTime2
- #define CT_HeMoDelay cDelayTime3
- #define CT_SL_Delay cDelayTime4
- #define CT_HSL_Delay cDelayTime5
- #define CT_ZL_Delay cDelayTime6
- #define CT_XM_BACK_Delay cDelayTime7
- #define CT_CLT_Delay cDelayTime8
- #define CT_ZDP_Delay cDelayTime9
- #define CT_AlarmDelay cDelayTime10
- #define CT_DLP_Time cDelayTime11
- #define CT_HeMoDelay1 cDelayTime12
- #define CT_HuChiDelay cDelayTime13
- #define CT_HeLianDelay cDelayTime14
-
- #define CT_AutoStep cStepMByte //自动动作
- #define CT_MotorStep cStepMByte1 //电机拖带
- #define CT_HeMoStep cStepMByte2 //合模动作
- #define CT_SL_Step cStepMByte3 //送料动作
- #define CT_HSL_Step cStepMByte4 //模送料动作
- #define CT_ZL_Step cStepMByte5 //装料动作
- #define CT_CLT_Step cStepMByte6 //穿拉头动作
- #define CT_ZD_Step cStepMByte7 //振动盘动作
- #define CT_HuChiStep cStepMByte8 //护齿动作
- #define CT_HeLianStep cStepMByte9 //合链动作
-
- //32位
- #define CT_Zipper_Length cUDword32Buff1
- #define CT_cKongWei_Pos cUDword32Buff2
- #define CT_cKongWeiCheck_Length cUDword32Buff3
- //8位
- #define CT_cSongLiaoOk cCharBuff1
- #define CT_cMotorDinWei_OK cCharBuff2
- #define CT_cZhuangLiaoOk cCharBuff3
- #define CT_cZLCnt cCharBuff4
- #define CT_SingOneFlg001 cCharBuff5
- #define CT_cZDP_Con cCharBuff6
- #define CT_HeMo_Mode cCharBuff7
-
-
- #define CT_START_IN M0384//X00 //开始
- #define CT_START_IN_UP (M0384 && !OLDM384) //(X00 && !OLDX00)
- #define CT_STOP_IN M0385 //X01 //停止
- #define CT_STOP_IN_UP (M0385 && !OLDM385) // (X01 && !OLDX01)
- #define CT_MG_IN M0386//X02 //码钩到位
- #define CT_MG_IN_UP (M0386 && !OLD386) //(X06 && !OLDX06)
- #define CT_JIELIAO_IN M0387//X03 接料到位
- #define CT_ERROR_IN M0388 //X04 //故障输入
- #define CT_FD_ORIGIN_IN M0389//X05 分带
- #define CT_DZ_IN M0390// X06 //拉头感应
- #define CT_XM_ORIGIN_IN M0391//X07 //下模原位
- #define CT_HSL_ORIGIN_IN M0392//X10 //横送料原位
- #define CT_HSL_LIMIT_IN M0393//X11 //横送料到位
- #define CT_HELLIAN_LIMIT_IN M0394//X12 //合链到位
- #define CT_SL_LIMIT_IN M0395// X13 //送拉头到位
- #define CT_ZDP_IN M0396//X14 //振动盘料检
- #define CT_ZDP_IN_UP (M0396 && !OLDM396) // (X14 && !OLDX14)
- #define CT_ZDP_IN_DW (!M0396 && OLDM396)
- #define CT_GUO_LIAN_IN M0397//X15 //过链感应
- #define CT_GUO_LIAN_IN_UP (M0397 && !OLDM397)
- #define CT_GUO_LIAN_IN_DW (!M0397 && OLDM397)
- #define CT_SL_ORIGIN_IN M0398// X16 //送拉头原位
- #define CT_GZ_IN M0399//X17 //钩针拉带到位
-
-
- #define CT_FenDai_VAVLE M0352// Y00 //分带
- #define CT_XiaMo_VAVLE M0353// Y01 //下模
- #define CT_SongLiao_VAVLE M0354// Y02 //送料
- #define CT_GouZhen_VAVLE M0355// Y03 //勾针
- #define CT_MaGou_VAVLE M0356//Y04 //码钩
- #define CT_DaLaPian_VAVLE M0357//Y05 //顶拉片(打拉片)
- #define CT_JiaLaTou_VAVLE M0358// Y06 //夹拉头
- #define CT_HeLian_VAVLE M0359// Y07 //合链
- #define CT_ZhenDongPian_OUT M0361//Y11 //振动盘
- #define CT_HangSongLiao_VAVLE M0362// Y12 //横送料
- #define CT_JieLiao_VAVLE M0363//Y13 //接料下模
- #define CT_HuChi_VAVLE M0364// Y14 //护齿
-
-
- //M0~M4全局固定使用
- /*
- #define bRunning M0000
- #define bStart M0001
- #define bStop M0002
- #define bAlarmStop M0003
- #define bClearTotal M0004
- */
- #define CT_bSL M0006 //手动送料
- #define CT_bHSL M0007 //手动横送拉头
- #define CT_bJL M0008 //手动接料
- #define CT_bGM M0009 //手动勾码
- #define CT_bFD M0010 //手动分带
- #define CT_bXM M0011 //手动下模
- #define CT_bMotorH M0012 //手动拖带
- #define CT_bHL M0013 //手动合链
- #define CT_bDLP M0014 //手动顶拉片
- #define CT_bHC M0015 //手动护齿
- #define CT_bMotorDW M0016 //电机一键定位
- #define CT_bZL M0017 //装料
- #define CT_bHM M0018 //合模
- #define CT_bSingle M0019 //单一自动
- #define CT_bZDP M0020 //振动盘
- #define CT_bJLT M0021 //手动夹拉头
- #define CT_bMGMS M0022 //码钩模式切换
- #define CT_bGZ M0023 //钩针输出
-
- #endif
- #endif
|