📄 b00d8403b85f001d1289bbda6de18a35
字号:
while (continue_looping && !errorcode) { c = TRT_GetInput(NULL, /*must be NULL- */ /*we dont use synchronisation with symaphore*/ 0, /*must be NULL - */ /*we dont use synchronisation with symaphore*/ NULL,/*must be NULL -*/ /* we dont use communication to other Prozess*/ 0, /*must be NULL -*/ /*we dont use communication to other Prozess*/ &rec_data, blocking_flag);/* Wait until an event does occur*/ /***************************************** ** CHECK RETURN CODES of Notifications ** ******************************************/ if (c == 0) { /* Process Tilcon Notification (rec_data) */ switch(rec_data.code) { case TRT_keyboard: /*Keyboard input*/ switch (rec_data.state) { /* Menue Buttons*/ case TRT_KEY_F2: ExecuteFctBotton(BUTTON_F2_C); break; case TRT_KEY_F3: ExecuteFctBotton(BUTTON_F3_C); break; case TRT_KEY_F4: ExecuteFctBotton(BUTTON_F4_C); break; case TRT_KEY_F5: ExecuteFctBotton(BUTTON_F5_C); break; case TRT_KEY_F6: ExecuteFctBotton(BUTTON_F6_C); break; case TRT_KEY_F7: ExecuteFctBotton(BUTTON_F7_C); break; case TRT_KEY_F8: ExecuteFctBotton(BUTTON_F8_C); break; case TRT_KEY_F9: ExecuteFctBotton(BUTTON_F9_C); break; /* M Keys Noch nicht belegt*/ case MENU_ALT_F2: break; case MENU_ALT_F3: break; case MENU_ALT_F4: break; case MENU_ALT_F5: break; /* Panel Keys*/ case TRT_KEY_CTRL|TRT_KEY_F1: ExecutePanelButton(MO_MACHINE);/*Machine*/ break; case TRT_KEY_CTRL|TRT_KEY_F3: ExecutePanelButton(MO_PROGRAME);/*Programe*/ break; case TRT_KEY_CTRL|TRT_KEY_F4: ExecutePanelButton(MO_MAINT);/*Maintenance*/ break; case TRT_KEY_CTRL|TRT_KEY_F6: ExecutePanelButton(MO_DIAGNOSE);/*Diagnose*/ break; default:break; } break; #ifdef HWDS_WINDOWS /* this code is only to silmulat feed override on*/ /*Windows Platform*/ case TRT_window: if(rec_data.state== TRT_window_quit) continue_looping = FALSE; break; case TRT_slider: /* we can call this funktion also as callback.*/ /* hier is just to test*/ if (!strcmp(rec_data.ID,"Feedrate_Slider")) Dab_h_ChangeFeedrate(); if (!strcmp(rec_data.ID,"Spindlerate_Slider")) Dab_h_ChangeSpindlerate(); break; case TRT_button: if (!strcmp(rec_data.ID,"VPanel_Start_Button_ID")) Dab_h_RunNcProg(); if (!strcmp(rec_data.ID,"VPanel_Stop_Button_ID")) Dab_h_CLRNcProg(); break;#endif case TRT_tree: /*if (!strcmp(rec_data.ID,"DirectoryTree_ID1")) Dab_h_ListDir();break;*/ if (!strcmp(rec_data.ID,"Test_tree")) { //FOCUS IS THE KEY. if(rec_data.event==1){ /*event==1 means Enter input!*/ strcpy(FileFoldBuf,rec_data.txt); ChangeChar(FileFoldBuf,'\\','/'); TRT_SetValues(TRT_cid2,"FoldSelect", TRT_ATT_TEXT,FileFoldBuf,NULL); /************************************/ Directory_Load(); Directory_Load(); TRT_SetValues(TRT_cid2, "Test_tree", TRT_ATT_STATE,TRUE, TRT_ATT_CURRENT_ITEM,0, NULL); TRT_SetValues(TRT_cid2, "FilesUnderFold", TRT_ATT_STATE,TRUE, TRT_ATT_CURRENT_ITEM,0, NULL); } }; if (!strcmp(rec_data.ID,"VariableTree")){ if(rec_data.event==1) { Find_PermVariable(rec_data.txt); } } break; case TRT_listbox: /*Handle listbox notifications */ if(!strcmp(rec_data.ID,"FilesUnderFold")){ if(rec_data.event==1){ strcpy(Currentfileselect,rec_data.txt); /******************************************/ FileReadTest(); Dab_h_LoadNcProg(); } }; break; case TRT_numberbox: /*Handle Numberbox notifications */ break; case TRT_combobox: /* Handle Combobox notifications */ break; case TRT_edit_text: /*Handle Edit text notifications */ break; default: break; } } else if (c == 1) /* call callback funktion */ { /* TRT_GetInput has already called a callback, so do nothing */ } else if (c == -1) { if (blocking_flag == TRT_BLOCK) /* Something has failed.*/ errorcode = -1; else {/*no message was received */ } } else if (c & TRT_CH_TRIGGER_BIT) // i.e. if the sign bit is set { // another process called the function TRT_ChTrigger() } else if (c > 1) // indicates a TRT_ChSend { } else { // invalid return code, Rec_Data will contain garbage and // not a Tilcon notification, so could cause crash // Possible memory is no good. } } // end of main loop // return errorcode;} /* OF MainEventLoop *//*F*//*************************************************************************** >AUTHOR : AB** FUNCTIONNAME : Dab_h_GraStartup** ** >DESCRIPTION: This is the entry funktion of the graphic task .** Ther are tow defferent Entrys: ** an entry for windows variante and ** an other for BRC Traget ** ** >NOTES: you can change the content of this function as necessary ** but dont change the name and the Call Parameter ** ** >PARAMETER:** ** >RETURN VALUE:** ** >INCLUDES:"dab_h_startgra.h"** */#ifdef CC_TRT_DOSEXPORT int Dab_h_GraStartup() /* WINDOWS Entry*/ #else /*Vxworks Entry*/ EXPORT int Dab_h_GraStartup(PxrTask_t MyTask, PxrMbx_t MyMbx, PxrEvents_t MyEvents)#endif{ static long errorcode = 0; errorcode = InitializeApp(); /*Initialize Application */ ConnectGUItoNCS(); /*Connect to NCS */ /*Begin Test*/ Dab_h_GetAxisNmb_Req(); Dab_h_InitAxisinterface(); /* Get the axis number */ /* Dab_h_LoadNCProg();*/ /* Get the axis Values */ Dab_h_GetAxisValues_Req(); /* Get the axis ende position Values */ Dab_h_GetAxisEndPosValues_Req(); /* Get the axis Restweg Values */ Dab_h_GetAxisRestwegValues_Req(); /*StartMechanism for get Wera Infos*/ Dab_h_activateWeraReports(); /*Get the maschine parameter*/ Dab_h_InitMacParainterface(); Dab_h_GetFeedrate_Req(); // Dab_h_GetSpindlerate_Req(); Dab_h_TestGetParameter(); /* init to load whole file system */ /* Init_load_ListDir();*/ if (!errorcode) { ChangeConnectSymbol(1); /* Change the connection symbol on GUI */ errorcode += MainEventLoop(); /* Process unti done */ } else {/* Traitment of Errors*/ /* Initialisation Problem*/ } errorcode = TRT_WindowDelete (TRT_cid, MAIN_WINDOW_ID ); errorcode = TRT_Exit (TRT_cid); /* Close TRT_CID */ #ifdef HWDS_WINDOWS StopEvHandThread();#endif return(errorcode); /*lint -e715*/} /* OF Dab_h_GraStartup *//*lint +e715*//************************************************************************//******************** Callback functions ********************************//************************************************************************//* this functions will be called automatically by pressing the ** correspendent button on the GUI** The name of a callback funktion will be given on Tilcon GUI Editor, ** dont change*//*F*//*======================================================================** detailed documentation of the history** of this file. the numbers of the paragraphs must correspond** to the numbers of the history-comments within the fileheader**----------------------------------------------------------------------*//* ausgecheckte Revision: /main/NC_V0_integration/1** Autor: rolfglei Datum: Mar 13 2007** eingecheckte Revision: /main/NC_V0_integration/2** Date: Mar 13 13:58:1 2007** CQ-Pr: ** Pflichtenheft-Nr/Name: ** Kommentar: Log-Eintrag ge?ndert.** ---------------------------------------------------------------------*//* ausgecheckte Revision: /main/NC_V0_integration/2** Autor: abdeaity Datum: May 8 2007** eingecheckte Revision: /main/NC_V0_integration/3** Date: May 9 17:9:51 2007** CQ-Pr: ** Pflichtenheft-Nr/Name: HMI demo** Kommentar: call other functions to test in Dab_h_GraStartup** -To get axis rest ** -To get axis end position** -To load NC program** -To clear NC Program** -To run NC Program**** ---------------------------------------------------------------------*//* ausgecheckte Revision: /main/NC_V0_integration/3** Autor: abdeaity Datum: May 31 2007** eingecheckte Revision: /main/NC_V0_integration/4** Date: Jun 1 15:17:49 2007** CQ-Pr: ** Pflichtenheft-Nr/Name: ** Kommentar: Exclude Pxr0task.h and Include Pxr1osty.h** ---------------------------------------------------------------------*//* ausgecheckte Revision: /main/NC_V0_integration/4** Autor: abdeaity Datum: Jun 6 2007** eingecheckte Revision: /main/NC_V0_integration/5** Date: Jun 6 17:10:18 2007** CQ-Pr: ** Pflichtenheft-Nr/Name: ** Kommentar: change in function On_Chan_Lang_Button** - Example about how to set error or warning ** in the WERA database** - Example about how to get a text from NC Kernel ** ---------------------------------------------------------------------*//* ausgecheckte Revision: /main/NC_V0_integration/5** Autor: karlgros Datum: Oct 24 2007** eingecheckte Revision: /main/NC_V0_integration/6** Date: Oct 30 15:12:51 2007** CQ-Pr: ** Pflichtenheft-Nr/Name: ** Kommentar: putenv (benutzt in dab) fuer getenv von Tilcon** ---------------------------------------------------------------------*//* ausgecheckte Revision: /main/NC_V0_integration/6** Autor: abdeaity Datum: Oct 31 2007** eingecheckte Revision: /main/NC_V0_integration/7** Date: Nov 1 17:12:28 2007** CQ-Pr: ** Pflichtenheft-Nr/Name: HMI Demo ** Kommentar: HMI Demo 2:- StopEvhandthread if windows** -Move function On_Chan_Lang_Button** -Menu buttons not as callback** ---------------------------------------------------------------------*//* ausgecheckte Revision: /main/NC_V0_integration/7** Autor: abdeaity Datum: Jan 10 2008** eingecheckte Revision: /main/NC_V0_integration/8** Date: Jan 10 15:12:26 2008** CQ-Pr: ** Pflichtenheft-Nr/Name: ** Kommentar: exclude pxr0vxsc.h** ---------------------------------------------------------------------*//* ausgecheckte Revision: /main/NC_V0_integration/8** Autor: abdeaity Datum: Mar 5 2008** eingecheckte Revision: /main/NC_V0_integration/9** Date: Mar 5 13:47:55 2008** CQ-Pr: ** Pflichtenheft-Nr/Name: ** Kommentar: CTRL+F Buttons** ---------------------------------------------------------------------*//* ausgecheckte Revision: /main/NC_V0_integration/9** Autor: karlgros Datum: Mar 7 2008** eingecheckte Revision: /main/NC_V0_integration/10** Date: Mar 7 17:45:10 2008** CQ-Pr: ** Pflichtenheft-Nr/Name: ** Kommentar: changed MO_DIAGNOSE to the right key** ---------------------------------------------------------------------*//* ausgecheckte Revision: /main/NC_V0_integration/10** Autor: karlgros Datum: Apr 2 2008** eingecheckte Revision: /main/NC_V0_integration/11** Date: Apr 2 17:46:59 2008** CQ-Pr: ** Pflichtenheft-Nr/Name: ** Kommentar: Grafik Applikation auf OEM-Partitition GUI_Demo** ---------------------------------------------------------------------*//* ausgecheckte Revision: /main/NC_V0_integration/11** Autor: abdeaity Datum: Apr 17 2008** eingecheckte Revision: /main/NC_V0_integration/12** Date: Apr 17 17:33:43 2008** CQ-Pr: ** Pflichtenheft-Nr/Name: ** Kommentar: FKeys Konstants f?r neue Tilcon Version** ---------------------------------------------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -