123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 |
- #ifndef __GLJIAOYADINCUN_H__
- #define __GLJIAOYADINCUN_H__
- #if CHANG_SHENG_GEI_LI_MACHINE
- extern void JYDC_InitAction(void);
- extern void JYDC_ManualAction(void);
- extern void JYDC_Action(void);
- extern void JYDC_DelayAction(void);
- extern void JYDC_ExtiActionX30(void);
- extern void JYDC_ExtiActionX31(void);
- //0
- typedef struct
- {
- unsigned long Total; //0生产总量
- unsigned long SetTotal; //2产量设置
- unsigned long CurLength; //4
- unsigned long SetLength; //6拉链长度
- unsigned long CurLength_JY;//8当前位置
- unsigned short CntDir; //10
- unsigned short SetSpeed; //11胶牙定寸速度
- unsigned short SetAccDec; //12
- unsigned short ShaCheDelayTime;//13延时刹车
- unsigned short ShaCheTime; //14刹车持续时间
- unsigned short DelayChuiQiTime;//15
- unsigned short XC_AlarmTime;//16下冲报警时间
- unsigned short XC_DelayTime;//17延时下冲
- unsigned short SetDaoKouLength;//18
- unsigned short res2; //19
- unsigned short EncCircleLength;//20
- unsigned short SetSlowLength; //21
- unsigned short SetKouWeiLength;//22
- unsigned short JiZhunChiShu;//23
- unsigned short JiZhunLength;//24
- unsigned short LowSpeed; //25慢速度
- unsigned short ReviseChi; //26修正齿数
- unsigned short KongWeiLength;//27除齿长度
- unsigned short DaoKouLength; //28刀口长度
- unsigned short SetSlow; //29慢速长度
- unsigned short SetChuiQiTime; //30吹气持续时间
- unsigned short XiChiEn; //31铣齿电机开关
- unsigned short MotorCyclePulse;//32电机细分
- unsigned short MotorCycleLength;//33拖带轮周长
- unsigned short MotorAccTime; //34电机加速时间
- unsigned short MotorDecTime; //35电机减速时间
- unsigned short res4[15]; //36~50
- unsigned short ModeSelect; //51当前模具类型选择
- unsigned short JiZhunChiShu_1;//52 3号模具齿数
- unsigned short JiZhunLength_1;//53 3号模具长度
- unsigned short SetDaoKou_1; //54 3号模具刀口长度
-
- unsigned short JiZhunChiShu_2;//55 5号模具齿数
- unsigned short JiZhunLength_2;//56 5号模具长度
- unsigned short SetDaoKou_2; //57 5号模具刀口长度
-
- unsigned short JiZhunChiShu_3;//58 8号模具齿数
- unsigned short JiZhunLength_3;//59 8号模具长度
- unsigned short SetDaoKou_3; //60 8号模具刀口长度
-
- unsigned short JiZhunChiShu_4;//61 特殊模具齿数
- unsigned short JiZhunLength_4;//62 特殊模具长度
- unsigned short SetDaoKou_4; //63 特殊模具刀口长度
- unsigned short res5[10]; //64~73
- unsigned short PassWordError; //74
- unsigned short res6[46]; //75~120
- unsigned short DisplayData[8]; //121
- unsigned short res7[232];
- unsigned short NowGroup; //361
- unsigned long AllSetLength; //362
- unsigned long AllSetTotal; //364
- unsigned long AllOverZipLength; //366
- unsigned long AllOverZipTotal; //368
- unsigned short res8[32];
- unsigned long ZipperLength[5];//400~409
- unsigned short KongWeiTooth[5];//410~414
- unsigned short ReviseTooth[5];//415~419
- unsigned long SetZipTotal[5]; //420~429
- unsigned long OverZipTotal[5];//430~439
- unsigned long ZipperLengthBuff;//440
- unsigned short KongWeiToothBuff;//442
- unsigned short ReviseToothBuff; //443
- unsigned long SetZipTotalBuff; //444
- unsigned long OverZipTotalBuff;//446
- } JYDC_ParamStrct;
- #define SET_LEN_ADDR 6
- #define SET_LEN_ADDR_JY 26
- #define CLR_PULSE_DELAY 100
- #define MAXSPEED 150
- #define JYDC_ALARM_ADDR 100
- #define JYDC_TOTAL_ADDR 0
- #define JYDC_PROSPEED_ADDR 78
- //故障代码列表
- #define JYDC_NO_ALARM 0
- #define JYDC_TOTAL_ALARM 1
- #define JYDC_KADAI_ALARM 2
- #define JYDC_XIACHONG_ARRIVE_ALARM 3
- #define JYDC_COUNT_ALARM 4
- #define JYDC_START_XIACHONG_ALARM 5
- #define JYDC_SEBIAO_ALARM 6
- #define NO_TOOTHCOUT_TIME user_datas[81] //多久没感应到数齿信号异常
- #define SET_ACCDEC 10
- #define JYDC_XiaChongStep cStepMByte3
- #define JYDC_ManualStep cStepMByte2
- #define JYDC_MotorStep cStepMByte1
- #define JYDC_AutoStep cStepMByte
- #define JYDC_XiaChongDelay cDelayTime1
- #define JYDC_AutoDelay cDelayTime2
- #define JYDC_ChuiQiDelay cDelayTime3
- #define JYDC_XiChiChuiQiDelay cDelayTime4
- #define SET_ZIPPER_LENGTH (user_datas[6] | user_datas[7] << 16)
- #define SET_TOTAL (user_datas[2] | user_datas[3] << 16)
- #define JYDC_PARAM_REVICHISHU user_datas[26]
- #define JYDC_PARAM_CHUIQI_TIME user_datas[30]
- #define CUR_LEN_JY user_datas[8]
- #define JYDC_PARAM_SET_SPEED user_datas[11]
- #define JYDC_PARAM_LOW_SPEED user_datas[25]
- #define SET_KOUWEI_JY user_datas[27] //除齿长度
- #define JYDC_PARAM_LOW_LENGTH user_datas[29]
- #define JYDC_PARAM_XC_ALARM_TIME user_datas[16]//JYDC_Param->XC_AlarmTime //下冲最长时间
- #define JYDC_PARAM_SHACHE_DELAY_TIME user_datas[13]//JYDC_Param->ShaCheDelayTime //下冲最长时间
- #define JYDC_PARAM_SHACHE_TIME (user_datas[38]*10) //JYDC_Param->ShaCheTime //刹车时间
- #define CUIQI_TIME user_datas[30]//JYDC_Param->CuiQiTime //吹气时间
- #define XIACONG_DELAY_TIME user_datas[17]//JYDC_Param->XC_DelayTime //下冲最长时间
- #define SET_ZIPPER_LENGTH_INCH (user_datas[31] | user_datas[32] << 16)
- #define JYDC_PARAM_CYCLE_DELAY user_datas[33]
- #define JYDC_COUNT_DIR user_datas[34] // 数齿信号方向
- #define JYDC_SEBIAO_MODE user_datas[35]//色标模式,0为普通1为色标模式
- #define JYDC_SEBIAO_DELAY user_datas[36]//色标模式延迟下冲齿数
- #define JYDC_XICHI_MOTOR_MODE user_datas[37]//0为自动的时候不用铣齿电机,1为使用
- #define JYDC_FILTER 10
- #define DISPLAY_DATA0 user_datas[121]
- #define DISPLAY_DATA1 user_datas[122]
- #define DISPLAY_DATA2 user_datas[123]
- #define DISPLAY_DATA3 user_datas[124]
- #define DISPLAY_DATA4 user_datas[125]
- #define DISPLAY_DATA5 user_datas[126]
- #define DISPLAY_DATA6 user_datas[127]
- #define DISPLAY_DATA7 user_datas[128]
- #define MODE_SELECT user_datas[51]
- #define JY_JIZHUN_CISHU user_datas[23] //基准齿数
- #define JY_JIZHUN_LEN user_datas[24] //基准长度
- #define SET_DAOKOU_JY user_datas[28] //机械模具刀口
- //3#
- #define JY_JIZHUN_CISHU1 user_datas[52] //基准齿数
- #define JY_JIZHUN_LEN1 user_datas[53] //基准长度
- #define SET_DAOKOU_JY1 user_datas[54] //机械模具刀口
- //5#
- #define JY_JIZHUN_CISHU2 user_datas[55] //基准齿数
- #define JY_JIZHUN_LEN2 user_datas[56] //基准长度
- #define SET_DAOKOU_JY2 user_datas[57] //机械模具刀口
- //8#
- #define JY_JIZHUN_CISHU3 user_datas[58] //基准齿数
- #define JY_JIZHUN_LEN3 user_datas[59] //基准长度
- #define SET_DAOKOU_JY3 user_datas[60] //机械模具刀口
- //特殊刀模
- #define JY_JIZHUN_CISHU4 user_datas[61] //基准齿数
- #define JY_JIZHUN_LEN4 user_datas[62] //基准长度
- #define SET_DAOKOU_JY4 user_datas[63] //机械模具刀口
- #define START_IN X00
- #define START_IN_UP (X00 && !OLDX00)
- #define STOP_IN X01
- #define STOP_IN_UP (X01 && !OLDX01)
- #define JYDC_ManXiaChong_UP (X02 && !OLDX02)
- #define JYDC_ChuDai_IN_UP (X12 && !OLDX12)
- #define JYDC_ChuDai_IN_DW (!X12 && OLDX12)
- #define JYDC_ChuDai_IN (X12)
- #define JYDC_XiaChong_IN X14
- #define JYDC_XiaChong_IN_UP (X14 && !OLDX14)
- #define JYDC_XiaChong_DW (!X14 && OLDX14)
- #define JYDC_KaDai_IN X03
- #define JYDC_COUNT_IN_UP (X16 && !OLDX16)
- #define JYDC_COUNT_IN_DW (!X16 && OLDX16)
- #define JYDC_ShaChe_VAVLE Y00
- #define JYDC_ChuiQi_VAVLE Y01
- #define JYDC_SuoChi_VAVLE Y02
- #define JYDC_XiaChong_MOTOR Y04
- #define JYDC_XiChiChuiQi_VAVLE Y13
- #define JYDC_XiChi_MOTOR Y14
- #define ALARM_LED Y04
- //M0~M4 Actioon.h全局使用
- #define JYDC_bManSuoChi M0005
- #define JYDC_bTest M0006
- #define JYDC_bManChuiQi M0007
- #define JYDC_bManXiaChong M0008
- #define JYDC_bStart M0009
- #define JYDC_bAddTooth M0010
- #define JYDC_bDecTooth M0011
- #define JYDC_bChangeLength M0016
- #define JYDC_bRunning M0017
- #define JYDC_bStop M0018
- #define JYDC_bSingleOrGroup M0019
- #define JYDC_bManXiChiMotor M0020
- #define JYDC_bAlarmStop M0036
- #define JYDC_bSetInch M0039
- #define JYDC_bSetTooth M0040
- #define JYDC_bManMotor M0041
- #define JYDC_bManGuaChiMotor M0042
- #endif
- #endif
|