123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- #ifndef __XDCHUAN_TOU_JI_H__
- #define __XDCHUAN_TOU_JI_H__
- #if FJ_YING_XING_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 HouMa_MODE_DANKUAI 0
- #define HouMa_MODE_SHUANGBI 1
- #define HouMa_MODE_YOUHOUMA 2
- /*
- * 警告类型 警告编号
- */
- #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 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_CYCLE_LENGTH 2950 //user_datas[10]
- #define CT_PARAM_CYCLE_PULSE 2000 //user_datas[11]
- #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_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无后码双闭模式,2有后码模式,
-
- #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_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_START_IN X00 // 启动
- #define CT_START_IN_UP (X00 && !OLDX00) //
- #define CT_STOP_IN X01 //停止
- #define CT_STOP_IN_UP (X01 && !OLDX01)
-
- #define CT_MG_IN X02 //码勾检料
- #define CT_MG_IN_UP (X02 && !OLDX02)
- #define CT_FD_IN X05 //分带到位
- #define CT_DZ_IN X06 //拉头检测(顶针)
- #define CT_XM_ORIGIN_IN X07 //下模原位
- #define CT_HSL_ORIGIN_IN X10 //横送原位
- #define CT_HSL_LIMIT_IN X11 //横送到位
- #define CT_ZDP_IN X14 //振动盘料检
- #define CT_ZDP_IN_UP (X14 && !OLDX14)
- #define CT_ZDP_IN_DW (!X14 && OLDX14)
- #define CT_GUO_LIAN_IN X15 //过链感应
- #define CT_GUO_LIAN_IN_UP (X15 && !OLDX15)
- #define CT_GUO_LIAN_IN_DW (!X15 && OLDX15)
- #define CT_SL_ORIGIN_IN X16 //送料原位
- #define CT_Manual_DW X20 //手动定位
- #define CT_Manual_DW_DW (!X20 && OLDX20)
- #define CT_Manual_DW_UP (!X20 && OLDX20)
- #define CT_Manual_ZHUANGLI X21 //手动装料
- #define CT_Manual_ZHUANGLI_DW (!X20 && OLDX20)
- #define CT_Manual_ZHUANGLI_UP (!X20 && OLDX20)
- #define CT_XiaMo_VAVLE Y01 //下模
- #define CT_SongLiao_VAVLE Y02 //送料
- #define CT_GouZhen_VAVLE Y03 //勾针
- #define CT_MaGou_VAVLE Y04 //码勾
- #define CT_DaLaPian_VAVLE Y05 //顶拉片(打拉片)
- #define CT_FenDai_VAVLE Y06 //分带
- #define CT_HeLian_VAVLE Y07 //合链(穿模后面)
- #define CT_ZhenDongPian_OUT Y11 //振动盘
- #define CT_HangSongLiao_VAVLE Y12 //横送料
- #define CT_JieLiao_VAVLE Y13 //接料下模
- #define CT_HuChi_VAVLE 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 //振动盘
- #endif
- #endif
|