123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403 |
- #ifndef __JHCHUANGTOU_NL_HELIAN_H__
- #define __JHCHUANGTOU_NL_HELIAN_H__
- #if JIN_HONG_MACHINE==1
- extern void JH_CTHL_NL_Action(void);
- extern void JH_CTHL_NL_InitAction(void);
- #define DIR_P 1
- #define DIR_N 0
- #define MOTOR_EN 0
- #define MOTOR_DISEN 1
- #define MOTOR_ALARM 0
- #define MOTOR_NOALARM 1
- #define ALARM_CLR 1
- #define ALARM_NOCLR 0
- #define JH_CTHL_NL_VAVLE_ERROR_TIME 3000
- #define JH_CTHL_NL_MOTOR_ALARM_TIME 5000
- //故障代码列表
- #define JH_CTHL_NL_NO_ALARM 0
- #define JH_CTHL_NL_WLZDTJ_ALARM 1 //无拉链自动停机
- #define JH_CTHL_NL_XKSC_Limit_ALARM 2 //X03斜口上止到位异常
- #define JH_CTHL_NL_TLiao_Limit_ALARM 3 //X04推料到位异常
- #define JH_CTHL_NL_HSLiao_Limit_ALARM 5 //X06横送料到位异常
- #define JH_CTHL_NL_HSLiao_Origin_ALARM 6 //X07横送料原位异常
- #define JH_CTHL_NL_JLiao_Limit_ALARM 7 //X10接料到位异常
- #define JH_CTHL_NL_CTM_Limit_ALARM 8 //X11穿头模到位异常
- #define JH_CTHL_NL_CTM_Origin_ALARM 9 //X12穿头模原位异常
- #define JH_CTHL_NL_First_CT_Origin_ALARM 10 //X13一次穿头原位异常
- #define JH_CTHL_NL_LTou_Check_ALARM 11 //X14拉头缺料感应异常
- #define JH_CTHL_NL_CXSC_Limit_ALARM 12 //X15插稍上止感应异常
- #define JH_CTHL_NL_CX_Limit_ALARM 13 //X16插稍到位感应异常
- #define JH_CTHL_NL_XKTD_Origin_ALARM 14 //X17斜口原位感应异常
- #define JH_CTHL_NL_CXGL_Limit_ALARM 15 //X20插稍下移到位异常
- #define JH_CTHL_NL_SF_ALR_ALARM 16 //X22伺服报警异常
- #define JH_CTHL_NL_SF_Origin_ALARM 17 //X23伺服原位(穿链原位)异常
- #define JH_CTHL_NL_ZLT_ALARM 18 //装拉头异常
- #define JH_CTHL_NL_FK_Check_ALARM 19 //X02方块检测
- #define JH_CTHL_NL_FKCXDW_ALARM 20 //方块插销定位异常警告
- #define JH_CTHL_NL_YCCRYWYC_ALARM 21 //一次穿入原位异常
- #define JH_CTHL_NL_XCXXCYC_ALARM 22 //小插销行程异常
- #define JH_CTHL_NL_HENSONGLIAO_ALARM 23 //横送料不能输出
- #define JH_CTHL_NL_YCCT_ALARM 24 //一次穿头不能输出
- #define JH_CTHL_NL_YCXM_Origin_ALARM 25 //一次穿头和下模不能输出
- #define JH_CTHL_NL_DXKCTXM_Origin_ALARM 26 //顶斜口和穿头下模不能输出
- #define JH_CTHL_NL_XKTD_ALARM 27 //斜口推带不能有输出
- #define JH_CTHL_NL_CXQJD_ALARM 28 //插销前夹带不能有输出
- #define JH_CTHL_NL_WFZIDONGCX_ALARM 29 //无法自动插销
- #define JH_CTHL_NL_SafeDoor_ALARM 30 //安全门关上才能启动
- #define JH_CTHL_NL_YAxis_Limit_ALARM 31 //合链电机超过最大行程范围
- #define JH_CTHL_NL_YAxis_Origin_ALARM 32 //合链电机回零失败
- #define JH_CTHL_NL_Y_SF_ALR_ALARM 33 //Y伺服报警
- #define JH_CTHL_NL_SongDai_ALARM 34 //送带异常
- #define JH_CTHL_NL_SERVO_CONFIG_ALARM 35 //伺服配置转矩限制失败
- #define JH_CTHL_NL_AutoStep cStepMByte
- #define JH_CTHL_NL_ZhuangLiaoStep cStepMByte1
- #define JH_CTHL_NL_TLiaoStep cStepMByte2
- #define JH_CTHL_NL_TD_MotorStep cStepMByte3 //拖带电机
- #define JH_CTHL_NL_JiaLianStep cStepMByte4
- #define JH_CTHL_NL_ZhenDongStep cStepMByte6
- #define JH_CTHL_NL_SongLiaoStep cStepMByte7
- #define JH_CTHL_NL_CL_MotorStep cStepMByte8 //穿链
- #define JH_CTHL_NL_AutoStep1 cStepMByte9
- #define JH_CTHL_NL_bFKCXTDDW_Step cStepMByte10
- #define JH_CTHL_NL_bCXCR_Step cStepMByte11
- #define JH_CTHL_NL_bCLFirst_Step cStepMByte12
- #define JH_CTHL_NL_HeMoStep cStepMByte13
- #define JH_CTHL_NL_SongDai_Step cStepMByte14
- #define JH_CTHL_NL_ZhuangLiaoDelay cDelayTime2
- #define JH_CTHL_NL_TLiao_Delay cDelayTime3
- #define JH_CTHL_NL_TD_MotorDelay cDelayTime4
- #define JH_CTHL_NL_AutoDelay cDelayTime5
- #define JH_CTHL_NL_TestDelay cDelayTime6
- #define JH_CTHL_NL_CL_MotorDelay cDelayTime7
- #define JH_CTHL_NL_TouchDelay cDelayTime8
- #define JH_CTHL_NL_AutoDelay1 cDelayTime9
- #define JH_CTHL_NL_ZDP_Delay cDelayTime10
- #define JH_CTHL_NL_bCXCR_Delay cDelayTime11
- #define JH_CTHL_NL_bFKCXTDDW_Delay cDelayTime12
- #define JH_CTHL_NL_bCLFirst_Delay cDelayTime13
- #define JH_CTHL_NL_bLTCHECK_Delay cDelayTime14
- #define JH_CTHL_NL_bSFBBAOJIN_Delay cDelayTime15
- #define JH_CTHL_NL_HeMo_Time cDelayTime16
- #define JH_CTHL_NL_SongDai_Delay cDelayTime17
- #define JH_CTHL_NL_SongDai_Delay2 cDelayTime18
- #define JH_CTHL_NL_XMDW_DELAY cDelayTime19
- //16位变量
- #define JH_CTHL_NL_RunStepSave cUShort16Buff1
- #define JH_CTHL_NL_TDMotorStepSave cUShort16Buff2
- #define cXCLD_MAX_LENGTH cUShort16Buff3
- //32位无符号变量
- #define JH_CTHL_NL_LianLengthCheck cUDword32Buff1
- #define JH_CTHL_NL_LianLengthAutoCheck cUDword32Buff2
- #define JH_CTHL_NL_LianLengthAutoCheckOLD cUDword32Buff3
- #define JH_CTHL_NL_TimeBuff cUDword32Buff4
- #define JH_CTHL_NL_LianLengthCheckReal cUDword32Buff5
- #define JH_CTHL_NL_LianLengthAutoFirst cUDword32Buff6
- //32位有符号变量
- #define JH_CTHL_NL_XSavePosBuff cDword32Buff1
- #define JH_CTHL_NL_X_CXPosBuff cDword32Buff2
- #define JH_CTHL_NL_YSavePosBuff cDword32Buff3
- #define CheckInX02PosBuff cDword32Buff4
- #define JH_CTHL_NL_YsaveCXDWPosBuff cDword32Buff5
- #define JH_CTHL_NL_LENTH cDword32Buff6
- #define JH_CTHL_NL_X_FKCheckPos cDword32Buff7
- #define JH_CTHL_NL_Y_CL_Length cDword32Buff8
- #define JH_CTHL_NL_Y_CL_PosBuff cDword32Buff9
- #define JH_CTHL_NL_LENCountBuff cDword32Buff10
- #define JH_CTHL_NL_Y_CL_PosBuff1 cDword32Buff11
- #define JH_CTHL_NL_X_CXPosBuff1 cDword32Buff12
- #define JH_CTHL_NL_X_AutoLENGTH cDword32Buff13
- #define JH_CTHL_LianLengthERROR_Check cDword32Buff14
- #define JH_CTHL_NL_LianLengthXC_Check cDword32Buff15
- //8位变量
- #define JH_CTHL_NL_TryCnt cCharBuff1
- #define JH_CTHL_NL_cZipCnt cCharBuff2
- #define cStopInCnt cCharBuff3
- #define cStopMode cCharBuff4
- #define cXcxcrCnt cCharBuff5
- #define cWULATOUCnt cCharBuff6
- #define bSingOneCnt cCharBuff7
- #define cCHULIANBAOJIN cCharBuff8
- #define cCXCONE cCharBuff9
- #define cBanAuTo cCharBuff10
- #define cHeLian cCharBuff11
- #define cHeLianone cCharBuff12
- #define cDJzzcd cCharBuff13
- #define cXCDWONE cCharBuff14
- //位标志位
- #define bTuiLaTouOkFlg bBitFlag0
- #define bZhuangLiaoOkFlg bBitFlag1
- #define bXiaMoENFlg bBitFlag2
- #define bYFirstDingWeiFlg bBitFlag3
- #define bCL_EN_FLG bBitFlag4
- #define bCL_OK_FLG bBitFlag5
- #define bCheckEN_FLG bBitFlag6
- #define bSingOneFlg bBitFlag7
- #define JH_CTHL_NL_bXCBackOK bBitFlag8
- #define JH_CTHL_NL_bDinweiOK bBitFlag9
- #define JH_CTHL_NL_bTest bBitFlag10
- #define JH_CTHL_NL_bReStart bBitFlag11
- #define JH_CTHL_NL_X_EN_FLG bBitFlag12
- #define JH_CTHL_NL_Y_EN_FLG bBitFlag13
- #define JH_CTHL_NL_CXDW_Stop bBitFlag14
- #define JH_CTHL_NL_TOTAL_ADDR 76
- #define JH_CTHL_NL_WORK_TOTAL_ADDR 102
- //#define JH_CTHL_NL_CUR_TOTAL_ADDR 104
- #define JH_CTHL_NL_SPEED_ADDR 78
- #define JH_CTHL_NL_ALARM_ADDR 100
- #define JH_CTHL_NL_PARAM_CYCLE_PULSE user_datas[0]//0 转一圈脉冲数 (拖带)
- #define JH_CTHL_NL_PARAM_CYCLE_LENGTH user_datas[1]//0.1 转一圈拖带多长 (拖带)
- #define JH_CTHL_NL_PARAM_TD_RunSpeed user_datas[2]//整数 拖带电机拖带速度
- #define JH_CTHL_NL_PARAM_FKDW_Speed user_datas[3]//整数 方块定位速度(低速度)
- #define JH_CTHL_NL_PARAM_CL_Speed user_datas[4]//整数 合链速度
- #define JH_CTHL_NL_PARAM_CL_Back_O_Speed user_datas[5]//整数 合链电机回零速度
- #define JH_CTHL_NL_PARAM_FKDW_Length user_datas[6]//0.01 方块定位长度
- #define JH_CTHL_NL_PARAM_CXDW_Length user_datas[7]//0.01 插销定位长度
- #define JH_CTHL_NL_PARAM_CL_Length user_datas[8]//0.01 合链长度(气缸时为时间)
- #define JH_CTHL_NL_PARAM_CLT_Time (10*user_datas[8])//0.01 合链时间
- #define JH_CTHL_NL_PARAM_CL_MAX_Length user_datas[9]//0.01 穿链最长限制
- #define JH_CTHL_NL_PARAM_TLiao_BACKDELAY (10*user_datas[10])//0.01推拉头到位延时返回
- #define JH_CTHL_NL_PARAM_MaGou_DELAY (10*user_datas[11])//0.01接料到位延时码勾
- #define JH_CTHL_NL_PARAM_HSLiaoOff_DELAY (10*user_datas[12])//0.01码勾输出后退横送料
- #define JH_CTHL_NL_PARAM_CheckLT_DELAY (10*user_datas[13])//0.01码勾输出后延时检测拉头
- #define JH_CTHL_NL_PARAM_HL_BACK_Time (10*user_datas[14])//0.01合链气缸返回时间
- #define JH_CTHL_NL_PARAM_First_CL_Timer (10*user_datas[15]) //0.01一次穿入时间
- #define JH_CTHL_NL_PARAM_MGOff_XiaMo_DELAY (10*user_datas[16]) //0.01松码勾后延时退下模
- #define JH_CTHL_NL_PARAM_CXCR_DELAY (10*user_datas[17]) //0.01插销延时穿入
- #define JH_CTHL_NL_PARAM_XKDW_TD_DELAY (10*user_datas[18]) //0.01斜口定位后延时拖带
- #define JH_CTHL_NL_PARAM_XK_CR_DELAY (10*user_datas[19]) //0.01斜口延时穿拉头
- #define JH_CTHL_NL_PARAM_DXK_XKDW_Off_DELAY (10*user_datas[20]) //0.01顶斜口后延时退方块勾针
- //#define JH_CTHL_NL_PARAM_XCQJD_XCDW_DELAY (10*user_datas[21]) //0.01插销前夹带后延时插销定位
- #define JH_CTHL_NL_PARAM_First_CL_DELAY (10*user_datas[22]) //0.01延时一次穿入
- #define JH_CTHL_NL_PARAM_HLJJ_CL_DELAY (10*user_datas[23]) //0.01合链夹具延时合链
- #define JH_CTHL_NL_PARAM_ZDP_Start_TIME (10*user_datas[24]) //0.01振动盘启动延时
- #define JH_CTHL_NL_PARAM_ZDP_Stop_TIME (10*user_datas[25]) //0.01振动盘延时停止
- #define JH_CTHL_NL_PARAM_XCX_LENTH user_datas[26] //0.01 小插销感应后再走标准长度
- #define JH_CTHL_NL_PARAM_XCXWC_LENTH user_datas[27] //0.01 小插销标准长度过长的误差值
- #define JH_CTHL_NL_PARAM_TDFZ_LENTH user_datas[28] //0.01拖带电机反转长度
- #define JH_CTHL_NL_PARAM_WLCDSHEZHI_LENTH (10* user_datas[29]) //0.1无拉链情况再走长度设置
- #define JH_CTHL_NL_PARAM_YCYCLE_PULSE user_datas[30]//Y轴转一圈脉冲数
- #define JH_CTHL_NL_PARAM_YCYCLE_LENGTH user_datas[31]//Y轴 整数 转一圈拖带多长
- #define JH_CTHL_NL_PARAM_CR_MODE user_datas[32]//气缸穿入(0)还时电机穿入(1)
- //#define JH_CTHL_NL_PARAM_XXHT_Time (10*user_datas[33])//0.01 插销退回时间
- #define JH_CTHL_NL_PARAM_XKDW_Speed (user_datas[33])//斜口定位速度
- #define JH_CTHL_NL_PARAM_DXK_DELAY (10*user_datas[34])//0.01 插销退回时间
- #define JH_CTHL_NL_PARAM_CXJZ_HT_DELAY (10*user_datas[35]) //0.01插销前夹具延时后退
- #define JH_CTHL_NL_PARAM_Y_MAX_LENTH (user_datas[36]) //0.01 合链电机最大行程
- #define JH_CTHL_NL_PARAM_LACHUBAOHU_LENTH (user_datas[37]) //0.01 上止定位延时停电机
- #define JH_CTHL_NL_PARAM_TDCR_LowSpeed user_datas[38] //拖带穿入慢速度
- #define JH_CTHL_NL_PARAM_TDCR_LowSpeedLength user_datas[39] //拖带穿入慢速距离
- #define JH_CTHL_NL_PARAM_HSLYDTL_DELAY (10*user_datas[40]) //0.01 横送料原点延时推料
- #define JH_CTHL_NL_PARAM_UP_DOWN_OUT_SELECT (user_datas[41]) //拉链类型 0 树脂,1尼龙
- #define JH_CTHL_NL_PARAM_TuiDXM_Lenght (user_datas[42]) //退顶斜码位置
- #define JH_CTHL_NL_PARAM_GFJ_WorkMode (user_datas[43]) //公分节操作选择
- #define JH_CTHL_NL_PARAM_GFJ_Length (user_datas[44]) //公分节长度标准
- #define JH_CTHL_NL_PARAM_QianMaSelect (user_datas[45]) //前码类型选择
- #define JH_CTHL_NL_PARAM_ZDP_AUTO user_datas[46] //振动盘控制
- #define JH_CTHL_NL_PARAM_MOTOR_ENSelect user_datas[47] //合链电机类型 0 伺服 ,1 步进
- #define JH_CTHL_NL_PARAM_BoardSelect user_datas[48] //板块类型 0 DB15 ,1 无DB15
- #define JH_CTHL_NL_PARAM_SongDaiTime (10*user_datas[49]) //送带时间
- #define JH_CTHL_NL_PARAM_SongDaiEn user_datas[50] //送带配置 0 无送带 ,1 有送带
- #define JH_CTHL_NL_PARAM_CXSX_En user_datas[51] //插销上下开关 0 开 ,1 关
- #define JH_CTHL_NL_PARAM_FKDW_LowSpeedLength user_datas[52] //方块定位的慢速长度
- #define JH_CTHL_NL_PARAM_FKTD_ChangeSpeedPos user_datas[53] //拖带变速位置
- #define JH_CTHL_NL_PARAM_FDOff_Pos user_datas[54] //分带关闭位置
- #define JH_CTHL_NL_PARAM_FD_EN user_datas[55] //分带开关
- #define JH_CTHL_NL_PARAM_FKJD_DELAY (10*user_datas[56]) //方块夹带延时
- #define JH_CTHL_NL_PARAM_FKJDFZ_DELAY (10*user_datas[57]) //方块夹带延时
- #define JH_CTHL_NL_PARAM_XKMS_LENGTH user_datas[58] //前码穿入慢速长度
- #define JH_CTHL_NL_PARAM_CR_SPEED user_datas[60] //穿入速度
- #define JH_CTHL_NL_PARAM_CR_LENGTH user_datas[61] //穿入长度
- #define JH_CTHL_NL_FK_IN_SPEED user_datas[62] //方块感应后慢速度
- #define JH_CTHL_NL_XC_IN_LENGTH user_datas[63] //小插感应后慢速长度
- #define JH_CTHL_NL_CX_IN_DW_LENGTH user_datas[64] //小插感应后再走长度
- #define JH_CTHL_NL_PARAM_XCRU user_datas[65]//作监控
- #define JH_CTHL_NL_PARAM_CXCR user_datas[66]//作监控
- #define JH_CTHL_NL_PARAM_QMDW_LENGTH user_datas[67]//延时输出前码定位
- #define JH_CTHL_NL_PARAM_CX_DELAY (user_datas[68]*10)
- #define JH_CTHL_PARAM_DCGO_LENGTH user_datas[69]//前码定位后再走长度
- #define JH_CTHL_PARAM_YaDai_LENGTH user_datas[70]//提前压带
- #define JH_CTHL_PARAM_XCLD_MAX_LENGTH user_datas[71]//小插拉带最大拉出长度
- #define JH_CTHL_TRARR_FK_SPEED user_datas[72]//入方块的扭矩速度
- #define JH_CTHL_LOCAL_LOW_SPEED user_datas[73]//转向扭矩的低速速度
- #define JH_CTHL_TRARR_RUN_LENGTH user_datas[74]//扭矩行走距离
- #define JH_CTHL_X_RUN_MODE user_datas[86]//X轴入方块模式
- #define JH_CTHL_Y_RUN_MODE user_datas[87]//Y轴入方块模式
- //
- //伺服参数 180~190
- #define SERVO_PARAM_TRARR_LIMITMAX user_datas[180]//伺服扭矩最大限制
- #define SERVO_PARAM_TRARR_LIMITMIN user_datas[181]//伺服扭矩最小限制
- #define SERVO_PARAM_SPEED_DIFFER user_datas[182]//速度差值
- #define SERVO_PARAM_ENCODE user_datas[190]//转换后的值
- #define SERVO_PARAM_ALARM user_datas[192]//转换后的值
- //横送检测时间
- #define HSLIAO_CHECK_TIME 1//横送是检测穿头模和第一次合链是否在原位
- //输入
- #define JH_CTHL_NL_START_IN M0384 //X00 //启动
- #define JH_CTHL_NL_START_IN_UP (M0384 && !OLDM384)//(X00 && !OLDX00)
- #define JH_CTHL_NL_STOP_IN M0385 // X01 //停止
- #define JH_CTHL_NL_STOP_IN_UP (M0385 && !OLDM385)//(X01 && !OLDX01)
- #define JH_CTHL_NL_STOP_IN_DW (!M0385 && OLDM385)//(!X01 && OLDX01)
- #define JH_CTHL_NL_FK_Check M0386 //X02方块检测
- #define JH_CTHL_NL_FK_Check_UP (M0386 && !OLDM386)
- #define JH_CTHL_NL_FK_Check_DW (!M0386 && OLDM386)
- #define JH_CTHL_NL_XKSC_Limit_IN M0387 //X03斜口上止到位
- #define JH_CTHL_NL_TLiao_Limit_IN M0388 //X04推料到位
- #define JH_CTHL_NL_SafeDoor_IN 1//M0389 //X05安全门
- #define JH_CTHL_NL_HSLiao_Limit_IN M0390 //X06横送料到位
- #define JH_CTHL_NL_HSLiao_Origin_IN M0391 //X07横送料原位
- #define JH_CTHL_NL_JLiao_Limit_IN M0392 //X10接料到位
- #define JH_CTHL_NL_CTM_Limit_IN M0393 //X11穿头模到位
- #define JH_CTHL_NL_CTM_Origin_IN M0394 //X12穿头模原位
- #define JH_CTHL_NL_First_CT_Origin_IN M0395 //X13一次穿头原位
- #define JH_CTHL_NL_LTou_Check M0396 //X14拉头缺料感应
- #define JH_CTHL_NL_CXSC_Limit_IN M0397 //X15插稍上止感应
- #define JH_CTHL_NL_CXSC_Limit_IN_UP (M0397 && !OLDM397)
- #define JH_CTHL_NL_CXSC_Limit_IN_DW (!M0397 && OLDM397)
- #define JH_CTHL_NL_CX_Limit_IN M0398 //X16插稍到位感应
- #define JH_CTHL_NL_XKTD_Origin_IN M0399 //X17斜口推带原位感应
- #define JH_CTHL_NL_CXXY_Limit_IN M0400 //X20插稍下移到位
- #define JH_CTHL_NL_ZDP_IN M0401 //X21振动盘
- #define JH_CTHL_NL_SF_ALR_IN M0402 //X22伺服报警
- #define JH_CTHL_NL_SF_Origin_IN M0403 //X23伺服原位(穿链原位)
- #define JH_CTHL_NL_Y_SF_ALR_IN M0404 //X24伺服报警
- #define JH_CTHL_NL_SongDai_Origin_IN M0405 //X25 送带原点
- #define JH_CTHL_NL_SongDai_Limit_IN M0406 //X26 送带到位
- //#define JH_CTHL_NL_Test_Motor_P M0404 //测试用
- //#define JH_CTHL_NL_Test_Motor_N M0405 //测试用
- //输出
- #define JH_CTHL_NL_XKDW_VAVLE M0304 //Y00 斜口定位电磁阀(方块勾针)
- #define JH_CTHL_NL_XKTD_VAVLE M0305 //Y01 斜口推带电磁阀(前码前后)
- #define JH_CTHL_NL_DXK_VAVLE M0306 //Y02 顶斜口电磁阀(顶斜码)
- #define JH_CTHL_NL_GDXM_VAVLE M0307 //Y03 固定斜码
- #define JH_CTHL_NL_FKGD_VAVLE M0308 //Y04 方块固定电磁阀(方块定位)
- #define JH_CTHL_NL_CXSCDW_VAVLE M0330 //Y05 插销上止定位电磁阀(小插勾针)
- #define JH_CTHL_NL_CXSX_VAVLE M0310 //Y06 插销下移电磁阀(小插销上下)
- #define JH_CTHL_NL_CXQJD_VAVLE M0311 //Y07 插销前夹带电磁阀(插销前锁带)
- //#define JH_CTHL_NL_CXHT_VAVLE M0312 //Y10 摆臂
- #define JH_CTHL_NL_BB_VAVLE M0312 //Y10 摆臂
- #define JH_CTHL_NL_HLJJ_VAVLE M0313 //Y11 合链夹具电磁阀(夹子)
- #define JH_CTHL_NL_CXHDW_VAVLE M0314 //Y12 插销后定位电磁阀(穿小插)
- #define JH_CTHL_NL_CXHJD_VAVLE M0315 //Y13 插销后夹带电磁阀(穿小插锁带)
- #define JH_CTHL_NL_FKJD_VAVLE M0316 //Y14 方块夹带电磁阀(大插锁带)
- #define JH_CTHL_NL_TLiao_VAVLE M0317 //Y15 推料电磁阀
- #define JH_CTHL_NL_HSLiao_VAVLE M0318 //Y16 横送料电磁阀
- #define JH_CTHL_NL_JLTou_VAVLE M0319 //Y17 接拉头电磁阀
- #define JH_CTHL_NL_CTXMSS_VAVLE M0320 //Y20 穿头下模上升电磁阀
- #define JH_CTHL_NL_FengDai_VAVLE M0321 //Y21 分带电磁阀
- #define JH_CTHL_NL_ZhenDongPian_OUT M0322 //Y22 振动盘启动
- #define JH_CTHL_NL_First_CT_VAVLE M0323 //Y23 穿拉头电磁阀
- #define JH_CTHL_NL_MGuo_VAVLE M0324 //Y24 码勾电磁阀
- #define JH_CTHL_NL_Run_DENG_VAVLE M0325 //Y25 运行
- #define JH_CTHL_NL_Stop_DENG_VAVLE M0327 //Y27 待机
- #define JH_CTHL_NL_ERROR_DENG_VAVLE M0328 //Y30 报警
- #define JH_CTHL_NL_CXDWZ_VAVLE M0326 //Y26 插销定位针(到位)电磁阀(小插卡位)
- #define JH_CTHL_NL_YaiDai_VAVLE M0309 //Y27 告警清除
- #define JH_CTHL_NL_SongDai_VAVLE M0330 //Y30 送带电机启动
- #define JH_CTHL_NL_HL_VAVLE M0330 //Y25 合链电磁阀
- #define JH_CTHL_NL_ALARMCLR_VAVLE M0330 //Y27 告警清除
- #define JH_CTHL_NL_Run_State M0330 //Y31 运行灯
- #define JH_CTHL_NL_Stop_State M0330 //Y32 停止灯
- //M0~M4全局固定使用
- /*
- #define bRunning M0000
- #define bStart M0001
- #define bStop M0002
- #define bAlarmStop M0003
- #define bClearTotal M0004
- */
- #define JH_CTHL_NL_bTLiao M0005 //手动推料
- #define JH_CTHL_NL_bHSL M0006 //手动横送料
- #define JH_CTHL_NL_bJLT M0007 //接拉头
- #define JH_CTHL_NL_bMG M0008 //码勾
- #define JH_CTHL_NL_bFKJD M0009 //方块夹带
- #define JH_CTHL_NL_bXKTD M0010 //斜口推带
- #define JH_CTHL_NL_bXKDW M0011 //斜口定位
- #define JH_CTHL_NL_bCTXM M0012 //穿头下模
- #define JH_CTHL_NL_bDXK M0013 //顶斜口
- #define JH_CTHL_NL_bFKGD M0014 //方块固定
- #define JH_CTHL_NL_bCXQJD M0015 //插销前夹带
- #define JH_CTHL_NL_bCXSY M0016 //插销下移电磁阀
- #define JH_CTHL_NL_bCXDWZ M0017 //Y14 插销定位针电磁阀
- #define JH_CTHL_NL_bCXHJD M0018 //Y15 插销后夹带电磁阀
- #define JH_CTHL_NL_bCXHDW M0019 //Y16 插销后定位电磁阀(插销穿入)
- #define JH_CTHL_NL_bXKGD M0020 //Y17 固定斜码电磁阀
- #define JH_CTHL_NL_bFirst_CT M0021 //Y20 一次穿头电磁阀(穿拉头)
- #define JH_CTHL_NL_bHLJJ M0022 //Y21 合链夹具电磁阀
- #define JH_CTHL_NL_bCXSCDW M0023 //Y23 插销上止定位电磁阀
- #define JH_CTHL_NL_bCXHT M0034 //Y10 插销后退
- #define JH_CTHL_NL_bHL M0035 //合链电磁阀
- #define JH_CTHL_NL_bZDP M0036 //振动盘
- #define JH_CTHL_NL_bBB M0037 //摆臂
- #define JH_CTHL_NL_bFD M0038 //分带
- #define JH_CTHL_NL_bTiaoShiStep M0041
- #define JH_CTHL_NL_bTiaoShiMode M0040
- #define JH_CTHL_NL_bOnceStart M0042 //单一启动,做一条停止
- #define JH_CTHL_NL_bBanZiDong M0047 //前码穿入
- #define JH_CTHL_NL_CXC M0048 //小插穿入
- #define JH_CTHL_NL_bCLMotor_P M0026 //穿链电机正转
- #define JH_CTHL_NL_bCLMotor_N M0025 //穿链电机反转
- //下面为动作组合按键
- #define JH_CTHL_NL_bAutoZhuangLiao M0024 //自动装料
- #define JH_CTHL_NL_bCLMotor_O M0027 //穿链电机定位原点
- #define JH_CTHL_NL_bCL_First M0028 //一次穿链动作
- #define JH_CTHL_NL_bFKTDDW M0029 //拖带方块定位
- #define JH_CTHL_NL_bFKCXTDDW M0030 //拖带方块插销定位
- #define JH_CTHL_NL_bCXMotorDW M0031 //插销电机前定位
- #define JH_CTHL_NL_bCXCR M0032 //插销穿入(包含电机前定位,插销下移,后夹,后定位)
- #define JH_CTHL_NL_bMotorHL M0033 //电机合链操作
- #define JH_CTHL_NL_bTDMotor_P M0046 //穿链电机正转
- #define JH_CTHL_NL_bTDMotor_N M0045 //穿链电机反转
- //
- #define QDCT_TOTAL_ADDR 8
- #define QDCT_NOWTOTAL_ADDR 10
- #define QDCT_SETTOTAL_ADDR 12
- #define QDCT_SPEED_ADDR 14
- #define QDCT_ALARM_ADDR 100
- #define QDCT_NO_ALARM 0
- #define QDCT_EX_ALARM 40
- #define JYDC_FILTER user_datas[39]
- #endif
- #endif
|