123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372 |
- #ifndef JHQUEDUAN_CHUANTOU_H
- #define JHQUEDUAN_CHUANTOU_H
- #if JIN_HONG_MACHINE == 1
- extern void QDCT_InitAction(void);
- extern void QDCT_Action(void);
- extern void QDCT_ExtiActionX31(void);
- extern void QDCT_SetAlarmCode(unsigned alarm_code);
- //#define QDCT_LATOU user_datas[132] // 0为双拉头 1为单拉头
- #define QDCT_LONG_LENGTH_USE user_datas[133] //0为普通长度 1为无限长
- #define QDCT_PARAM_QLT_ON (user_datas[31]) //前拉头开
- #define QDCT_PARAM_HLT_ON (user_datas[32]) //后拉头开
- #define QDCT_PARAM_MODE (user_datas[86]) // 0为正穿 1为反穿
- #define QDCT_SEBIAO_MODE (user_datas[59])
- #define QDCT_SEBIAO_USE user_datas[134] //色标配置选择:0无色标 ,1有色标,该变量只在屏幕上使用
- #define QDCT_DIR_P 1
- #define QDCT_DIR_N 0
- #define QDCT_JJ_DIR_P 1
- #define QDCT_JJ_DIR_N 0
- #define QDCT_YL_DIR_P 1
- #define QDCT_YL_DIR_N 0
- #define QDCT_MOTOR_EN 1
- #define QDCT_MOTOR_DISEN 0
- #define QDCT_VAVLE_ERROR_TIME 3000
- #define QDCT_MOTOR_ALARM_TIME 5000
- //故障代码列表
- #define QDCT_NO_ALARM 0
- #define QDCT_NO_ZIPPER_ALARM 1
- #define QDCT_LT_ALARM 2
- #define QDCT_XQ_ORIGIN_ALARM 3
- #define QDCT_XQ_LIMIT_ALARM 4
- #define QDCT_JD_ALARM 5
- #define QDCT_DEC_ALARM 6
- #define QDCT_GO_LIMIT_ALARM 7
- #define QDCT_BACK_LIMIT_ALARM 8
- #define QDCT_LTCZ_ALARM 9
- #define QDCT_ZHA_ALARM 10 //扎数到
- #define QDCT_XM_LIMIT_ALARM 13
- #define QDCT_XQ_ALARM 14
- #define QDCT_TOTAL_ALARM 16
- #define QDCT_XM_ORIGIN_ALARM 17
- #define QDCT_SL_ORIGIN_ALARM 18
- #define QDCT_SQ_ORIGIN_ALARM 19
- #define QDCT_SL_ALARM 20
- #define QDCT_HSL_LIMIT_ALARM 22
- #define QDCT_HSL_ORIGIN_ALARM 23
- #define QDCT_JD_LEFT_ALARM 24
- #define QDCT_JD_RIGHT_ALARM 25
- #define QDCT_JLT_ALARM 26
- #define QDCT_ZLT_ALARM 27
- #define QDCT_START_NO_ZIPPER_ALARM 30
- #define QDCT_START_JLT_ALARM 31
- #define QDCT_START_LTCZ_ALARM 32
- #define QDCT_START_GL_ORIGIN_ALARM 33
- #define QDCT_START_SL_LIMIT_ALARM 34
- #define QDCT_START_SQ_ORIGIN_ALARM 35
- #define QDCT_SYL_ORIGIN_ALARM 36
- #define QDCT_START_SM_ORIGIN_ALARM 37
- #define QDCT_YL_LIMIT_ALARM 38
- #define QDCT_EX_ALARM 40
- #define QDCT_SQ_LIMIT_ALARM 41
- #define QDCT_KD_ALARM 42
- #define QDCT_SE_BIAO_ALARM 43
- #define QDCT_ZIPPER_LENGTH_ALARM 44
- #define QDCT_HHSL_LIMIT_ALARM 45
- #define QDCT_HHSL_ORIGIN_ALARM 46
- #define QDCT_HJLT_ALARM 47
- #define QDCT_HZLT_ALARM 48
- #define QDCT_CLOK_ALARM 49 //穿链检测警告
- #define QDCT_AutoStep cStepMByte
- #define QDCT_QZhuangLiaoStep cStepMByte1
- #define QDCT_HZhuangLiaoStep cStepMByte2
- #define QDCT_MotorStep cStepMByte3
- #define QDCT_JiaLianStep cStepMByte4
- #define QDCT_XiaQieStep cStepMByte5
- #define QDCT_ZhenDongStep cStepMByte6
- #define QDCT_QTLTStep cStepMByte7
- #define QDCT_HTLTStep cStepMByte8
- #define QDCT_QZDPStep cStepMByte9
- #define QDCT_HZDPStep cStepMByte10
- #define QDCT_TLPStep cStepMByte11
- #define QDCT_TuiLianStep cStepMByte12
- #define QDCT_HeMoStep cStepMByte13 //合模动作
- #define QDCT_MotorStepSave cStepMByte14
- #define QDCT_MotorStepY cStepMByte15
- #define QDCT_XiaQieDelay cDelayTime1
- #define QDCT_QZhuangLiaoDelay cDelayTime2
- #define QDCT_HTLT_Delay cDelayTime3
- #define QDCT_MotorDelay cDelayTime4
- #define QDCT_AutoDelay cDelayTime5
- #define QDCT_TableDelay cDelayTime6
- #define QDCT_QZhenDongDelay cDelayTime7
- #define QDCT_HZhuangLiaoDelay cDelayTime8
- #define QDCT_JD_Delay cDelayTime9
- #define QDCT_QTLT_Delay cDelayTime10
- #define QDCT_HZhenDongDelay cDelayTime11
- #define QDCT_CQDelay cDelayTime12
- #define QDCT_TLPDelay cDelayTime13
- #define QDCT_TLDelay cDelayTime14
- #define QDCT_HeMoDelay cDelayTime15
- #define QDCT_TestMotorDelay cDelayTime16
- #define QDCT_MotorBackLimitDelay cDelayTime17
- #define QDCT_MotorYDelay cDelayTime18
- #define QZDPAutoDisable cCharBuff1 //振动盘自动功能关闭
- #define HZDPAutoDisable cCharBuff2 //振动盘自动功能关闭
- #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_PARAM_CYCLE_PULSE user_datas[0]//0 转一圈脉冲数
- #define QDCT_PARAM_CYCLE_LENGTH user_datas[1]//1 转一圈拖带多长
- #define QDCT_PARAM_TABLE_TIME (user_datas[2]*10)//台面电机工作时间
- #define QDCT_PARAM_GO_LOWSPEED user_datas[3] //夹带前进低速
- #define QDCT_PARAM_TABLE_NUM user_datas[4]
- #define QDCT_PARAM_HSL_DELAY_BACK (user_datas[5]*10)
- #define QDCT_PARAM_XQ_UP_LENGTH user_datas[6] //提前输出下切刀长度
- #define QDCT_PARAM_HSL_DELAY (user_datas[7]*10)
- #define QDCT_PARAM_SET_ZIPPER_LENGTH (user_datas[16] | user_datas[17] << 16)//拉链长度
- #define QDCT_PARAM_PUTIN_LENGTH user_datas[18] //穿入长度
- #define QDCT_PARAM_JJGO_SPEED user_datas[20] //前进高速
- #define QDCT_PARAM_JJFZ_LENGTH user_datas[21] //后退反转速度
- #define QDCT_PARAM_JJBACK_SPEED user_datas[22] //后退速度
- #define QDCT_PARAM_JJDINGWEI_LENGTH user_datas[23] //前进定位长度
- #define QDCT_PARAM_CUT_BACK_LENGTH user_datas[24] //剩余多长松夹子
- #define QDCT_PARAM_SJZ_LENGTH user_datas[25] //切断后后退长度
- #define QDCT_PARAM_CUT_DELAY (user_datas[26]*10) //延迟下切
- #define QDCT_PARAM_CUTBACK_DELAY (user_datas[27]*10) //切断后延时后退
- #define QDCT_PARAM_CUTBACK_SPEED user_datas[28] //切断后后退速度
- //#define QDCT_PARAM_KL_TIME (user_datas[30]*10) //开链时间
- #define QDCT_PARAM_DLP_TIME (user_datas[33]*10) //挡拉片时间
- #define QDCT_PARAM_FZ_DELAY (user_datas[34]*10) //延时反转
- #define QDCT_PARAM_ZD_WORKNUM user_datas[36]
- #define QDCT_PARAM_ZD_WORK_TIME (user_datas[37]*10) //振动盘工作时间
- #define QDCT_PARAM_ZD_DELAY_WORK (user_datas[38]*10) //振动盘延时启动
- #define QDCT_PARAM_KL_DELAY (user_datas[40]*10)
- #define QDCT_PARAM_JD_DELAY (user_datas[41]*10) //延时夹带
- #define QDCT_PARAM_ZD_MODE user_datas[42] //振动盘工作模式 0为连续1为间歇工作
- #define QDCT_PARAM_CYCLE_DELAY (user_datas[43]*10) //延时启动下一周期
- #define QDCT_PARAM_FIRST_SPEED user_datas[44] //第一条慢速度
- #define QDCT_PARAM_GO_LOWSPEED_LENGTH user_datas[45] //前进慢速长度
- #define QDCT_PARAM_CZ_CHECK_DELAY (user_datas[46]*10) //延时检测拉头触针
- #define QDCT_PARAM_LOCK_TIME 0// (user_datas[47]*10) //锁拉头时间
- #define QDCT_PARAM_Mold_Distance user_datas[50] //拉链与穿入模间距
- #define QDCT_BACK_LOWSPEED_LENGTH user_datas[53] //后退慢速长度后退钩针模式才用
- #define QDCT_ZFC_MODE user_datas[51] //正反穿模式
- #define QDCT_TL_LENGTH user_datas[54] //推链长度
- #define QDCT_ZHA_NO user_datas[55] //扎数
- #define QDCT_ZHA_STOP_TIME (user_datas[56]*10) //扎数到停止时间
- #define QDCT_BACK_LOWSPEED user_datas[58]
- #define QDCT_SEBIAO_LENGTH user_datas[60]
- #define QDCT_REMAIN_CHECK_LENGTH user_datas[61]
- #define QDCT_PARAM_MAX_BACK_LENGTH user_datas[62]
- #define QDCT_PARAM_OFFSET_LENGTH user_datas[63] //修正长度
- #define QDCT_PARAM_PUTIN_SPEED_LENGTH user_datas[64]
- #define QDCT_PARAN_SJ_TIME user_datas[65]
- #define QDCT_PARAM_PUTIN_START_LENGTH user_datas[66]
- #define QDCT_PARAM_SL_BACKDELAY (user_datas[67]*10)
- #define QDCT_PARAM_FZ_LENGTH user_datas[68]
- #define QDCT_PARAM_DELAY_BACK (user_datas[69]*10)
- #define QDCT_PARAM_XM_START_TIME user_datas[70] //夹拉头开后延时退下模
- #define QDCT_PARAM_FIRSTSPEED user_datas[71]
- #define QDCT_PARAM_CHANGE_LT user_datas[72]
- #define QDCT_PARAM_PUTIN_LOW_SPEED user_datas[73]
- #define QDCT_PARAM_PUTIN_LOW_SPEED_LENGTH user_datas[74] //穿入的慢速长度
- #define QDCT_PARAM_DELAY_JLT (user_datas[75]*10)
- #define QDCT_PARAM_START_SPEED user_datas[76]
- #define QDCT_PARAM_ACC_PULSE user_datas[77]
- #define QDCT_PARAM_DEC_PULSE user_datas[78]
- #define QDCT_PARAM_LOWSPEED_LENGTH user_datas[79]
- #define QDCT_PARAM_CNT_ENABLE_LENGTH user_datas[80]
- #define QDCT_PARAM_CQ_TIME (user_datas[81]*10)
- #define QDCT_PARAM_TLP_ENABLE user_datas[82]
- #define QDCT_PARAM_TLP_TIME (user_datas[83]*10)
- #define QDCT_PARAM_TABLE_TIME2 (user_datas[84]*10)//台面电机工作时间
- #define QDCT_PARAM_TABLE_NUM2 user_datas[85]
- #define QDCT_PARAM_DELAY_SL (user_datas[94]*10)//延时送链
- #define QDCT_PARAM_XM_MODE user_datas[95] // 0为下模动 1为下模不动
- #define QDCT_PARAM_CS_CONTROL user_datas[96]
- #define QDCT_PARAM_CS_ENABLE user_datas[97] //
- #define QDCT_PARAM_CS_DELAY (user_datas[98]*10)
- #define QDCT_PARAM_CS_TIME (user_datas[99]*10)
- #define QDCT_PARAM_CS_COLD_TIME (user_datas[101]*10)
- #define QDCT_PARAM_DELAY_KL (user_datas[102]*10)
- #define QDCT_PARAM_KL_TIME (user_datas[103]*10)//开链时间
- #define QDCT_SEBIAO_TQ_CHECK_LENGTH user_datas[104]
- #define QDCT_SEBIAO_HIGH_SPEED user_datas[105]
- #define QDCT_SEBIAO_LOW_SPEED user_datas[106]
- #define QDCT_SEBIAO_ERROR_LENGHT user_datas[107]
- #define QDCT_SEBIAO_BACK_LSPEED_LENGTH user_datas[108]
- #define QDCT_SEBIAO_BACK_DW_SPEED user_datas[109]
- #define QDCT_PARAM_YLCYCLE_PULSE user_datas[110]//0 转一圈脉冲数
- #define QDCT_PARAM_YLCYCLE_LENGTH user_datas[111]//1 转一圈拖带多长
- #define QDCT_PARAM_TRANS_LENGTH user_datas[112]
- #define QDCT_PARAM_YL_SPEED user_datas[113]
- #define QDCT_PARAM_YL_SL_LENGTH user_datas[114]
- #define QDCT_PARAM_YL_SL_SPEED user_datas[115]
- #define QDCT_PARAM_WAIT_LENGTH user_datas[116]
- #define QDCT_PARAM_YL_DELAY (user_datas[117]*10)
- #define QDCT_PARAM_YL_SL_DELAY (user_datas[118]*10)
- #define QDCT_PARAM_YL_BACK_DELAY (user_datas[119]*10)
- #define QDCT_PARAM_YL_FZ_DELAY (user_datas[120]*10)
- #define QDCT_PARAM_BACK_DELAY (user_datas[87]*10) //反穿延时后退
- #define QDCT_PARAM_TRY_TIMES 2//user_datas[88]
- #define QDCT_PARAM_KL_QC_SELECT (user_datas[130]) //开链吹气选择
- #define QDCT_CHUAN_LIAN_CHECK_SELECT (user_datas[131])
- #define QDCT_PARAM_HM_MODE (user_datas[135])
- //#define QDCT_PARAM_ZDPCQ_MODE user_datas[136]
- #define QDCT_PARAM_TB_CNT1 user_datas[200]
- #define QDCT_PARAM_TB_CNT2 user_datas[201]
- #define QDCT_PARAM_BACK_ALARM_MODE 1 //后退为感应后限
- #define QDCT_PARAM_TL_ENABLE 0
- //输入定义
- #define QDCT_START_IN M0384 //X00
- #define QDCT_START_IN_UP (M0384 && !OLDM384)
- #define QDCT_STOP_IN M0385 //X01
- #define QDCT_STOP_IN_UP (M0385 && !OLDM385)
- #define QDCT_STOP_IN_DW (!M0385 && OLDM385)
- #define QDCT_QJLT_IN M0386 //X02
- #define QDCT_HJLT_IN M0387 //X03
- #define QDCT_XQ_LIMIT_IN M0388 //X04
- #define QDCT_SL_ORIGIN_IN M0388 //X04
- #define QDCT_JZ_LEFT_IN 1
- #define QDCT_JZ_RIGHT_IN 1
- #define QDCT_GO_LIMIT_IN M0389 //X05
- #define QDCT_GO_LIMIT_IN_UP (M0389 && !OLDM389)
- #define QDCT_HTLT_LIMIT_IN M0390 //X06
- #define QDCT_BACK_LIMIT_IN M0391 //X07
- #define QDCT_BACK_LIMIT_IN_UP (M0391 && !OLDM391)
- #define QDCT_HHSL_ORIGIN_IN M0392 //X10
- #define QDCT_HHSL_LIMIT_IN M0393 //X11
- #define QDCT_HHSL_LIMIT_IN_DW (!M0393 && OLDM393)
- #define QDCT_QLTCZ_IN M0394 //X12
- #define QDCT_HLTCZ_IN M0395 //X13
- #define QDCT_XM_LIMIT_IN M0396 //X14
- #define QDCT_XM_ORIGIN_IN M0397 //X15
- #define QDCT_XM_ORIGIN_IN_UP (M0397 && !OLDM397)
- #define QDCT_SQ_LIMIT_IN M0398 //X16
- #define QDCT_SB_IN 0
- #define QDCT_SEBIAO_IN M0399 //X17
- #define QDCT_SEBIAO_IN_UP (M0399 && !OLDM399)
- #define QDCT_SEBIAO_IN_DW (!M0399 && OLDM399)
- #define QDCT_NO_ZIPPER_CHECK_IN M0400 //X20
- #define QDCT_QZDP_IN M0401 //X21
- #define QDCT_QTLT_LIMIT_IN M0402 //X22
- #define QDCT_XQ_ORIGIN_IN 1
- #define QDCT_QHSL_ORIGIN_IN M0403 //X23
- #define QDCT_QHSL_LIMIT_IN M0404 //X24
- #define QDCT_QHSL_LIMIT_IN_DW (!M0404 && OLDM404)
- #define QDCT_HZDP_IN M0405 //X25
- #define QDCT_CHUAN_LIAN_OK M0406 //X26
- #define QDCT_CHUAN_LIAN_OK_UP (M0406 && !OLDM406)
- //X27
- #define QDCT_KA_DAI_IN !M0408 //X30
- #define QDCT_SYL_ORIGIN_IN M0409 //X31
- #define QDCT_YL_LIMIT_IN M0410 //X32
- //输出定义
- #define QDCT_QHSL_OUT M0304 //Y00 前横送拉头
- #define QDCT_QJLT_OUT M0305 //Y01 前夹拉头
- #define QDCT_HHSL_OUT M0306 //Y02 后横送拉头
- #define QDCT_HJLT_OUT M0307 //Y03 后夹拉头
- #define QDCT_JD_OUT M0308 //Y04 夹带
- #define QDCT_XM_OUT M0309 //Y05 下模
- #define QDCT_SZ_OUT M0310 //Y06 夹带电机松轴
- #define QDCT_XQ_OUT M0311 //Y07 下切刀
- #define QDCT_SL_OUT M0311 //Y07 送链
- #define QDCT_SQ_OUT M0312 //Y10 上切刀
- #define QDCT_QDLP_OUT M0313 //Y11 前挡拉头
- #define QDCT_TB_OUT M0314 //Y12 台面电机
- #define QDCT_YD_OUT M0315 //Y13 压带
- #define QDCT_CQ_OUT M0316 //Y14 吹气
- #define QDCT_CS_OUT M0317 //Y15 超声/增压
- #define QDCT_HDLP_OUT M0318 //Y16 后挡拉头
- #define QDCT_ZDPCQ_OUT M0319 //Y17 振动盘吹气
- #define QDCT_QTLT_OUT M0320 //Y20 前推拉头
- #define QDCT_HTLT_OUT M0321 //Y21 后推拉头
- #define QDCT_QZDP_OUT M0322 //Y22 前振动盘
- #define QDCT_HZDP_OUT M0323 //Y23 后振动盘
- #define QDCT_TLP_OUT M0324 //Y24 推拉片
- #define QDCT_YL_OUT M0325 //Y25 压轮电磁阀
- #define QDCT_STATE_RUN M0326 //Y26 运行灯
- #define QDCT_STATE_ERROR M0327 //Y27 警告灯
- #define QDCT_SYL_OUT M0328 //Y30 送压轮
- //M0~M4全局固定使用
- /*
- #define bRunning M0000
- #define bStart M0001
- #define bStop M0002
- #define bAlarmStop M0003
- #define bClearTotal M0004
- */
- #define QDCT_bClerNowTotal M0005
- #define QDCT_bQianDianDW M0006
- #define QDCT_bGeiLT M0007
- #define QDCT_bTestMode M0008
- #define QDCT_bQieDuan M0009
- #define QDCT_bOnceStart M0010
- #define QDCT_bQZuangLT M0013
- #define QDCT_bHZuangLT M0014
- #define QDCT_bHeMo M0015
- #define QDCT_bChuanLT M0016
- #define QDCT_bSaveWorkState M0017
- #define QDCT_bWorkMode M0018
- #define QDCT_bAlarmStop M0019
- #define QDCT_bTable M0020
- #define QDCT_bCheckDinWei M0021
- #define QDCT_bManXQ M0051 //控制下切刀
- #define QDCT_bManXM M0052
- #define QDCT_bMotorGo M0053
- #define QDCT_bMotorBack M0054
- #define QDCT_bManSQ M0055 //控制上切刀
- #define QDCT_bManJD M0056
- #define QDCT_bManQHSL M0057
- #define QDCT_bManHHSL M0058
- #define QDCT_bManQZD M0059
- #define QDCT_bManHZD M0060
- #define QDCT_bManQJLT M0061
- #define QDCT_bManHJLT M0062
- #define QDCT_bManSZ M0063
- #define QDCT_bManQTLT M0064
- #define QDCT_bManHTLT M0065
- #define QDCT_bManYD M0066
- #define QDCT_bManCQ M0067
- #define QDCT_bManDLP M0068
- #define QDCT_bYLGO M0069
- #define QDCT_bYLBACK M0070
- #define QDCT_bYL M0071
- #define QDCT_bManKL M0072
- #define QDCT_bManCS M0073
- #define QDCT_bReset_Origin M0074
- #define QDCT_bTest M0075
- #define QDCT_AxisEn_status M0076 //轴使能状态
- #define QDCT_bSYL M0077 //送压轮
- #define QDCT_YAxisEn_status M0078 //Y轴使能状态
- #define QDCT_bManSZ_Y M0079 //Y松轴
- #endif
- #endif
|