123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- #ifndef __JHNILONGSHANGCHIJI_H__
- #define __JHNILONGSHANGCHIJI_H__
- #if JIN_HONG_MACHINE==1
- /*
- * 警告类型 警告编号
- */
- #define SC_NO_ALARM 0 /* 没警告*/
- #define SC_NO_ZIPPER_ALARM 1 /* 没拉链,自动停机*/
- #define SC_CHENGXING_IN_ALARM 2 //成型到位感应异常
- #define SC_GOUZHEN_IN_ALARM 3 // 钩针未到位
- #define SC_GOUZHEN_ON_ALARM 4 //钩针输出 原点不到位
- #define SC_YADAI_IN_ALARM 5 // 压带未到位
- #define SC_LATOU_CHECK_ALARM 6 // 实际拉头比预设拉头少
- #define SC_ERROR_LENGTH_ALARM 7 // 拉链长度保护
- #define SC_XIAYA_IN_ALARM 8 // 下压不到位
- #define SC_CHENGXING_ORIGIN_ALARM 9 // 成型原点感应异常
- #define SC_LATOU_IN_ALARM 10 // 拉头感应异常
- #define SC_GOUZHEN_BCAK_ALARM 11 // 拉头感应异常
- #define SC_DIR_P 1
- #define SC_DIR_N 0
- #define SC_Y_DIR_P 1
- #define SC_Y_DIR_N 0
- #define SC_MOTOR_DISEN 1
- #define SC_MOTOR_EN 0
- #define SC_AutoDelay cDelayTime1
- #define SC_MotorDelay cDelayTime2
- #define SC_FengDaiDelay cDelayTime3
- #define SC_SongSiDelay cDelayTime4
- #define SC_QieDuanDelay cDelayTime5
- #define SC_XiaChongDelay cDelayTime6
- #define SC_AutoStep cStepMByte //自动动作
- #define SC_MotorStep cStepMByte1 //电机拖带
- #define SC_FengDai_Step cStepMByte2
- #define SC_QieDuan_Step cStepMByte3
-
- //内部参数
- #define SC_PARAM_CYCLE_PULSE user_datas[30] //电机细分
- #define SC_PARAM_CYCLE_LENGTH user_datas[31] //电机周长
-
- #define VAVLE_ALARM_TIME 3000
- #define MOTOR_ALARM_TIME 5000
- #define VAVLE_ALARM_TIME_GOUZHEN 300
- #define SC_ALARM_ADDR 100
- #define SC_PARAM_ZIPPER_LENGTH_ADDR 1
- #define SC_WORKTOTAL_ADDR 102
- #define SC_TOTAL_ADDR 76
- #define SC_PROSPEED_ADDR 78
-
- //变量设置 unsigned char
- #define SC_Zipper_Length cCharBuff1
- #define SC_MotorDinWei_OK cCharBuff2
- #define SC_ZipCnt cCharBuff3
- #define SC_PARAM_LT_TOTAL cCharBuff4
- #define SC_SUOZHOU cCharBuff5
- #define SC_Singleone cCharBuff6
- #define SC_DCC_TIME_BL cCharBuff7
- #define SC_XIAYA cCharBuff8
- #define SC_FIRST_RUN cCharBuff9
-
- //long
- #define SC_length_buff cDword32Buff1
- #define SC_LT_buff cDword32Buff2
-
- //可设置参数
- #define SC_PARAM_ZIPPER_LENGTH (user_datas[1] | (user_datas[2] << 16)) //
- #define SC_PARAM_TD_TIME (user_datas[3] * 10) //时间 秒 2位小数 //延时拖带
- #define SC_PARAM_SHUKONG_MODE user_datas[4] //数控模式模式,0有数控模式, 1 感应模式,2智能长度模式
- #define SC_PARAM_FANZHUAN_MODE user_datas[5] //反转模式,1有反转, 0 没反转
- //#define SC_PARAM_GO_LOW_SPEED_LENGTH user_datas[6] //慢速长度
-
- #define SC_PARAM_GOUZHEN_LENGTH user_datas[8] // 数控模式提前上钩针
- #define SC_PARAM_GOUZHEN_GANYIN_DELAY (user_datas[9]*10) // 延时上钩针
- #define SC_PARAM_GO_HIGN_SPEED user_datas[10] //电机快速度
- #define SC_PARAM_GO_LOW_SPEED user_datas[11] //电机慢速度
- #define SC_PARAM_SET_LT_TOTAL user_datas[15] //拉头预设数量
- #define SC_PARAM_SET_LT_LENGTH user_datas[16] //拉头检测有效长度
- #define SC_PARAM_ChengXing_BACK_DELAY (user_datas[18]*10)//成型气缸延时返回
- #define SC_PARAM_FANZHUAN_LENGTH user_datas[19] //电机反转长度
- #define SC_PARAM_YaDai_DELAY (user_datas[20]*10)//延时压带
-
- #define SC_PARAM_START_SPEED user_datas[21] //电机开始速度
- #define SC_PARAM_ACC_TIME user_datas[22] //加速时间
- #define SC_PARAM_DEC_TIME user_datas[23] //减速时间
- #define SC_PARAM_ERROR_LENGTH user_datas[24] //拉链长度保护
- #define SC_PARAM_NOGZ_DELAY (user_datas[25]*10) //退勾针延时成型
- #define SC_PARAM_GYGO_HIGN_SPEED user_datas[26] //感应模式快速度
- #define SC_PARAM_YAJINCISHU user_datas[27] //压紧次数
- #define SC_PARAM_Mator_Mode user_datas[28] //电机模式
- #define SC_PARAM_XiaChong_BACK_DELAY (user_datas[29]*10) //压紧次数
- #define SC_STOP_IN M0384 //X00 //停止
- #define SC_STOP_IN_UP (M0384 && !OLDM384)
- #define SC_START_IN M0385//X01 //开始
- #define SC_START_IN_UP (M0385 && !OLDM385)
- #define SC_GZ_IN M0386//X02 //钩针到位
- #define SC_YADAI_IN M0387 //X03 //压带到位
- #define SC_TUITOU_IN M0388 //X04 //推头感应
- #define SC_TUITOU_IN_UP (M0388 && !OLDM388)
- #define SC_ChengXing_ORIGIN_IN M0389//X05 //切线原位
- #define SC_ChengXing_ORIGIN_IN_UP (M0389 && !OLDM389) //X05
- #define SC_ChengXing_ORIGIN_IN_DW (!M0389 && OLDM389)//X05
- #define SC_ChengXing_IN M0390// X06 //切线到位
- #define SC_ChengXing_IN_UP (M0390 && !OLDM390)
-
- #define SC_XIAYA_IN M0391//X07 //撞针到位
- #define SC_XIAYA_IN_UP (M0391 && !OLDM391) //撞针到位
- #define SC_GOUZHEN_ON M0392//X10 //钩位输出
- #define SC_GUO_LIAN_IN M0393//X11 //
- #define SC_GUO_LIAN_IN_UP (M0393 && !OLDM393)
- #define SC_GUO_LIAN_IN_DW (!M0393 && OLDM393)
-
- #define SC_SZ_OUT M0354// Y02 //松轴
- #define SC_GouZhen_VAVLE M0355// Y03 //钩针气缸
- #define SC_YaDai_VAVLE M0356//Y04 //压带气缸
- #define SC_ChengXing_VAVLE M0357//Y05
- #define SC_XiaYa_VAVLE M0358// Y06
- #define SC_SongSi_VAVLE M0359// Y07 //送丝气缸
- #define SC_DianGLG_VAVLE M0360// Y10 // 顶过链杆
- #define SC_XiaChong_VAVLE M0361// Y11 // 下冲
- //M0~M4全局固定使用
- /*
- #define bRunning M0000
- #define bStart M0001
- #define bStop M0002
- #define bAlarmStop M0003
- #define bClearTotal M0004
- */
- #define SC_bGouZhen M0005 //手动钩针
- #define SC_bYaDai M0006 //手动压带
- #define SC_bXiaYa M0007 //手动上模
- #define SC_bChengXing M0008 //手动成型
- #define SC_bSongSi M0009 //手动送丝
- #define SC_bTuoDai M0010 //手动拖带
- #define SC_bSingleone M0011 //单循环
- #define SC_bXiaChong M0012 //下冲
-
- #endif
- #endif
|