123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663 |
- #include "global.h"
- #include "Action.h"
- byte_bits_t cRunState,cRunState1,cRunState2,cRunState3,cRunState4,cRunState5,cRunState6,cRunState7;
- byte_bits_t cTimeState;
- unsigned long cMachineType;
- unsigned long cScreenEnable;
- unsigned long cWifiEnable;
- unsigned short cSetPulseType;
- unsigned char cSetXdirType;
- unsigned char cSetYdirType;
- unsigned char cSetXdirCh;
- unsigned char cSetYdirCh;
- unsigned char AllRunFlg = 0;
- unsigned char JYDCRunFlg = 0,CCJRunFlg = 0;
- unsigned char LockMachineFlg = 0;
- unsigned char Y05Flg =0;
- unsigned char Y06Flg =0;
- unsigned char Y04Flg =0;
- unsigned char Y07Flg =0;
- static unsigned short old_machine_type;
- static unsigned short old_screen_type;
- static unsigned short old_wifi_type;
- //动作步就量
- unsigned short cStepMByte,cStepMByte1,cStepMByte2,cStepMByte3,cStepMByte4,cStepMByte5,
- cStepMByte6,cStepMByte7,cStepMByte8,cStepMByte9,cStepMByte10,cStepMByte11,cStepMByte12,
- cStepMByte13,cStepMByte14,cStepMByte15,cStepMByte16,cStepMByte17,cStepMByte18,cStepMByte19,
- cStepMByte20,cStepMByte21,cStepMByte22,cStepMByte23,cStepMByte24,cStepMByte25,cStepMByte26;
- //定时器
- unsigned long cDelayTime1,cDelayTime2,cDelayTime3,cDelayTime4,cDelayTime5,cDelayTime6,
- cDelayTime7,cDelayTime8,cDelayTime9,cDelayTime10,cDelayTime11,cDelayTime12,cDelayTime13,cDelayTime14,
- cDelayTime15,cDelayTime16,cDelayTime17,cDelayTime18,cDelayTime19,cDelayTime20,cDelayTime21,cDelayTime22,
- cDelayTime23,cDelayTime24,cDelayTime25,cDelayTime26,cDelayTime27,cDelayTime28,cDelayTime29,cDelayTime30,
- cDelayTime31,cDelayTime32,cDelayTime33,cDelayTime34,cDelayTime35;
- //8位变量
- 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位变量
- 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位变量
- unsigned long cUDword32Buff1,cUDword32Buff2,cUDword32Buff3,cUDword32Buff4,cUDword32Buff5,cUDword32Buff6,cUDword32Buff7,
- cUDword32Buff8,cUDword32Buff9,cUDword32Buff10,cUDword32Buff11,cUDword32Buff12,cUDword32Buff13,
- cUDword32Buff14,cUDword32Buff15;
- //有符号变量
- long cDword32Buff1,cDword32Buff2,cDword32Buff3,cDword32Buff4,cDword32Buff5,cDword32Buff6,cDword32Buff7,cDword32Buff8,cDword32Buff9,
- cDword32Buff10,cDword32Buff11,cDword32Buff12,cDword32Buff13,cDword32Buff14,cDword32Buff15;
- short *Short16Buff1,*Short16Buff2,*Short16Buff3;
- long dwXRealPos,dwYRealPos;
- long dwRealPos;
- unsigned char SingOneFlg = 0;
- unsigned long dwZipCnt = 0;
- unsigned char cSeBiaoEn = 0;
- unsigned char cSeBiaoOk = 0;
- unsigned short alarm_message_buff[ONE_MESSAGE_SIZE_WORD];
- unsigned short message_size_buff[5];
- unsigned char cWifiStep = 0;
- unsigned char jydc_use_x30 = 1;
- unsigned char jydc_use_x20 = 1;
- unsigned long CalInch(unsigned long length)
- {
- float length_buff;
- length_buff = length;
-
- return (unsigned long)round(length_buff / 2.539999);
- }
- unsigned long CalLengthCM(unsigned long length)
- {
- float length_buff;
- length_buff = length;
-
- return (unsigned long)round(length_buff * 2.539999);
- }
- long CalInch2(long length)
- {
- float length_buff;
- length_buff = length;
-
- return (long)round(length_buff / 2.539999);
- }
- long CalLengthCM2(long length)
- {
- float length_buff;
- length_buff = length;
-
- return (long)round(length_buff * 2.539999);
- }
- //计算生成速度
- void CalProSP(unsigned short addr)
- {
- static unsigned long cProSpTime = 0;
- long temp;
- unsigned short i;
- i = dwTickCount - cProSpTime;
- temp=(60000)%i;
- if(temp)
- {
- user_datas[addr] = ((60000)/i)+1;
- }
- else
- {
- user_datas[addr] = (60000)/i;
- }
- cProSpTime = dwTickCount;
- }
- //增加产量
- void AddToTal(unsigned short addr)
- {
- unsigned long buff;
-
- buff = user_datas[addr + 1] << 16;
- buff |= user_datas[addr];
-
- buff++;
-
- user_datas[addr + 1] = buff >> 16;
- user_datas[addr] = buff & 0x0000FFFF;
- }
- //获取产量
- unsigned long GetTotal(unsigned short addr)
- {
- unsigned long buff;
-
- buff = user_datas[addr + 1] << 16;
- buff |= user_datas[addr];
-
- return buff;
- }
- //清除产量
- void ClrcToTal(unsigned short addr)
- {
- user_datas[addr + 1] = 0;
- user_datas[addr] = 0;
- }
- //设置故障编号
- void SetAlarmCode(unsigned short addr,unsigned short alarm_code)
- {
- user_datas[addr] = alarm_code;
- }
- //获取故障编号
- unsigned short GetAlarmCode(unsigned short addr)
- {
- return user_datas[addr];
- }
- void SetData32bits(unsigned short addr,long source_data)
- {
- user_datas[addr + 1] = (source_data & 0xFFFF0000) >> 16;
- user_datas[addr] = source_data & 0x0000FFFF;
- }
- unsigned long GetData32bits(unsigned short addr)
- {
- return (user_datas[addr] | (user_datas[addr + 1] >> 16));
- }
- //开机读取机型
- void GetMachineType(void)
- {
- //机型选择,重上电才有效
- cMachineType = MACHINE_TYPE;
-
- // hw_flash_data_read(MACHINE_TYPE_SAVE_ADDR, &cMachineType,4);
- // if(cMachineType > 100) cMachineType = 0;
- // MACHINE_TYPE_SET_DATA = cMachineType;
- // old_machine_type = MACHINE_TYPE_SET_DATA;
- //
- // hw_flash_data_read(MACHINE_SCREEN_SAVE_ADDR, &cScreenEnable,4);
- // if(cScreenEnable > 1) cScreenEnable = 1;
- // MACHINE_SCREEN_SET_DATA = cScreenEnable;
- // old_screen_type = MACHINE_SCREEN_SET_DATA;
- //
- // hw_flash_data_read(MACHINE_WIFI_SAVE_ADDR, &cWifiEnable,4);
- // if(cWifiEnable > 1) cWifiEnable = 1;
- // MACHINE_WIFI_SET_DATA = cWifiEnable;
- // old_wifi_type = MACHINE_WIFI_SET_DATA;
-
- }
- //设置保存机型
- void SetMachineType(void)
- {
- if(old_machine_type != MACHINE_TYPE_SET_DATA)
- {
- old_machine_type = MACHINE_TYPE_SET_DATA;
- hw_flash_data_write(MACHINE_TYPE_SAVE_ADDR, &old_machine_type,4);
- }
-
- if(old_screen_type != MACHINE_SCREEN_SET_DATA)
- {
- old_screen_type = MACHINE_SCREEN_SET_DATA;
- hw_flash_data_write(MACHINE_SCREEN_SAVE_ADDR, &old_screen_type,4);
- hw_flash_data_read(MACHINE_SCREEN_SAVE_ADDR, &cScreenEnable,4);
- }
-
- if(old_wifi_type != MACHINE_WIFI_SET_DATA)
- {
- old_wifi_type = MACHINE_WIFI_SET_DATA;
- hw_flash_data_write(MACHINE_WIFI_SAVE_ADDR, &old_wifi_type,4);
- }
- }
- //初始化脉冲
- void InitPWM(void)
- {
- hw_pwm_init(72);
- }
- //初始化Uart
- void InitUart(void)
- {
- hw_dma_uart_init(72);
- }
- //根据机型来选初始化脉冲
- void Mechine_Config(void)
- {
- //生产测试程序
- #if (TEST_MACHINE == 1)
- Test_Mechine_Config();
- #endif
-
- //金龙拉链
- #if (JIN_LONG_MACHINE == 1)
- JL_Mechine_Config();
- #endif
- //传驰拉链
- #if (CHUAN_CHI_MACHINE == 1)
- CC_Mechine_Config();
- #endif
- //聚星拉链
- #if (JU_XING_MACHINE == 1)
- JX_Mechine_Config();
- #endif
- //安正拉链
- #if (AN_ZHEN_MACHINE == 1)
- AZ_Mechine_Config();
- #endif
- //昌盛给力
- #if (CHANG_SHENG_GEI_LI_MACHINE == 1)
- GL_Mechine_Config();
- #endif
-
- //锦泓拉链
- #if (JIN_HONG_MACHINE == 1)
- JH_Mechine_Config();
- #endif
- //舜业鑫业
- #if (XIN_YE_MACHINE == 1)
- XY_Mechine_Config();
- #endif
- //盈兴拉链
- #if (FJ_YING_XING_MACHINE == 1)
- YX_Mechine_Config();
- #endif
-
-
- }
- void InitAction(void)
- {
- //生产测试程序
- #if (TEST_MACHINE == 1)
- Test_Mechine_InitAction();
- #endif
-
- //昌盛给力
- #if (CHANG_SHENG_GEI_LI_MACHINE == 1)
- GL_Mechine_InitAction();
- #endif
- //金龙拉链
- #if (JIN_LONG_MACHINE == 1)
- JL_Mechine_InitAction();
- #endif
- //传驰拉链
- #if (CHUAN_CHI_MACHINE == 1)
- CC_Mechine_InitAction();
- #endif
- //聚星拉链
- #if (JU_XING_MACHINE == 1)
- JX_Mechine_InitAction();
- #endif
- //安正拉练
- #if (An_Zhen_MACHINE == 1)
- AZ_Mechine_InitAction();
- #endif
- //锦泓拉链
- #if (JIN_HONG_MACHINE == 1)
- JH_Mechine_InitAction();
- #endif
- //锦泓拉链
- #if (XIN_YE_MACHINE == 1)
- XY_Mechine_InitAction();
- #endif
-
- #if (FJ_YING_XING_MACHINE == 1)
- YX_Mechine_InitAction();
- #endif
-
-
- }
- void Action(void)
- {
- InputPinConfig();
- //生产测试程序
- #if (TEST_MACHINE == 1)
- Test_Mechine_Action();
- #endif
-
- //昌盛给力
- #if (CHANG_SHENG_GEI_LI_MACHINE == 1)
- GL_Mechine_Action();
- #endif
- //金龙拉链
- #if (JIN_LONG_MACHINE == 1)
- JL_Mechine_Action();
- #endif
- //传驰拉链
- #if (CHUAN_CHI_MACHINE == 1)
- CC_Mechine_Action();
- #endif
-
- //聚星拉链
- #if (JU_XING_MACHINE == 1)
- JX_Mechine_Action();
- #endif
- //安正拉链
- #if (An_Zhen_MACHINE == 1)
- AZ_Mechine_Action();
- #endif
-
- //锦泓拉链
- #if (JIN_HONG_MACHINE == 1)
- JH_Mechine_Action();
- #endif
- //舜业鑫业
- #if (XIN_YE_MACHINE == 1)
- XY_Mechine_Action();
- #endif
- //盈兴拉链
- #if (FJ_YING_XING_MACHINE == 1)
- YX_Mechine_Action();
- #endif
-
- OutputPinConfig();
- }
- void DelayAction(void)
- {
- #if (JIN_HONG_MACHINE == 1|| XIN_YE_MACHINE==1)
- switch(MACHINE_TYPE)
- {
- case JIAO_YA_DIN_CUN:JYDC_DelayAction();break;
- // case CHU_CHI_JI:CCJ_DelayAction();break;
- // case JIAO_YA_CHU_CHI:
- // {
- // JYDC_DelayAction();
- // CCJ_DelayAction();
- // }break;
- default:;
- }
- #endif
- }
- //X30/X16外部中断动作
- void ExtiAcitionX30(void)
- {
- static int count;
- #if (JIN_HONG_MACHINE == 1|| XIN_YE_MACHINE==1||CHANG_SHENG_GEI_LI_MACHINE == 1)
- switch(cMachineType)
- {
- case JIAO_YA_DIN_CUN:
- case JIAO_YA_CHU_CHI:
- count++;
- if(count>5)
- {
- jydc_use_x20=0;//检测到使用X30,关闭X20
- EXTI20Disable();
- }
- JYDC_ExtiActionX30(X30EXTI_IOIN);
- break;
- // case CHU_CHI_JI:;break;
- // case JIAO_YA_CHU_CHI:
- // {
- // JYDC_ExtiActionX30();
- // }break;
- default:;
- }
- #endif
- }
- //X31/X17外部中断动作
- void ExtiAcitionX31(void)
- {
- //昌盛给力
- #if (CHANG_SHENG_GEI_LI_MACHINE == 1)
- switch(MACHINE_TYPE)
- {
- //case JIAO_YA_DIN_CUN:JYDC_ExtiActionX31();break;
- case MXC_NILONG:MXC_ExtiActionX31();break;
- //case QIE_DUAN_JI:QueDuan_ExtiActionX31();break;
- case CHUAN_TOU_QIE_DUAN_JI:QDCT_ExtiActionX31();break;
- default:;
- }
- #endif
-
- #if (JIN_HONG_MACHINE == 1|| XIN_YE_MACHINE==1)
- switch(MACHINE_TYPE)
- {
- case JIAO_YA_DIN_CUN:JYDC_ExtiActionX31();break;
- //case MXC_NILONG:MXC_ExtiActionX31();break;
- //case QIE_DUAN_JI:QueDuan_ExtiActionX31();break;
- //case CHUAN_TOU_QIE_DUAN_JI:QDCT_ExtiActionX31();break;
- default:;
- }
- #endif
- }
- //X20外部中断动作
- void ExtiAcitionX20(void)
- {
- static int count;
-
- #if (JIN_HONG_MACHINE == 1|| XIN_YE_MACHINE==1||CHANG_SHENG_GEI_LI_MACHINE == 1)
- switch(cMachineType)
- {
- case JIAO_YA_DIN_CUN:
- case JIAO_YA_CHU_CHI:
- count++;
- if(count>5)
- {
- jydc_use_x30=0;//检测到使用X20,关闭X30
- EXTI30Disable();
- }
- JYDC_ExtiActionX30(X20EXTI_IOIN);
- break;
- // case CHU_CHI_JI:;break;
- // case JIAO_YA_CHU_CHI:
- // {
- // JYDC_ExtiActionX30();
- // }break;
- default:;
- }
- #endif
- }
- void PWMAction(void)
- {
- #if 0
- switch(MACHINE_TYPE)
- {
- case TEST_ACTION:break;
- case JIAO_YA_DIN_CUN:break;
- case CHU_CHI_JI:break;
- case JIAO_YA_CHU_CHI:break;
- case QIE_DUAN_JI:break;
- case CHUAN_TOU_QIE_DUAN_JI:break;
- case MXC_NILONG:break;
- case DA_KONG_JI:break;
- case JIN_SHU_DIN_CUN:break;
- case CHUAN_TOU_JI:break;
- case HUA_XIAN_JI:break;
- case JIN_SHU_KLSZ_JI:break;
- case HE_LIAN_JI:HL_PWMAction();break;
- case TIE_BU_JI:break;
- case YYA_JI:break;
- case SYYA_JI:break;
- case FANG_KUAI_CHA_XIAO_JI:break;
- case GONG_ZHI_MA:break;
- case LA_SI_JI:break;
- case DING_ZHI_JI:break;
- default:;
- }
- #endif
- }
- unsigned long no_addr_buff[2];
- //故障记录保存功能
- void AlarmMessageSave(unsigned short alarm_addr)
- {
- unsigned short i = 0;
-
- hw_flash_data_read(SAVE_MESSAGE_START_ADDR, no_addr_buff,8);
-
- alarm_message_buff[0] = (no_addr_buff[0] + 1) & 0x0000FFFF;
- alarm_message_buff[1] = (no_addr_buff[0] + 1) >> 16;
-
- for(i = 1;i < (ONE_MESSAGE_SIZE_WORD - 3);i++)alarm_message_buff[i + 1] = user_datas[SAV_MESSAGE_USER_DATAS_START_ADDR + i - 1];
-
- alarm_message_buff[ONE_MESSAGE_SIZE_WORD - 1] = mh_crc16_calc((unsigned char *)&alarm_message_buff[0],(ONE_MESSAGE_SIZE_WORD - 1) * 2);
- hw_flash_data_write(no_addr_buff[1],alarm_message_buff,ONE_MESSAGE_SIZE_WORD*2);
-
- hw_flash_data_write(SAVE_MESSAGE_START_ADDR,no_addr_buff,10);
- }
- //故障记录通讯读取功能
- void AlarmMessageRead(void)
- {
- unsigned short i;
- switch(ALARM_MESSAGE_CMD)
- {
- case CMD_READ_MESSAGE:
- {
- hw_flash_data_read(SAVE_MESSAGE_START_ADDR, no_addr_buff,8);
- user_datas[SAV_MESSAGE_USER_DATAS_START_ADDR] = no_addr_buff[0] & 0x0000FFFF;
- user_datas[SAV_MESSAGE_USER_DATAS_START_ADDR+1] = no_addr_buff[0] << 16;
- user_datas[SAV_MESSAGE_USER_DATAS_START_ADDR+2] = no_addr_buff[1] & 0x0000FFFF;
- user_datas[SAV_MESSAGE_USER_DATAS_START_ADDR+3] = no_addr_buff[1] << 16;
- }break;
- case CMD_READ_ALARM_MESSAGE:
- {
- hw_flash_data_read(SAVE_MESSAGE_START_ADDR, alarm_message_buff,ONE_MESSAGE_SIZE_WORD*2);
- for(i=1;i<ONE_MESSAGE_SIZE_WORD;i++)user_datas[SAV_MESSAGE_USER_DATAS_START_ADDR+2] = alarm_message_buff[i];
- }break;
- default:;
- }
- }
- //WIFI恢复默认出厂连接 wifi名: 123456 密码:88888888
- void ReSetWifi(void)
- {
- static unsigned short save_times;
- static unsigned long reset_wifi_delay;
- char wifi_name[] = "tiaoshiwifi";
- char wifi_psd[] = "88888888";
- unsigned char i,j;
-
- if(CHANG_SHENG_GEI_LI_MACHINE)
- {
- strcpy(wifi_name, "123456");
- }
-
- if(((GPIOD->IDR >> 8) & 0x01) == 0)
- save_times++;
- else
- save_times = 0;
-
- if((save_times >= 10000) && (cWifiStep == 0))cWifiStep = 1;
- switch(cWifiStep)
- {
- case 0:break;
- case 1:
- {
- j =(unsigned char)( round(sizeof(wifi_name) / 2));
-
- for(i=0;i<j;i++)
- {
- user_datas[1605+i] = wifi_name[2*i];
- user_datas[1605+i] |= wifi_name[2*i+1] << 8;
- }
- j = 12;
- for(;i<j;i++)
- {
- user_datas[1605+i] = 0;
- }
-
- j = (unsigned char)(round(sizeof(wifi_psd) / 2));
- for(i=0;i<j;i++)
- {
- user_datas[1617+i] = wifi_psd[2*i];
- user_datas[1617+i] |= wifi_psd[2*i+1] << 8;
- }
-
- j = 12;
- for(;i<j;i++)
- {
- user_datas[1617+i] = 0;
- }
- run_led_speed = 50000;
- cWifiStep = 2;
- }break;
- case 2:
- {
- user_datas[1604] = 3;
- cWifiStep = 3;
- reset_wifi_delay = dwTickCount + 30000;
- }break;
- case 3:
- {
- if(user_datas[1602] == 2)
- {
- cWifiStep = 4;
- }
- else if(dwTickCount >= reset_wifi_delay)
- {
- cWifiStep = 0;
- run_led_speed = 500000;
- }
- }break;
- case 4:
- {
- if(save_times == 0)
- {
- cWifiStep = 0;
- run_led_speed = 500000;
- }
-
- }break;
- default:;
- }
- }
- void CheckTimeOver(void)
- {
- /* #if USE_PSW
- static unsigned long psw_cnt_delay = 0;
-
- if(dwTickCount >= psw_cnt_delay)
- {
- psw_cnt_delay = dwTickCount + 3600000;
- MACHINE_LOCK_TIME++;
- }
-
- if(MACHINE_LOCK_PSW != (MACHINE_BASE_PSW * MACHINE_TYPE+1))
- {
- if(MACHINE_LOCK_TIME >= (MACHINE_USE_DAY*24))
- {
- LockMachineFlg = 1;
- MACHINE_LOCK_TIME = (MACHINE_USE_DAY*24);
- }
- }
- else
- {
- MACHINE_PSW_ENABLE = 9527;
- }
-
- if(LockMachineFlg && (MACHINE_PSW_ENABLE != 9527))
- {
- Y00 = 0;
- Y04 = 0;
- Y06 = 0;
- AxisEgmStop(X_AXIS);
- }
-
- #endif*/
- }
|