123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623 |
- #ifndef __ACTION_H__
- #define __ACTION_H__
- extern unsigned long cMachineType;
- extern unsigned long cScreenEnable;
- extern unsigned long cWifiEnable;
- extern unsigned short cSetPulseType;
- extern unsigned char cSetXdirType;
- extern unsigned char cSetYdirType;
- extern unsigned char cSetXdirCh;
- extern unsigned char cSetYdirCh;
- extern unsigned char JYDCRunFlg,CCJRunFlg;
- extern byte_bits_t cRunState,cRunState1;
- extern byte_bits_t cTimeState;
- extern unsigned short cStepMByte,cStepMByte1,cStepMByte2,cStepMByte3,cStepMByte4,cStepMByte5,cStepMByte6,cStepMByte7,cStepMByte8,cStepMByte9,cStepMByte10,cStepMByte11,cStepMByte12,cStepMByte13,cStepMByte14,cStepMByte15;
- extern unsigned long cDelayTime1,cDelayTime2,cDelayTime3,cDelayTime4,cDelayTime5,cDelayTime6,cDelayTime7,cDelayTime8,cDelayTime9,cDelayTime10,cDelayTime11,cDelayTime12,cDelayTime13,cDelayTime14,cDelayTime15,cDelayTime16,cDelayTime17,cDelayTime18;
- extern long dwXRealPos,dwYRealPos;
- extern long dwRealPos,dwRealPosY;
- extern unsigned char SingOneFlg;
- extern unsigned long dwZipCnt;
- extern unsigned char cSeBiaoEn;
- extern unsigned char cSeBiaoOk;
- extern unsigned char LockMachineFlg;
- extern unsigned char jydc_use_x30;
- extern unsigned char jydc_use_x20;
- //8位变量
- extern unsigned char cCharBuff1,cCharBuff2,cCharBuff3,cCharBuff4,cCharBuff5,cCharBuff6,cCharBuff7,cCharBuff8,
- cCharBuff9,cCharBuff10,cCharBuff11,cCharBuff12,cCharBuff13,cCharBuff14,cCharBuff15,
- cCharBuff16,cCharBuff17,cCharBuff18,cCharBuff19,cCharBuff20,cCharBuff21,cCharBuff22,
- cCharBuff23,cCharBuff24,cCharBuff25,cCharBuff26,cCharBuff27,cCharBuff28,cCharBuff29,
- cCharBuff30,cCharBuff31,cCharBuff32,cCharBuff33,cCharBuff34,cCharBuff35,cCharBuff36,
- cCharBuff37,cCharBuff38,cCharBuff39,cCharBuff40,cCharBuff41,cCharBuff41,cCharBuff42,
- cCharBuff43,cCharBuff44,cCharBuff45,cCharBuff46,cCharBuff47,cCharBuff48,cCharBuff49,
- cCharBuff50,cCharBuff51,cCharBuff52,cCharBuff53,cCharBuff54,cCharBuff55,cCharBuff56,
- cCharBuff57,cCharBuff58,cCharBuff59,cCharBuff60;
- //16位变量
- extern unsigned short cUShort16Buff1,cUShort16Buff2,cUShort16Buff3,cUShort16Buff4,cUShort16Buff5,cUShort16Buff6,cUShort16Buff7,
- cUShort16Buff8,cUShort16Buff9,cUShort16Buff10,cUShort16Buff11,cUShort16Buff12,cUShort16Buff13,cUShort16Buff14,
- cUShort16Buff15,cUShort16Buff16,cUShort16Buff17,cUShort16Buff18,cUShort16Buff18,cUShort16Buff19,cUShort16Buff20,
- cUShort16Buff20,cUShort16Buff21,cUShort16Buff22,cUShort16Buff23,cUShort16Buff24,cUShort16Buff25,cUShort16Buff26,
- cUShort16Buff27,cUShort16Buff28,cUShort16Buff29,cUShort16Buff30,cUShort16Buff31,cUShort16Buff32,cUShort16Buff33,
- cUShort16Buff34,cUShort16Buff35,cUShort16Buff36,cUShort16Buff37,cUShort16Buff38,cUShort16Buff39,cUShort16Buff40;
- //32位变量
- extern unsigned long cUDword32Buff1,cUDword32Buff2,cUDword32Buff3,cUDword32Buff4,cUDword32Buff5,cUDword32Buff6,cUDword32Buff7,
- cUDword32Buff8,cUDword32Buff9,cUDword32Buff10,cUDword32Buff11,cUDword32Buff12,cUDword32Buff13,
- cUDword32Buff14,cUDword32Buff15;
- //有符号变量
- extern long cDword32Buff1,cDword32Buff2,cDword32Buff3,cDword32Buff4,cDword32Buff5,cDword32Buff6,cDword32Buff7,cDword32Buff8,cDword32Buff9,
- cDword32Buff10,cDword32Buff11,cDword32Buff12,cDword32Buff13,cDword32Buff14,cDword32Buff15;
- //16位指针型有符号变量
- extern short *Short16Buff1,*Short16Buff2,*Short16Buff3;
- extern long dwXRealPos,dwYRealPos,dwZRealPos,dwARealPos;
- extern void InitPWM(void);
- extern void GetMachineType(void);
- extern void SetMachineType(void);
- extern void CalProSP(unsigned short addr);
- extern void AddToTal(unsigned short addr);
- extern unsigned long GetTotal(unsigned short addr);
- extern void ClrcToTal(unsigned short addr);
- extern void SetAlarmCode(unsigned short addr,unsigned short alarm_code);
- extern unsigned short GetAlarmCode(unsigned short addr);
- extern void InitAction(void);
- extern void Action(void);
- extern unsigned long CalInch(unsigned long length);
- extern unsigned long CalLengthCM(unsigned long length);
- extern void DelayAction(void);
- extern void ExtiAcitionX30(void);
- extern void ExtiAcitionX31(void);
- extern void ExtiAcitionX20(void);
- extern void SetData32bits(unsigned short addr,long source_data);
- extern unsigned long GetData32bits(unsigned short addr);
- extern long CalLengthCM2(long length);
- extern long CalInch2(long length);
- extern void AlarmMessageSave(unsigned short alarm_addr);
- extern void ReSetWifi(void);
- extern void CheckTimeOver(void);
- extern void PWMAction(void);
- extern void Mechine_Config(void);
- extern void InitUart(void);
- extern unsigned char Y05Flg;
- extern unsigned char Y06Flg;
- extern unsigned char Y04Flg;
- extern unsigned char Y07Flg;
- #define bShaCheRun cRunState.bits.b1
- #define bFreqChange cRunState.bits.b2
- #define bCountEn cRunState.bits.b3
- #define bClrPulse cRunState.bits.b4
- #define bTwoDK cRunState.bits.b5
- #define bDZRunning cRunState.bits.b6
- #define bDZJiaoZhunState cRunState.bits.b7
- #define bDZStart cRunState1.bits.b0
- #define bCheckOK cRunState1.bits.b1
- #define bt10ms cTimeState.bits.b0
- #define b10ms cTimeState.bits.b1
- #define b100ms cTimeState.bits.b2
- #define X_ON_ENABLE 0x01
- #define X_DIR_ENABLE 0x02
- #define X_AXIS_PULSE_ENABLE 0x04
- #define Y_ON_ENABLE 0x10
- #define Y_DIR_ENABLE 0x20
- #define Y_AXIS_PULSE_ENABLE 0x40
- #define bRunning M0000
- #define bStart M0001
- #define bStop M0002
- #define bAlarmStop M0003
- #define bClearTotal M0004
- /**机器设置**/
- //机器种类
- #define MACHINE_TYPE_SAVE_ADDR (POWEROFF_BACKUP_ADDRESS - 2048) //机型存储在备份数据的前2k的第一个地址
- #define MACHINE_TYPE_SET_DATA user_datas[500] // D500设置机型种类
- #define MACHINE_TYPE user_datas[300]
- //机器带不带触摸屏
- #define MACHINE_SCREEN_SAVE_ADDR (MACHINE_TYPE_SAVE_ADDR + 4)
- #define MACHINE_SCREEN_SET_DATA user_datas[501]
- #define MACHINE_SCREEN cScreenEnable
- //机器带不带WIFI
- #define MACHINE_WIFI_SAVE_ADDR (MACHINE_TYPE_SAVE_ADDR + 8)
- #define MACHINE_WIFI_SET_DATA user_datas[502]
- #define MACHINE_WIFI cWifiEnable user_datas[502]
- //机器上电启动不启动WIFI
- #define MACHINE_BOOT_WIFI user_datas[254]
- #define MACHINE_LOCK_TIME user_datas[240]//使用时间保存单位小时
- #define MACHINE_PSW_ENABLE user_datas[241]
- #define MACHINE_LOCK_PSW (user_datas[16] | user_datas[17] << 16)
- #define MACHINE_BASE_PSW (user_datas[0] | user_datas[1] << 16)
- #define MACHINE_USE_DAY 30//使用天数
- #define USE_PSW (0) //配置使能三个月使用期限
- /*************************/
- //厂家配置
- #define HAI_HUA_MACHINE (0) // 海华拉链
- #define JIN_HONG_MACHINE (1) // 锦泓拉链
- #define HONG_YE_MACHINE (0) // 宏业拉链
- #define FU_XIAO_WEI_MACHINE (0) // 付小伟
- #define CHANG_SHENG_GEI_LI_MACHINE (0) // 昌盛给力拉链
- #define YOU_GUAN_MACHINE (0) // 福建优冠拉链
- #define ZHEN_YU_MACHINE (0) // 振宇拉链
- #define JUN_TENG_MACHINE (0) // 南通骏腾拉链
- #define JIA_CHENG_WEI_YE_MACHINE (0) // 嘉成伟业拉链
- #define XIN_SHENG_MACHINE (0) // 欣盛拉链
- #define WEI_YUAN_SONG_MACHINE (0) //魏远松东城协力,王志文树脂定寸
- #define PENG_WEI_CHANG_MACHINE (0) //彭伟昌
- #define XIN_YE_MACHINE (0) //鑫业(舜业)拉链机械
- #define XI_DONG_MACHINE (0) //陈锡冬拉链机械
- #define JU_XING_MACHINE (0) //湖北汉川聚星拉链机械
- #define YU_WEN_XUAN_MACHINE (0) //宇文轩拉链机械
- #define TONG_YONG_MACHINE (0) //厂家通用机型 浙江温州王永贴布机,浙江湖州织里优诚开口切断机,聚星贴布机 温州鸿门定制机
- #define FJ_YING_XING_MACHINE (0) //福建盈兴拉链机械
- #define BRUCE_MACHINE (0) //布鲁斯打褶机
- #define JIN_LONG_MACHINE (0) //温州金龙拉链
- #define CHUAN_CHI_MACHINE (0) //福建传驰拉链机械
- //板脉冲方式定义
- #define SET_PULSE_TYPE cSetPulseType
- #define X_AXIS_PULSE_Y_ON (X_AXIS_PULSE_ENABLE | Y_ON_ENABLE) //X轴脉冲Y轴当使能
- #define X_AXIS_PULSE_Y_DIR (X_AXIS_PULSE_ENABLE | Y_DIR_ENABLE) //X轴脉冲Y轴当方向
- #define Y_AXIS_PULSE_X_ON (Y_AXIS_PULSE_ENABLE | X_ON_ENABLE) //Y轴脉冲X轴当使能
- #define Y_AXIS_PULSE_X_DIR (Y_AXIS_PULSE_ENABLE | X_DIR_ENABLE) //Y轴脉冲X轴当方向
- #define XY_AXIS_ON (X_ON_ENABLE | Y_ON_ENABLE) //XY轴都当使能
- #define XY_AXIS_PULSE (X_AXIS_PULSE_ENABLE | Y_AXIS_PULSE_ENABLE) //XY轴脉冲两个当脉冲
- //轴方向类型选择
- #define SET_XDIR_TYPE cSetXdirType
- #define SET_YDIR_TYPE cSetYdirType
- #define SET_XDIR_CH cSetXdirCh
- #define SET_YDIR_CH cSetYdirCh
- //方向输出类型分为脉冲和Y输出和不使用三种
- #define PULSE_OUTPUT_TYPE 0
- #define Y_OUTPUT_TYPE 1
- #define NO_USE_TYPE 2
- //数据保存区域用于保存故障信息等数据不含备份功能
- //保存在芯片FLASH的最后一段存储区
- #define SAVE_MESSAGE_SIZE 30 // 故障信息保存大小 单位k
- #define SAVE_MESSAGE_DATA_SIZE (2048 * SAVE_MESSAGE_SIZE / 2)
- #define SAVE_MESSAGE_START_ADDR (127 - (SAVE_MESSAGE_SIZE / 2 - 1)) * 2048
- #define ONE_MESSAGE_SIZE_WORD 10
- #define SAV_MESSAGE_USER_DATAS_START_ADDR 1000
- #define ALARM_MESSAGE_CMD user_datas[SAV_MESSAGE_USER_DATAS_START_ADDR+2]
- #define CMD_READ_MESSAGE 1
- #define CMD_READ_ALARM_MESSAGE 2
- #if (TONG_YONG_MACHINE | ZHEN_YU_MACHINE | YU_WEN_XUAN_MACHINE | XIN_YE_MACHINE)
- #define DWORD (unsigned long)
- #define M00 M0000
- #define M01 M0001
- #define M02 M0002
- #define M03 M0003
- #define M04 M0004
- #define M05 M0005
- #define M06 M0006
- #define M07 M0007
- #define M08 M0008
- #define M09 M0009
- #define M0 M0000
- #define M1 M0001
- #define M2 M0002
- #define M3 M0003
- #define M4 M0004
- #define M5 M0005
- #define M6 M0006
- #define M7 M0007
- #define M8 M0008
- #define M9 M0009
- #define M10 M0010
- #define M11 M0011
- #define M12 M0012
- #define M13 M0013
- #define M14 M0014
- #define M15 M0015
- #define M16 M0016
- #define M17 M0017
- #define M18 M0018
- #define M19 M0019
- #define M20 M0020
- #define M21 M0021
- #define M22 M0022
- #define M23 M0023
- #define M24 M0024
- #define M25 M0025
- #define M26 M0026
- #define M27 M0027
- #define M28 M0028
- #define M29 M0029
- #define M30 M0030
- #define M31 M0031
- #define M32 M0032
- #define M33 M0033
- #define M34 M0034
- #define M35 M0035
- #define M36 M0036
- #define X00_UP (X00 && !OLDX00)
- #define X01_UP (X01 && !OLDX01)
- #define X02_UP (X02 && !OLDX02)
- #define X03_UP (X03 && !OLDX03)
- #define X04_UP (X04 && !OLDX04)
- #define X05_UP (X05 && !OLDX05)
- #if (FANG_KUAI_JI_CONFIG)
- #define X006 (X30)
- #define X007 (X31)
- #define X010 (X32)
- #define X011 (X33)
- #define X06_UP (X30 && !OLDX30)
- #define X07_UP (X31 && !OLDX31)
- #define X10_UP (X32 && !OLDX32)
- #define X11_UP (X33 && !OLDX33)
- #else
- #define X06_UP (X06 && !OLDX06)
- #define X07_UP (X07 && !OLDX07)
- #define X10_UP (X10 && !OLDX10)
- #define X11_UP (X11 && !OLDX11)
- #endif
- #define X12_UP (X12 && !OLDX12)
- #define X13_UP (X13 && !OLDX13)
- #define X14_UP (X14 && !OLDX14)
- #define X15_UP (X15 && !OLDX15)
- #define X16_UP (X16 && !OLDX16)
- #define X17_UP (X17 && !OLDX17)
- #define X20_UP (X20 && !OLDX20)
- #if (FANG_KUAI_JI_CONFIG)
- #define X21_UP (X06 && !OLDX06)
- #define X22_UP (X07 && !OLDX07)
- #define X23_UP (X10 && !OLDX10)
- #define X24_UP (X11 && !OLDX11)
- #else
- #define X21_UP (X30 && !OLDX30)
- #define X22_UP (X31 && !OLDX31)
- #define X23_UP (X32 && !OLDX32)
- #define X24_UP (X33 && !OLDX33)
- #endif
- #define X25_UP (X34 && !OLDX34)
- #define X26_UP (X35 && !OLDX35)
- #define X27_UP (X36 && !OLDX36)
- #define X00_DW (!X00 && OLDX00)
- #define X01_DW (!X01 && OLDX01)
- #define X02_DW (!X02 && OLDX02)
- #define X03_DW (!X03 && OLDX03)
- #define X04_DW (!X04 && OLDX04)
- #define X05_DW (!X05 && OLDX05)
- #if (FANG_KUAI_JI_CONFIG)
- #define X06_DW (!X30 && OLDX30)
- #define X07_DW (!X31 && OLDX31)
- #define X10_DW (!X32 && OLDX32)
- #define X11_DW (!X33 && OLDX33)
- #else
- #define X06_DW (!X06 && OLDX06)
- #define X07_DW (!X07 && OLDX07)
- #define X10_DW (!X10 && OLDX10)
- #define X11_DW (!X11 && OLDX11)
- #endif
- #define X12_DW (!X12 && OLDX12)
- #define X13_DW (!X13 && OLDX13)
- #define X14_DW (!X14 && OLDX14)
- #define X15_DW (!X15 && OLDX15)
- #define X16_DW (!X16 && OLDX16)
- #define X17_DW (!X17 && OLDX17)
- #define X20_DW (!X20 && OLDX20)
- #if (FANG_KUAI_JI_CONFIG)
- #define X21_DW (!X06 && OLDX06)
- #define X22_DW (!X07 && OLDX07)
- #define X23_DW (!X10 && OLDX10)
- #define X24_DW (!X11 && OLDX11)
- #else
- #define X21_DW (!X30 && OLDX30)
- #define X22_DW (!X31 && OLDX31)
- #define X23_DW (!X32 && OLDX32)
- #define X24_DW (!X33 && OLDX33)
- #endif
- #define X25_DW (!X34 && OLDX34)
- #define X26_DW (!X35 && OLDX35)
- #define X27_DW (!X36 && OLDX36)
- #define SETQ00 Y00 = 1//cMidleCoil[2] |= 0x1
- #define SETQ01 Y01 = 1//cMidleCoil[2] |= 0x2
- #define SETQ02 Y02 = 1//cMidleCoil[2] |= 0x4
- #define SETQ03 Y03 = 1//cMidleCoil[2] |= 0x8
- #if (FANG_KUAI_JI_CONFIG)
- #define SETQ04 Y04Flg = 1//Y04 = 1//cMidleCoil[2] |= 0x10
- #define SETQ05 Y05Flg = 1//cMidleCoil[2] |= 0x20
- #define SETQ06 Y06Flg = 1//cMidleCoil[2] |= 0x40
- #define SETQ07 Y07Flg = 1//SETQ07 Y07 = 1//cMidleCoil[2] |= 0x80
- #else
- #define SETQ04 Y04 = 1//Y04 = 1//cMidleCoil[2] |= 0x10
- #define SETQ05 Y05 = 1//cMidleCoil[2] |= 0x20
- #define SETQ06 Y06 = 1//cMidleCoil[2] |= 0x40
- #define SETQ07 Y07 = 1//SETQ07 Y07 = 1//cMidleCoil[2] |= 0x80
- #endif
- #define SETQ10 Y10 = 1//cMidleCoil[2] |= 0x100
- #define SETQ11 Y11 = 1//cMidleCoil[2] |= 0x200
- #define SETQ12 Y12 = 1//cMidleCoil[2] |= 0x400
- #define SETQ13 Y13 = 1//cMidleCoil[2] |= 0x800
- #define SETQ14 Y14 = 1//cMidleCoil[2] |= 0x1000
- #define SETQ15 Y15 = 1//cMidleCoil[2] |= 0x2000
- #define SETQ16 Y20 = 1//cMidleCoil[2] |= 0x2000
- #define SETQ17 Y21 = 1//cMidleCoil[2] |= 0x2000
- #define CLRQ00 Y00 = 0//cMidleCoil[2] &= ~0x1
- #define CLRQ01 Y01 = 0//cMidleCoil[2] &= ~0x2
- #define CLRQ02 Y02 = 0//cMidleCoil[2] &= ~0x4
- #define CLRQ03 Y03 = 0//cMidleCoil[2] &= ~0x8
- #if (FANG_KUAI_JI_CONFIG)
- #define CLRQ04 Y04Flg = 0//cMidleCoil[2] &= ~0x10
- #define CLRQ05 Y05Flg = 0//cMidleCoil[2] &= ~0x20
- #define CLRQ06 Y06Flg = 0//cMidleCoil[2] &= ~0x40
- #define CLRQ07 Y07Flg = 0//cMidleCoil[2] &= ~0x80
- #else
- #define CLRQ04 Y04 = 0//cMidleCoil[2] &= ~0x10
- #define CLRQ05 Y05 = 0//cMidleCoil[2] &= ~0x20
- #define CLRQ06 Y06 = 0//cMidleCoil[2] &= ~0x40
- #define CLRQ07 Y07 = 0//cMidleCoil[2] &= ~0x80
- #endif
- #define CLRQ10 Y10 = 0//cMidleCoil[2] &= ~0x100
- #define CLRQ11 Y11 = 0//cMidleCoil[2] &= ~0x200
- #define CLRQ12 Y12 = 0//cMidleCoil[2] &= ~0x400
- #define CLRQ13 Y13 = 0//cMidleCoil[2] &= ~0x800
- #define CLRQ14 Y14 = 0//cMidleCoil[2] &= ~0x1000
- #define CLRQ15 Y15 = 0//cMidleCoil[2] &= ~0x2000
- #define CLRQ16 Y20 = 0//cMidleCoil[2] &= ~0x2000
- #define CLRQ17 Y21 = 0//cMidleCoil[2] &= ~0x2000
- #define SETY000() Y00 = 1//cMidleCoil[2] |= 0x1
- #define SETY001() Y01 = 1//cMidleCoil[2] |= 0x2
- #define SETY002() Y02 = 1//cMidleCoil[2] |= 0x4
- #define SETY003() Y03 = 1//cMidleCoil[2] |= 0x8
- #define SETY004() Y04 = 1//cMidleCoil[2] |= 0x10
- #define SETY005() Y05 = 1//cMidleCoil[2] |= 0x20
- #define SETY006() Y06 = 1//cMidleCoil[2] |= 0x40
- #define SETY007() Y07 = 1//cMidleCoil[2] |= 0x80
- #define SETY010() Y10 = 1//cMidleCoil[2] |= 0x100
- #define SETY011() Y11 = 1//cMidleCoil[2] |= 0x200
- #define SETY012() Y12 = 1//cMidleCoil[2] |= 0x400
- #define SETY013() Y13 = 1//cMidleCoil[2] |= 0x800
- #define SETY014() Y14 = 1//cMidleCoil[2] |= 0x1000
- #define SETY015() Y15 = 1//cMidleCoil[2] |= 0x2000
- #define SETY016() Y20 = 1//cMidleCoil[2] |= 0x1000
- #define SETY017() Y21 = 1//cMidleCoil[2] |= 0x2000
- #define SETY020() Y22 = 1//cMidleCoil[2] |= 0x100
- #define SETY021() Y23 = 1//cMidleCoil[2] |= 0x200
- #define SETY022() Y24 = 1//cMidleCoil[2] |= 0x400
- #define SETY023() Y25 = 1//cMidleCoil[2] |= 0x800
- #define SETY024() Y26 = 1//cMidleCoil[2] |= 0x1000
- #define SETY025() Y27 = 1//cMidleCoil[2] |= 0x2000
- #define SETY026() Y30 = 1//cMidleCoil[2] |= 0x1000
- #define SETY027() Y31 = 1//cMidleCoil[2] |= 0x2000
- #define CLRY000() Y00 = 0//cMidleCoil[2] &= ~0x1
- #define CLRY001() Y01 = 0//cMidleCoil[2] &= ~0x2
- #define CLRY002() Y02 = 0//cMidleCoil[2] &= ~0x4
- #define CLRY003() Y03 = 0//cMidleCoil[2] &= ~0x8
- #define CLRY004() Y04 = 0//cMidleCoil[2] &= ~0x10
- #define CLRY005() Y05 = 0//cMidleCoil[2] &= ~0x20
- #define CLRY006() Y06 = 0//cMidleCoil[2] &= ~0x40
- #define CLRY007() Y07 = 0//cMidleCoil[2] &= ~0x80
- #define CLRY010() Y10 = 0//cMidleCoil[2] &= ~0x100
- #define CLRY011() Y11 = 0//cMidleCoil[2] &= ~0x200
- #define CLRY012() Y12 = 0//cMidleCoil[2] &= ~0x400
- #define CLRY013() Y13 = 0//cMidleCoil[2] &= ~0x800
- #define CLRY014() Y14 = 0//cMidleCoil[2] &= ~0x1000
- #define CLRY015() Y15 = 0//cMidleCoil[2] &= ~0x2000
- #define CLRY016() Y20 = 0//cMidleCoil[2] &= ~0x1000
- #define CLRY017() Y21 = 0//cMidleCoil[2] &= ~0x2000
- #define CLRY020() Y22 = 0//cMidleCoil[2] &= ~0x100
- #define CLRY021() Y23 = 0//cMidleCoil[2] &= ~0x200
- #define CLRY022() Y24 = 0//cMidleCoil[2] &= ~0x400
- #define CLRY023() Y25 = 0//cMidleCoil[2] &= ~0x800
- #define CLRY024() Y26 = 0//cMidleCoil[2] &= ~0x1000
- #define CLRY025() Y27 = 0//cMidleCoil[2] &= ~0x2000
- #define CLRY026() Y30 = 0//cMidleCoil[2] &= ~0x1000
- #define CLRY027() Y31 = 0//cMidleCoil[2] &= ~0x2000
- #define SETY00() Y00 = 1//cMidleCoil[2] |= 0x1
- #define SETY01() Y01 = 1//cMidleCoil[2] |= 0x2
- #define SETY02() Y02 = 1//cMidleCoil[2] |= 0x4
- #define SETY03() Y03 = 1//cMidleCoil[2] |= 0x8
- #define SETY04() Y04 = 1//cMidleCoil[2] |= 0x10
- #define SETY05() Y05 = 1//cMidleCoil[2] |= 0x20
- #define SETY06() Y06 = 1//cMidleCoil[2] |= 0x40
- #define SETY07() Y07 = 1//cMidleCoil[2] |= 0x80
- #define SETY10() Y10 = 1//cMidleCoil[2] |= 0x100
- #define SETY11() Y11 = 1//cMidleCoil[2] |= 0x200
- #define SETY12() Y12 = 1//cMidleCoil[2] |= 0x400
- #define SETY13() Y13 = 1//cMidleCoil[2] |= 0x800
- #define SETY14() Y14 = 1//cMidleCoil[2] |= 0x1000
- #define SETY15() Y15 = 1//cMidleCoil[2] |= 0x2000
- #define SETY16() Y20 = 1//cMidleCoil[2] |= 0x2000
- #define SETY017() Y21 = 1//cMidleCoil[2] |= 0x2000
- #define CLRY00() Y00 = 0//cMidleCoil[2] &= ~0x1
- #define CLRY01() Y01 = 0//cMidleCoil[2] &= ~0x2
- #define CLRY02() Y02 = 0//cMidleCoil[2] &= ~0x4
- #define CLRY03() Y03 = 0//cMidleCoil[2] &= ~0x8
- #define CLRY04() Y04 = 0//cMidleCoil[2] &= ~0x10
- #define CLRY05() Y05 = 0//cMidleCoil[2] &= ~0x20
- #define CLRY06() Y06 = 0//cMidleCoil[2] &= ~0x40
- #define CLRY07() Y07 = 0//cMidleCoil[2] &= ~0x80
- #define CLRY10() Y10 = 0//cMidleCoil[2] &= ~0x100
- #define CLRY11() Y11 = 0//cMidleCoil[2] &= ~0x200
- #define CLRY12() Y12 = 0//cMidleCoil[2] &= ~0x400
- #define CLRY13() Y13 = 0//cMidleCoil[2] &= ~0x800
- #define CLRY14() Y14 = 0//cMidleCoil[2] &= ~0x1000
- #define CLRY15() Y15 = 0//cMidleCoil[2] &= ~0x2000
- #define CLRY16() Y20 = 0//cMidleCoil[2] &= ~0x2000
- #define CLRY017() Y21 = 0//cMidleCoil[2] &= ~0x2000
- #define X000 X00
- #define X001 X01
- #define X002 X02
- #define X003 X03
- #define X004 X04
- #define X005 X05
- #if (FANG_KUAI_JI_CONFIG)
- #define X006 X30
- #define X007 X31
- #define X010 X32
- #define X011 X33
- #else
- #define X006 X06
- #define X007 X07
- #define X010 X10
- #define X011 X11
- #endif
- #define X012 X12
- #define X013 X13
- #define X014 X14
- #define X015 X15
- #define X016 X16
- #define X017 X17
- #define X020 X20
- #if (FANG_KUAI_JI_CONFIG)
- #define X021 X06
- #define X022 X07
- #define X023 X10
- #define X024 X11
- #else
- #define X021 X30
- #define X022 X31
- #define X023 X32
- #define X024 X33
- #endif
- #define X025 X34
- #define X026 X35
- #define X027 X36
- #define Y000 Y00
- #define Y001 Y01
- #define Y002 Y02
- #define Y003 Y03
- #if (FANG_KUAI_JI_CONFIG)
- #define Y004 Y04Flg//Y04
- #define Y005 Y05Flg// Y05
- #define Y006 Y06Flg
- #define Y007 Y07Flg//Y07
- #else
- #define Y004 Y04//Y04
- #define Y005 Y05// Y05
- #define Y006 Y06
- #define Y007 Y07//Y07
- #endif
- #define Y010 Y10
- #define Y011 Y11
- #define Y012 Y12
- #define Y013 Y13
- #define Y014 Y14
- #define Y015 Y15
- #define Y016 Y20
- #define Y017 Y21
- #define Y020 Y22
- #define Y021 Y23
- #define Y022 Y24
- #define Y023 Y25
- #define Y024 Y26
- #define Y025 Y27
- #define SETDR() SetEn(X_AXIS,1) //步进电机松
- #define CLRDR() SetEn(X_AXIS,0) //步进电机锁轴
- //输入输出警告
- #define ERY00 32
- #define ERY01 33
- #define ERY02 34
- #define ERY03 35
- #define ERY04 36
- #define ERY05 37
- #define ERY06 38
- #define ERY07 39
- #define ERY10 40
- #define ERY11 41
- #define ERY12 42
- #define ERY13 43
- #define ERY14 44
- #define ERY15 45
- #define ERY16 46
- #define ERY017 47
- #define ERX00 48
- #define ERX01 49
- #define ERX02 50
- #define ERX03 51
- #define ERX04 52
- #define ERX05 53
- #define ERX06 54
- #define ERX07 55
- #define ERX10 56
- #define ERX11 57
- #define ERX12 58
- #define ERX13 59
- #define ERX14 60
- #define ERX15 61
- #define ERX16 62
- #define ERX17 63
- #define ERX20 64
- #define ERX21 65
- #define ERX22 66
- #define ERX23 67
- #define ERX24 68
- #define ERX25 69
- #define ERX26 70
- #define ERX27 71
- #define InPage 6
- #define OutPage 7
- #define ActionPage 11
- #endif
- #endif
|