├── .gitattributes ├── .gitignore ├── GRS_Pro ├── .gitignore ├── GRS_Core │ ├── GRS_Core.pro │ ├── header │ │ ├── GRS_Common.h │ │ ├── GRS_SharedMemory.h │ │ ├── ProData_CoorOp.h │ │ ├── ProData_Kinematic.h │ │ └── ProData_Quaternion.h │ └── source │ │ ├── GRS_Common.cpp │ │ ├── GRS_SharedMemory.cpp │ │ ├── ProData_CoorOp.c │ │ ├── ProData_Kinematic.c │ │ └── ProData_Quaternion.c ├── GRS_Pro.pro ├── GR_HMI │ ├── GR-HMI.qrc │ ├── GR_HMI.pro │ ├── header │ │ ├── CustomThread │ │ │ └── updateposedatathread.h │ │ ├── CustomWidget │ │ │ ├── operatingbar.h │ │ │ └── simplepage.h │ │ ├── Page_Jogging │ │ │ ├── alignpage.h │ │ │ ├── gotopage.h │ │ │ ├── joggingpage.h │ │ │ ├── simplesettingpage.h │ │ │ └── tablesettingpage.h │ │ ├── Page_ProgramData │ │ │ └── programdatapage.h │ │ ├── hmiapp.h │ │ ├── mainmenuwidget.h │ │ ├── mainwidget.h │ │ ├── panelbutton.h │ │ ├── panelwidget.h │ │ ├── quicksetbar.h │ │ ├── screenwidget.h │ │ ├── systembutton.h │ │ └── virtualbutton.h │ ├── lib │ │ ├── libGRS_Core.a │ │ └── librobDecodePrg.a │ ├── resource │ │ ├── images.qrc │ │ ├── images │ │ │ ├── CancelJob_Large.png │ │ │ ├── CloseTab_Large.png │ │ │ ├── ExecuteJob_Large.png │ │ │ ├── Explorer_Dir.png │ │ │ ├── Explorer_File.png │ │ │ ├── Explorer_File_mod.png │ │ │ ├── Explorer_File_pgf.png │ │ │ ├── Explorer_file_SYS.png │ │ │ ├── GR-HMI-icon.png │ │ │ ├── GRS_home.jpg │ │ │ ├── GSK_Logo.png │ │ │ ├── Jogging │ │ │ │ ├── Coordinate_Base.png │ │ │ │ ├── Coordinate_Tool.png │ │ │ │ ├── Coordinate_Wobj.png │ │ │ │ ├── Coordinate_World.png │ │ │ │ ├── Increment_Large.png │ │ │ │ ├── Increment_Medium.png │ │ │ │ ├── Increment_None.png │ │ │ │ ├── Increment_Small.png │ │ │ │ ├── Increment_User.png │ │ │ │ ├── MotionMode_Axis.png │ │ │ │ └── MotionMode_Linear.png │ │ │ ├── Jogging_Mechanical_Unit_Robot.png │ │ │ ├── Jogging_Motion_Mode_Axis.png │ │ │ ├── Jogging_Motion_Mode_Linear.png │ │ │ ├── Jogging_Motion_Mode_Reorient.png │ │ │ ├── Launch_Large.png │ │ │ ├── NewBatchJobLarge.png │ │ │ ├── NewDeviceList_Large.png │ │ │ ├── OpenDeviceList_Large.png │ │ │ ├── PauseJob_Large.png │ │ │ ├── ResumeJob.png │ │ │ ├── SaveDeviceList_Large.png │ │ │ ├── ScanNetwork.png │ │ │ ├── VerifyJob_Large.png │ │ │ ├── administrator.png │ │ │ ├── background.png │ │ │ ├── bmp30.bmp │ │ │ ├── drop_down.png │ │ │ ├── mainScreenCloseBtn.png │ │ │ ├── mainScreenMenuBtn.png │ │ │ ├── mainScreenMenuBtn_2.png │ │ │ ├── mainScreenMenuBtn_checked.png │ │ │ ├── mainScreenMenuBtn_checked_2.png │ │ │ ├── menu │ │ │ │ ├── menu_0.png │ │ │ │ ├── menu_1.png │ │ │ │ ├── menu_10.png │ │ │ │ ├── menu_11.png │ │ │ │ ├── menu_12.png │ │ │ │ ├── menu_13.png │ │ │ │ ├── menu_14.png │ │ │ │ ├── menu_17.png │ │ │ │ ├── menu_2.png │ │ │ │ ├── menu_3.png │ │ │ │ ├── menu_4.png │ │ │ │ ├── menu_5.png │ │ │ │ ├── menu_6.png │ │ │ │ ├── menu_8.png │ │ │ │ ├── menu_9.png │ │ │ │ ├── menu_Arc.png │ │ │ │ ├── menu_AutoProduction.png │ │ │ │ ├── menu_Backup.png │ │ │ │ ├── menu_Calibration.png │ │ │ │ ├── menu_ControlPanel.png │ │ │ │ ├── menu_EventLog.png │ │ │ │ ├── menu_Explorer.png │ │ │ │ ├── menu_HotEdit.png │ │ │ │ ├── menu_IO.png │ │ │ │ ├── menu_Jogging.png │ │ │ │ ├── menu_LogOff.png │ │ │ │ ├── menu_ProgramData.png │ │ │ │ ├── menu_ProgramEditor.png │ │ │ │ ├── menu_Restart.png │ │ │ │ └── menu_SystemInfo.png │ │ │ ├── robotIcon_16.png │ │ │ ├── robotIcon_32.png │ │ │ ├── robot_model_.png │ │ │ ├── systemButton │ │ │ │ ├── arrow_down.png │ │ │ │ ├── close.png │ │ │ │ ├── close_hover.png │ │ │ │ ├── close_pressed.png │ │ │ │ ├── feedback.png │ │ │ │ ├── feedback_hover.png │ │ │ │ ├── feedback_pressed.png │ │ │ │ ├── menu.png │ │ │ │ ├── menu_hover.png │ │ │ │ ├── menu_pressed.png │ │ │ │ ├── min.png │ │ │ │ ├── min_hover.png │ │ │ │ ├── min_pressed.png │ │ │ │ ├── skin.png │ │ │ │ ├── skin_hover.png │ │ │ │ └── skin_pressed.png │ │ │ ├── view.bmp │ │ │ └── 广州数控Logo.jpg │ │ ├── qss │ │ │ └── GR-HMI.qss │ │ └── styleSheets.qrc │ ├── source │ │ ├── CustomThread │ │ │ └── updateposedatathread.cpp │ │ ├── CustomWidget │ │ │ ├── operatingbar.cpp │ │ │ └── simplepage.cpp │ │ ├── Page_Jogging │ │ │ ├── alignpage.cpp │ │ │ ├── gotopage.cpp │ │ │ ├── joggingpage.cpp │ │ │ ├── simplesettingpage.cpp │ │ │ └── tablesettingpage.cpp │ │ ├── Page_ProgramData │ │ │ └── programdatapage.cpp │ │ ├── hmiapp.cpp │ │ ├── main.cpp │ │ ├── mainmenuwidget.cpp │ │ ├── mainwidget.cpp │ │ ├── panelbutton.cpp │ │ ├── panelwidget.cpp │ │ ├── quicksetbar.cpp │ │ ├── screenwidget.cpp │ │ ├── systembutton.cpp │ │ └── virtualbutton.cpp │ └── system │ │ └── example │ │ ├── CalibData.mod │ │ ├── Module1.mod │ │ ├── example - 副本.pgf │ │ ├── example-1.pgf │ │ ├── example.pgf │ │ ├── example.pgf.bak │ │ ├── ok │ │ ├── CalibData.mod │ │ ├── Module1.mod │ │ ├── example - 副本.pgf │ │ ├── example.pgf │ │ └── example.pgf.bak │ │ └── wuheng │ │ ├── CalibData.mod │ │ ├── Module1.mod │ │ ├── example - 副本.pgf │ │ ├── example.pgf │ │ └── example.pgf.bak └── robDecodePrg │ ├── header │ ├── decode_core │ │ ├── ITP_Interface.h │ │ ├── basic_data_type.h │ │ ├── decode_datatype.h │ │ ├── decode_instructions.h │ │ ├── decode_lexical_analysis.h │ │ ├── decode_parse_file.h │ │ ├── decode_proc_task.h │ │ ├── decode_shmem.h │ │ ├── decode_typestructs.h │ │ └── sharemempublic.h │ └── decode_prg │ │ ├── decode_public.h │ │ ├── decodethread.h │ │ ├── robotdecodepublic.h │ │ ├── robotpgfxmlparser.h │ │ ├── robotprgfilestruct.h │ │ └── robotvariablestruct.h │ ├── robDecodePrg.pro │ └── source │ ├── decode_core │ ├── decode_instructions.c │ ├── decode_lexical_analysis.c │ ├── decode_parse_file.c │ ├── decode_proc_task.c │ ├── decode_shmem.c │ └── decode_typestructs.c │ ├── decode_prg │ ├── decode_public.cpp │ ├── decodethread.cpp │ ├── robotdecodepublic.cpp │ ├── robotpgfxmlparser.cpp │ ├── robotprgfilestruct.cpp │ ├── robotvariablestruct.cpp │ └── sharemempublic.cpp │ └── test.cpp ├── LICENSE ├── MFC框架显示库 ├── GLUT32.DLL ├── Microsoft.VC90.CRT │ ├── Microsoft.VC90.CRT.manifest │ ├── msvcm90.dll │ ├── msvcp90.dll │ └── msvcr90.dll ├── Microsoft.VC90.DebugCRT │ ├── Microsoft.VC90.DebugCRT.manifest │ ├── msvcm90d.dll │ ├── msvcp90d.dll │ └── msvcr90d.dll ├── Microsoft.VC90.DebugMFC │ ├── Microsoft.VC90.DebugMFC.manifest │ ├── mfc90d.dll │ ├── mfc90ud.dll │ ├── mfcm90d.dll │ └── mfcm90ud.dll ├── Microsoft.VC90.MFC │ ├── Microsoft.VC90.MFC.manifest │ ├── mfc90.dll │ ├── mfc90u.dll │ ├── mfcm90.dll │ └── mfcm90u.dll ├── RoboSim.exe └── glu32.dll ├── README.md └── screenshots ├── GR_HMI_Data.png ├── GR_HMI_Jogging.png ├── GR_HMI_Jogging_Align.png ├── GR_HMI_Jogging_Align_Coord.png ├── GR_HMI_Jogging_Coordinatee.png ├── GR_HMI_Jogging_Euler.png ├── GR_HMI_Jogging_Goto.png ├── GR_HMI_Jogging_Increment.png ├── GR_HMI_Jogging_Motion.png ├── GR_HMI_Jogging_Tool.png ├── GR_HMI_Main.png ├── GR_HMI_Main_small.png ├── GR_HMI_Menu.png ├── GR_HMI_Mode_Manual.png └── 模拟操作.png /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.tmp 3 | *.swp 4 | build-GRS_Pro* 5 | -------------------------------------------------------------------------------- /GRS_Pro/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.tmp 3 | *.swp 4 | GRS_Pro.pro.user* 5 | moc_* 6 | -------------------------------------------------------------------------------- /GRS_Pro/GRS_Core/GRS_Core.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2016-01-15T13:38:55 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | QT += widgets 9 | QT += network 10 | 11 | TARGET = GRS_Core 12 | TEMPLATE = lib 13 | CONFIG += staticlib 14 | 15 | ROOTDIR = $${PWD}/../ 16 | 17 | DESTDIR = $${ROOTDIR}/GR_HMI/lib/ 18 | 19 | INCLUDEPATH += \ 20 | $${ROOTDIR}/GRS_Core/header \ 21 | $${ROOTDIR}/robDecodePrg/header/decode_core \ 22 | $${ROOTDIR}/robDecodePrg/header/decode_prg 23 | 24 | SOURCES += \ 25 | source/ProData_CoorOp.c \ 26 | source/ProData_Kinematic.c \ 27 | source/ProData_Quaternion.c \ 28 | source/GRS_Common.cpp \ 29 | source/GRS_SharedMemory.cpp 30 | 31 | HEADERS += \ 32 | header/ProData_CoorOp.h \ 33 | header/ProData_Kinematic.h \ 34 | header/ProData_Quaternion.h \ 35 | header/GRS_Common.h \ 36 | header/GRS_SharedMemory.h 37 | unix { 38 | target.path = /usr/lib 39 | INSTALLS += target 40 | } 41 | -------------------------------------------------------------------------------- /GRS_Pro/GRS_Core/header/GRS_SharedMemory.h: -------------------------------------------------------------------------------- 1 | #ifndef GRS_SHAREDMEMORY_H 2 | #define GRS_SHAREDMEMORY_H 3 | 4 | #include "ITP_Interface.h" 5 | 6 | #if defined(__cplusplus) 7 | extern "C" 8 | { 9 | #endif 10 | 11 | 12 | /* 13 | * 共享内存 14 | */ 15 | #ifdef SHAREDMEMORY_GLOBALS 16 | #define SHAREDMEMORY_EXT 17 | #else 18 | #define SHAREDMEMORY_EXT extern 19 | #endif 20 | 21 | SHAREDMEMORY_EXT ITP_InputData *pInputData; // 参数输入共享内存 22 | SHAREDMEMORY_EXT ITP_OutputData *pOutputData; // 数据输出共享内存(只读) 23 | SHAREDMEMORY_EXT ITP_MotSetData *pMotSetData; // 运动参数共享内存 24 | 25 | 26 | /* 27 | * @brief 共享内存初始化函数和清除函数完成 28 | * @author luhuadong 29 | * @date 20160119 30 | */ 31 | int G_SharedMemoryInit(); 32 | void G_SharedMemoryCleanup(); 33 | 34 | 35 | #if defined(__cplusplus) 36 | } 37 | #endif 38 | 39 | #endif // GRS_SHAREDMEMORY_H 40 | -------------------------------------------------------------------------------- /GRS_Pro/GRS_Core/header/ProData_CoorOp.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef DataManage_CoorOp_H 3 | #define DataManage_CoorOp_H 4 | 5 | 6 | //#include "ITP_Interface.h" 7 | #include "ITP_Interface.h" 8 | 9 | 10 | 11 | 12 | #if defined(__cplusplus) 13 | extern "C" 14 | { 15 | #endif 16 | 17 | 18 | //用户坐标系创建 pPoseX1 为原点, pPoseX2 为X轴正方向, pPoseY1 表示Y轴方向, pUserCoor 为输出的用户坐标系 19 | //int DataManage_CreateUserCoordinate(ITP_Pose *pPoseX1,ITP_Pose *pPoseX2,ITP_Pose *pPoseY1,ITP_Pose *pUserCoor); 20 | int ProData_CreateUserCoord(ITP_Pose *pPoseX1,ITP_Pose *pPoseX2,ITP_Pose *pPoseY1,ITP_Pose *pUserCoor); 21 | 22 | //工具坐标系创建 numPos>=4, pPose 为点指针数组( numPos 个), pToolPose 为 pPose 相对与法兰盘的工具偏移量(为0时表示法兰盘位置) 23 | //pElongZ 指向工具的Z轴反方向, pElongX 指向工具的X轴反方向, pToolCoor 为相对与法兰盘的工具坐标系偏移 24 | //int DataManage_CreateToolCoordinate(int numPos,ITP_Pose *pPose,ITP_Pose *pToolPose,ITP_Pose *pElongZ,ITP_Pose *pElongX,ITP_Pose *pToolCoor); 25 | int ProData_CreateToolCoord(int numPos,ITP_Pose *pPose,ITP_Pose *pToolPose,ITP_Pose *pElongZ,ITP_Pose *pElongX,ITP_Pose *pToolCoor); 26 | 27 | 28 | #if defined(__cplusplus) 29 | } 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /GRS_Pro/GRS_Core/header/ProData_Kinematic.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef KINEMATIC_H 3 | #define KINEMATIC_H 4 | 5 | 6 | //#include "ITP_Interface.h" 7 | #include "ITP_Interface.h" 8 | 9 | #if defined(__cplusplus) 10 | extern "C" 11 | { 12 | #endif 13 | 14 | 15 | 16 | void Kinematic_CreateRotationMatrix(double mat[4][4],double a,double alpha,double d,double theta); 17 | 18 | void Kinematic_MultiplyMatrix(double matOutput[4][4],double matLeft[4][4],double matRight[4][4]); 19 | 20 | int Kinematic__mat4_inv(double a[4][4],double ainv[4][4]); 21 | 22 | int Kinematics_XYZToQuat(double *pXYZ,ITP_Orient *quat); 23 | int Kinematics_XYZToMat(double *pXYZ, double m[4][4]); 24 | int Kinematics_Mat2xyz(double m[4][4], ITP_EulerXYZ *Exyz); 25 | int Kinematics_MatToQuat(double m[4][4], ITP_Orient *q); 26 | int Kinematics_Quat2Mat(ITP_Orient *q, ITP_Pos *pPosition,double m[4][4]); 27 | 28 | 29 | #if defined(__cplusplus) 30 | } 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /GRS_Pro/GRS_Core/header/ProData_Quaternion.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ITP_Quaternion_H 3 | #define ITP_Quaternion_H 4 | 5 | 6 | //四元组运算,插补/插值 7 | //#include "ITP_Interface.h" 8 | #include "ITP_Interface.h" 9 | 10 | 11 | 12 | #if defined(__cplusplus) 13 | extern "C" 14 | { 15 | #endif 16 | 17 | 18 | 19 | int ITPQuaternion_Inv(ITP_Orient *pQuat,ITP_Orient *pOutQuat);//求逆 20 | 21 | void ITPQuaternion_RotatePoint(ITP_Orient *pQuat,ITP_Pos *pPoint,ITP_Pos *pOutputPoint); 22 | 23 | void ITPQuaternion_Normalize(ITP_Orient *pQuat,ITP_Orient *pOutQuat); 24 | 25 | int ITPQuaternion_Mult(ITP_Orient *pLeftQuat,ITP_Orient *pRightQuat,ITP_Orient *pOutQuat);//求积 26 | 27 | void ITPQuaternion_CreateQuat(double angle,ITP_Vecter *pVecter,ITP_Orient *pOutQuat); 28 | 29 | //angle旋转角度,pVecter旋转方向,pQuat初始坐标(注:s应该为0),pOutQuat输出四元组 30 | int ITPQuaternion_Rotate(double angle,ITP_Vecter *pVecter,ITP_Orient *pQuat,ITP_Orient *pOutQuat);//求旋转后的四元组 31 | 32 | double ITPQuaternion_GetCornerOfQuat(ITP_Orient *pQuat1,ITP_Orient *pQuat2); 33 | int ITPQuaternion_InterpolateTime(double dt,int flagShortestPath,ITP_Orient *pQuat1,ITP_Orient *pQuat2,ITP_Orient *pOutQuat); 34 | //int ITPQuaternion_InterpolateAngle(double angle,int flagShortestPath,ITP_Orient *pQuat1,ITP_Orient *pQuat2,ITP_Orient *pOutQuat); 35 | #if defined(__cplusplus) 36 | } 37 | #endif 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /GRS_Pro/GRS_Core/source/GRS_Common.cpp: -------------------------------------------------------------------------------- 1 | // 定义SYSTEM_GLOBALS中声明的变量 2 | #define SYSTEM_GLOBALS 3 | 4 | // 定义PROGRAMDATA_GLOBALS中声明的变量 5 | #define PROGRAMDATA_GLOBALS 6 | 7 | // 定义JOGGING_GLOBALS中声明的变量 8 | #define JOGGING_GLOBALS 9 | 10 | // 定义PROGRAMDATA_GLOBALS中声明的变量 11 | #define PROGRAMDATA_GLOBALS 12 | 13 | #include "GRS_Common.h" 14 | 15 | #include 16 | 17 | void joggingInit() 18 | { 19 | /* ******************** 最大速度定义 ********************* */ 20 | MaxSpeed_Joint[0] = ITP_angle2radian(156); // 六个关节轴的最大速度(单位:度每秒)[156 140 156 270 180 430] 21 | MaxSpeed_Joint[1] = ITP_angle2radian(140); 22 | MaxSpeed_Joint[2] = ITP_angle2radian(156); 23 | MaxSpeed_Joint[3] = ITP_angle2radian(270); 24 | MaxSpeed_Joint[4] = ITP_angle2radian(180); 25 | MaxSpeed_Joint[5] = ITP_angle2radian(430); 26 | MaxSpeed_Linear = 1500; // 线性运动最大速度(单位:毫米每秒)1500 27 | MaxSpeed_Reorient = ITP_angle2radian(180); // 重定向最大速度(单位:毫米每秒)1200,这里设为180度每秒 28 | 29 | JoggingSpeedRate = 0.5; // 手动操纵的最大速度倍率 30 | SysSpeedRate = 0.5; // 机器人系统的速度倍率 31 | 32 | /* ************* 以下是手动操纵界面中用到的结构体(初始化) ************* */ 33 | joggingPar.mechanicalUnit = Jogging::PAR_ROB_1; // 机械单元默认选择ROB_1 34 | joggingPar.absoluteAccuracy = Jogging::PAR_OFF; // 绝对精度默认选择OFF 35 | joggingPar.motionMode = Jogging::PAR_AXIS1_6; // 运动模式默认选择AXIS1_6(关节运动模式) 36 | joggingPar.coordinateSystem = Jogging::PAR_BASE;// 坐标系默认选择BASE(基坐标)【注意:当运动模式为AXIS1_6时该选项无效】 37 | joggingPar.increment = Jogging::PAR_NONE; // 增量默认选择NONE 38 | joggingPar.maxSpeed = ITP_MaxSpeed; // 手动操作的最大速度(12000 mm/min) 39 | joggingPar.curSpeed = 0.0; // 手动操作的当前速度(单位已转换) 40 | 41 | SW_Increment = SW_OFF; // 默认关闭增量开关 42 | incVal[Jogging::PAR_NONE].axis = 0.0; // (rad) 无 43 | incVal[Jogging::PAR_NONE].linear = 0.0; // (mm) 44 | incVal[Jogging::PAR_NONE].reorient = 0.0; // (rad) 45 | incVal[Jogging::PAR_SMALL].axis = 0.0001; // (rad) 小 46 | incVal[Jogging::PAR_SMALL].linear = 0.005; // (mm) 47 | incVal[Jogging::PAR_SMALL].reorient = 0.0005; // (rad) 48 | incVal[Jogging::PAR_MEDIUM].axis = 0.0004; // (rad) 中 49 | incVal[Jogging::PAR_MEDIUM].linear = 1.0; // (mm) 50 | incVal[Jogging::PAR_MEDIUM].reorient= 0.004; // (rad) 51 | //incVal[Jogging::PAR_LARGE].axis = 0.0025; // (rad) 大 52 | incVal[Jogging::PAR_LARGE].axis = 0.025; // (rad) 大 53 | incVal[Jogging::PAR_LARGE].linear = 5.0; // (mm) 54 | incVal[Jogging::PAR_LARGE].reorient = 0.009; // (rad) 55 | incVal[Jogging::PAR_USER] = incVal[Jogging::PAR_SMALL]; // 用户增量的缺省值等于小增量的值 56 | } 57 | 58 | void programDataInit() 59 | { 60 | // tooldata: robhold, tframe, tload 61 | defaultTool0 = {1, {{0,0,0}, {1,0,0,0}}, {-1, {0,0,0}, {1,0,0,0}, 0, 0, 0}}; 62 | 63 | // wobjdata: robhold, ufprog, ufmec, uframe, oframe 64 | decode_string ufmecStr = {""}; 65 | defaultWobj0 = {0, 1, ufmecStr, {{0,0,0}, {1,0,0,0}}, {{0,0,0}, {1,0,0,0}}}; 66 | 67 | // loaddata: mass, cog, aom, ix, iy, iz 68 | defaultLoad0 = {0, {0,0,0}, {1,0,0,0}, 0, 0, 0}; 69 | 70 | G_CurToolData.dataType = D_DATATYPE_TOOLDATA; 71 | strcpy(G_CurToolData.dataProperty.typeName, "tool0"); 72 | G_CurToolData.dataValue.tooldataData = defaultTool0; 73 | 74 | G_CurWobjData.dataType = D_DATATYPE_WOBJDATA; 75 | strcpy(G_CurWobjData.dataProperty.typeName, "wobj0"); 76 | G_CurWobjData.dataValue.wobjdataData = defaultWobj0; 77 | 78 | G_CurLoadData.dataType = D_DATATYPE_LOADDATA; 79 | strcpy(G_CurLoadData.dataProperty.typeName, "load0"); 80 | G_CurLoadData.dataValue.loaddataData = defaultLoad0; 81 | } 82 | 83 | /* 84 | * Global functions as follows: 85 | */ 86 | int G_CommonInit() 87 | { 88 | // 注册一个自定义事件 89 | myCustomEvent = (QEvent::Type)QEvent::registerEventType(5000); 90 | 91 | // G_SysName = QHostInfo::localHostName(); 92 | G_ControllerName = QString("GSK_RB08B"); 93 | 94 | // 为一些全局参数设置初始值,后续会增加关机保存当前参数的功能,可以从XML或INI文件中读取参数信息 95 | G_OperatingMode = OM_Auto; 96 | G_ControllerStatus = CS_MotorOff; 97 | G_ProductionStatus = PS_Stopped; 98 | G_SpeedScaleFactor = 0.2; 99 | 100 | joggingInit(); 101 | programDataInit(); 102 | 103 | return 0; 104 | } 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /GRS_Pro/GRS_Core/source/GRS_SharedMemory.cpp: -------------------------------------------------------------------------------- 1 | #define SHAREDMEMORY_GLOBALS 2 | #include "GRS_SharedMemory.h" 3 | #include 4 | 5 | #ifdef Q_OS_LINUX 6 | #include 7 | #include 8 | #include 9 | 10 | #elif defined(Q_OS_WIN) 11 | #include 12 | #define pwstr_size 32 13 | 14 | //存放文件映射对象的句柄,因为释放时需要用到,所以做成全局变量。 15 | static HANDLE hFileMapping_InputData; 16 | static HANDLE hFileMapping_OutputData; 17 | static HANDLE hFileMapping_MotSetData; 18 | 19 | #endif 20 | 21 | typedef enum{ 22 | SHM_InputData, 23 | SHM_OutputData, 24 | SHM_MotSetData 25 | }SharedMemoryTypes; 26 | 27 | 28 | #ifdef Q_OS_LINUX 29 | void getSharedMemory_linux(SharedMemoryTypes type, void **pSharedMemory) 30 | { 31 | int shmid = 0; 32 | int shmflg = 0; 33 | 34 | // Open a shared memory, not create. 35 | switch (type) { 36 | case SHM_InputData: 37 | shmid = shmget(ITP_Key_InputShareMem, sizeof(ITP_InputData), 0666); 38 | break; 39 | case SHM_OutputData: 40 | { // read only 41 | shmid = shmget(ITP_Key_OutputShareMem, sizeof(ITP_OutputData), 0444); 42 | shmflg = SHM_RDONLY; 43 | } 44 | break; 45 | case SHM_MotSetData: 46 | shmid = shmget(ITP_Key_ParaShareMem, sizeof(ITP_MotSetData), 0666); 47 | break; 48 | default: 49 | shmid = -1; 50 | break; 51 | } 52 | 53 | // Attache the shared memory segment to the address space of the calling process. 54 | if(shmid > 0) {*pSharedMemory = shmat(shmid, NULL, shmflg);} 55 | else {*pSharedMemory = NULL;} 56 | } 57 | #elif defined(Q_OS_WIN) 58 | void getSharedMemory_win(SharedMemoryTypes type, void **pSharedMemory) 59 | { 60 | char *cstr; 61 | DWORD dwDesiredAccess = FILE_MAP_READ | FILE_MAP_WRITE; 62 | HANDLE *handle; 63 | 64 | switch (type) { 65 | case SHM_InputData: 66 | { 67 | cstr = "ITP_ShareMem_InputData"; 68 | handle = &hFileMapping_InputData; 69 | } 70 | break; 71 | case SHM_OutputData: 72 | { 73 | cstr = "ITP_ShareMem_OutputData"; 74 | dwDesiredAccess = FILE_MAP_READ; 75 | handle = &hFileMapping_OutputData; 76 | } 77 | break; 78 | case SHM_MotSetData: 79 | { 80 | cstr = "ITP_ShareMem_MotSetData"; 81 | handle = &hFileMapping_MotSetData; 82 | } 83 | break; 84 | default: 85 | *pSharedMemory = NULL; 86 | return; 87 | } 88 | 89 | /* ***** Type (char *) switch to type (wchar_t *) ***** */ 90 | size_t cstr_len = strlen(cstr); 91 | size_t n = (size_t)MultiByteToWideChar(CP_ACP,0,(const char*)cstr,(int)cstr_len,NULL,0); 92 | wchar_t pwstr[pwstr_size]; 93 | if(n>=pwstr_size) n = pwstr_size-1; 94 | 95 | MultiByteToWideChar(CP_ACP,0,(const char*)cstr,(int)cstr_len,pwstr,(int)n); 96 | pwstr[n]=0; 97 | /* ***** switch over ***** */ 98 | 99 | //尝试打开指定命名的共享内存,获取相应对象的句柄 100 | *handle = OpenFileMapping(dwDesiredAccess, 0, pwstr); 101 | 102 | if(NULL != *handle)//判断句柄是否指向有效的命名对象,否则初始化失败 103 | { 104 | // 将文件映射内核对象handle映射到当前应用程序的进程地址 105 | *pSharedMemory = MapViewOfFile(*handle, dwDesiredAccess, 0, 0, 0); 106 | } 107 | else {*pSharedMemory = NULL;} 108 | } 109 | #endif 110 | 111 | /* 112 | * @brief 共享内存初始化函数 113 | * 114 | * @param 无 115 | * 116 | * @return 成功返回0,失败返回1 117 | * 118 | * @description 平台无关的共享内存初始化函数,该版本只支持LINUX和WINDOWS两类操作系统, 119 | * 用于打开插补模块提供的共享内存,并连接到本地全局变量。 120 | */ 121 | int G_SharedMemoryInit() 122 | { 123 | #ifdef Q_OS_LINUX 124 | getSharedMemory_linux(SHM_InputData, (void **)&pInputData); 125 | getSharedMemory_linux(SHM_OutputData, (void **)&pOutputData); 126 | getSharedMemory_linux(SHM_MotSetData, (void **)&pMotSetData); 127 | 128 | #elif defined(Q_OS_WIN) 129 | getSharedMemory_win(SHM_InputData, (void **)&pInputData); 130 | getSharedMemory_win(SHM_OutputData, (void **)&pOutputData); 131 | getSharedMemory_win(SHM_MotSetData, (void **)&pMotSetData); 132 | 133 | #else 134 | // This version only support LINUX and WINDOWS operating system. 135 | qDebug("Sorry, the application don't suit for your OS."); 136 | return 1; 137 | #endif 138 | 139 | // As long as one of above shared memory attached unsuccessfully, it would be return 1, 140 | // i.e, those shared memorys initialize failed. You have to recall this function if you don't want to exit. 141 | if(pInputData == NULL || pOutputData == NULL || pMotSetData == NULL) 142 | { 143 | G_SharedMemoryCleanup(); 144 | qDebug("Shared Memory Initialization Failed!"); 145 | return 1; 146 | } 147 | return 0; 148 | } 149 | 150 | void G_SharedMemoryCleanup() 151 | { 152 | #ifdef Q_QS_LINUX 153 | if(NULL != pInputData) {shmdt(pInputData);} 154 | if(NULL != pOutputData) {shmdt(pOutputData);} 155 | if(NULL != pMotSetData) {shmdt(pMotSetData);} 156 | 157 | return ; 158 | 159 | #elif defined(Q_OS_WIN) 160 | if(NULL != pInputData) {UnmapViewOfFile(pInputData);} 161 | if(NULL != pOutputData) {UnmapViewOfFile(pOutputData);} 162 | if(NULL != pMotSetData) {UnmapViewOfFile(pMotSetData);} 163 | 164 | if(NULL != hFileMapping_InputData) 165 | { 166 | CloseHandle(hFileMapping_InputData); 167 | hFileMapping_InputData = NULL; 168 | } 169 | if(NULL != hFileMapping_OutputData) 170 | { 171 | CloseHandle(hFileMapping_OutputData); 172 | hFileMapping_OutputData = NULL; 173 | } 174 | if(NULL != hFileMapping_MotSetData) 175 | { 176 | CloseHandle(hFileMapping_MotSetData); 177 | hFileMapping_MotSetData = NULL; 178 | } 179 | return ; 180 | #endif 181 | } 182 | -------------------------------------------------------------------------------- /GRS_Pro/GRS_Core/source/ProData_CoorOp.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "ProData_CoorOp.h" 4 | 5 | #include "ProData_Quaternion.h" 6 | #include "ProData_Kinematic.h" 7 | #include 8 | 9 | 10 | void DataManage_PosNormalize(ITP_Pos *pPos,ITP_Pos *pOutPos) 11 | { 12 | double size; 13 | size = sqrt(ITP_Square(pPos->x) + ITP_Square(pPos->y) + ITP_Square(pPos->z)); 14 | if (ITP_ABS(size-1)x = pPos->x * size; 21 | pOutPos->y = pPos->y * size; 22 | pOutPos->z = pPos->z * size; 23 | 24 | } 25 | 26 | 27 | 28 | //用户坐标系创建 29 | //x1为原点坐标,x1到x2为x轴正方向,x1到y1为Y轴正方向(注意:基坐标系是哪个) 30 | int ProData_CreateUserCoord(ITP_Pose *pPoseX1,ITP_Pose *pPoseX2,ITP_Pose *pPoseY1,ITP_Pose *pUserCoor) 31 | { 32 | ITP_Pos posX2,posX1,posXRotate,posZ1,posZ,posY1,posZRotate; 33 | ITP_Orient rot1,rot2,rot; 34 | double angle,sinA; 35 | pUserCoor->trans=pPoseX1->trans; 36 | 37 | posX1.x=1; 38 | posX1.y=0; 39 | posX1.z=0; 40 | posX2.x=pPoseX2->trans.x-pPoseX1->trans.x; 41 | posX2.y=pPoseX2->trans.y-pPoseX1->trans.y; 42 | posX2.z=pPoseX2->trans.z-pPoseX1->trans.z; 43 | DataManage_PosNormalize(&posX2,&posX2);//单位化 44 | 45 | posXRotate.x=posX1.y*posX2.z-posX1.z*posX2.y;//posXRotate表示旋转轴向量 46 | posXRotate.y=posX1.z*posX2.x-posX1.x*posX2.z; 47 | posXRotate.z=posX1.x*posX2.y-posX1.y*posX2.x; 48 | angle=acos((posX1.x*posX2.x+posX1.y*posX2.y+posX1.z*posX2.z)/(sqrt(posX2.x*posX2.x+posX2.y*posX2.y+posX2.z*posX2.z))); 49 | 50 | //构建四元组(X轴)(旋转到X轴平行且同向) 51 | angle=angle/2; 52 | rot1.s=cos(angle); 53 | sinA=sin(angle); 54 | rot1.x=posXRotate.x*sinA; 55 | rot1.y=posXRotate.y*sinA; 56 | rot1.z=posXRotate.z*sinA; 57 | 58 | posZ1.x=0; 59 | posZ1.y=0; 60 | posZ1.z=1;//旋转后Z轴的坐标系 61 | 62 | //posZ为posZ1在原坐标系的坐标 63 | ITPQuaternion_RotatePoint(&rot1,&posZ1,&posZ); 64 | 65 | posY1.x=pPoseY1->trans.x-pPoseX1->trans.x; 66 | posY1.y=pPoseY1->trans.y-pPoseX1->trans.y; 67 | posY1.z=pPoseY1->trans.z-pPoseX1->trans.z; 68 | DataManage_PosNormalize(&posY1,&posY1); 69 | 70 | posZ1.x=posX2.y*posY1.z-posX2.z*posY1.y;//这里的posZ1表示工件坐标系Z在原始坐标系的向量 71 | posZ1.y=posX2.z*posY1.x-posX2.x*posY1.z; 72 | posZ1.z=posX2.x*posY1.y-posX2.y*posY1.x; 73 | DataManage_PosNormalize(&posZ1,&posZ1); 74 | 75 | posZRotate.x=posZ.y*posZ1.z-posZ.z*posZ1.y; 76 | posZRotate.y=posZ.z*posZ1.x-posZ.x*posZ1.z; 77 | posZRotate.z=posZ.x*posZ1.y-posZ.y*posZ1.x; 78 | angle=acos((posZ.x*posZ1.x+posZ.y*posZ1.y+posZ.z*posZ1.z)/(sqrt(posZ.x*posZ.x+posZ.y*posZ.y+posZ.z*posZ.z)*sqrt(posZ1.x*posZ1.x+posZ1.y*posZ1.y+posZ1.z*posZ1.z))); 79 | 80 | //构建四元组(Z轴)(旋转到Z轴平行且同向) 81 | angle=angle/2; 82 | rot2.s=cos(angle); 83 | sinA=sin(angle); 84 | rot2.x=posZRotate.x*sinA; 85 | rot2.y=posZRotate.y*sinA; 86 | rot2.z=posZRotate.z*sinA; 87 | 88 | ITPQuaternion_Mult(&rot2,&rot1,&rot); 89 | 90 | ITPQuaternion_Normalize(&rot,&rot); 91 | pUserCoor->rot=rot; 92 | return 1; 93 | } 94 | 95 | 96 | //x1为起点坐标,x1到x2为x轴正方向,x1到z1为Z轴正方向(注意:基坐标系是哪个) 97 | int DataManage_CalToolQuaternion(ITP_Pose *pPoseP,ITP_Pose *pPoseZ1,ITP_Pose *pPoseX1,ITP_Pose *pToolCoor) 98 | { 99 | ITP_Pos posZ2,posZ1,posZRotate,posX1,posY1,posY,posYRotate; 100 | ITP_Orient rot1,rot2,rot; 101 | double angle,sinA; 102 | 103 | if (pPoseZ1==0) 104 | { 105 | return 0; 106 | } 107 | posZ1.x=0; //由Z开始 108 | posZ1.y=0; 109 | posZ1.z=1; 110 | posZ2.x=pPoseP->trans.x-pPoseZ1->trans.x; 111 | posZ2.y=pPoseP->trans.y-pPoseZ1->trans.y; 112 | posZ2.z=pPoseP->trans.z-pPoseZ1->trans.z; 113 | //posZ2.x=pPoseZ1->trans.x-pPoseP->trans.x; 114 | //posZ2.y=pPoseZ1->trans.y-pPoseP->trans.y; 115 | //posZ2.z=pPoseZ1->trans.z-pPoseP->trans.z; 116 | DataManage_PosNormalize(&posZ2,&posZ2);//单位化 117 | 118 | posZRotate.x=posZ1.y*posZ2.z-posZ1.z*posZ2.y;//posXRotate表示旋转轴向量 119 | posZRotate.y=posZ1.z*posZ2.x-posZ1.x*posZ2.z; 120 | posZRotate.z=posZ1.x*posZ2.y-posZ1.y*posZ2.x; 121 | angle=acos((posZ1.x*posZ2.x+posZ1.y*posZ2.y+posZ1.z*posZ2.z)/(sqrt(posZ2.x*posZ2.x+posZ2.y*posZ2.y+posZ2.z*posZ2.z))); 122 | 123 | //构建四元组(X轴)(旋转到X轴平行且同向) 124 | angle=angle/2; 125 | rot1.s=cos(angle); 126 | sinA=sin(angle); 127 | rot1.x=posZRotate.x*sinA; 128 | rot1.y=posZRotate.y*sinA; 129 | rot1.z=posZRotate.z*sinA; 130 | 131 | if (pPoseX1==0) 132 | { 133 | ITPQuaternion_Normalize(&rot1,&rot1); 134 | pToolCoor->rot=rot1;//相对与基坐标系的旋转四元组 135 | } 136 | else 137 | { 138 | posY1.x=0; 139 | posY1.y=1; 140 | posY1.z=0;//旋转后Y轴的坐标系 141 | ITPQuaternion_RotatePoint(&rot1,&posY1,&posY); 142 | 143 | posX1.x=pPoseP->trans.x-pPoseX1->trans.x; 144 | posX1.y=pPoseP->trans.y-pPoseX1->trans.y; 145 | posX1.z=pPoseP->trans.z-pPoseX1->trans.z; 146 | DataManage_PosNormalize(&posX1,&posX1); 147 | 148 | posY1.x=posZ2.y*posX1.z-posZ2.z*posX1.y;//这里的posZ1表示工件坐标系Z在原始坐标系的向量 149 | posY1.y=posZ2.z*posX1.x-posZ2.x*posX1.z; 150 | posY1.z=posZ2.x*posX1.y-posZ2.y*posX1.x; 151 | DataManage_PosNormalize(&posY1,&posY1); 152 | 153 | posYRotate.x=posY.y*posY1.z-posY.z*posY1.y; 154 | posYRotate.y=posY.z*posY1.x-posY.x*posY1.z; 155 | posYRotate.z=posY.x*posY1.y-posY.y*posY1.x; 156 | angle=acos((posY.x*posY1.x+posY.y*posY1.y+posY.z*posY1.z)/(sqrt(posY.x*posY.x+posY.y*posY.y+posY.z*posY.z)*sqrt(posY1.x*posY1.x+posY1.y*posY1.y+posY1.z*posY1.z))); 157 | 158 | //构建四元组(Z轴)(旋转到Z轴平行且同向) 159 | angle=angle/2; 160 | rot2.s=cos(angle); 161 | sinA=sin(angle); 162 | rot2.x=posYRotate.x*sinA; 163 | rot2.y=posYRotate.y*sinA; 164 | rot2.z=posYRotate.z*sinA; 165 | 166 | ITPQuaternion_Mult(&rot2,&rot1,&rot); 167 | ITPQuaternion_Normalize(&rot,&rot); 168 | pToolCoor->rot=rot; 169 | } 170 | 171 | return 1; 172 | } 173 | 174 | //根据工具坐标系在基坐标的pose和工具偏移pose计算TCP坐标 175 | void DataManage_ToolPoseToTCP(ITP_Pose *pPose,ITP_Pose *pToolPose,ITP_Pose *pTCPPose) 176 | { 177 | double matTool[4][4],matTool_inv[4][4],matPose[4][4],matTCP[4][4]; 178 | Kinematics_Quat2Mat(&pPose->rot,&pPose->trans,matPose); 179 | Kinematics_Quat2Mat(&pToolPose->rot,&pToolPose->trans,matTool); 180 | Kinematic__mat4_inv(matTool,matTool_inv); 181 | Kinematic_MultiplyMatrix(matTCP,matPose,matTool_inv);//得出TCP点的矩阵 182 | 183 | pTCPPose->trans.x=matTCP[0][3]; //x 184 | pTCPPose->trans.y=matTCP[1][3]; //y 185 | pTCPPose->trans.z=matTCP[2][3]; //z 186 | Kinematics_MatToQuat(matTCP,&pTCPPose->rot); 187 | } 188 | 189 | void DataManage_PoseToToolOffset(ITP_Pose *pTCPPose,ITP_Pose *pToolPose,ITP_Pose *pToolCoor) 190 | { 191 | double matTool[4][4],matTCP[4][4],matTCP_inv[4][4],matToolOffset[4][4]; 192 | Kinematics_Quat2Mat(&pTCPPose->rot,&pTCPPose->trans,matTCP); 193 | Kinematics_Quat2Mat(&pToolPose->rot,&pToolPose->trans,matTool); 194 | Kinematic__mat4_inv(matTCP,matTCP_inv); 195 | 196 | Kinematic_MultiplyMatrix(matToolOffset,matTCP_inv,matTool); 197 | 198 | pToolCoor->trans.x=matToolOffset[0][3]; //x 199 | pToolCoor->trans.y=matToolOffset[1][3]; //y 200 | pToolCoor->trans.z=matToolOffset[2][3]; //z 201 | Kinematics_MatToQuat(matToolOffset,&pToolCoor->rot); 202 | } 203 | 204 | 205 | //返回:0表示无解,1表示有解 206 | //工具坐标系创建,numPos为点的个数,pToolPose表示当前选取点所选取的工具坐标系,如果pToolPose为0表示TCP的点 207 | int ProData_CreateToolCoord(int numPos,ITP_Pose *pPose,ITP_Pose *pToolPose,ITP_Pose *pElongZ,ITP_Pose *pElongX,ITP_Pose *pToolCoor) 208 | { 209 | double p1_x,p1_y,p1_z,p2_x,p2_y,p2_z,p3_x,p3_y,p3_z,p4_x,p4_y,p4_z; 210 | double a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3; 211 | double x,y,z; 212 | ITP_Pose tcpPose,toolPose; 213 | p1_x=pPose[0].trans.x; 214 | p1_y=pPose[0].trans.y; 215 | p1_z=pPose[0].trans.z; 216 | 217 | p2_x=pPose[1].trans.x; 218 | p2_y=pPose[1].trans.y; 219 | p2_z=pPose[1].trans.z; 220 | 221 | p3_x=pPose[2].trans.x; 222 | p3_y=pPose[2].trans.y; 223 | p3_z=pPose[2].trans.z; 224 | 225 | p4_x=pPose[3].trans.x; 226 | p4_y=pPose[3].trans.y; 227 | p4_z=pPose[3].trans.z; 228 | 229 | a1 =-2*p1_x+2*p2_x; 230 | b1 =-2*p1_y+2*p2_y; 231 | c1 =-2*p1_z+2*p2_z; 232 | d1 =ITP_Square(p1_x)-ITP_Square(p2_z)+ITP_Square(p1_y)-ITP_Square(p2_y)+ITP_Square(p1_z)-ITP_Square(p2_x); 233 | a2 =-2*p1_x+2*p3_x; 234 | b2 =-2*p1_y+2*p3_y; 235 | c2 =-2*p1_z+2*p3_z; 236 | d2 =ITP_Square(p1_x)+ITP_Square(p1_y)+ITP_Square(p1_z)-ITP_Square(p3_x)-ITP_Square(p3_y)-ITP_Square(p3_z); 237 | a3 =-2*p1_x+2*p4_x; 238 | b3 =-2*p1_y+2*p4_y; 239 | c3 =-2*p1_z+2*p4_z; 240 | d3 =ITP_Square(p1_x)-ITP_Square(p4_z)+ITP_Square(p1_y)-ITP_Square(p4_y)+ITP_Square(p1_z)-ITP_Square(p4_x); 241 | 242 | 243 | if (a1==0 || (b2*a1-a2*b1)==0 || ITP_ABS(a3*b1*c2-a3*c1*b2-b3*a1*c2+b3*a2*c1+c3*a1*b2-c3*a2*b1) 2 | 3 | qss/GR-HMI.qss 4 | images/GR-HMI-icon.png 5 | images/background.png 6 | images/Jogging_Mechanical_Unit_Robot.png 7 | images/Jogging_Motion_Mode_Axis.png 8 | images/Jogging_Motion_Mode_Linear.png 9 | images/Jogging_Motion_Mode_Reorient.png 10 | images/systemButton/close.png 11 | images/systemButton/close_hover.png 12 | images/systemButton/close_pressed.png 13 | images/systemButton/min.png 14 | images/systemButton/min_hover.png 15 | images/systemButton/min_pressed.png 16 | 17 | 18 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/GR_HMI.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2016-01-15T14:05:14 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui 8 | QT += network 9 | QT += xml 10 | 11 | greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 12 | 13 | TARGET = GR_HMI 14 | TEMPLATE = app 15 | 16 | ROOTDIR = $${PWD}/../ 17 | 18 | INCLUDEPATH += \ 19 | $${ROOTDIR}/GRS_Core/header \ 20 | $${ROOTDIR}/GR_HMI/header \ 21 | $${ROOTDIR}/robDecodePrg/header/decode_core \ 22 | $${ROOTDIR}/robDecodePrg/header/decode_prg 23 | 24 | LIBS += -L $${ROOTDIR}/GR_HMI/lib -lrobDecodePrg -lGRS_Core 25 | 26 | OBJECTS_DIR = obj/ 27 | 28 | DESTDIR = bin/ 29 | 30 | SOURCES += \ 31 | source/main.cpp \ 32 | source/hmiapp.cpp \ 33 | source/mainwidget.cpp \ 34 | source/panelbutton.cpp \ 35 | source/panelwidget.cpp \ 36 | source/screenwidget.cpp \ 37 | source/systembutton.cpp \ 38 | source/virtualbutton.cpp \ 39 | source/quicksetbar.cpp \ 40 | source/mainmenuwidget.cpp \ 41 | source/CustomWidget/simplepage.cpp \ 42 | source/Page_Jogging/joggingpage.cpp \ 43 | source/CustomWidget/operatingbar.cpp \ 44 | source/CustomThread/updateposedatathread.cpp \ 45 | source/Page_Jogging/simplesettingpage.cpp \ 46 | source/Page_Jogging/tablesettingpage.cpp \ 47 | source/Page_Jogging/alignpage.cpp \ 48 | source/Page_Jogging/gotopage.cpp \ 49 | source/Page_ProgramData/programdatapage.cpp 50 | 51 | HEADERS += \ 52 | header/hmiapp.h \ 53 | header/mainwidget.h \ 54 | header/panelbutton.h \ 55 | header/panelwidget.h \ 56 | header/screenwidget.h \ 57 | header/systembutton.h \ 58 | header/virtualbutton.h \ 59 | header/quicksetbar.h \ 60 | header/mainmenuwidget.h \ 61 | header/CustomWidget/simplepage.h \ 62 | header/Page_Jogging/joggingpage.h \ 63 | header/CustomWidget/operatingbar.h \ 64 | header/CustomThread/updateposedatathread.h \ 65 | header/Page_Jogging/simplesettingpage.h \ 66 | header/Page_Jogging/tablesettingpage.h \ 67 | header/Page_Jogging/alignpage.h \ 68 | header/Page_Jogging/gotopage.h \ 69 | header/Page_ProgramData/programdatapage.h 70 | 71 | RESOURCES += \ 72 | resource/styleSheets.qrc \ 73 | resource/images.qrc 74 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/CustomThread/updateposedatathread.h: -------------------------------------------------------------------------------- 1 | #ifndef UPDATEPOSEDATATHREAD_H 2 | #define UPDATEPOSEDATATHREAD_H 3 | 4 | #include 5 | 6 | class UpdatePoseDataThread : public QThread 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit UpdatePoseDataThread(QObject *parent = 0); 11 | ~UpdatePoseDataThread(); 12 | 13 | protected: 14 | void run(); 15 | 16 | signals: 17 | void poseDataUpdated(QString *poseData); 18 | 19 | public slots: 20 | 21 | private: 22 | 23 | }; 24 | 25 | #endif // UPDATEPOSEDATATHREAD_H 26 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/CustomWidget/operatingbar.h: -------------------------------------------------------------------------------- 1 | #ifndef OPERATINGBAR_H 2 | #define OPERATINGBAR_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "GRS_Common.h" 9 | 10 | class OperatingBar : public QWidget 11 | { 12 | Q_OBJECT 13 | public: 14 | explicit OperatingBar(QWidget *parent = 0); 15 | 16 | QButtonGroup *buttonGroup; 17 | 18 | QAbstractButton *firstButton() const; 19 | QAbstractButton *secondButton() const; 20 | QAbstractButton *thirdButton() const; 21 | QAbstractButton *fourthButton() const; 22 | QAbstractButton *fifthButton() const; 23 | 24 | signals: 25 | 26 | public slots: 27 | 28 | private: 29 | void createButtons(); 30 | QWidget *mainWidget; 31 | 32 | }; 33 | 34 | #endif // OPERATINGBAR_H 35 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/CustomWidget/simplepage.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMPLEPAGE_H 2 | #define SIMPLEPAGE_H 3 | 4 | #include 5 | #include 6 | 7 | #include "GRS_Common.h" 8 | 9 | class SimplePage : public QWidget 10 | { 11 | Q_OBJECT 12 | public: 13 | explicit SimplePage(QWidget *parent = 0); 14 | explicit SimplePage(const QString &text, QWidget *parent = 0); 15 | explicit SimplePage(const QIcon &icon, const QString &text, QWidget *parent = 0); 16 | 17 | void setIcon(const QIcon & icon); 18 | void setText(const QString & text); 19 | void setMainLayout(QLayout * layout); // set layout for mainWidget 20 | 21 | int navBarHeight() const; 22 | int mainWidgetHeight() const; 23 | 24 | signals: 25 | 26 | public slots: 27 | 28 | private: 29 | void createWidget(); 30 | void simplePageInit(); 31 | 32 | QWidget *navBar; 33 | QLabel *navIcon; 34 | QLabel *navText; 35 | 36 | QWidget *mainWidget; 37 | 38 | 39 | }; 40 | 41 | #endif // SIMPLEPAGE_H 42 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/Page_Jogging/alignpage.h: -------------------------------------------------------------------------------- 1 | #ifndef ALIGNPAGE_H 2 | #define ALIGNPAGE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "GRS_Common.h" 10 | #include "CustomWidget/simplepage.h" 11 | #include "CustomWidget/operatingbar.h" 12 | 13 | class AlignPage : public SimplePage 14 | { 15 | Q_OBJECT 16 | public: 17 | explicit AlignPage(QWidget *parent = 0); 18 | 19 | OperatingBar *operatingBar; 20 | 21 | signals: 22 | 23 | public slots: 24 | void closeBtnResponded(); 25 | 26 | private: 27 | void createPage(); 28 | 29 | QWidget *tipsWidget; 30 | QLabel *currentKeyLabel; 31 | QLabel *currentValLabel; 32 | QLabel *tipsLabel; 33 | 34 | QWidget *contentWidget; 35 | QLabel *step1Label; 36 | QLabel *coordLabel; 37 | QComboBox *coordComboBox; 38 | QLabel *step2Label; 39 | QPushButton *startBtn; 40 | QLabel *step3Label; 41 | 42 | }; 43 | 44 | #endif // ALIGNPAGE_H 45 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/Page_Jogging/gotopage.h: -------------------------------------------------------------------------------- 1 | #ifndef GOTOPAGE_H 2 | #define GOTOPAGE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "GRS_Common.h" 11 | #include "GRS_SharedMemory.h" 12 | #include "CustomWidget/simplepage.h" 13 | #include "CustomWidget/operatingbar.h" 14 | 15 | class GoToPage : public SimplePage 16 | { 17 | Q_OBJECT 18 | public: 19 | explicit GoToPage(QWidget *parent = 0); 20 | 21 | OperatingBar *operatingBar; 22 | 23 | signals: 24 | 25 | public slots: 26 | void filterBtnResponded(); 27 | void closeBtnResponded(); 28 | 29 | private slots: 30 | void listWidgetClicked(); 31 | void goToPosBtnPressed(); 32 | void goToPosBtnReleased(); 33 | 34 | private: 35 | void createPage(); 36 | void listDataUpdate(); 37 | 38 | QWidget *tipsWidget; 39 | QLabel *mechanicalUnitKeyLabel; // 机械单元 40 | QLabel *mechanicalUnitValLabel; 41 | QLabel *activeToolKeyLabel; // 活动工具 42 | QLabel *activeToolValLabel; 43 | QLabel *activeWobjKeyLabel; // 活动工件 44 | QLabel *activeWobjValLabel; 45 | 46 | QWidget *contentWidget; 47 | QListWidget *robtargetListWidget; // 显示当前任务中的机器人示教点列表 48 | QLabel *activeFilterKeyLabel; // 活动过滤器: XXX 49 | QLabel *activeFilterValLabel; 50 | // 按住“启动装置”(1.Press and hold Enabling Device.) 51 | QLabel *step1Label; 52 | // 按住“转到”按钮,转到位置Px(2.Press and hold Go To button to go to position Px) 53 | QLabel *step2Label; 54 | QPushButton *goToPosBtn; // “转到”按钮 55 | 56 | char mode; // 记录进行“转到”操作前系统的模式 57 | ITP_RobTarget tarRob; // 目标点 58 | QMap map; 59 | 60 | }; 61 | 62 | #endif // GOTOPAGE_H 63 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/Page_Jogging/joggingpage.h: -------------------------------------------------------------------------------- 1 | #ifndef JOGGINGPAGE_H 2 | #define JOGGINGPAGE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include "GRS_Common.h" 14 | #include "GRS_SharedMemory.h" 15 | #include "CustomWidget/simplepage.h" 16 | #include "CustomWidget/operatingbar.h" 17 | #include "CustomThread/updateposedatathread.h" 18 | #include "Page_Jogging/simplesettingpage.h" 19 | #include "Page_Jogging/tablesettingpage.h" 20 | #include "Page_Jogging/alignpage.h" 21 | #include "Page_Jogging/gotopage.h" 22 | 23 | class JoggingPage : public SimplePage 24 | { 25 | Q_OBJECT 26 | public: 27 | explicit JoggingPage(QWidget *parent = 0); 28 | 29 | OperatingBar *operatingBar; 30 | 31 | public slots: 32 | void settingBoxUpdate(); 33 | void updatePoseData(QString *poseData); // 接收线程updatePoseDataThread的信号来更新数据 34 | void displayBoxUpdate(); // 主要用于属性设置子界面设定参数后的更新 20160122 35 | 36 | private slots: 37 | void settingTableClicked(const int, const int); 38 | void positionShowInBtnClicked(); 39 | void orientationFormatBtnClicked(); 40 | void angleUnitBtnClicked(); 41 | // void subPageIsOk(); 42 | void alignBtnClicked(); 43 | void goToBtnClicked(); 44 | 45 | private: 46 | void joggingParInit(); 47 | void centralWidgetInit(); 48 | void createSettingTableItem(); 49 | void createDisplayTableItem(); 50 | 51 | QGroupBox *settingBox; 52 | QTableWidget *settingTable; 53 | 54 | QGroupBox *displayBox; 55 | QTableWidget *displayTable; 56 | QLabel *displayLabel; 57 | QPushButton *positionShowInBtn; 58 | QPushButton *orientationFormatBtn; 59 | QPushButton *angleUnitBtn; 60 | 61 | QStringList *poseKeyItemStrList; // 指向当前位置表第一列(key)的字符串链表 62 | QStringList *poseUnitItemStrList; // 指向当前位置表第三列(unit)的字符串链表 63 | QList poseTabKeyItemList; // 第一列 64 | QList poseTabValItemList; // 第二列 65 | QList poseTabUnitItemList; // 第三列 66 | 67 | UpdatePoseDataThread *updatePoseDataThread; // 实时更新机器人位姿数据的线程 68 | 69 | // 子界面 70 | SimpleSettingPage *motionModePage; 71 | SimpleSettingPage *coordSystemPage; 72 | SimpleSettingPage *incrementPage; 73 | TableSettingPage *toolPage; 74 | TableSettingPage *wobjPage; 75 | AlignPage *alignPage; 76 | GoToPage *goToPage; 77 | }; 78 | 79 | #endif // JOGGINGPAGE_H 80 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/Page_Jogging/simplesettingpage.h: -------------------------------------------------------------------------------- 1 | #ifndef SIMPLESETTINGPAGE_H 2 | #define SIMPLESETTINGPAGE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "GRS_Common.h" 10 | #include "GRS_SharedMemory.h" 11 | 12 | #include "CustomWidget/simplepage.h" 13 | #include "CustomWidget/operatingbar.h" 14 | 15 | class SimpleSettingPage : public SimplePage 16 | { 17 | Q_OBJECT 18 | public: 19 | explicit SimpleSettingPage(Jogging::MANUALSUBWIDGET flag, QWidget *parent = 0); 20 | 21 | OperatingBar *operatingBar; 22 | 23 | signals: 24 | void okBtnClicked(); 25 | 26 | public slots: 27 | void contentWidgetUpdate(int); // 处理该界面的主项目选址区事务,更新显示 28 | 29 | private slots: 30 | void okBtnResponded(); 31 | void cancelBtnResponded(); 32 | 33 | private: 34 | void createPage(); 35 | void initMotionMode(); 36 | void initCoordSystem(); 37 | void initIncrementalMode(); 38 | 39 | Jogging::MANUALSUBWIDGET wFlag; 40 | 41 | QWidget *tipsWidget; 42 | QLabel *currentKeyLabel; 43 | QLabel *currentValLabel; 44 | QLabel *tipsLabel; 45 | 46 | QWidget *contentWidget; 47 | QButtonGroup *btnGroup; 48 | QSize iconSize; 49 | QStringList iconStrList, textStrList; 50 | 51 | }; 52 | 53 | #endif // SIMPLESETTINGPAGE_H 54 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/Page_Jogging/tablesettingpage.h: -------------------------------------------------------------------------------- 1 | #ifndef TABLESETTINGPAGE_H 2 | #define TABLESETTINGPAGE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "GRS_Common.h" 12 | #include "GRS_SharedMemory.h" 13 | #include "CustomWidget/simplepage.h" 14 | #include "CustomWidget/operatingbar.h" 15 | #include "decode_datatype.h" 16 | 17 | class TableSettingPage : public SimplePage 18 | { 19 | Q_OBJECT 20 | public: 21 | explicit TableSettingPage(Jogging::MANUALSUBWIDGET flag, QWidget *parent = 0); 22 | 23 | OperatingBar *operatingBar; 24 | 25 | ProgramData::proData thisData; // 用于保存本页面内的操作,可作为参数传递到子界面 26 | decode_typestruct dataType; 27 | 28 | signals: 29 | void okBtnClicked(); 30 | 31 | public slots: 32 | void tableDataUpdate(); 33 | 34 | private slots: 35 | void okBtnResponded(); 36 | void cancelBtnResponded(); 37 | void tabViewClicked(QModelIndex modelIndex); 38 | 39 | private: 40 | void createPage(); 41 | void updateThisData(); 42 | 43 | Jogging::MANUALSUBWIDGET wFlag; 44 | 45 | QWidget *tipsWidget; 46 | QLabel *currentKeyLabel; 47 | QLabel *currentValLabel; 48 | QLabel *tipsLabel; 49 | 50 | QWidget *contentWidget; 51 | QTableView *tabView; 52 | QStandardItemModel *tabModel; 53 | QLabel *itemCntLabel; 54 | }; 55 | 56 | #endif // TABLESETTINGPAGE_H 57 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/Page_ProgramData/programdatapage.h: -------------------------------------------------------------------------------- 1 | #ifndef PROGRAMDATAPAGE_H 2 | #define PROGRAMDATAPAGE_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "GRS_Common.h" 12 | #include "CustomWidget/simplepage.h" 13 | #include "CustomWidget/operatingbar.h" 14 | 15 | class ProgramDataPage : public SimplePage 16 | { 17 | Q_OBJECT 18 | public: 19 | explicit ProgramDataPage(QWidget *parent = 0); 20 | 21 | OperatingBar *operatingBar; 22 | 23 | signals: 24 | 25 | public slots: 26 | 27 | private: 28 | void createPage(); 29 | 30 | // QWidget *tipsWidget; 31 | QLabel *tipsLabel; 32 | 33 | // QWidget *scopeWidget; 34 | QLabel *scopeKeyLabel; 35 | QLabel *scopeValLabel; 36 | QPushButton *scopeBtn; 37 | 38 | // QWidget *contentWidget; 39 | QTableWidget *contentTable; 40 | 41 | }; 42 | 43 | #endif // PROGRAMDATAPAGE_H 44 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/hmiapp.h: -------------------------------------------------------------------------------- 1 | /* 2 | * 子类化QApplication,为了获取PanelWidget产生的按钮事件。 3 | */ 4 | #ifndef HMIAPP_H 5 | #define HMIAPP_H 6 | 7 | #include 8 | #include "GRS_Common.h" 9 | 10 | class HmiApp : public QApplication 11 | { 12 | public: 13 | HmiApp(int & argc, char ** argv):QApplication(argc, argv){} 14 | 15 | protected: 16 | bool event(QEvent *); 17 | }; 18 | 19 | #endif // HMIAPP_H 20 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/mainmenuwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINMENUWIDGET_H 2 | #define MAINMENUWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #include "GRS_Common.h" 10 | 11 | class MainMenuWidget : public QWidget 12 | { 13 | Q_OBJECT 14 | public: 15 | explicit MainMenuWidget(QWidget *parent = 0); 16 | 17 | QTableWidget *menuTable; 18 | 19 | signals: 20 | 21 | public slots: 22 | void menuTableUpdate(); 23 | 24 | private slots: 25 | // void dontSelectMenuItem(QTableWidgetItem *); 26 | 27 | private: 28 | void createTableItem(); 29 | 30 | 31 | QStringList menuItemNameList; 32 | 33 | }; 34 | 35 | #endif // MAINMENUWIDGET_H 36 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/mainwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWIDGET_H 2 | #define MAINWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "GRS_Common.h" 9 | #include "panelwidget.h" 10 | #include "screenwidget.h" 11 | 12 | class MainWidget : public QWidget 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | MainWidget(QWidget *parent = 0); 18 | ~MainWidget(); 19 | 20 | private slots: 21 | void switchBtnClicked(); 22 | 23 | private: 24 | QHBoxLayout *mainLayout; 25 | 26 | PanelWidget *panelWidget; // 模拟示教器操作面板 27 | ScreenWidget *screenWidget; // 模拟示教器屏幕 28 | 29 | }; 30 | 31 | #endif // MAINWIDGET_H 32 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/panelbutton.h: -------------------------------------------------------------------------------- 1 | #ifndef PANELBUTTON_H 2 | #define PANELBUTTON_H 3 | 4 | #include 5 | 6 | class PanelButton : public QPushButton 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit PanelButton(const QString & text, QWidget *parent = 0); 11 | 12 | protected: 13 | // 原来的想法是用事件过滤和重写事件的方法,模拟实际按钮,这样看起来对以后改成嵌入式版本更适合。 14 | void mousePressEvent(QMouseEvent *e); 15 | void mouseReleaseEvent(QMouseEvent *e); 16 | 17 | signals: 18 | 19 | public slots: 20 | 21 | private: 22 | bool mousePressedFlag; 23 | QWidget *parentWindow; 24 | 25 | }; 26 | 27 | #endif // PANELBUTTON_H 28 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/panelwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef PANELWIDGET_H 2 | #define PANELWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | 12 | #include "GRS_Common.h" 13 | #include "GRS_SharedMemory.h" 14 | #include "systembutton.h" 15 | #include "panelbutton.h" 16 | #include "virtualbutton.h" 17 | 18 | 19 | class PanelWidget : public QWidget 20 | { 21 | Q_OBJECT 22 | public: 23 | explicit PanelWidget(QWidget *parent = 0); 24 | 25 | int switchFlag; 26 | 27 | protected: 28 | bool event(QEvent *); 29 | 30 | signals: 31 | void showMin(); 32 | void closeApp(); 33 | void switchBtnClicked(); 34 | void statusChanged(); // 相关状态改变,需要修改主界面的状态显示(事件按钮) 35 | 36 | public slots: 37 | 38 | private slots: 39 | void modeBtnResponded(); 40 | void operatingModeChanged(const int); 41 | void keyLongPressListenerRespond(); // 按钮长按监听 42 | void incrementTimerRespond(); // 增量模式下连续运动处理函数 43 | void robotJogging(int id); // 机器人动 44 | void robotStanding(int id); // 机器人不动 45 | 46 | private: 47 | QFrame *mainFrame; 48 | SystemButton *minBtn; // minimize button of qApp 49 | SystemButton *closeBtn; // close button of qApp 50 | QPushButton *switchBtn; // switch button of qApp 51 | 52 | QPushButton *modeBtn; 53 | QPushButton *emergencyStopBtn; // emergency stop button of GRS 54 | 55 | void createPanelBtns(); 56 | 57 | PanelButton *btnA; 58 | PanelButton *btnB; 59 | PanelButton *btnC; 60 | PanelButton *btnD; 61 | 62 | PanelButton *btnE; 63 | PanelButton *btnF; 64 | PanelButton *btnG; 65 | PanelButton *btnH; 66 | 67 | PanelButton *btnI; 68 | PanelButton *btnJ; 69 | PanelButton *btnK; 70 | PanelButton *btnL; 71 | 72 | typedef enum moveBtnFlag{ 73 | Btn_Pos_J1, Btn_Neg_J1, 74 | Btn_Pos_J2, Btn_Neg_J2, 75 | Btn_Pos_J3, Btn_Neg_J3, 76 | Btn_Pos_J4, Btn_Neg_J4, 77 | Btn_Pos_J5, Btn_Neg_J5, 78 | Btn_Pos_J6, Btn_Neg_J6 79 | }moveBtnTpyes; 80 | 81 | PanelButton *moveBtnPosJ1; 82 | PanelButton *moveBtnNegJ1; 83 | PanelButton *moveBtnPosJ2; 84 | PanelButton *moveBtnNegJ2; 85 | PanelButton *moveBtnPosJ3; 86 | PanelButton *moveBtnNegJ3; 87 | PanelButton *moveBtnPosJ4; 88 | PanelButton *moveBtnNegJ4; 89 | PanelButton *moveBtnPosJ5; 90 | PanelButton *moveBtnNegJ5; 91 | PanelButton *moveBtnPosJ6; 92 | PanelButton *moveBtnNegJ6; 93 | QButtonGroup *moveBtnGroup; 94 | QTimer *keyLongPressListener; // 用于监听增量模式下相关动作按钮的长按状态 95 | QTimer *incrementTimer; // 增量模式持续运动时的定时器,如果控制杆偏转持续一秒钟或数秒钟,机器人就会持续移动(速率为每秒10步)。 96 | 97 | VirtualButton *enableBtn; 98 | VirtualButton *holdBtn; 99 | 100 | void createVirtualWidget(); 101 | QWidget *virtualWidget; 102 | QPushButton *motorSwitchBtn; 103 | QButtonGroup *operatingModeBtnGroup; 104 | 105 | }; 106 | 107 | #endif // PANELWIDGET_H 108 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/quicksetbar.h: -------------------------------------------------------------------------------- 1 | #ifndef QUICKSETBAR_H 2 | #define QUICKSETBAR_H 3 | 4 | #include 5 | 6 | #include "GRS_Common.h" 7 | 8 | class QuickSetBar : public QWidget 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit QuickSetBar(QWidget *parent = 0); 13 | 14 | signals: 15 | 16 | public slots: 17 | 18 | }; 19 | 20 | #endif // QUICKSETBAR_H 21 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/screenwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef SCREENWIDGET_H 2 | #define SCREENWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #include "GRS_Common.h" 14 | #include "GRS_SharedMemory.h" 15 | 16 | #include "mainmenuwidget.h" 17 | #include "quicksetbar.h" 18 | #include "CustomWidget/simplepage.h" 19 | #include "Page_Jogging/joggingpage.h" 20 | #include "Page_ProgramData/programdatapage.h" 21 | 22 | 23 | class ScreenWidget : public QWidget 24 | { 25 | Q_OBJECT 26 | public: 27 | explicit ScreenWidget(QWidget *parent = 0); 28 | 29 | QWidget *topBar; 30 | QPushButton *menuBtn; 31 | MainMenuWidget *menuWidget; 32 | QPushButton *operatorBtn; 33 | 34 | QPushButton *eventLogBtn; 35 | QLabel *operatingModeLabel; // 机器人操作模式 36 | QLabel *controllerOSInfoLabel; // 机器人本体型号 + 控制器系统版本信息 37 | QLabel *controllerStatusLabel; // 机器人和控制器状态 38 | QLabel *productionStatusLabel; // 程序执行状态 + 当前速度倍率 39 | QLabel *taskInfoLabel; // 系统当前任务提示信息 40 | 41 | QPushButton *closeBtn; 42 | 43 | QStackedWidget *centralWidget; 44 | // 只能打开一个的界面 45 | QWidget *homePage; 46 | JoggingPage *joggingPage; 47 | ProgramDataPage *programDataPage; 48 | 49 | QWidget *bottomBar; 50 | QButtonGroup *bottomBarBtnGroup; 51 | QPushButton *quickSetBtn; 52 | QuickSetBar *quickSetBar; 53 | 54 | 55 | signals: 56 | 57 | public slots: 58 | void eventLogBtnUpdate(); 59 | 60 | private slots: 61 | void quickSetBtnClicked(bool); 62 | void menuBtnClicked(bool); 63 | void selectMenuItem(QTableWidgetItem *); 64 | void closeBtnClicked(); 65 | 66 | private: 67 | QFrame *mainFrame; 68 | 69 | }; 70 | 71 | #endif // SCREENWIDGET_H 72 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/systembutton.h: -------------------------------------------------------------------------------- 1 | #ifndef SYSTEMBUTTON_H 2 | #define SYSTEMBUTTON_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class SystemButton : public QPushButton 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit SystemButton(QWidget *parent = 0); 13 | 14 | void setPicName(QString pic_name); 15 | 16 | protected: 17 | void enterEvent(QEvent *); 18 | void leaveEvent(QEvent *); 19 | void mousePressEvent(QMouseEvent *event); 20 | void mouseReleaseEvent(QMouseEvent *event); 21 | void paintEvent(QPaintEvent *); 22 | 23 | private: 24 | //枚举按钮的几种状态 25 | enum ButtonStatus{NORMAL, ENTER, PRESS, NOSTATUS}; 26 | ButtonStatus status; 27 | QString pic_name; 28 | 29 | int btn_width; //按钮宽度 30 | int btn_height; //按钮高度 31 | bool mouse_press; //按钮左键是否按下 32 | 33 | }; 34 | 35 | #endif // SYSTEMBUTTON_H 36 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/header/virtualbutton.h: -------------------------------------------------------------------------------- 1 | #ifndef VIRTUALBUTTON_H 2 | #define VIRTUALBUTTON_H 3 | 4 | #include 5 | 6 | class VirtualButton : public QPushButton 7 | { 8 | Q_OBJECT 9 | public: 10 | explicit VirtualButton(const QString & text, QWidget *parent = 0); 11 | 12 | signals: 13 | 14 | public slots: 15 | 16 | }; 17 | 18 | #endif // VIRTUALBUTTON_H 19 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/lib/libGRS_Core.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/lib/libGRS_Core.a -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/lib/librobDecodePrg.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/lib/librobDecodePrg.a -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | images/GR-HMI-icon.png 4 | images/Jogging_Mechanical_Unit_Robot.png 5 | images/Jogging_Motion_Mode_Axis.png 6 | images/Jogging_Motion_Mode_Linear.png 7 | images/Jogging_Motion_Mode_Reorient.png 8 | images/systemButton/close.png 9 | images/systemButton/close_hover.png 10 | images/systemButton/close_pressed.png 11 | images/systemButton/min.png 12 | images/systemButton/min_hover.png 13 | images/systemButton/min_pressed.png 14 | images/mainScreenMenuBtn.png 15 | images/mainScreenMenuBtn_checked.png 16 | images/mainScreenMenuBtn_checked_2.png 17 | images/mainScreenMenuBtn_2.png 18 | images/administrator.png 19 | images/mainScreenCloseBtn.png 20 | images/robotIcon_32.png 21 | images/robotIcon_16.png 22 | images/GRS_home.jpg 23 | images/menu/menu_0.png 24 | images/menu/menu_1.png 25 | images/menu/menu_2.png 26 | images/menu/menu_3.png 27 | images/menu/menu_4.png 28 | images/menu/menu_5.png 29 | images/menu/menu_6.png 30 | images/menu/menu_8.png 31 | images/menu/menu_9.png 32 | images/menu/menu_10.png 33 | images/menu/menu_11.png 34 | images/menu/menu_12.png 35 | images/menu/menu_13.png 36 | images/menu/menu_14.png 37 | images/menu/menu_17.png 38 | images/menu/menu_Arc.png 39 | images/menu/menu_AutoProduction.png 40 | images/menu/menu_Backup.png 41 | images/menu/menu_Calibration.png 42 | images/menu/menu_ControlPanel.png 43 | images/menu/menu_EventLog.png 44 | images/menu/menu_Explorer.png 45 | images/menu/menu_HotEdit.png 46 | images/menu/menu_IO.png 47 | images/menu/menu_Jogging.png 48 | images/menu/menu_LogOff.png 49 | images/menu/menu_ProgramData.png 50 | images/menu/menu_ProgramEditor.png 51 | images/menu/menu_Restart.png 52 | images/menu/menu_SystemInfo.png 53 | images/Jogging/Coordinate_Base.png 54 | images/Jogging/Coordinate_Tool.png 55 | images/Jogging/Coordinate_Wobj.png 56 | images/Jogging/Coordinate_World.png 57 | images/Jogging/Increment_Large.png 58 | images/Jogging/Increment_Medium.png 59 | images/Jogging/Increment_None.png 60 | images/Jogging/Increment_Small.png 61 | images/Jogging/Increment_User.png 62 | images/Jogging/MotionMode_Axis.png 63 | images/Jogging/MotionMode_Linear.png 64 | images/drop_down.png 65 | 66 | 67 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/CancelJob_Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/CancelJob_Large.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/CloseTab_Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/CloseTab_Large.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/ExecuteJob_Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/ExecuteJob_Large.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Explorer_Dir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Explorer_Dir.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Explorer_File.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Explorer_File.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Explorer_File_mod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Explorer_File_mod.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Explorer_File_pgf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Explorer_File_pgf.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Explorer_file_SYS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Explorer_file_SYS.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/GR-HMI-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/GR-HMI-icon.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/GRS_home.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/GRS_home.jpg -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/GSK_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/GSK_Logo.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Jogging/Coordinate_Base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Jogging/Coordinate_Base.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Jogging/Coordinate_Tool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Jogging/Coordinate_Tool.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Jogging/Coordinate_Wobj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Jogging/Coordinate_Wobj.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Jogging/Coordinate_World.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Jogging/Coordinate_World.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Jogging/Increment_Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Jogging/Increment_Large.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Jogging/Increment_Medium.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Jogging/Increment_Medium.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Jogging/Increment_None.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Jogging/Increment_None.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Jogging/Increment_Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Jogging/Increment_Small.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Jogging/Increment_User.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Jogging/Increment_User.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Jogging/MotionMode_Axis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Jogging/MotionMode_Axis.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Jogging/MotionMode_Linear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Jogging/MotionMode_Linear.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Jogging_Mechanical_Unit_Robot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Jogging_Mechanical_Unit_Robot.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Jogging_Motion_Mode_Axis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Jogging_Motion_Mode_Axis.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Jogging_Motion_Mode_Linear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Jogging_Motion_Mode_Linear.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Jogging_Motion_Mode_Reorient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Jogging_Motion_Mode_Reorient.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/Launch_Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/Launch_Large.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/NewBatchJobLarge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/NewBatchJobLarge.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/NewDeviceList_Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/NewDeviceList_Large.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/OpenDeviceList_Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/OpenDeviceList_Large.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/PauseJob_Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/PauseJob_Large.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/ResumeJob.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/ResumeJob.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/SaveDeviceList_Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/SaveDeviceList_Large.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/ScanNetwork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/ScanNetwork.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/VerifyJob_Large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/VerifyJob_Large.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/administrator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/administrator.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/background.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/bmp30.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/bmp30.bmp -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/drop_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/drop_down.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/mainScreenCloseBtn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/mainScreenCloseBtn.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/mainScreenMenuBtn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/mainScreenMenuBtn.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/mainScreenMenuBtn_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/mainScreenMenuBtn_2.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/mainScreenMenuBtn_checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/mainScreenMenuBtn_checked.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/mainScreenMenuBtn_checked_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/mainScreenMenuBtn_checked_2.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_0.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_1.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_10.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_11.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_12.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_13.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_14.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_17.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_2.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_3.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_4.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_5.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_6.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_8.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_9.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_Arc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_Arc.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_AutoProduction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_AutoProduction.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_Backup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_Backup.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_Calibration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_Calibration.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_ControlPanel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_ControlPanel.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_EventLog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_EventLog.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_Explorer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_Explorer.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_HotEdit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_HotEdit.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_IO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_IO.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_Jogging.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_Jogging.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_LogOff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_LogOff.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_ProgramData.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_ProgramData.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_ProgramEditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_ProgramEditor.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_Restart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_Restart.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/menu/menu_SystemInfo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/menu/menu_SystemInfo.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/robotIcon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/robotIcon_16.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/robotIcon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/robotIcon_32.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/robot_model_.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/robot_model_.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/systemButton/arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/systemButton/arrow_down.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/systemButton/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/systemButton/close.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/systemButton/close_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/systemButton/close_hover.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/systemButton/close_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/systemButton/close_pressed.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/systemButton/feedback.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/systemButton/feedback.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/systemButton/feedback_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/systemButton/feedback_hover.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/systemButton/feedback_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/systemButton/feedback_pressed.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/systemButton/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/systemButton/menu.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/systemButton/menu_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/systemButton/menu_hover.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/systemButton/menu_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/systemButton/menu_pressed.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/systemButton/min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/systemButton/min.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/systemButton/min_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/systemButton/min_hover.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/systemButton/min_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/systemButton/min_pressed.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/systemButton/skin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/systemButton/skin.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/systemButton/skin_hover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/systemButton/skin_hover.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/systemButton/skin_pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/systemButton/skin_pressed.png -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/view.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/view.bmp -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/images/广州数控Logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/GRS_Pro/GR_HMI/resource/images/广州数控Logo.jpg -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/resource/styleSheets.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | qss/GR-HMI.qss 4 | 5 | 6 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/source/CustomThread/updateposedatathread.cpp: -------------------------------------------------------------------------------- 1 | #include "header/CustomThread//updateposedatathread.h" 2 | #include "GRS_Common.h" 3 | #include "GRS_SharedMemory.h" 4 | #include 5 | #include 6 | 7 | UpdatePoseDataThread::UpdatePoseDataThread(QObject *parent) : 8 | QThread(parent) 9 | { 10 | // nothing 11 | } 12 | 13 | UpdatePoseDataThread::~UpdatePoseDataThread() 14 | { 15 | QThread::terminate(); 16 | } 17 | 18 | /* 19 | * @brief 机器人位姿数据刷新线程的主函数 20 | * 21 | * @param 无 22 | * 23 | * @return 无 24 | */ 25 | void UpdatePoseDataThread::run() 26 | { 27 | QString poseData[POSITION_ROWS]; // 包含一个周期的机器人位姿数据 28 | double w, x, y, z; // 四元数 29 | double ex, ey, ez; // 欧拉角 30 | 31 | while(1) 32 | { 33 | /* *************************************************************************** 34 | * 根据当前对关节、坐标操作,四元数、欧拉角的选择来确定【位置】表中第二列的显示数据。 35 | * 注意要控制显示精度,这里规定:单位为度的精确到小数点后两位;单位为弧度的精确到小数点后五位; 36 | * 单位为毫米的精确到小数点后一位;四元数精确到小数点后五位。 37 | *************************************************************************** */ 38 | if(joggingPar.motionMode == Jogging::PAR_AXIS1_6) // ---------------- 关节操作 ---------------- (1、2、3、4、5、6) 39 | { 40 | for(int i=0; icurJointTarget.robax.rax[i]), 'f', 2);} 43 | else if(displayFmt.curUnit == Jogging::PAR_SHOW_RADIANS) // 关节操作 & 单位弧度 44 | { poseData[i] = QString::number(pOutputData->curJointTarget.robax.rax[i], 'f', 5);} 45 | } 46 | poseData[POSITION_ROWS-1] = tr(" "); 47 | } 48 | else // -------------------- 坐标操作 -------------------- 49 | { 50 | poseData[0] = QString::number(pOutputData->curRob.pose.trans.x, 'f', 1); // X 51 | poseData[1] = QString::number(pOutputData->curRob.pose.trans.y, 'f', 1); // Y 52 | poseData[2] = QString::number(pOutputData->curRob.pose.trans.z, 'f', 1); // Z 53 | 54 | #if 1 55 | w = pOutputData->curRob.pose.rot.s; 56 | x = pOutputData->curRob.pose.rot.x; 57 | y = pOutputData->curRob.pose.rot.y; 58 | z = pOutputData->curRob.pose.rot.z; 59 | #else 60 | w = pOutputData->curRob.pose.rot.z; 61 | x = pOutputData->curRob.pose.rot.y; 62 | y = pOutputData->curRob.pose.rot.x; 63 | z = pOutputData->curRob.pose.rot.s; 64 | #endif 65 | 66 | if(displayFmt.curOrientFmt == Jogging::PAR_SHOW_QUATERNION) // 坐标操作 & 四元数 (X、Y、Z、q1、q2、q3、q4) 67 | { 68 | poseData[3] = QString::number(w, 'f', 5); 69 | poseData[4] = QString::number(x, 'f', 5); 70 | poseData[5] = QString::number(y, 'f', 5); 71 | poseData[6] = QString::number(z, 'f', 5); 72 | } 73 | else if(displayFmt.curOrientFmt == Jogging::PAR_SHOW_EULERANGLES) // 坐标操作 & 欧拉角 (X、Y、Z、EZ、EY、EX) 74 | { 75 | /* ************************************************************************ 76 | * 由于欧拉角的万向锁特性造成的不确定性,机器人运动控制算法并没有使用欧拉角来计算, 77 | * 故在此系统中欧拉角的作用仅仅是提供给用户更直观的数据(相比于四元数)。 78 | * 所以我们在这里要自己做四元数到欧拉角的转换。 79 | * (pOutputData->curRob.euler.ex 或 ey 或 ez 数据无效) 80 | ************************************************************************ */ 81 | ex = atan2((2*w*x + 2*y*z), (-2*x*x - 2*y*y + 1)); 82 | ey = asin(2*w*y - 2*z*x); 83 | ez = atan2((2*w*z + 2*x*y), (-2*y*y - 2*z*z + 1)); 84 | 85 | if(displayFmt.curUnit == Jogging::PAR_SHOW_DEGREES) // 坐标操作 & 欧拉角 & 单位度 86 | { 87 | poseData[3] = QString::number(ITP_radian2angle(ez), 'f', 2); 88 | poseData[4] = QString::number(ITP_radian2angle(ey), 'f', 2); 89 | poseData[5] = QString::number(ITP_radian2angle(ex), 'f', 2); 90 | } 91 | else if(displayFmt.curUnit == Jogging::PAR_SHOW_RADIANS) // 坐标操作 & 欧拉角 & 单位弧度 92 | { 93 | poseData[3] = QString::number(ez, 'f', 5); 94 | poseData[4] = QString::number(ey, 'f', 5); 95 | poseData[5] = QString::number(ex, 'f', 5); 96 | } 97 | poseData[POSITION_ROWS-1] = tr(" "); 98 | } 99 | else // -------------------- 其他情况 -------------------- 100 | { 101 | for(int i=0; i 106 | 107 | 108 | msleep(100); // 数据刷新周期为100ms 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/source/CustomWidget/operatingbar.cpp: -------------------------------------------------------------------------------- 1 | #include "header/CustomWidget/operatingbar.h" 2 | #include 3 | 4 | OperatingBar::OperatingBar(QWidget *parent) : 5 | QWidget(parent) 6 | { 7 | setFixedSize(UI_SCREEN_WIDTH, 54); 8 | 9 | mainWidget = new QWidget; 10 | mainWidget->setObjectName("operatingBar"); 11 | 12 | buttonGroup = new QButtonGroup; 13 | createButtons(); 14 | 15 | QHBoxLayout *mainLayout = new QHBoxLayout; 16 | mainLayout->setMargin(0); 17 | mainLayout->addWidget(mainWidget); 18 | setLayout(mainLayout); 19 | } 20 | 21 | void OperatingBar::createButtons() 22 | { 23 | int btnWidth = 160; 24 | 25 | 26 | // 为了界面简洁和操作方便,规定操作栏最多五个按钮,可以将其中一个按钮设为“更多”来包含额外的操作。 27 | for(int i=0; i<5; i++) 28 | { 29 | QPushButton *btn = new QPushButton(mainWidget); 30 | btn->setFixedSize(btnWidth, this->height()); 31 | btn->setObjectName("operatingBarBtn"); 32 | btn->setGeometry(btnWidth * i, 0, btn->width(), btn->height()); 33 | buttonGroup->addButton(btn, i+1); 34 | } 35 | 36 | 37 | } 38 | 39 | QAbstractButton *OperatingBar::firstButton() const 40 | { 41 | return buttonGroup->button(1); 42 | } 43 | 44 | QAbstractButton *OperatingBar::secondButton() const 45 | { 46 | return buttonGroup->button(2); 47 | } 48 | 49 | QAbstractButton *OperatingBar::thirdButton() const 50 | { 51 | return buttonGroup->button(3); 52 | } 53 | 54 | QAbstractButton *OperatingBar::fourthButton() const 55 | { 56 | return buttonGroup->button(4); 57 | } 58 | 59 | QAbstractButton *OperatingBar::fifthButton() const 60 | { 61 | return buttonGroup->button(5); 62 | } 63 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/source/CustomWidget/simplepage.cpp: -------------------------------------------------------------------------------- 1 | #include "header/CustomWidget/simplepage.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | SimplePage::SimplePage(QWidget *parent) : 8 | QWidget(parent) 9 | { 10 | simplePageInit(); 11 | setText(tr("Simple Page")); 12 | } 13 | 14 | SimplePage::SimplePage(const QString &text, QWidget *parent) : 15 | QWidget(parent) 16 | { 17 | simplePageInit(); 18 | setText(text); 19 | } 20 | 21 | SimplePage::SimplePage(const QIcon &icon, const QString &text, QWidget *parent) : 22 | QWidget(parent) 23 | { 24 | simplePageInit(); 25 | setIcon(icon); 26 | setText(text); 27 | } 28 | 29 | void SimplePage::setIcon(const QIcon &icon) 30 | { 31 | navIcon->setPixmap(icon.pixmap(QSize(24, 24))); 32 | } 33 | 34 | void SimplePage::setText(const QString &text) 35 | { 36 | navText->setText(text); 37 | } 38 | 39 | void SimplePage::setMainLayout(QLayout *layout) 40 | { 41 | mainWidget->setLayout(layout); 42 | } 43 | 44 | int SimplePage::navBarHeight() const 45 | { 46 | return navBar->height(); 47 | } 48 | 49 | int SimplePage::mainWidgetHeight() const 50 | { 51 | return mainWidget->height(); 52 | } 53 | 54 | void SimplePage::simplePageInit() 55 | { 56 | setFixedSize(UI_SCREEN_WIDTH, UI_SCREEN_HEIGHT - 54*2); 57 | // setFixedSize(parent->width(), parent->height()); 58 | // setObjectName("SimplePage"); 59 | 60 | navBar = new QWidget; 61 | navBar->setObjectName("SimplePageNavBar"); 62 | navBar->setFixedHeight(32); 63 | navIcon = new QLabel; 64 | navIcon->setFixedSize(32, 32); 65 | navText = new QLabel; 66 | 67 | QHBoxLayout *navBarLayout = new QHBoxLayout; 68 | navBarLayout->setContentsMargins(5, 0, 0, 0); 69 | navBarLayout->setSpacing(0); 70 | navBarLayout->addWidget(navIcon, Qt::AlignLeft | Qt::AlignVCenter); 71 | navBarLayout->addWidget(navText, Qt::AlignLeft | Qt::AlignVCenter); 72 | navBar->setLayout(navBarLayout); 73 | 74 | mainWidget = new QWidget; 75 | mainWidget->setFixedSize(UI_SCREEN_WIDTH, this->height() - navBar->height()); 76 | mainWidget->setObjectName("SimplePageMainWidget"); 77 | 78 | QVBoxLayout *mainLayout = new QVBoxLayout; 79 | mainLayout->setMargin(0); 80 | mainLayout->setSpacing(0); 81 | mainLayout->addWidget(navBar); 82 | mainLayout->addWidget(mainWidget); 83 | this->setLayout(mainLayout); 84 | } 85 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/source/Page_Jogging/alignpage.cpp: -------------------------------------------------------------------------------- 1 | #include "header/Page_Jogging/alignpage.h" 2 | #include 3 | #include 4 | 5 | AlignPage::AlignPage(QWidget *parent) : 6 | SimplePage(parent) 7 | { 8 | setAttribute(Qt::WA_DeleteOnClose); 9 | QPixmap pixmap(":/images/menu/menu_Jogging.png"); 10 | setIcon(QIcon(pixmap)); 11 | setText(tr("Jogging - Align")); 12 | 13 | createPage(); 14 | 15 | connect(operatingBar->fifthButton(), SIGNAL(clicked()), this, SLOT(closeBtnResponded())); 16 | } 17 | 18 | void AlignPage::createPage() 19 | { 20 | tipsWidget = new QWidget; 21 | tipsWidget->setObjectName("tipsWidgetOfSimpleSettingPage"); 22 | tipsWidget->setFixedHeight(132); 23 | currentKeyLabel = new QLabel(tipsWidget); 24 | currentKeyLabel->setProperty("h", 0); 25 | currentValLabel = new QLabel(tipsWidget); 26 | currentValLabel->setProperty("h", 0); 27 | tipsLabel = new QLabel(tipsWidget); 28 | tipsLabel->setProperty("h", 1); 29 | 30 | currentKeyLabel->setText(tr("Current tool:\t\t")); 31 | currentValLabel->setText(QString(QLatin1String(G_CurToolData.dataProperty.typeName))); 32 | currentKeyLabel->setAlignment(Qt::AlignLeft | Qt::AlignBottom); 33 | currentValLabel->setAlignment(Qt::AlignLeft | Qt::AlignBottom); 34 | tipsLabel->setAlignment(Qt::AlignLeft | Qt::AlignBottom); 35 | 36 | QHBoxLayout *currentKeyValLayout = new QHBoxLayout; 37 | currentKeyValLayout->setMargin(0); 38 | currentKeyValLayout->setSpacing(0); 39 | currentKeyValLayout->addWidget(currentKeyLabel); 40 | currentKeyValLayout->addWidget(currentValLabel); 41 | currentKeyValLayout->addStretch(); 42 | QVBoxLayout *tipsLayout = new QVBoxLayout; 43 | tipsLayout->setMargin(10); 44 | tipsLayout->setSpacing(20); 45 | tipsLayout->addLayout(currentKeyValLayout); 46 | tipsLayout->addWidget(tipsLabel); 47 | tipsWidget->setLayout(tipsLayout); 48 | 49 | contentWidget = new QWidget; 50 | contentWidget->setFixedSize(UI_SCREEN_WIDTH, 274); 51 | 52 | step1Label = new QLabel(tr("1. Select coordinate system to align the currently selected tool to:")); 53 | coordLabel = new QLabel(tr("Coord:")); 54 | coordComboBox = new QComboBox; 55 | coordComboBox->setFixedSize(300, 30); 56 | coordComboBox->addItem(tr("World")); 57 | coordComboBox->addItem(tr("Base")); 58 | coordComboBox->addItem(tr("Work object")); 59 | step2Label = new QLabel(tr("2. Press the enabling device the tap and hold 'Start Align'.")); 60 | startBtn = new QPushButton(tr("Start Align")); 61 | startBtn->setProperty("type", "normal"); 62 | startBtn->setFixedSize(300, 30); 63 | step3Label = new QLabel(tr("3. When ready tap 'Close'.")); 64 | 65 | QGridLayout *contentLayout = new QGridLayout; 66 | contentLayout->setContentsMargins(60, 10, 60, 10); 67 | contentLayout->setSpacing(20); 68 | contentLayout->addWidget(step1Label, 0, 0, 1, 2, Qt::AlignLeft | Qt::AlignVCenter); 69 | contentLayout->addWidget(coordLabel, 1, 0, 1, 1, Qt::AlignCenter); 70 | contentLayout->addWidget(coordComboBox, 1, 1, 1, 1, Qt::AlignLeft | Qt::AlignVCenter); 71 | contentLayout->addWidget(step2Label, 2, 0, 1, 2, Qt::AlignLeft | Qt::AlignVCenter); 72 | contentLayout->addWidget(startBtn, 3, 1, 1, 1, Qt::AlignLeft | Qt::AlignVCenter); 73 | contentLayout->addWidget(step3Label, 4, 0, 1, 2, Qt::AlignLeft | Qt::AlignVCenter); 74 | contentWidget->setLayout(contentLayout); 75 | 76 | 77 | // bottom 78 | operatingBar = new OperatingBar; 79 | operatingBar->firstButton()->hide(); 80 | operatingBar->secondButton()->hide(); 81 | operatingBar->thirdButton()->hide(); 82 | operatingBar->fourthButton()->hide(); 83 | operatingBar->fifthButton()->setText(tr("Close")); 84 | 85 | QVBoxLayout *mainLayout = new QVBoxLayout; 86 | mainLayout->setMargin(0); 87 | mainLayout->setSpacing(0); 88 | mainLayout->addWidget(tipsWidget); 89 | mainLayout->addWidget(contentWidget); 90 | mainLayout->addWidget(operatingBar); 91 | this->setMainLayout(mainLayout); 92 | } 93 | 94 | void AlignPage::closeBtnResponded() 95 | { 96 | this->close(); 97 | } 98 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/source/Page_Jogging/gotopage.cpp: -------------------------------------------------------------------------------- 1 | #include "header/Page_Jogging/gotopage.h" 2 | #include 3 | #include 4 | #include 5 | 6 | GoToPage::GoToPage(QWidget *parent) : 7 | SimplePage(parent) 8 | { 9 | setAttribute(Qt::WA_DeleteOnClose); 10 | QPixmap pixmap(":/images/menu/menu_Jogging.png"); 11 | setIcon(QIcon(pixmap)); 12 | setText(tr("Jogging - Go to Position")); 13 | 14 | mode = pInputData->mode; 15 | memset(&tarRob, 0, sizeof(ITP_RobTarget)); 16 | createPage(); 17 | listDataUpdate(); 18 | 19 | connect(operatingBar->fifthButton(), SIGNAL(clicked()), this, SLOT(closeBtnResponded())); 20 | connect(robtargetListWidget, SIGNAL(itemSelectionChanged()), this, SLOT(listWidgetClicked())); 21 | connect(goToPosBtn, SIGNAL(pressed()), this, SLOT(goToPosBtnPressed())); 22 | connect(goToPosBtn, SIGNAL(released()), this, SLOT(goToPosBtnReleased())); 23 | } 24 | 25 | void GoToPage::createPage() 26 | { 27 | /* 提示栏 */ 28 | tipsWidget = new QWidget; 29 | tipsWidget->setObjectName("tipsWidgetOfSimpleSettingPage"); 30 | tipsWidget->setFixedHeight(132); 31 | 32 | mechanicalUnitKeyLabel = new QLabel(tipsWidget); // 机械单元 33 | mechanicalUnitValLabel = new QLabel(tipsWidget); 34 | activeToolKeyLabel = new QLabel(tipsWidget); // 活动工具 35 | activeToolValLabel = new QLabel(tipsWidget); 36 | activeWobjKeyLabel = new QLabel(tipsWidget); // 活动工件 37 | activeWobjValLabel = new QLabel(tipsWidget); 38 | mechanicalUnitKeyLabel->setProperty("h", 0); 39 | mechanicalUnitValLabel->setProperty("h", 0); 40 | activeToolKeyLabel->setProperty("h", 0); 41 | activeToolValLabel->setProperty("h", 0); 42 | activeWobjKeyLabel->setProperty("h", 0); 43 | activeWobjValLabel->setProperty("h", 0); 44 | 45 | mechanicalUnitKeyLabel->setText(tr("Mechanical unit:")); 46 | mechanicalUnitValLabel->setText(tr("ROB_1")); 47 | activeToolKeyLabel->setText(tr("Active tool:")); 48 | activeToolValLabel->setText(QString(QLatin1String(G_CurToolData.dataProperty.typeName))); 49 | activeWobjKeyLabel->setText(tr("active work object:")); 50 | activeWobjValLabel->setText(QString(QLatin1String(G_CurWobjData.dataProperty.typeName))); 51 | 52 | QGridLayout *tipsLayout = new QGridLayout; 53 | tipsLayout->setContentsMargins(20, 20, 300, 30); 54 | tipsLayout->setSpacing(20); 55 | tipsLayout->addWidget(mechanicalUnitKeyLabel, 0, 0, 1, 1, Qt::AlignLeft | Qt::AlignVCenter); 56 | tipsLayout->addWidget(mechanicalUnitValLabel, 0, 1, 1, 1, Qt::AlignLeft | Qt::AlignVCenter); 57 | tipsLayout->addWidget(activeToolKeyLabel, 1, 0, 1, 1, Qt::AlignLeft | Qt::AlignVCenter); 58 | tipsLayout->addWidget(activeToolValLabel, 1, 1, 1, 1, Qt::AlignLeft | Qt::AlignVCenter); 59 | tipsLayout->addWidget(activeWobjKeyLabel, 2, 0, 1, 1, Qt::AlignLeft | Qt::AlignVCenter); 60 | tipsLayout->addWidget(activeWobjValLabel, 2, 1, 1, 1, Qt::AlignLeft | Qt::AlignVCenter); 61 | tipsWidget->setLayout(tipsLayout); 62 | 63 | /* 内容栏 */ 64 | contentWidget = new QWidget; 65 | contentWidget->setFixedSize(UI_SCREEN_WIDTH, 274); 66 | robtargetListWidget = new QListWidget(contentWidget); // 显示当前任务中的机器人示教点列表 67 | 68 | activeFilterKeyLabel = new QLabel(contentWidget); // 活动过滤器: XXX 69 | activeFilterKeyLabel->setProperty("h", 5); 70 | activeFilterKeyLabel->setText(tr("Active filter:\t")); 71 | activeFilterValLabel = new QLabel(contentWidget); 72 | activeFilterValLabel->setProperty("h", 5); 73 | activeFilterValLabel->setText(tr("None")); 74 | step1Label = new QLabel(contentWidget); 75 | step1Label->setText(tr("1. Press and hold Enabling Device.")); 76 | step2Label = new QLabel(contentWidget); 77 | step2Label->setText(tr("2. Press and hold Go To button to go to position.")); 78 | goToPosBtn = new QPushButton(contentWidget); // “转到”按钮 79 | goToPosBtn->setProperty("type", "normal"); 80 | goToPosBtn->setFixedHeight(40); 81 | goToPosBtn->setText(tr("Go to")); 82 | goToPosBtn->setEnabled(false); 83 | 84 | QHBoxLayout *contentRightTopLayout = new QHBoxLayout; 85 | contentRightTopLayout->setContentsMargins(0, 0, 0, 10); 86 | contentRightTopLayout->setSpacing(0); 87 | contentRightTopLayout->addWidget(activeFilterKeyLabel); 88 | contentRightTopLayout->addWidget(activeFilterValLabel); 89 | contentRightTopLayout->addStretch(); 90 | 91 | QVBoxLayout *contentRightLayout = new QVBoxLayout; 92 | contentRightLayout->setMargin(20); 93 | contentRightLayout->setSpacing(20); 94 | contentRightLayout->addLayout(contentRightTopLayout); 95 | contentRightLayout->addWidget(step1Label); 96 | contentRightLayout->addWidget(step2Label); 97 | contentRightLayout->addStretch(); 98 | contentRightLayout->addWidget(goToPosBtn, Qt::AlignCenter); 99 | 100 | QHBoxLayout *contentLayout = new QHBoxLayout; 101 | contentLayout->setMargin(0); 102 | contentLayout->setSpacing(0); 103 | contentLayout->addWidget(robtargetListWidget, 6); 104 | contentLayout->addLayout(contentRightLayout, 4); 105 | contentWidget->setLayout(contentLayout); 106 | 107 | 108 | // bottom 109 | operatingBar = new OperatingBar; 110 | operatingBar->firstButton()->setText(tr("Filter")); 111 | operatingBar->secondButton()->hide(); 112 | operatingBar->thirdButton()->hide(); 113 | operatingBar->fourthButton()->hide(); 114 | operatingBar->fifthButton()->setText(tr("Close")); 115 | 116 | QVBoxLayout *mainLayout = new QVBoxLayout; 117 | mainLayout->setMargin(0); 118 | mainLayout->setSpacing(0); 119 | mainLayout->addWidget(tipsWidget); 120 | mainLayout->addWidget(contentWidget); 121 | mainLayout->addWidget(operatingBar); 122 | this->setMainLayout(mainLayout); 123 | } 124 | 125 | void GoToPage::listDataUpdate() 126 | { 127 | // ==================== 表格内容显示 128 | int moduleNum = getFileModuleCnt(0); 129 | decode_type_property tmpProperty; 130 | module_prg_property tmpModule; 131 | decode_type_data tmpData; 132 | int i = 0, j = 0, rowCnt = 0; 133 | 134 | for(i=0; isetSizeHint(QSize(300, 40)); 147 | robtargetListWidget->addItem(item); 148 | 149 | usePosGetSelVarVal(0, i, -1, j, D_DATATYPE_ROBTARGET, &tmpData); 150 | // 插补模块和译码模块定义的数据类型不一样,所以要这样子处理 151 | tarRob.pose.trans.x = tmpData.robtargetData.trans.x; 152 | tarRob.pose.trans.y = tmpData.robtargetData.trans.y; 153 | tarRob.pose.trans.z = tmpData.robtargetData.trans.z; 154 | tarRob.pose.rot.s = tmpData.robtargetData.rot.q1; 155 | tarRob.pose.rot.x = tmpData.robtargetData.rot.q2; 156 | tarRob.pose.rot.y = tmpData.robtargetData.rot.q3; 157 | tarRob.pose.rot.z = tmpData.robtargetData.rot.q4; 158 | 159 | map.insert(name, tarRob); 160 | 161 | qDebug("x=%f, y=%f, z=%f, q1=%f, q2=%f, q3=%f, q4=%f", tmpData.robtargetData.trans.x, tmpData.robtargetData.trans.y, 162 | tmpData.robtargetData.trans.z, tmpData.robtargetData.rot.q1, tmpData.robtargetData.rot.q2, 163 | tmpData.robtargetData.rot.q3, tmpData.robtargetData.rot.q4); 164 | 165 | rowCnt++; 166 | j++; 167 | } 168 | } 169 | } 170 | 171 | void GoToPage::listWidgetClicked() 172 | { 173 | if(!robtargetListWidget->currentItem()->text().isEmpty()) {goToPosBtn->setEnabled(true);} 174 | 175 | tarRob = map.value(robtargetListWidget->currentItem()->text()); 176 | } 177 | 178 | void GoToPage::filterBtnResponded() 179 | { 180 | 181 | } 182 | 183 | void GoToPage::closeBtnResponded() 184 | { 185 | pInputData->mode = mode; 186 | this->close(); 187 | } 188 | 189 | void GoToPage::goToPosBtnPressed() 190 | { 191 | // 是否有一些点被插补算法认为无法到达,所以按键动作失效?——2015.11.13 192 | // 问题描述:有时候按键失灵,但是一旦按键进入转到模式后就不再失灵。。。 193 | 194 | if(ITP_Mode_JointOp_PosMode != pInputData->mode) {pInputData->mode = ITP_Mode_JointOp_PosMode;} 195 | 196 | pInputData->tarRob = tarRob; 197 | // robotPosSpeed 表示工具轨迹速度,工具方向速度。当两个值有一个不为0时,以该值为速度运动 198 | pInputData->robotPosSpeed.v_ort = (MaxSpeed_Reorient * interpolatePeriod / 1000) * JoggingSpeedRate * SysSpeedRate; 199 | pInputData->robotPosSpeed.v_tcp = (MaxSpeed_Linear * interpolatePeriod / 1000) * JoggingSpeedRate * SysSpeedRate; 200 | 201 | qDebug("x=%f, y=%f, z=%f, q1=%f, q2=%f, q3=%f, q4=%f", pInputData->tarRob.pose.trans.x, pInputData->tarRob.pose.trans.y, 202 | pInputData->tarRob.pose.trans.z, pInputData->tarRob.pose.rot.s, pInputData->tarRob.pose.rot.x, 203 | pInputData->tarRob.pose.rot.y, pInputData->tarRob.pose.rot.z); 204 | qDebug(" v_ort=%f, v_tcp=%f, mode=%d", pInputData->robotPosSpeed.v_ort, pInputData->robotPosSpeed.v_tcp, pInputData->mode); 205 | } 206 | 207 | void GoToPage::goToPosBtnReleased() 208 | { 209 | pInputData->robotPosSpeed.v_ort = 0; // 工具方向速度 radian/插补周期 210 | pInputData->robotPosSpeed.v_tcp = 0; // 工具轨迹速度 mm/插补周期 211 | 212 | qDebug(""); 213 | } 214 | 215 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/source/Page_Jogging/simplesettingpage.cpp: -------------------------------------------------------------------------------- 1 | #include "header/Page_Jogging/simplesettingpage.h" 2 | #include 3 | #include 4 | #include 5 | 6 | SimpleSettingPage::SimpleSettingPage(Jogging::MANUALSUBWIDGET flag, QWidget *parent) : 7 | SimplePage(parent) 8 | { 9 | setAttribute(Qt::WA_DeleteOnClose); 10 | wFlag = flag; 11 | QPixmap pixmap(":/images/menu/menu_Jogging.png"); 12 | setIcon(QIcon(pixmap)); 13 | 14 | createPage(); 15 | 16 | iconSize.setWidth(70); 17 | iconSize.setHeight(70); 18 | 19 | switch (flag) { 20 | case Jogging::MOTION_MODE: 21 | { 22 | setText(tr("Jogging - Motion Mode")); 23 | tipsLabel->setText(tr("Select motion mode.")); 24 | initMotionMode(); 25 | } 26 | break; 27 | case Jogging::COORDINATE_SYSTEM: 28 | { 29 | setText(tr("Jogging - Coordinate System")); 30 | tipsLabel->setText(tr("Select coordinate system.")); 31 | initCoordSystem(); 32 | } 33 | break; 34 | case Jogging::INCREMENT: 35 | { 36 | setText(tr("Jogging - Increment")); 37 | tipsLabel->setText(tr("Select incremental mode.")); 38 | initIncrementalMode(); 39 | } 40 | break; 41 | default: 42 | break; 43 | } 44 | 45 | connect(btnGroup, SIGNAL(buttonClicked(int)), this, SLOT(contentWidgetUpdate(int))); 46 | connect(operatingBar->fourthButton(), SIGNAL(clicked()), this, SLOT(okBtnResponded())); 47 | connect(operatingBar->fifthButton(), SIGNAL(clicked()), this, SLOT(cancelBtnResponded())); 48 | } 49 | 50 | void SimpleSettingPage::createPage() 51 | { 52 | tipsWidget = new QWidget; 53 | tipsWidget->setObjectName("tipsWidgetOfSimpleSettingPage"); 54 | tipsWidget->setFixedHeight(132); 55 | currentKeyLabel = new QLabel(tipsWidget); 56 | currentKeyLabel->setProperty("h", 0); 57 | currentValLabel = new QLabel(tipsWidget); 58 | currentValLabel->setProperty("h", 0); 59 | tipsLabel = new QLabel(tipsWidget); 60 | tipsLabel->setProperty("h", 1); 61 | 62 | currentKeyLabel->setText(tr("Current selection:\t\t")); 63 | currentKeyLabel->setAlignment(Qt::AlignLeft | Qt::AlignBottom); 64 | currentValLabel->setAlignment(Qt::AlignLeft | Qt::AlignBottom); 65 | tipsLabel->setAlignment(Qt::AlignLeft | Qt::AlignBottom); 66 | 67 | QHBoxLayout *currentKeyValLayout = new QHBoxLayout; 68 | currentKeyValLayout->setMargin(0); 69 | currentKeyValLayout->setSpacing(0); 70 | currentKeyValLayout->addWidget(currentKeyLabel); 71 | currentKeyValLayout->addWidget(currentValLabel); 72 | currentKeyValLayout->addStretch(); 73 | QVBoxLayout *tipsLayout = new QVBoxLayout; 74 | tipsLayout->setMargin(10); 75 | tipsLayout->setSpacing(20); 76 | tipsLayout->addLayout(currentKeyValLayout); 77 | tipsLayout->addWidget(tipsLabel); 78 | tipsWidget->setLayout(tipsLayout); 79 | 80 | contentWidget = new QWidget; 81 | contentWidget->setFixedHeight(274); 82 | btnGroup = new QButtonGroup; 83 | 84 | operatingBar = new OperatingBar; 85 | operatingBar->firstButton()->hide(); 86 | operatingBar->secondButton()->hide(); 87 | operatingBar->thirdButton()->hide(); 88 | operatingBar->fourthButton()->setText(tr("OK")); 89 | operatingBar->fifthButton()->setText(tr("Cancel")); 90 | 91 | QVBoxLayout *mainLayout = new QVBoxLayout; 92 | mainLayout->setMargin(0); 93 | mainLayout->setSpacing(0); 94 | mainLayout->addWidget(tipsWidget); 95 | mainLayout->addWidget(contentWidget); 96 | mainLayout->addWidget(operatingBar); 97 | this->setMainLayout(mainLayout); 98 | } 99 | 100 | void SimpleSettingPage::initMotionMode() 101 | { 102 | iconStrList<<"Axis"<<"Linear"; 103 | textStrList<setObjectName("toolBtnOfSimpleSettingPage"); 111 | toolBtn->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); 112 | QPixmap pixmap(QString(":/images/Jogging/MotionMode_%1.png").arg(iconStrList.at(i))); 113 | toolBtn->setIcon(pixmap); // 为按钮设置图标 114 | toolBtn->setIconSize(iconSize); 115 | toolBtn->setFixedSize(iconSize.width()+30, iconSize.height()+30); 116 | toolBtn->setText(textStrList.at(i)); // 设置提示文字 117 | toolBtn->setCheckable(true); 118 | toolBtn->setChecked(false); 119 | 120 | btnGroup->addButton(toolBtn, Jogging::PAR_AXIS1_6+i); 121 | mainLayout->addWidget(toolBtn); 122 | } 123 | contentWidget->setLayout(mainLayout); 124 | 125 | // 设置初选项 126 | contentWidgetUpdate(joggingPar.motionMode); 127 | } 128 | 129 | void SimpleSettingPage::initCoordSystem() 130 | { 131 | iconStrList<<"World"<<"Base"<<"Tool"<<"Wobj"; 132 | textStrList<setObjectName("toolBtnOfSimpleSettingPage"); 140 | toolBtn->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); 141 | QPixmap pixmap(QString(":/images/Jogging/Coordinate_%1.png").arg(iconStrList.at(i))); 142 | toolBtn->setIcon(pixmap); // 为按钮设置图标 143 | toolBtn->setIconSize(iconSize); 144 | toolBtn->setFixedSize(iconSize.width()+30, iconSize.height()+30); 145 | toolBtn->setText(textStrList.at(i)); // 设置提示文字 146 | toolBtn->setCheckable(true); 147 | toolBtn->setChecked(false); 148 | 149 | btnGroup->addButton(toolBtn, Jogging::PAR_WORLD+i); 150 | mainLayout->addWidget(toolBtn); 151 | } 152 | contentWidget->setLayout(mainLayout); 153 | 154 | // 设置初选项 155 | contentWidgetUpdate(joggingPar.coordinateSystem); 156 | } 157 | 158 | void SimpleSettingPage::initIncrementalMode() 159 | { 160 | iconStrList<<"None"<<"Small"<<"Medium"<<"Large"<<"User"; 161 | textStrList<setObjectName("toolBtnOfSimpleSettingPage"); 169 | toolBtn->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); 170 | QPixmap pixmap(QString(":/images/Jogging/Increment_%1.png").arg(iconStrList.at(i))); 171 | toolBtn->setIcon(pixmap); // 为按钮设置图标 172 | toolBtn->setIconSize(iconSize); 173 | toolBtn->setFixedSize(iconSize.width()+30, iconSize.height()+30); 174 | toolBtn->setText(textStrList.at(i)); // 设置提示文字 175 | toolBtn->setCheckable(true); 176 | toolBtn->setChecked(false); 177 | 178 | btnGroup->addButton(toolBtn, Jogging::PAR_NONE+i); 179 | mainLayout->addWidget(toolBtn); 180 | } 181 | contentWidget->setLayout(mainLayout); 182 | 183 | // 设置初选项 184 | contentWidgetUpdate(joggingPar.increment); 185 | } 186 | 187 | void SimpleSettingPage::contentWidgetUpdate(int id) 188 | { 189 | btnGroup->button(id)->setChecked(true); 190 | // currentValLabel->setText(textStrList.at(id)); 191 | currentValLabel->setText(btnGroup->checkedButton()->text()); 192 | } 193 | 194 | void SimpleSettingPage::okBtnResponded() 195 | { 196 | switch (wFlag) { 197 | case Jogging::MOTION_MODE: 198 | { 199 | joggingPar.motionMode = (Jogging::TypeMotionMode)btnGroup->checkedId(); 200 | // 更新到插补模块 201 | if(Jogging::PAR_AXIS1_6 == joggingPar.motionMode) {pInputData->mode = ITP_Mode_JointOp_SpeedAndIncMode;} // 关节模式 202 | else if(Jogging::PAR_LINEAR == joggingPar.motionMode) {pInputData->mode = ITP_Mode_CoordinateOp_SpeedAndIncMode;} // 坐标模式 203 | } 204 | break; 205 | case Jogging::COORDINATE_SYSTEM: 206 | { 207 | joggingPar.coordinateSystem = (Jogging::TypeCoordinateSystem)btnGroup->checkedId(); 208 | // 更新到插补模块 209 | if(Jogging::PAR_WORLD == joggingPar.coordinateSystem) {pInputData->flagCoordinate = -1;} // 未定义 210 | else if(Jogging::PAR_BASE == joggingPar.coordinateSystem) {pInputData->flagCoordinate = 0;} // 0表示基坐标系 211 | else if(Jogging::PAR_TOOL == joggingPar.coordinateSystem) {pInputData->flagCoordinate = 1;} // 1表示工具坐标系 212 | else if(Jogging::PAR_WORKOBJECT == joggingPar.coordinateSystem) {pInputData->flagCoordinate = 2;} // 2表示用户自定义坐标系(基准坐标系为基坐标系) 213 | } 214 | break; 215 | case Jogging::INCREMENT: 216 | { 217 | joggingPar.increment = (Jogging::TypeIncrement)btnGroup->checkedId(); 218 | if(Jogging::PAR_NONE == joggingPar.increment) {SW_Increment = SW_OFF;} // 关闭或打开增量开关 219 | else {SW_Increment = SW_ON;} 220 | // 不需要更新到插补模块,仅由界面控制 221 | } 222 | break; 223 | default: 224 | break; 225 | } 226 | 227 | emit okBtnClicked(); 228 | this->close(); 229 | } 230 | 231 | void SimpleSettingPage::cancelBtnResponded() 232 | { 233 | this->close(); 234 | } 235 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/source/Page_ProgramData/programdatapage.cpp: -------------------------------------------------------------------------------- 1 | #include "header/Page_ProgramData/programdatapage.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | ProgramDataPage::ProgramDataPage(QWidget *parent) : 8 | SimplePage(parent) 9 | { 10 | QPixmap pixmap(":/images/menu/menu_ProgramData.png"); 11 | setIcon(QIcon(pixmap)); 12 | setText(tr("Program Data")); 13 | 14 | createPage(); 15 | } 16 | 17 | // 20160126 突然感觉好累 18 | void ProgramDataPage::createPage() 19 | { 20 | tipsLabel = new QLabel(tr("Select a data type from the list.")); 21 | tipsLabel->setFixedSize(UI_SCREEN_WIDTH, 48); 22 | tipsLabel->setAlignment(Qt::AlignLeft | Qt::AlignBottom); 23 | tipsLabel->setMargin(5); 24 | tipsLabel->setStyleSheet("border-bottom: 1px solid Gray"); 25 | 26 | scopeKeyLabel = new QLabel(tr("Scope:")); 27 | scopeKeyLabel->setFixedSize(80, 32); 28 | scopeKeyLabel->setAlignment(Qt::AlignLeft | Qt::AlignBottom); 29 | scopeKeyLabel->setMargin(5); 30 | scopeValLabel = new QLabel(tr("RAPID/T_ROB1")); 31 | scopeValLabel->setFixedSize(560, 32); 32 | scopeValLabel->setAlignment(Qt::AlignLeft | Qt::AlignBottom); 33 | scopeValLabel->setMargin(5); 34 | scopeBtn = new QPushButton(tr("Change Scope")); 35 | scopeBtn->setFixedSize(160, 32); 36 | 37 | QHBoxLayout *scopeLayout = new QHBoxLayout; 38 | scopeLayout->setMargin(0); 39 | scopeLayout->setSpacing(0); 40 | scopeLayout->addWidget(scopeKeyLabel); 41 | scopeLayout->addWidget(scopeValLabel); 42 | scopeLayout->addWidget(scopeBtn); 43 | 44 | contentTable = new QTableWidget; 45 | contentTable->setFixedSize(UI_SCREEN_WIDTH, 326); 46 | contentTable->setColumnCount(3); 47 | contentTable->setRowCount(5); 48 | contentTable->verticalHeader()->hide(); 49 | contentTable->horizontalHeader()->hide(); 50 | contentTable->setShowGrid(false); 51 | contentTable->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 52 | contentTable->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 53 | contentTable->setEditTriggers(false); 54 | contentTable->setSelectionBehavior(QAbstractItemView::SelectItems); 55 | contentTable->setSelectionMode(QAbstractItemView::SingleSelection); 56 | contentTable->horizontalHeader()->setFixedHeight(34); 57 | contentTable->verticalHeader()->setDefaultSectionSize(40); 58 | contentTable->setColumnWidth(0, contentTable->width()/3); 59 | contentTable->setColumnWidth(1, contentTable->width()/3); 60 | contentTable->horizontalHeader()->setStretchLastSection(true); 61 | 62 | 63 | // bottom 64 | operatingBar = new OperatingBar; 65 | operatingBar->firstButton()->hide(); 66 | operatingBar->secondButton()->hide(); 67 | operatingBar->thirdButton()->hide(); 68 | operatingBar->fourthButton()->setText(tr("Show Data")); 69 | operatingBar->fifthButton()->setText(tr("View")); 70 | 71 | QVBoxLayout *mainLayout = new QVBoxLayout; 72 | mainLayout->setMargin(0); 73 | mainLayout->setSpacing(0); 74 | mainLayout->addWidget(tipsLabel); 75 | mainLayout->addLayout(scopeLayout); 76 | mainLayout->addWidget(contentTable); 77 | mainLayout->addWidget(operatingBar); 78 | this->setMainLayout(mainLayout); 79 | 80 | } 81 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/source/hmiapp.cpp: -------------------------------------------------------------------------------- 1 | #include "hmiapp.h" 2 | #include 3 | 4 | //HmiApp::HmiApp(int &argc, char **argv) 5 | //{ 6 | 7 | //} 8 | 9 | bool HmiApp::event(QEvent *e) 10 | { 11 | if(e->type() == myCustomEvent) 12 | { 13 | qDebug() << "I'm HmiApp, myCustomEvent is comming."; 14 | 15 | // 修改参数 16 | // 通知相关界面参数被修改了 17 | 18 | return true; 19 | } 20 | 21 | return QApplication::event(e); 22 | } 23 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/source/main.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwidget.h" 2 | #include "hmiapp.h" 3 | 4 | #include "GRS_Common.h" 5 | #include "GRS_SharedMemory.h" 6 | #include "decode_public.h" 7 | #include "robotdecodepublic.h" 8 | #include "decode_proc_task.h" 9 | 10 | #include 11 | #include 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | HmiApp a(argc, argv); 16 | 17 | int ret1 = G_CommonInit(); 18 | int ret2 = G_SharedMemoryInit(); 19 | 20 | if(ret1 || ret2) 21 | { 22 | G_SharedMemoryCleanup(); 23 | a.exit(1); 24 | return 1; 25 | } 26 | 27 | if(1 == decodeTaskInit()) 28 | { 29 | readRobotPrgFile(0, "E:/workspace/Qt_Project/GSK_Robot_Sys/GRS_Pro/GR_HMI/system/example/example.pgf"); 30 | } 31 | else qDebug("Decode module initialize failed."); 32 | 33 | QFile file(":/qss/GR-HMI.qss"); 34 | file.open(QFile::ReadOnly); 35 | a.setStyleSheet(file.readAll()); 36 | file.close(); 37 | 38 | MainWidget w; 39 | w.show(); 40 | 41 | int retcode; 42 | retcode = a.exec(); 43 | 44 | return retcode; 45 | //return a.exec(); 46 | } 47 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/source/mainmenuwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "header/mainmenuwidget.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | MainMenuWidget::MainMenuWidget(QWidget *parent) : 8 | QWidget(parent) 9 | { 10 | setFixedSize(UI_SCREEN_WIDTH * 0.9, UI_SCREEN_HEIGHT - 54*2); 11 | setObjectName("mainScreenMenuWidget"); 12 | 13 | QFrame *frame = new QFrame; 14 | 15 | menuTable = new QTableWidget(9, 2); 16 | menuTable->setFixedSize(600, 450); 17 | menuTable->horizontalHeader()->hide(); 18 | menuTable->verticalHeader()->hide(); 19 | menuTable->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 20 | menuTable->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); 21 | menuTable->setShowGrid(false); 22 | menuTable->setFrameShape(QFrame::NoFrame); 23 | menuTable->setEditTriggers(false); 24 | menuTable->setSelectionBehavior(QAbstractItemView::SelectItems); 25 | menuTable->setSelectionMode(QAbstractItemView::SingleSelection); 26 | 27 | for(int i=0; irowCount(); i++) 28 | { 29 | menuTable->setRowHeight(i, menuTable->height()/9); 30 | } 31 | menuTable->verticalHeader()->setStretchLastSection(true); 32 | for(int i=0; icolumnCount(); i++) 33 | { 34 | menuTable->setColumnWidth(i, menuTable->width()/2); 35 | } 36 | menuTable->horizontalHeader()->setStretchLastSection(true); 37 | 38 | QHBoxLayout *frameLayout = new QHBoxLayout; 39 | frameLayout->addWidget(menuTable, Qt::AlignCenter); 40 | frame->setLayout(frameLayout); 41 | 42 | QHBoxLayout *mainLayout = new QHBoxLayout; 43 | mainLayout->setMargin(0); 44 | mainLayout->addWidget(frame); 45 | setLayout(mainLayout); 46 | 47 | createTableItem(); 48 | } 49 | 50 | void MainMenuWidget::createTableItem() 51 | { 52 | menuItemNameList << tr("HotEdit") << tr("Inputs and Outputs") << tr("Jogging") 53 | << tr("Production Window") << tr("Program Editor") << tr("Program Data") 54 | << tr("RobotWare Arc") << tr("") << tr("Log Off Default User") 55 | << tr("Backup and Restore") << tr("Calibration") << tr("Control Panel") 56 | << tr("Event Log") << tr("FlexPendand Explorer") << tr("System Info") 57 | << tr("") << tr("") << tr("Restart"); 58 | 59 | int totalCount = menuTable->rowCount() * menuTable->columnCount(); 60 | 61 | QPixmap pixmap; 62 | // QPixmap pixmap(":/images/robotIcon_16.png"); 63 | // QIcon icon(pixmap); 64 | 65 | for(int i=0; isetFlags(item->flags() & ~(Qt::ItemIsEnabled)); 72 | // item->setFlags(item->flags() & ~(Qt::ItemIsSelectable)); 73 | item->setData(Qt::UserRole, Menu_none); 74 | }else 75 | { 76 | pixmap = QPixmap(QString(":/images/menu/menu_%1.png").arg(i)); 77 | item->setIcon(QIcon(pixmap)); 78 | item->setText(menuItemNameList.at(i)); 79 | item->setData(Qt::UserRole, (menuItemTypes)i); 80 | } 81 | 82 | if(i < totalCount/2) {menuTable->setItem(i, 0, item);} 83 | else {menuTable->setItem(i - totalCount/2, 1, item);} 84 | } 85 | 86 | } 87 | 88 | void MainMenuWidget::menuTableUpdate() 89 | { 90 | int totalCount = menuTable->rowCount() * menuTable->columnCount(); 91 | for(int i=0; iitem(i, 0)->setSelected(false);} 94 | else {menuTable->item(i - totalCount/2, 1)->setSelected(false);} 95 | } 96 | } 97 | 98 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/source/mainwidget.cpp: -------------------------------------------------------------------------------- 1 | #include "mainwidget.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | MainWidget::MainWidget(QWidget *parent) 8 | : QWidget(parent) 9 | { 10 | setObjectName("appMainWidget"); 11 | // setWindowFlags(Qt::FramelessWindowHint); 12 | setWindowIcon(QIcon(":/images/GR-HMI-icon.png")); 13 | //setMinimumSize(878, 504); 14 | setFixedSize(UI_SCREEN_WIDTH + UI_PANEL_WIDTH, UI_SCREEN_HEIGHT); 15 | 16 | //mainFrame = new QFrame; 17 | panelWidget = new PanelWidget; 18 | screenWidget = new ScreenWidget; 19 | 20 | 21 | //mainFrame->setCursor(Qt::SizeAllCursor); 22 | 23 | //QHBoxLayout *mainFrameLayout = new QHBoxLayout(mainFrame); 24 | //mainFrameLayout->setMargin(0); 25 | //mainFrameLayout->setSpacing(0); 26 | //mainFrameLayout->addWidget(screenWidget, 3); 27 | //mainFrameLayout->addWidget(panelWidget, 1); 28 | 29 | 30 | mainLayout = new QHBoxLayout; 31 | mainLayout->setMargin(0); 32 | mainLayout->setSpacing(0); 33 | mainLayout->addWidget(screenWidget); 34 | mainLayout->addWidget(panelWidget); 35 | this->setLayout(mainLayout); 36 | 37 | connect(panelWidget, SIGNAL(showMin()), this, SLOT(showMinimized())); 38 | connect(panelWidget, SIGNAL(closeApp()), this, SLOT(close())); 39 | connect(panelWidget, SIGNAL(switchBtnClicked()), this, SLOT(switchBtnClicked())); 40 | // 当操作面板的相关操作改变了系统的一些模式和状态,会在屏幕中中更新显示 41 | connect(panelWidget, SIGNAL(statusChanged()), screenWidget, SLOT(eventLogBtnUpdate())); 42 | } 43 | 44 | MainWidget::~MainWidget() 45 | { 46 | 47 | } 48 | 49 | void MainWidget::switchBtnClicked() 50 | { 51 | if(panelWidget->switchFlag == 0) 52 | { 53 | panelWidget->switchFlag = 1; 54 | QRect thisRect = this->geometry(); 55 | QRect panelRect = panelWidget->geometry(); 56 | 57 | mainLayout->removeWidget(screenWidget); 58 | screenWidget->hide(); 59 | this->setFixedSize(panelWidget->size()); 60 | this->setGeometry(thisRect.x() + panelRect.x(), thisRect.y() + panelRect.y(), panelRect.width(), panelRect.height()); 61 | 62 | 63 | } 64 | else if(panelWidget->switchFlag == 1) 65 | { 66 | panelWidget->switchFlag = 0; 67 | QRect thisRect = this->geometry(); 68 | 69 | mainLayout->insertWidget(0, screenWidget); 70 | screenWidget->show(); 71 | this->setFixedSize(UI_SCREEN_WIDTH + UI_PANEL_WIDTH, UI_SCREEN_HEIGHT); 72 | this->setGeometry(thisRect.x() - UI_SCREEN_WIDTH, thisRect.y(), thisRect.width() + UI_SCREEN_WIDTH, thisRect.height()); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/source/panelbutton.cpp: -------------------------------------------------------------------------------- 1 | #include "panelbutton.h" 2 | #include 3 | #include 4 | 5 | #include "GRS_Common.h" 6 | 7 | PanelButton::PanelButton(const QString & text, QWidget *parent) : 8 | QPushButton(parent) 9 | { 10 | this->setObjectName("panelBtn"); 11 | this->setText(text); 12 | this->setFixedSize(40, 40); 13 | parentWindow = parent; 14 | mousePressedFlag = false; 15 | } 16 | 17 | void PanelButton::mousePressEvent(QMouseEvent *e) 18 | { 19 | if(e->button() == Qt::LeftButton) 20 | { 21 | mousePressedFlag = true; 22 | } 23 | else if(e->button() == Qt::RightButton) 24 | { 25 | // QEvent event = QEvent(myCustomEvent); 26 | QEvent myEvent(myCustomEvent); 27 | QWidget *receiver = this->parentWidget(); 28 | if(receiver == 0) 29 | return; 30 | receiver = parentWindow; 31 | QCoreApplication::sendEvent(receiver, &myEvent); 32 | QCoreApplication::sendEvent(qApp, &myEvent); 33 | qApp->children(); 34 | } 35 | QPushButton::mousePressEvent(e); 36 | } 37 | 38 | void PanelButton::mouseReleaseEvent(QMouseEvent *e) 39 | { 40 | if(mousePressedFlag && this->rect().contains(e->pos())) 41 | { 42 | mousePressedFlag = false; 43 | 44 | QEvent myEvent = QEvent(myCustomEvent); 45 | QCoreApplication::sendEvent(this->parentWidget(), &myEvent); 46 | } 47 | QPushButton::mouseReleaseEvent(e); 48 | } 49 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/source/quicksetbar.cpp: -------------------------------------------------------------------------------- 1 | #include "header/quicksetbar.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | QuickSetBar::QuickSetBar(QWidget *parent) : 8 | QWidget(parent) 9 | { 10 | setFixedSize(96, UI_SCREEN_HEIGHT - 108); 11 | setObjectName("mainScreenQuickSetBar"); 12 | 13 | QFrame *w = new QFrame; 14 | // w->setStyleSheet("background-color: FloralWhite"); 15 | 16 | // QLabel *label = new QLabel(tr("hello")); 17 | 18 | QVBoxLayout *mainLayout = new QVBoxLayout; 19 | mainLayout->setMargin(0); 20 | mainLayout->addWidget(w); 21 | // mainLayout->addWidget(label); 22 | setLayout(mainLayout); 23 | } 24 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/source/systembutton.cpp: -------------------------------------------------------------------------------- 1 | #include "systembutton.h" 2 | 3 | SystemButton::SystemButton(QWidget *parent) : 4 | QPushButton(parent) 5 | { 6 | status = NORMAL; 7 | mouse_press = false; 8 | } 9 | 10 | void SystemButton::setPicName(QString pic_name) 11 | { 12 | this->pic_name = pic_name; 13 | setFixedSize(QPixmap(pic_name).size()); 14 | } 15 | 16 | void SystemButton::enterEvent(QEvent *) 17 | { 18 | status = ENTER; 19 | update(); 20 | } 21 | 22 | void SystemButton::mousePressEvent(QMouseEvent *event) 23 | { 24 | //若点击鼠标左键 25 | if(event->button() == Qt::LeftButton) 26 | { 27 | mouse_press = true; 28 | status = PRESS; 29 | update(); 30 | } 31 | } 32 | 33 | void SystemButton::mouseReleaseEvent(QMouseEvent *event) 34 | { 35 | //若点击鼠标左键 36 | if(mouse_press && this->rect().contains(event->pos())) 37 | { 38 | mouse_press = false; 39 | status = ENTER; 40 | update(); 41 | emit clicked(); 42 | } 43 | } 44 | 45 | void SystemButton::leaveEvent(QEvent *) 46 | { 47 | status = NORMAL; 48 | update(); 49 | } 50 | 51 | void SystemButton::paintEvent(QPaintEvent *) 52 | { 53 | QPainter painter(this); 54 | QPixmap pixmap; 55 | switch(status) 56 | { 57 | case NORMAL: 58 | { 59 | pixmap.load(pic_name); 60 | break; 61 | } 62 | case ENTER: 63 | { 64 | pixmap.load(pic_name + QString("_hover")); 65 | break; 66 | } 67 | case PRESS: 68 | { 69 | pixmap.load(pic_name + QString("_pressed")); 70 | break; 71 | } 72 | case NOSTATUS: 73 | { 74 | pixmap.load(pic_name); 75 | break; 76 | } 77 | default: 78 | pixmap.load(pic_name); 79 | } 80 | 81 | painter.drawPixmap(rect(), pixmap); 82 | } 83 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/source/virtualbutton.cpp: -------------------------------------------------------------------------------- 1 | #include "virtualbutton.h" 2 | 3 | VirtualButton::VirtualButton(const QString & text, QWidget *parent) : 4 | QPushButton(parent) 5 | { 6 | this->setObjectName("virtualBtn"); 7 | this->setText(text); 8 | this->setFixedSize(80, 30); 9 | this->setCheckable(true); 10 | } 11 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/system/example/CalibData.mod: -------------------------------------------------------------------------------- 1 | MODULE CalibData 2 | PERS wobjdata wobj0:=[FALSE,TRUE,"",[[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]]; 3 | PERS tooldata tool0:=[TRUE,[[0,0,0],[1,0,0,0]],[1,[0,0,1],[1,0,0,0],0,0,0]]; 4 | CONST zonedata z0:=[FALSE,0.3,0.3,0.3,0.03,0.3,0.03]; 5 | CONST speeddata v1000:=[1000,500,5000,1000]; 6 | CONST num time:=0.5; 7 | PERS tooldata tWeldGun:=[TRUE,[[125.800591275,0,381.268213238],[0.898794046,0,0.438371147,0]],[2,[0,0,100],[0,1,0,0],0,0,0]]; 8 | TASK PERS wobjdata Workobject_1:=[FALSE,TRUE,"",[[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]]; 9 | PERS tooldata tGripper:=[TRUE,[[0,0,115],[1,0,0,0]],[1,[0,0,100],[0,1,0,0],0,0,0]]; 10 | TASK PERS wobjdata MoveExampleCood:=[FALSE,TRUE,"",[[0,350,150],[1,0,0,0]],[[0,0,0],[1,0,0,0]]]; 11 | PERS tooldata MyTool:=[TRUE,[[31.792631019,0,229.638935148],[0.945518576,0,0.325568154,0]],[1,[0,0,1],[1,0,0,0],0,0,0]]; 12 | PERS tooldata MyNewTool:=[TRUE,[[0,0,0],[1,0,0,0]],[1,[0,0,1],[1,0,0,0],0,0,0]]; 13 | ENDMODULE -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/system/example/Module1.mod: -------------------------------------------------------------------------------- 1 | MODULE Module1 2 | CONST robtarget p60:=[[921.57,-665.43,1400.10],[0.420819,-1.96661E-07,0.907145,-3.80985E-09],[-1,0,-1,0],[0,0,0,0,0,0]]; 3 | CONST robtarget p10:=[[940.00,0.00,1455.00],[0.707107,0,0.707107,0],[0,0,0,0],[0,0,0,0,0,0]]; 4 | CONST robtarget p20:=[[921.57,-665.43,1400.10],[0.420819,-1.96661E-07,0.907145,-3.80985E-09],[-1,0,-1,0],[0,0,0,0,0,0]]; 5 | CONST robtarget p30:=[[403.34,218.34,1400.10],[0.420818,-5.72188E-08,0.907145,1.96676E-08],[0,-1,0,0],[0,0,0,0,0,0]]; 6 | CONST robtarget p40:=[[921.57,218.34,1400.10],[0.420819,-9.99145E-08,0.907145,1.88407E-08],[0,-1,0,0],[0,0,0,0,0,0]]; 7 | CONST robtarget p50:=[[403.34,218.34,1400.10],[0.420818,-5.72188E-08,0.907145,1.96676E-08],[0,-1,0,0],[0,0,0,0,0,0]]; 8 | PERS tooldata MyNewTool2:=[TRUE,[[0,0,0],[1,0,0,0]],[1,[0,0,1],[1,0,0,0],0,0,0]]; 9 | PROC main() 10 | MoveJ p10, v1000, z0, tool0\WObj:=wobj0; 11 | MoveJ p20, v1000, z0, tool0\WObj:=wobj0; 12 | MoveJ p30, v1000, z0, tool0\WObj:=wobj0; 13 | MoveJ p40, v1000, z0, tool0\WObj:=wobj0; 14 | MoveJ p50, v1000, z0, tool0\WObj:=wobj0; 15 | MoveJ p60, v1000, z0, tool0\WObj:=wobj0; 16 | MoveJ p10, v1000, z0, tool0\WObj:=wobj0; 17 | MoveJ p20, v1000, z0, tool0\WObj:=wobj0; 18 | MoveJ p30, v1000, z0, tool0\WObj:=wobj0; 19 | MoveJ p40, v1000, z0, tool0\WObj:=wobj0; 20 | MoveJ p50, v1000, z0, tool0\WObj:=wobj0; 21 | MoveJ p60, v1000, z0, tool0\WObj:=wobj0; 22 | MoveJ p10, v1000, z0, tool0\WObj:=wobj0; 23 | MoveJ p20, v1000, z0, tool0\WObj:=wobj0; 24 | MoveJ p30, v1000, z0, tool0\WObj:=wobj0; 25 | MoveJ p40, v1000, z0, tool0\WObj:=wobj0; 26 | MoveJ p50, v1000, z0, tool0\WObj:=wobj0; 27 | MoveJ p60, v1000, z0, tool0\WObj:=wobj0; 28 | MoveJ p10, v1000, z0, tool0\WObj:=wobj0; 29 | MoveJ p20, v1000, z0, tool0\WObj:=wobj0; 30 | MoveJ p30, v1000, z0, tool0\WObj:=wobj0; 31 | MoveJ p40, v1000, z0, tool0\WObj:=wobj0; 32 | MoveJ p50, v1000, z0, tool0\WObj:=wobj0; 33 | MoveJ p60, v1000, z0, tool0\WObj:=wobj0; 34 | MoveJ p10, v1000, z0, tool0\WObj:=wobj0; 35 | MoveJ p20, v1000, z0, tool0\WObj:=wobj0; 36 | MoveJ p30, v1000, z0, tool0\WObj:=wobj0; 37 | MoveJ p40, v1000, z0, tool0\WObj:=wobj0; 38 | MoveJ p50, v1000, z0, tool0\WObj:=wobj0; 39 | MoveJ p60, v1000, z0, tool0\WObj:=wobj0; 40 | ENDPROC 41 | ENDMODULE -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/system/example/example - 副本.pgf: -------------------------------------------------------------------------------- 1 | 2 | 3 | CalibData.mod 4 | Module1.mod 5 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/system/example/example-1.pgf: -------------------------------------------------------------------------------- 1 | 2 | 3 | CalibData.mod 4 | Module1.mod 5 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/system/example/example.pgf: -------------------------------------------------------------------------------- 1 | 2 | 3 | Module1.mod 4 | CalibData.mod 5 | 6 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/system/example/example.pgf.bak: -------------------------------------------------------------------------------- 1 | 2 | 3 | CalibData.mod 4 | Module1.mod 5 | 6 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/system/example/ok/CalibData.mod: -------------------------------------------------------------------------------- 1 | MODULE CalibData 2 | PERS wobjdata wobj0:=[FALSE,TRUE,"",[[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]]; 3 | PERS tooldata tool0:=[TRUE,[[0,0,0],[1,0,0,0]],[1,[0,0,1],[1,0,0,0],0,0,0]]; 4 | PERS tooldata tWeldGun:=[TRUE,[[125.800591275,0,381.268213238],[0.898794046,0,0.438371147,0]],[2,[0,0,100],[0,1,0,0],0,0,0]]; 5 | TASK PERS wobjdata Workobject_1:=[FALSE,TRUE,"",[[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]]; 6 | PERS tooldata tGripper:=[TRUE,[[0,0,115],[1,0,0,0]],[1,[0,0,100],[0,1,0,0],0,0,0]]; 7 | TASK PERS wobjdata MoveExampleCood:=[FALSE,TRUE,"",[[0,350,150],[1,0,0,0]],[[0,0,0],[1,0,0,0]]]; 8 | PERS tooldata MyTool:=[TRUE,[[31.792631019,0,229.638935148],[0.945518576,0,0.325568154,0]],[1,[0,0,1],[1,0,0,0],0,0,0]]; 9 | PERS tooldata MyNewTool:=[TRUE,[[0,0,0],[1,0,0,0]],[1,[0,0,1],[1,0,0,0],0,0,0]]; 10 | ENDMODULE -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/system/example/ok/Module1.mod: -------------------------------------------------------------------------------- 1 | MODULE Module1 2 | CONST robtarget Target_10:=[[992.02143972009003,105.58588353520541,688.62696116427981],[0.037518392060359500,-0.88221442709096565,-0.034540933500233607,-0.46807798367654346],[0,0,0,0],[0,0,0,0,0,0]]; 3 | CONST robtarget Target_20:=[[974.69312433600101,-102.44437545204826,717.19053833095438],[0.025372975071369635,0.87342107122782642,-0.045774058722066899,0.48414520551115792],[-1,0,0,0],[0,0,0,0,0,0]]; 4 | CONST robtarget Target_40:=[[831.70675512279195,-336.03134127386653,954.43770175741713],[0.11747374759893031,0.77353277658943742,-0.15035954024161249,0.60435003998115933],[-1,0,0,0],[0,0,0,0,0,0]]; 5 | CONST zonedata z0:=[FALSE,0.3,0.3,0.3,0.03,0.3,0.03]; 6 | CONST speeddata v1000:=[1000,500,5000,1000]; 7 | CONST num time:=0.5; 8 | PROC main() 9 | MoveJ Target_10,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 10 | MoveJ Target_20,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 11 | MoveJ Target_40,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 12 | ENDPROC 13 | PROC Path_20() 14 | MoveL Target_230,v1000,z0,MyNewTool; 15 | MoveL Target_240,v1000,z0,MyNewTool; 16 | MoveL Target_250,v1000,z0,MyNewTool; 17 | MoveL Target_260,v1000,z0,MyNewTool; 18 | MoveC Target_270,Target_280,v1000,z0,MyNewTool; 19 | MoveC Target_290,Target_300,v1000,z0,MyNewTool; 20 | MoveC Target_310,Target_320,v1000,z0,MyNewTool; 21 | MoveL Target_330,v1000,z0,MyNewTool; 22 | Path_30; 23 | ENDPROC 24 | PROC Path_30() 25 | MoveL Target_340,v1000,z0,MyNewTool; 26 | MoveL Target_350,v1000,z0,MyNewTool; 27 | MoveL Target_360,v1000,z0,MyNewTool; 28 | Path_40; 29 | ENDPROC 30 | PROC Path_40() 31 | MoveL Target_370,v1000,z0,MyNewTool; 32 | MoveC Target_380,Target_390,v1000,z0,MyNewTool; 33 | ENDPROC 34 | ENDMODULE -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/system/example/ok/example - 副本.pgf: -------------------------------------------------------------------------------- 1 | 2 | 3 | CalibData.mod 4 | Module1.mod 5 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/system/example/ok/example.pgf: -------------------------------------------------------------------------------- 1 | 2 | 3 | Module1.mod 4 | CalibData.mod 5 | 6 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/system/example/ok/example.pgf.bak: -------------------------------------------------------------------------------- 1 | 2 | 3 | CalibData.mod 4 | Module1.mod 5 | 6 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/system/example/wuheng/CalibData.mod: -------------------------------------------------------------------------------- 1 | MODULE CalibData 2 | PERS wobjdata wobj0:=[FALSE,TRUE,"",[[0,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]]; 3 | PERS tooldata tool0:=[TRUE,[[0,0,0],[1,0,0,0]],[1,[0,0,1],[1,0,0,0],0,0,0]]; 4 | PERS tooldata tWeldGun:=[TRUE,[[125.800591275,0,381.268213238],[0.898794046,0,0.438371147,0]],[2,[0,0,100],[0,1,0,0],0,0,0]]; 5 | PERS wobjdata Workobject_1:=[FALSE,TRUE,"",[[200,0,0],[1,0,0,0]],[[0,0,0],[1,0,0,0]]]; 6 | PERS tooldata tGripper:=[TRUE,[[0,0,115],[1,0,0,0]],[1,[0,0,100],[0,1,0,0],0,0,0]]; 7 | PERS wobjdata MoveExampleCood:=[FALSE,TRUE,"",[[0,350,150],[1,0,0,0]],[[0,0,0],[1,0,0,0]]]; 8 | PERS tooldata MyTool:=[TRUE,[[31.792631019,0,229.638935148],[0.945518576,0,0.325568154,0]],[1,[0,0,1],[1,0,0,0],0,0,0]]; 9 | PERS tooldata MyNewTool:=[TRUE,[[0,0,60],[1,0,0,0]],[1,[0,0,1],[1,0,0,0],0,0,0]]; 10 | ENDMODULE -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/system/example/wuheng/Module1.mod: -------------------------------------------------------------------------------- 1 | MODULE Module1 2 | CONST robtarget Target_10:=[[623.736,-1.4,500],[0,0.847722968,-0.530439224,0],[-1,0,-2,0],[-1,-1,-1,-1,-1,-1]]; 3 | CONST robtarget Target_20:=[[615.902873443,8.281748692,500],[0,0.94557602,-0.325401277,0],[0,0,-2,0],[-1,-1,-1,-1,-1,-1]]; 4 | CONST robtarget Target_30:=[[604.61,13.532,500],[0,0.994622428,-0.103567489,0],[0,0,-2,0],[-1,-1,-1,-1,-1,-1]]; 5 | CONST robtarget Target_40:=[[599.403600487,16.302277668,500],[0,0.943554709,-0.331216713,0],[0,0,-2,0],[-1,-1,-1,-1,-1,-1]]; 6 | CONST robtarget Target_50:=[[595.562,20.777,500],[0,0.865930359,-0.500164587,0],[0,0,-2,0],[-1,-1,-1,-1,-1,-1]]; 7 | CONST robtarget Target_60:=[[597.816370005,14.915141124,500],[0,0.852892303,-0.522086888,0],[0,0,-2,0],[-1,-1,-1,-1,-1,-1]]; 8 | CONST robtarget Target_70:=[[590.643,15.324,500],[0,0.99985512,0.017021701,0],[0,0,1,0],[-1,-1,-1,-1,-1,-1]]; 9 | CONST robtarget Target_80:=[[585.395347846,-0.237449737,500],[0,0.719631545,0.694356133,0],[-1,0,1,0],[-1,-1,-1,-1,-1,-1]]; 10 | CONST robtarget Target_90:=[[589.518,-16.134,500],[0,0.491466316,0.870896584,0],[-1,0,0,0],[-1,-1,-1,-1,-1,-1]]; 11 | CONST robtarget Target_100:=[[597.083,-12.483,500],[0,-0.264785252,0.964307405,0],[-1,0,-1,0],[-1,-1,-1,-1,-1,-1]]; 12 | CONST robtarget Target_110:=[[595.746657937,-16.629604656,500],[0,0.721325087,0.69259665,0],[-1,0,1,0],[-1,-1,-1,-1,-1,-1]]; 13 | CONST robtarget Target_120:=[[596.742,-20.871,500],[0,0.509480024,0.860482484,0],[-1,0,0,0],[-1,-1,-1,-1,-1,-1]]; 14 | CONST robtarget Target_130:=[[603.809791295,-14.83880817,500],[0,-0.23193219,0.972731957,0],[-1,0,-1,0],[-1,-1,-1,-1,-1,-1]]; 15 | CONST robtarget Target_140:=[[615.416517972,-12.563275607,500],[0,-0.185133559,0.982713369,0],[-1,0,-1,0],[-1,-1,-1,-1,-1,-1]]; 16 | CONST robtarget Target_150:=[[621.175011199,-8.173115177,500],[0,-0.448574398,0.893745495,0],[-1,0,-1,0],[-1,-1,-1,-1,-1,-1]]; 17 | CONST robtarget Target_160:=[[623.736,-1.4,500],[0,-0.677333099,0.735676473,0],[-1,0,-1,0],[-1,-1,-1,-1,-1,-1]]; 18 | CONST robtarget Target_170:=[[617.31311623,-4.669496623,500],[0,0.926848335,0.375435965,0],[-1,0,1,0],[-1,-1,-1,-1,-1,-1]]; 19 | CONST robtarget Target_180:=[[611.975614607,-9.363781001,500],[0,0.989682936,0.143274863,0],[-1,0,1,0],[-1,-1,-1,-1,-1,-1]]; 20 | CONST robtarget Target_190:=[[608.374,-9.557,500],[0,0.995937158,-0.090050974,0],[-1,0,-2,0],[-1,-1,-1,-1,-1,-1]]; 21 | CONST robtarget Target_200:=[[602.090461719,-8.557904909,500],[0,0.991973762,0.126443879,0],[-1,0,1,0],[-1,-1,-1,-1,-1,-1]]; 22 | CONST robtarget Target_210:=[[599.177398091,-9.998243918,500],[0,0.945259462,0.326319705,0],[-1,0,1,0],[-1,-1,-1,-1,-1,-1]]; 23 | CONST robtarget Target_220:=[[597.083,-12.483,500],[0,0.858718949,0.512446843,0],[-1,0,1,0],[-1,-1,-1,-1,-1,-1]]; 24 | CONST robtarget Target_230:=[[597.816370005,14.915141124,500],[0,0.522086888,0.852892303,0],[0,0,0,0],[-1,-1,-1,-1,-1,-1]]; 25 | CONST robtarget Target_240:=[[599.228158361,12.447628134,500],[0,0.481013467,0.876713205,0],[0,0,0,0],[-1,-1,-1,-1,-1,-1]]; 26 | CONST robtarget Target_250:=[[595.93940711,12.49384908,500],[0,0.998290636,0.058444905,0],[0,0,1,0],[-1,-1,-1,-1,-1,-1]]; 27 | CONST robtarget Target_260:=[[592.751,11.687,500],[0,0.98212196,0.18824573,0],[0,0,1,0],[-1,-1,-1,-1,-1,-1]]; 28 | CONST robtarget Target_270:=[[590.032529197,-1.465300629,500],[0,0.698569925,0.715541794,0],[-1,0,0,0],[-1,-1,-1,-1,-1,-1]]; 29 | CONST robtarget Target_280:=[[593.379,-14.472,500],[0,0.518908028,0.854830076,0],[-1,0,0,0],[-1,-1,-1,-1,-1,-1]]; 30 | CONST robtarget Target_290:=[[598.550160299,-1.525622572,500],[0,0.710484728,-0.70371262,0],[-1,0,-2,0],[-1,-1,-1,-1,-1,-1]]; 31 | CONST robtarget Target_300:=[[594.878216801,7.831632395,500],[0,0.996886245,0.078853123,0],[0,0,1,0],[-1,-1,-1,-1,-1,-1]]; 32 | CONST robtarget Target_310:=[[592.899123752,1.965756689,500],[0,0.725029605,0.688717701,0],[0,0,1,0],[-1,-1,-1,-1,-1,-1]]; 33 | CONST robtarget Target_320:=[[595.07,-8.388,500],[0,0.525278576,0.850930325,0],[-1,0,0,0],[-1,-1,-1,-1,-1,-1]]; 34 | CONST robtarget Target_330:=[[593.379,-14.472,500],[0,0.825320138,0.564665096,0],[-1,0,1,0],[-1,-1,-1,-1,-1,-1]]; 35 | CONST robtarget Target_340:=[[595.069954295,-8.387992086,500],[0,-0.64397045,0.765050364,0],[-1,0,-1,0],[-1,-1,-1,-1,-1,-1]]; 36 | CONST robtarget Target_350:=[[595.439579744,-0.511504022,500],[0,0.734022523,-0.679125125,0],[-1,0,-2,0],[-1,-1,-1,-1,-1,-1]]; 37 | CONST robtarget Target_360:=[[593.856,7.213,500],[0,0.812702736,-0.582678525,0],[0,0,-2,0],[-1,-1,-1,-1,-1,-1]]; 38 | CONST robtarget Target_370:=[[599.228158361,12.447628134,500],[0,0.481013467,0.876713205,0],[0,0,0,0],[-1,-1,-1,-1,-1,-1]]; 39 | CONST robtarget Target_380:=[[609.753497158,2.464530985,500],[0,0.254329226,0.9671177,0],[0,0,0,0],[-1,-1,-1,-1,-1,-1]]; 40 | CONST robtarget Target_390:=[[623.736,-1.4,500],[0,0.012497461,0.999921904,0],[-1,0,0,0],[-1,-1,-1,-1,-1,-1]]; 41 | CONST zonedata z0:=[FALSE,0.3,0.3,0.3,0.03,0.3,0.03]; 42 | CONST speeddata v1000:=[1000,500,5000,1000]; 43 | CONST num time:=1; 44 | PROC main() 45 | MoveL Target_10,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 46 | MoveC Target_20,Target_30,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 47 | MoveL Target_40,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 48 | MoveL Target_50,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 49 | MoveL Target_60,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 50 | MoveL Target_70,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 51 | MoveC Target_80,Target_90,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 52 | MoveL Target_100,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 53 | MoveC Target_110,Target_120,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 54 | MoveC Target_130,Target_140,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 55 | MoveC Target_150,Target_160,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 56 | MoveC Target_170,Target_180,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 57 | MoveC Target_190,Target_200,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 58 | MoveL Target_210,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 59 | MoveL Target_220,v1000\T:=time,z0,MyNewTool\WObj:=wobj0; 60 | ENDPROC 61 | PROC Path_20() 62 | MoveL Target_230,v1000,z0,MyNewTool; 63 | MoveL Target_240,v1000,z0,MyNewTool; 64 | MoveL Target_250,v1000,z0,MyNewTool; 65 | MoveL Target_260,v1000,z0,MyNewTool; 66 | MoveC Target_270,Target_280,v1000,z0,MyNewTool; 67 | MoveC Target_290,Target_300,v1000,z0,MyNewTool; 68 | MoveC Target_310,Target_320,v1000,z0,MyNewTool; 69 | MoveL Target_330,v1000,z0,MyNewTool; 70 | Path_30; 71 | ENDPROC 72 | PROC Path_30() 73 | MoveL Target_340,v1000,z0,MyNewTool; 74 | MoveL Target_350,v1000,z0,MyNewTool; 75 | MoveL Target_360,v1000,z0,MyNewTool; 76 | Path_40; 77 | ENDPROC 78 | PROC Path_40() 79 | MoveL Target_370,v1000,z0,MyNewTool; 80 | MoveC Target_380,Target_390,v1000,z0,MyNewTool; 81 | ENDPROC 82 | ENDMODULE -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/system/example/wuheng/example - 副本.pgf: -------------------------------------------------------------------------------- 1 | 2 | 3 | CalibData.mod 4 | Module1.mod 5 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/system/example/wuheng/example.pgf: -------------------------------------------------------------------------------- 1 | 2 | 3 | Module1.mod 4 | CalibData.mod 5 | 6 | -------------------------------------------------------------------------------- /GRS_Pro/GR_HMI/system/example/wuheng/example.pgf.bak: -------------------------------------------------------------------------------- 1 | 2 | 3 | CalibData.mod 4 | Module1.mod 5 | 6 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/header/decode_core/basic_data_type.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Module Operation Explanation 3 | * Replace &name& with the name of the file 4 | ****************************************************************************/ 5 | 6 | /*************************************************************************** 7 | **************************************************************************** 8 | *Copyright(c),2008-2028,��������豸���޹�˾ 9 | *File name: basic_data_type.h 10 | *First Author: 11 | *Date:05/12/2015 12 | *�ӿ��ļ����������� 13 | **************************************************************************** 14 | ****************************************************************************/ 15 | 16 | #ifndef BASIC_DATA_TYPE_H 17 | #define BASIC_DATA_TYPE_H 18 | 19 | #ifdef BASIC_DATA_TYPE_GLOBALS 20 | #define BASIC_DATA_TYPE_EXT 21 | #else 22 | #define BASIC_DATA_TYPE_EXT extern 23 | #endif 24 | 25 | /***************************************************************************/ 26 | /*Add all #includes here*/ 27 | #include 28 | 29 | #ifdef Q_OS_LINUX 30 | #define Linux 1 31 | #define Windows 0 32 | #define STRUCT_ALIGN 4//结构体对体方式,linux为4 33 | #include 34 | #elif defined (Q_OS_WIN32) 35 | #define Linux 0 36 | #define Windows 1 37 | #define STRUCT_ALIGN 8//结构体对体方式,windows为8 38 | #include 39 | #endif 40 | 41 | #ifdef Q_OS_LINUX 42 | #include 43 | #elif defined (Q_OS_WIN32) 44 | #include "wtypesbase.h" 45 | #endif 46 | /***************************************************************************/ 47 | //#pragma pack(8) 48 | #if defined(__cplusplus) 49 | extern "C" 50 | { 51 | #endif 52 | 53 | /***************************************************************************/ 54 | /*Add all #defines here*/ 55 | #define TRUE 1 56 | #define FALSE 0 57 | 58 | //typedef char bool; 59 | #ifdef Q_OS_LINUX 60 | typedef char BOOLEAN; 61 | #include 62 | #elif defined (Q_OS_WIN32) 63 | #endif 64 | 65 | typedef unsigned char U8; 66 | typedef char S8; 67 | 68 | typedef unsigned short U16; 69 | typedef short S16; 70 | 71 | typedef unsigned int U32; 72 | typedef int S32; 73 | 74 | typedef unsigned long long U64; 75 | typedef long long S64; 76 | 77 | /***************************************************************************/ 78 | 79 | /***************************************************************************/ 80 | /*���¿�ʼ��������*/ 81 | /***************************************************************************/ 82 | /*�����ܣ����ú������ض��ͻ�����ע��*/ 83 | /*������� ����1��ע������������弰��Ч�Է�Χ*/ 84 | /*�������: ����1��ע������������弰��Ч�Է�Χ*/ 85 | /*����ֵ�� ����ֵ��Χ������*/ 86 | /***************************************************************************/ 87 | 88 | /***************************************************************************/ 89 | 90 | /***************************************************************************/ 91 | /*�����ܣ����ú������ض��ͻ�����ע��*/ 92 | /*������� ����1��ע������������弰��Ч�Է�Χ*/ 93 | /*�������: ����1��ע������������弰��Ч�Է�Χ*/ 94 | /*����ֵ�� ����ֵ��Χ������*/ 95 | /***************************************************************************/ 96 | 97 | /***************************************************************************/ 98 | 99 | /***************************************************************************/ 100 | /*�����ܣ����ú������ض��ͻ�����ע��*/ 101 | /*������� ����1��ע������������弰��Ч�Է�Χ*/ 102 | /*�������: ����1��ע������������弰��Ч�Է�Χ*/ 103 | /*����ֵ�� ����ֵ��Χ������*/ 104 | /***************************************************************************/ 105 | 106 | /***************************************************************************/ 107 | 108 | /***************************************************************************/ 109 | /*�����ܣ����ú������ض��ͻ�����ע��*/ 110 | /*������� ����1��ע������������弰��Ч�Է�Χ*/ 111 | /*�������: ����1��ע������������弰��Ч�Է�Χ*/ 112 | /*����ֵ�� ����ֵ��Χ������*/ 113 | /***************************************************************************/ 114 | 115 | /***************************************************************************/ 116 | /*������ʼ*/ 117 | #if defined(__cplusplus) 118 | } 119 | #endif 120 | 121 | #endif 122 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/header/decode_core/decode_parse_file.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Module Operation Explanation 3 | * Replace &name& with the name of the file 4 | ****************************************************************************/ 5 | 6 | /*************************************************************************** 7 | **************************************************************************** 8 | *Copyright(c),2008-2028,广州数控设备有限公司 9 | *File name: decode_parse_file.h 10 | *First Author: 11 | *Date:06/17/2009 12 | *接口文件功能描述: 13 | **************************************************************************** 14 | ****************************************************************************/ 15 | 16 | #ifndef DECODE_PARSE_FILE_H 17 | #define DECODE_PARSE_FILE_H 18 | 19 | #ifdef DECODE_PARSE_FILE_GLOBALS 20 | #define DECODE_PARSE_FILE_EXT 21 | #else 22 | #define DECODE_PARSE_FILE_EXT extern 23 | #endif 24 | 25 | /***************************************************************************/ 26 | /*Add all #includes here*/ 27 | #include "basic_data_type.h" 28 | #include "decode_datatype.h" 29 | #include "decode_instructions.h" 30 | /***************************************************************************/ 31 | 32 | #if defined(__cplusplus) 33 | extern "C" 34 | { 35 | #endif 36 | 37 | /***************************************************************************/ 38 | /*Add all #defines here*/ 39 | #define DECODE_FILE_NAME_LEN 10 40 | #define DECODE_FILE_PATH_LEN 256 41 | typedef struct { 42 | char name[DECODE_FILE_NAME_LEN+1];//译码需要打开的文件名 43 | char path[DECODE_FILE_PATH_LEN+1];//译码文件所在路径 44 | FILE *pFile; 45 | U32 curLine;//当前译码到的行号,即读取到的行号 46 | U32 curPos; 47 | U32 errLine;//译码出错的行 48 | }decode_task_file_info; 49 | 50 | 51 | 52 | 53 | /***************************************************************************/ 54 | 55 | /***************************************************************************/ 56 | /*以下开始函数声明*/ 57 | /***************************************************************************/ 58 | /*函数功能:若该函数有特定客户,请注明*/ 59 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 60 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 61 | /*返回值: 返回值范围及意义*/ 62 | /***************************************************************************/ 63 | int decode_parse_open_file(void); 64 | /***************************************************************************/ 65 | 66 | /***************************************************************************/ 67 | /*函数功能:若该函数有特定客户,请注明*/ 68 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 69 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 70 | /*返回值: 返回值范围及意义*/ 71 | /***************************************************************************/ 72 | int decode_parse_read_line(char *str[]); 73 | /***************************************************************************/ 74 | 75 | /***************************************************************************/ 76 | /*函数功能:若该函数有特定客户,请注明*/ 77 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 78 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 79 | /*返回值: 返回值范围及意义*/ 80 | /***************************************************************************/ 81 | 82 | /***************************************************************************/ 83 | 84 | /***************************************************************************/ 85 | /*函数功能:若该函数有特定客户,请注明*/ 86 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 87 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 88 | /*返回值: 返回值范围及意义*/ 89 | /***************************************************************************/ 90 | 91 | /***************************************************************************/ 92 | 93 | /***************************************************************************/ 94 | /*函数功能:若该函数有特定客户,请注明*/ 95 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 96 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 97 | /*返回值: 返回值范围及意义*/ 98 | /***************************************************************************/ 99 | 100 | /***************************************************************************/ 101 | 102 | /***************************************************************************/ 103 | /*函数功能:若该函数有特定客户,请注明*/ 104 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 105 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 106 | /*返回值: 返回值范围及意义*/ 107 | /***************************************************************************/ 108 | 109 | /***************************************************************************/ 110 | 111 | /***************************************************************************/ 112 | /*函数功能:若该函数有特定客户,请注明*/ 113 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 114 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 115 | /*返回值: 返回值范围及意义*/ 116 | /***************************************************************************/ 117 | 118 | /***************************************************************************/ 119 | 120 | /***************************************************************************/ 121 | /*函数功能:若该函数有特定客户,请注明*/ 122 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 123 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 124 | /*返回值: 返回值范围及意义*/ 125 | /***************************************************************************/ 126 | 127 | /***************************************************************************/ 128 | 129 | /***************************************************************************/ 130 | /*函数功能:若该函数有特定客户,请注明*/ 131 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 132 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 133 | /*返回值: 返回值范围及意义*/ 134 | /***************************************************************************/ 135 | 136 | /***************************************************************************/ 137 | 138 | /***************************************************************************/ 139 | /*函数功能:若该函数有特定客户,请注明*/ 140 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 141 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 142 | /*返回值: 返回值范围及意义*/ 143 | /***************************************************************************/ 144 | 145 | /***************************************************************************/ 146 | 147 | 148 | #if defined(__cplusplus) 149 | } 150 | #endif 151 | 152 | #endif 153 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/header/decode_core/decode_proc_task.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Module Operation Explanation 3 | * Replace &name& with the name of the file 4 | ****************************************************************************/ 5 | 6 | /*************************************************************************** 7 | **************************************************************************** 8 | *Copyright(c),2008-2028,广州数控设备有限公司 9 | *File name: decode_proc_task.h 10 | *First Author: 11 | *Date:06/17/2009 12 | *接口文件功能描述: 13 | **************************************************************************** 14 | ****************************************************************************/ 15 | 16 | #ifndef DECODE_PROC_TASK_H 17 | #define DECODE_PROC_TASK_H 18 | 19 | #ifdef DECODE_PROC_TASK_GLOBALS 20 | #define DECODE_PROC_TASK_EXT 21 | #else 22 | #define DECODE_PROC_TASK_EXT extern 23 | #endif 24 | 25 | /***************************************************************************/ 26 | /*Add all #includes here*/ 27 | 28 | /***************************************************************************/ 29 | 30 | #if defined(__cplusplus) 31 | extern "C" 32 | { 33 | #endif 34 | 35 | /***************************************************************************/ 36 | /*Add all #defines here*/ 37 | #define DECODE_TASK_STOP (0)//译码任务停止,复位 38 | #define DECODE_TASK_START (1)//译码任务启动 39 | #define DECODE_TASK_PAUSE (2)//译码任务暂停 40 | /***************************************************************************/ 41 | 42 | /***************************************************************************/ 43 | /*以下开始函数声明*/ 44 | /***************************************************************************/ 45 | /*函数功能:若该函数有特定客户,请注明*/ 46 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 47 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 48 | /*返回值: 返回值范围及意义*/ 49 | /***************************************************************************/ 50 | int decodeTaskInit(void); 51 | /***************************************************************************/ 52 | 53 | /***************************************************************************/ 54 | /*函数功能:若该函数有特定客户,请注明*/ 55 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 56 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 57 | /*返回值: 返回值范围及意义*/ 58 | /***************************************************************************/ 59 | void decodeTaskRunningProc(int channel);//译码任务执行函数 60 | /***************************************************************************/ 61 | 62 | /***************************************************************************/ 63 | /*函数功能:若该函数有特定客户,请注明*/ 64 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 65 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 66 | /*返回值: 返回值范围及意义*/ 67 | /***************************************************************************/ 68 | int setDecodeTaskState(int state); 69 | /***************************************************************************/ 70 | 71 | /***************************************************************************/ 72 | /*函数功能:若该函数有特定客户,请注明*/ 73 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 74 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 75 | /*返回值: 返回值范围及意义*/ 76 | /***************************************************************************/ 77 | int getDecodeTaskState(void); 78 | /***************************************************************************/ 79 | 80 | /***************************************************************************/ 81 | /*函数功能:若该函数有特定客户,请注明*/ 82 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 83 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 84 | /*返回值: 返回值范围及意义*/ 85 | /***************************************************************************/ 86 | int setDecodeTaskFirstLinePos(int modNum, int modLine); 87 | /***************************************************************************/ 88 | 89 | /***************************************************************************/ 90 | /*函数功能:若该函数有特定客户,请注明*/ 91 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 92 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 93 | /*返回值: 返回值范围及意义*/ 94 | /***************************************************************************/ 95 | int getDecodeTaskRunLinePos(int *modNum, int *modLine); 96 | /***************************************************************************/ 97 | 98 | /***************************************************************************/ 99 | /*函数功能:若该函数有特定客户,请注明*/ 100 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 101 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 102 | /*返回值: 返回值范围及意义*/ 103 | /***************************************************************************/ 104 | 105 | /***************************************************************************/ 106 | 107 | /***************************************************************************/ 108 | /*函数功能:若该函数有特定客户,请注明*/ 109 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 110 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 111 | /*返回值: 返回值范围及意义*/ 112 | /***************************************************************************/ 113 | 114 | /***************************************************************************/ 115 | 116 | /***************************************************************************/ 117 | /*函数功能:若该函数有特定客户,请注明*/ 118 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 119 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 120 | /*返回值: 返回值范围及意义*/ 121 | /***************************************************************************/ 122 | 123 | /***************************************************************************/ 124 | 125 | /***************************************************************************/ 126 | /*函数功能:若该函数有特定客户,请注明*/ 127 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 128 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 129 | /*返回值: 返回值范围及意义*/ 130 | /***************************************************************************/ 131 | 132 | /***************************************************************************/ 133 | 134 | /***************************************************************************/ 135 | /*函数功能:若该函数有特定客户,请注明*/ 136 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 137 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 138 | /*返回值: 返回值范围及意义*/ 139 | /***************************************************************************/ 140 | 141 | /***************************************************************************/ 142 | 143 | /***************************************************************************/ 144 | /*函数功能:若该函数有特定客户,请注明*/ 145 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 146 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 147 | /*返回值: 返回值范围及意义*/ 148 | /***************************************************************************/ 149 | 150 | /***************************************************************************/ 151 | 152 | /***************************************************************************/ 153 | /*函数功能:若该函数有特定客户,请注明*/ 154 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 155 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 156 | /*返回值: 返回值范围及意义*/ 157 | /***************************************************************************/ 158 | 159 | /***************************************************************************/ 160 | 161 | /***************************************************************************/ 162 | /*函数功能:若该函数有特定客户,请注明*/ 163 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 164 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 165 | /*返回值: 返回值范围及意义*/ 166 | /***************************************************************************/ 167 | 168 | /***************************************************************************/ 169 | 170 | 171 | #if defined(__cplusplus) 172 | } 173 | #endif 174 | 175 | #endif 176 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/header/decode_core/decode_shmem.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Module Operation Explanation 3 | * Replace &name& with the name of the file 4 | ****************************************************************************/ 5 | 6 | /*************************************************************************** 7 | **************************************************************************** 8 | *Copyright(c),2008-2028,广州数控设备有限公司 9 | *File name: decode_shmem.h 10 | *First Author: 11 | *Date:06/17/2009 12 | *接口文件功能描述: 13 | **************************************************************************** 14 | ****************************************************************************/ 15 | 16 | #ifndef DECODE_SHMEM_H 17 | #define DECODE_SHMEM_H 18 | 19 | #ifdef DECODE_SHMEM_GLOBALS 20 | #define DECODE_SHMEM_EXT 21 | #else 22 | #define DECODE_SHMEM_EXT extern 23 | #endif 24 | 25 | /***************************************************************************/ 26 | /*Add all #includes here*/ 27 | #include "decode_datatype.h" 28 | #include "robotdecodepublic.h" 29 | /***************************************************************************/ 30 | 31 | #if defined(__cplusplus) 32 | extern "C" 33 | { 34 | #endif 35 | 36 | /***************************************************************************/ 37 | /*Add all #defines here*/ 38 | typedef struct { 39 | // int curModule; //下一行译码所在的模块 40 | // int curModuleLine; //下一行译码所在模块的行 41 | // int curRoutine; //下一行译码所在的例行程序 42 | // int curRoutineLine;//下一行译码所在的例行程序的行 43 | int alarmNum;//译码报警号 44 | program_pointer execPtr;//译码正在执行的行号指针,与插补一致,作为执行光标 45 | program_pointer readPtr;//译码读取的行号指针,译码内部光标 46 | }decode_shmem_output;//译码输出交互数据至共享内存 47 | 48 | typedef struct { 49 | int flag;//可以包含初始化完成之类的标记 50 | int decodeDirection;//译码方向:0:向前,1:向后 51 | program_pointer startPtr;//界面启动运行时传递给译码的起始指针 52 | // int curModule; //当前译码所在的模块 53 | // int curModuleLine; //当前译码所在模块的行 54 | // int curRoutine; //当前译码所在的例行程序 55 | // int curRoutineLine;//当前译码所在的例行程序的行 56 | }decode_shmem_input;//译码从共享内存接收输入数据 57 | /***************************************************************************/ 58 | 59 | /***************************************************************************/ 60 | /*以下开始函数声明*/ 61 | /***************************************************************************/ 62 | /*函数功能:若该函数有特定客户,请注明*/ 63 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 64 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 65 | /*返回值: 返回值范围及意义*/ 66 | /***************************************************************************/ 67 | int initDecodeShmem(void); 68 | /***************************************************************************/ 69 | 70 | /***************************************************************************/ 71 | /*函数功能:若该函数有特定客户,请注明*/ 72 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 73 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 74 | /*返回值: 返回值范围及意义*/ 75 | /***************************************************************************/ 76 | void *getDecodeShmemInputPtr(void); 77 | /***************************************************************************/ 78 | 79 | /***************************************************************************/ 80 | /*函数功能:若该函数有特定客户,请注明*/ 81 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 82 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 83 | /*返回值: 返回值范围及意义*/ 84 | /***************************************************************************/ 85 | void *getDecodeShmemOutputPtr(void); 86 | /***************************************************************************/ 87 | 88 | /***************************************************************************/ 89 | /*函数功能:若该函数有特定客户,请注明*/ 90 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 91 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 92 | /*返回值: 返回值范围及意义*/ 93 | /***************************************************************************/ 94 | 95 | /***************************************************************************/ 96 | 97 | /***************************************************************************/ 98 | /*函数功能:若该函数有特定客户,请注明*/ 99 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 100 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 101 | /*返回值: 返回值范围及意义*/ 102 | /***************************************************************************/ 103 | 104 | /***************************************************************************/ 105 | 106 | /***************************************************************************/ 107 | /*函数功能:若该函数有特定客户,请注明*/ 108 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 109 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 110 | /*返回值: 返回值范围及意义*/ 111 | /***************************************************************************/ 112 | 113 | /***************************************************************************/ 114 | 115 | /***************************************************************************/ 116 | /*函数功能:若该函数有特定客户,请注明*/ 117 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 118 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 119 | /*返回值: 返回值范围及意义*/ 120 | /***************************************************************************/ 121 | 122 | /***************************************************************************/ 123 | 124 | /***************************************************************************/ 125 | /*函数功能:若该函数有特定客户,请注明*/ 126 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 127 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 128 | /*返回值: 返回值范围及意义*/ 129 | /***************************************************************************/ 130 | 131 | /***************************************************************************/ 132 | 133 | /***************************************************************************/ 134 | /*函数功能:若该函数有特定客户,请注明*/ 135 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 136 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 137 | /*返回值: 返回值范围及意义*/ 138 | /***************************************************************************/ 139 | 140 | /***************************************************************************/ 141 | 142 | /***************************************************************************/ 143 | /*函数功能:若该函数有特定客户,请注明*/ 144 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 145 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 146 | /*返回值: 返回值范围及意义*/ 147 | /***************************************************************************/ 148 | 149 | /***************************************************************************/ 150 | 151 | /***************************************************************************/ 152 | /*函数功能:若该函数有特定客户,请注明*/ 153 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 154 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 155 | /*返回值: 返回值范围及意义*/ 156 | /***************************************************************************/ 157 | 158 | /***************************************************************************/ 159 | 160 | /***************************************************************************/ 161 | /*函数功能:若该函数有特定客户,请注明*/ 162 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 163 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 164 | /*返回值: 返回值范围及意义*/ 165 | /***************************************************************************/ 166 | 167 | /***************************************************************************/ 168 | 169 | /***************************************************************************/ 170 | /*函数功能:若该函数有特定客户,请注明*/ 171 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 172 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 173 | /*返回值: 返回值范围及意义*/ 174 | /***************************************************************************/ 175 | 176 | /***************************************************************************/ 177 | 178 | 179 | #if defined(__cplusplus) 180 | } 181 | #endif 182 | 183 | #endif 184 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/header/decode_core/sharemempublic.h: -------------------------------------------------------------------------------- 1 | #ifndef ROBOTDECODEPUBLIC_H 2 | #define ROBOTDECODEPUBLIC_H 3 | 4 | #if defined(__cplusplus) 5 | extern "C" 6 | { 7 | #endif 8 | 9 | 10 | int createUserSharemem(char *memName, int size); 11 | 12 | int openUserSharemem(char *memName, int size); 13 | 14 | int closeUserSharemem(int id); 15 | 16 | void* mmapUserSharemem(int id, int size, int initFlag); 17 | 18 | #if defined(__cplusplus) 19 | } 20 | #endif 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/header/decode_prg/decode_public.h: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Module Operation Explanation 3 | * Replace &name& with the name of the file 4 | ****************************************************************************/ 5 | 6 | /*************************************************************************** 7 | **************************************************************************** 8 | *Copyright(c),2008-2028,广州数控设备有限公司 9 | *File name: decode_public.h 10 | *First Author: 11 | *Date:06/17/2009 12 | *接口文件功能描述: 13 | **************************************************************************** 14 | ****************************************************************************/ 15 | 16 | #ifndef DECODE_PUBLIC_H 17 | #define DECODE_PUBLIC_H 18 | 19 | #ifdef DECODE_PUBLIC_GLOBALS 20 | #define DECODE_PUBLIC_EXT 21 | #else 22 | #define DECODE_PUBLIC_EXT extern 23 | #endif 24 | 25 | /***************************************************************************/ 26 | /*Add all #includes here*/ 27 | //#include "decode_datatype.h" 28 | /***************************************************************************/ 29 | 30 | #if defined(__cplusplus) 31 | extern "C" 32 | { 33 | #endif 34 | 35 | /***************************************************************************/ 36 | /*Add all #defines here*/ 37 | 38 | /***************************************************************************/ 39 | 40 | /***************************************************************************/ 41 | /*以下开始函数声明*/ 42 | /***************************************************************************/ 43 | /*函数功能:若该函数有特定客户,请注明*/ 44 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 45 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 46 | /*返回值: 返回值范围及意义*/ 47 | /***************************************************************************/ 48 | void *newOperator(int size); 49 | /***************************************************************************/ 50 | 51 | /***************************************************************************/ 52 | /*函数功能:若该函数有特定客户,请注明*/ 53 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 54 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 55 | /*返回值: 返回值范围及意义*/ 56 | /***************************************************************************/ 57 | void deleteOperator(void *ptr); 58 | /***************************************************************************/ 59 | 60 | /***************************************************************************/ 61 | /*函数功能:若该函数有特定客户,请注明*/ 62 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 63 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 64 | /*返回值: 返回值范围及意义*/ 65 | /***************************************************************************/ 66 | 67 | /***************************************************************************/ 68 | 69 | /***************************************************************************/ 70 | /*函数功能:若该函数有特定客户,请注明*/ 71 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 72 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 73 | /*返回值: 返回值范围及意义*/ 74 | /***************************************************************************/ 75 | 76 | /***************************************************************************/ 77 | 78 | /***************************************************************************/ 79 | /*函数功能:若该函数有特定客户,请注明*/ 80 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 81 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 82 | /*返回值: 返回值范围及意义*/ 83 | /***************************************************************************/ 84 | 85 | /***************************************************************************/ 86 | 87 | /***************************************************************************/ 88 | /*函数功能:若该函数有特定客户,请注明*/ 89 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 90 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 91 | /*返回值: 返回值范围及意义*/ 92 | /***************************************************************************/ 93 | 94 | /***************************************************************************/ 95 | 96 | /***************************************************************************/ 97 | /*函数功能:若该函数有特定客户,请注明*/ 98 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 99 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 100 | /*返回值: 返回值范围及意义*/ 101 | /***************************************************************************/ 102 | 103 | /***************************************************************************/ 104 | 105 | /***************************************************************************/ 106 | /*函数功能:若该函数有特定客户,请注明*/ 107 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 108 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 109 | /*返回值: 返回值范围及意义*/ 110 | /***************************************************************************/ 111 | 112 | /***************************************************************************/ 113 | 114 | /***************************************************************************/ 115 | /*函数功能:若该函数有特定客户,请注明*/ 116 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 117 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 118 | /*返回值: 返回值范围及意义*/ 119 | /***************************************************************************/ 120 | 121 | /***************************************************************************/ 122 | 123 | /***************************************************************************/ 124 | /*函数功能:若该函数有特定客户,请注明*/ 125 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 126 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 127 | /*返回值: 返回值范围及意义*/ 128 | /***************************************************************************/ 129 | 130 | /***************************************************************************/ 131 | 132 | /***************************************************************************/ 133 | /*函数功能:若该函数有特定客户,请注明*/ 134 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 135 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 136 | /*返回值: 返回值范围及意义*/ 137 | /***************************************************************************/ 138 | 139 | /***************************************************************************/ 140 | 141 | /***************************************************************************/ 142 | /*函数功能:若该函数有特定客户,请注明*/ 143 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 144 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 145 | /*返回值: 返回值范围及意义*/ 146 | /***************************************************************************/ 147 | 148 | /***************************************************************************/ 149 | 150 | /***************************************************************************/ 151 | /*函数功能:若该函数有特定客户,请注明*/ 152 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 153 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 154 | /*返回值: 返回值范围及意义*/ 155 | /***************************************************************************/ 156 | 157 | /***************************************************************************/ 158 | 159 | 160 | #if defined(__cplusplus) 161 | } 162 | #endif 163 | 164 | #endif 165 | 166 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/header/decode_prg/decodethread.h: -------------------------------------------------------------------------------- 1 | #ifndef DECODETHREAD_H 2 | #define DECODETHREAD_H 3 | 4 | #include 5 | 6 | 7 | 8 | class DecodeThread : public QThread 9 | { 10 | Q_OBJECT 11 | public: 12 | // explicit DecodeThread(); 13 | DecodeThread(); 14 | ~DecodeThread(); 15 | 16 | protected: 17 | void run(); 18 | 19 | 20 | }; 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/header/decode_prg/robotpgfxmlparser.h: -------------------------------------------------------------------------------- 1 | #ifndef ROBOTPGFXMLPARSER_H 2 | #define ROBOTPGFXMLPARSER_H 3 | 4 | //#include 5 | #include 6 | 7 | class RobotPgfXmlParser 8 | { 9 | public: 10 | RobotPgfXmlParser(); 11 | bool readFile(const QString &fileName); 12 | private: 13 | void parseProgramElement(const QDomElement &element); 14 | void parseModuleElement(const QDomElement &element); 15 | }; 16 | 17 | #endif // ROBOTPGFXMLPARSER_H 18 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/header/decode_prg/robotprgfilestruct.h: -------------------------------------------------------------------------------- 1 | #ifndef ROBOTPRGFILESTRUCT_H 2 | #define ROBOTPRGFILESTRUCT_H 3 | 4 | //#include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | #include "decode_typestructs.h" 11 | #include "decode_lexical_analysis.h" 12 | #include "robotvariablestruct.h" 13 | #include "robotdecodepublic.h" 14 | 15 | 16 | //#define LINE_TYPE_NULL (0) //空字符行 17 | //#define LINE_TYPE_NOTE (1) //注释行 18 | //#define LINE_TYPE_MODULE (2) //MODULE开始 19 | //#define LINE_TYPE_MODULEEND (3) //MODULEEND 20 | //#define LINE_TYPE_PROC (4) //PROC开始 21 | //#define LINE_TYPE_PROCEND (5) //PROCEND 22 | //#define LINE_TYPE_VARIABLE (6) //变量类型 23 | //#define LINE_TYPE_IF (7) //IF开始 24 | //#define LINE_TYPE_IFEND (8) //IFEND 25 | 26 | 27 | 28 | //typedef struct {//程序指针存储结构 29 | // int curModule; //当前所在的模块 30 | // int curModuleLine; //当前所在模块的行 31 | // int curRoutine; //当前所在的例行程序 32 | // int curRoutineLine;//当前所在的例行程序的行 33 | //}program_pointer; 34 | 35 | 36 | 37 | 38 | typedef struct {//一行字符串存储结构 39 | //该行字符串类型,变量 or 程序指令等LINE_TYPE_NOTE:注释,LINE_TYPE_DATA:数据行,LINE_TYPE_INSTRUCTION:指令行 40 | //低8位为decode_line_type类型, 41 | //bit8~bit15如果是数据行LINE_TYPE_VAR:VAR,LINE_TYPE_PERS:PERS ,LINE_TYPE_CONST:CONST,如果是指令行,则为相应类型,如LINE_TYPE_IF等 42 | //bit16~bit24是变量范围0:全局, LINE_TYPE_LOCAL:LOCAL, LINE_TYPE_TASK:TASK 43 | //高8位暂定指令制表符缩进个数, 44 | int type:8;//此处需要改为位域方式,暂时未改 45 | int varType:8; 46 | int scope:8; 47 | int tabCnt:8;//制表符缩进次数 48 | // QList str;//该行字符串指针,用于存储每一个段,已经过滤空格和逗号, 49 | char *str; //该行字符串指针 50 | }line_str_data; 51 | 52 | typedef struct {//例行程序所需参数存储结构,一个参数 53 | int type;//参数类型索引 54 | decode_type_data paraDaa;//此处再添加一个数据结构体 55 | }parameter_struct; 56 | 57 | //typedef struct {//例行程序属性 58 | // char routineName[32];//例行程序名 59 | // int routineType;//例行程序类型procedure function trap 60 | // int routineFlag;//标志位,参看ABB用来标记,从低字节开始local backward error undo 61 | // int parentModule;//所属模块索引 62 | // char parameter[256];//参数字符串 63 | //}routine_prg_property; 64 | 65 | typedef struct {//例行程序存储结构 66 | routine_prg_property routinePrgPro;//例行程序属性 67 | QList lineStrData;//例行程序中所有字符串行 68 | QList parameterStruct;//例行程序所需参数,首个元素表示返回值 69 | robot_var_struct robotVarArry[D_DATATYPE_END_CNT];//例行程序中的变量 70 | int flag;//作为标志,暂时使用bit0为是否该例行程序有效,为0则无效 71 | }routine_prg; 72 | 73 | //typedef struct {//模块属性结构体 74 | // char moduleName[32];//模块名,ABB允许的最长长度 75 | // int moduleType;//模块类型,系统或者程序,0为程序,1为系统 76 | //}module_prg_property; 77 | 78 | typedef struct {//程序模块存储结构 79 | module_prg_property modulePrgPro;//模块属性 80 | QList lineStrData;//模块内部存储的程序行 81 | QList routinePrg;//模块包含的例行程序 82 | robot_var_struct robotVarArry[D_DATATYPE_END_CNT];//模块的变量 83 | int flag;//作为标志,暂时使用bit0为是否该模块有效,为0则无效 84 | }module_prg; 85 | 86 | typedef struct { //文件信息存储结构 87 | char fileName[32];//文件名 88 | char filePath[256];//文件路径 89 | int parentTask;//所属任务,也可作为所在通道 90 | int editFlag;//编辑状态标志 91 | program_pointer programPoniter;//当前程序指针,注意,自动方式下加载文件后要设置为main开头第一个有效指令 92 | QList dataTypeUseTable;//文件中使用的机器人数据类型表 93 | QList modulePrg;//包含的模块,注意,在加载模块时 94 | //注意此处还要添加剪切板 95 | }prg_file_info; 96 | 97 | 98 | class RobotPrgFileStruct 99 | { 100 | public: 101 | RobotPrgFileStruct(); 102 | ~RobotPrgFileStruct(); 103 | bool readRobotPrgFile(const char *filePathName); 104 | bool writeRobotPrgFile(const char *filePathName); 105 | bool parseProgramElement(const QDomElement &element); 106 | bool parseModuleElement(const QDomElement &element); 107 | bool writeModuleElement(QXmlStreamWriter *xmlWriter, int modulePos); 108 | program_pointer getSelectModuleLinePos(int selMod, int lineNum); 109 | int getSelectModuleLineStr(int selMod, int lineNum, char *str); 110 | bool createNewModule(module_prg_property modPrgPro); 111 | bool createNewRoutine(int modNum, routine_prg_property routinePrgPro); 112 | bool insertNewLineStr(int modNum, int lineNum, const char *str); 113 | bool appendLineStr(int modNum, int routineNum, const char *str); 114 | int getModulePos(char *modName); 115 | int getRoutinePos(int modNum, char *routineName); 116 | bool printModuleLineStrTest(int modNum); 117 | int createNewVariable(int modNum, int routineNum, char *str); 118 | bool deleteOneLineStr(int modNum, int lineNum); 119 | bool editOneLineStr(int modNum, int lineNum, const char *str); 120 | int getFileModuleCnt(void); 121 | int getSelModRoutineCnt(int modNum); 122 | bool modifyOneLineStr(int modNum, int lineNum, const char *str); 123 | int modifyOneVariable(int modNum, int routineNum, char *varName, char *str); 124 | int deleteOneVariable(int modNum, int routineNum, char *varName); 125 | int usePosGetSelVarProperty(int modNum, int routineNum, int pos, int varType, decode_type_property *pro); 126 | int usePosGetSelVarVal(int modNum, int routineNum, int pos, int varType, decode_type_data *dataVal); 127 | int useNameSetSelVarData(int modNum, int routineNum, char *varName, decode_type_data dataVal); 128 | int useNameGetSelVarData(int modNum, int routineNum, char *varName, decode_type_data *dataVal); 129 | int useNameGetSelVarProperty(int modNum, int routineNum, char *varName, decode_type_property *pro); 130 | int deleteSelRoutine(int modNum, int routineNum); 131 | int deleteSelModule(int modNum); 132 | int getSelModuleProperty(int modNum, module_prg_property *modPro); 133 | int modifySelModuleProperty(int modNum, module_prg_property modPro); 134 | int getSelRoutineProperty(int modNum, int routineNum, routine_prg_property *routinePro); 135 | int modifySelRoutineProperty(int modNum, int routineNum, routine_prg_property routinePro); 136 | int isCanSelLineStr(int modNum, int lineNum); 137 | int isCanEditLineStr(int modNum, int lineNum); 138 | int getSelRoutineFirstLinePos(int modNum, int routineNum); 139 | int getFileLineTotalCnt(void); 140 | int getSelModuleFileLineTotalCnt(int modNum); 141 | int getSelRoutineFileLineTotalCnt(int modNum, int routineNum); 142 | int clearFileStructInfo(void); 143 | int useNameGetModuleProperty(char *modName, module_prg_property *modPro); 144 | int useNameGetRoutineProperty(char *routineName, routine_prg_property *routinePro); 145 | int parseModLineToRelation(int *modNum, int *modLine, int *routine, int *routineLine); 146 | int getSelRoutineLineStr(int modNum, int routineNum, int routineLineNum, char *str); 147 | int getFirstInstructionLinePos(int modNum, int routineNum); 148 | 149 | private: 150 | prg_file_info prgFileInfo; 151 | 152 | }; 153 | 154 | #endif // ROBOTPRGFILESTRUCT_H 155 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/header/decode_prg/robotvariablestruct.h: -------------------------------------------------------------------------------- 1 | #ifndef ROBOTVARIABLESTRUCT_H 2 | #define ROBOTVARIABLESTRUCT_H 3 | 4 | #include 5 | 6 | #include "decode_typestructs.h" 7 | 8 | #if defined(__cplusplus) 9 | extern "C" 10 | { 11 | #endif 12 | 13 | typedef struct { 14 | int varType;//变量类型 15 | int valIndex;//变量值数组下标索引 16 | decode_type_property typePro; 17 | }robot_variable; 18 | 19 | typedef struct { 20 | QList robotVar; 21 | }robot_var_struct; 22 | 23 | 24 | 25 | #if defined(__cplusplus) 26 | } 27 | #endif 28 | 29 | #endif // ROBOTVARIABLESTRUCT_H 30 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/robDecodePrg.pro: -------------------------------------------------------------------------------- 1 | #------------------------------------------------- 2 | # 3 | # Project created by QtCreator 2016-01-15T14:22:22 4 | # 5 | #------------------------------------------------- 6 | 7 | QT += core gui xml 8 | 9 | TARGET = robDecodePrg 10 | TEMPLATE = lib 11 | CONFIG += staticlib 12 | 13 | DEFINES += ROBDECODEPRG_LIBRARY 14 | 15 | ROOTDIR = $${PWD}/../ 16 | 17 | DESTDIR = $${ROOTDIR}/GR_HMI/lib/ 18 | 19 | INCLUDEPATH += \ 20 | $${ROOTDIR}/GRS_Core/header \ 21 | header/decode_core \ 22 | header/decode_prg \ 23 | 24 | SOURCES += \ 25 | source/decode_core/decode_instructions.c \ 26 | source/decode_core/decode_lexical_analysis.c \ 27 | source/decode_core/decode_parse_file.c \ 28 | source/decode_core/decode_proc_task.c \ 29 | source/decode_core/decode_typestructs.c \ 30 | source/decode_prg/decode_public.cpp \ 31 | source/decode_prg/robotdecodepublic.cpp \ 32 | source/decode_prg/robotpgfxmlparser.cpp \ 33 | source/decode_prg/robotprgfilestruct.cpp \ 34 | source/decode_prg/robotvariablestruct.cpp \ 35 | source/decode_prg/decodethread.cpp \ 36 | source/decode_prg/sharemempublic.cpp \ 37 | source/decode_core/decode_shmem.c 38 | 39 | HEADERS += \ 40 | header/decode_core/basic_data_type.h \ 41 | header/decode_core/decode_datatype.h \ 42 | header/decode_core/decode_instructions.h \ 43 | header/decode_core/decode_lexical_analysis.h \ 44 | header/decode_core/decode_parse_file.h \ 45 | header/decode_core/decode_proc_task.h \ 46 | header/decode_core/decode_shmem.h \ 47 | header/decode_core/decode_typestructs.h \ 48 | header/decode_core/ITP_Interface.h \ 49 | header/decode_prg/decode_public.h \ 50 | header/decode_prg/robotdecodepublic.h \ 51 | header/decode_prg/robotpgfxmlparser.h \ 52 | header/decode_prg/robotprgfilestruct.h \ 53 | header/decode_prg/robotvariablestruct.h \ 54 | header/decode_prg/decodethread.h \ 55 | header/decode_core/sharemempublic.h 56 | 57 | 58 | #robdecodeprg.h\ 59 | # robdecodeprg_global.h 60 | 61 | 62 | win32{ 63 | 64 | } 65 | 66 | unix { 67 | target.path = /usr/lib 68 | INSTALLS += target 69 | } 70 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/source/decode_prg/decode_public.cpp: -------------------------------------------------------------------------------- 1 | /*************************************************************************** 2 | * Module Operation Explanation 3 | * Replace &name& with the name of the file 4 | * Fills the include, flaged with +include+ 5 | * Fills the definition flaged with ===== 6 | * 7 | ****************************************************************************/ 8 | 9 | /*************************************************************************** 10 | **************************************************************************** 11 | *Copyright(c),2008-2028,广州数控设备有限公司 12 | *File name: decode_pubic.c 13 | *First Author: 14 | *Date:06/17/2009 15 | *文件功能描述: 16 | **************************************************************************** 17 | ****************************************************************************/ 18 | 19 | #define DECODE_PUBLIC_GLOBALS 20 | 21 | /**********************************************************************/ 22 | /*Add all #includes here*/ 23 | #include "decode_public.h" 24 | /**********************************************************************/ 25 | 26 | /**********************************************************************/ 27 | /*Add all #defines here*/ 28 | //#define 29 | /**********************************************************************/ 30 | 31 | /**********************************************************************/ 32 | /*以下开始函数定义*/ 33 | /**********************************************************************/ 34 | /*函数功能:*/ 35 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 36 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 37 | /*返回值: 返回值范围及意义*/ 38 | /***********************************************************************/ 39 | /**********************************************************************/ 40 | /*函数实现原理:请注明获取输出参数的方法*/ 41 | /**********************************************************************/ 42 | void *newOperator(int size) 43 | { 44 | void *ptr = new char[size]; 45 | return ptr; 46 | } 47 | 48 | /**********************************************************************/ 49 | 50 | /**********************************************************************/ 51 | /*函数功能:*/ 52 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 53 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 54 | /*返回值: 返回值范围及意义*/ 55 | /***********************************************************************/ 56 | /**********************************************************************/ 57 | /*函数实现原理:请注明获取输出参数的方法*/ 58 | /**********************************************************************/ 59 | void deleteOperator(void *ptr) 60 | { 61 | delete ptr; 62 | } 63 | 64 | /**********************************************************************/ 65 | 66 | /**********************************************************************/ 67 | /*函数功能:*/ 68 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 69 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 70 | /*返回值: 返回值范围及意义*/ 71 | /***********************************************************************/ 72 | /**********************************************************************/ 73 | /*函数实现原理:请注明获取输出参数的方法*/ 74 | /**********************************************************************/ 75 | 76 | /**********************************************************************/ 77 | 78 | /**********************************************************************/ 79 | /*函数功能:*/ 80 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 81 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 82 | /*返回值: 返回值范围及意义*/ 83 | /***********************************************************************/ 84 | /**********************************************************************/ 85 | /*函数实现原理:请注明获取输出参数的方法*/ 86 | /**********************************************************************/ 87 | 88 | /**********************************************************************/ 89 | 90 | /**********************************************************************/ 91 | /*函数功能:*/ 92 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 93 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 94 | /*返回值: 返回值范围及意义*/ 95 | /***********************************************************************/ 96 | /**********************************************************************/ 97 | /*函数实现原理:请注明获取输出参数的方法*/ 98 | /**********************************************************************/ 99 | 100 | /**********************************************************************/ 101 | 102 | /**********************************************************************/ 103 | /*函数功能:*/ 104 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 105 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 106 | /*返回值: 返回值范围及意义*/ 107 | /***********************************************************************/ 108 | /**********************************************************************/ 109 | /*函数实现原理:请注明获取输出参数的方法*/ 110 | /**********************************************************************/ 111 | 112 | /**********************************************************************/ 113 | 114 | /**********************************************************************/ 115 | /*函数功能:*/ 116 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 117 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 118 | /*返回值: 返回值范围及意义*/ 119 | /***********************************************************************/ 120 | /**********************************************************************/ 121 | /*函数实现原理:请注明获取输出参数的方法*/ 122 | /**********************************************************************/ 123 | 124 | /**********************************************************************/ 125 | 126 | /**********************************************************************/ 127 | /*函数功能:*/ 128 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 129 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 130 | /*返回值: 返回值范围及意义*/ 131 | /***********************************************************************/ 132 | /**********************************************************************/ 133 | /*函数实现原理:请注明获取输出参数的方法*/ 134 | /**********************************************************************/ 135 | 136 | /**********************************************************************/ 137 | 138 | /**********************************************************************/ 139 | /*函数功能:*/ 140 | /*输入参数: 参数1:注明输入参数意义及有效性范围*/ 141 | /*输出参数: 参数1:注明输出参数意义及有效性范围*/ 142 | /*返回值: 返回值范围及意义*/ 143 | /***********************************************************************/ 144 | /**********************************************************************/ 145 | /*函数实现原理:请注明获取输出参数的方法*/ 146 | /**********************************************************************/ 147 | 148 | /**********************************************************************/ 149 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/source/decode_prg/decodethread.cpp: -------------------------------------------------------------------------------- 1 | #include "decodethread.h" 2 | #include "decode_proc_task.h" 3 | #include 4 | 5 | 6 | DecodeThread::DecodeThread() 7 | { 8 | 9 | } 10 | 11 | DecodeThread::~DecodeThread() 12 | { 13 | 14 | } 15 | 16 | void DecodeThread::run() 17 | { 18 | // int i = 0; 19 | decodeTaskInit(); 20 | while (1) { 21 | decodeTaskRunningProc(0); 22 | msleep(1);//此处用来测试1ms一次 23 | } 24 | } 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/source/decode_prg/robotpgfxmlparser.cpp: -------------------------------------------------------------------------------- 1 | #include "robotpgfxmlparser.h" 2 | #include 3 | 4 | 5 | RobotPgfXmlParser::RobotPgfXmlParser() 6 | { 7 | } 8 | 9 | bool RobotPgfXmlParser::readFile(const QString &fileName) 10 | { 11 | QFile file(fileName); 12 | QString errorStr; 13 | int errorLine; 14 | int errorColumn; 15 | QDomDocument doc; 16 | QDomElement root; 17 | 18 | if (!file.open(QFile::ReadOnly|QFile::Text)) { 19 | return false; 20 | } 21 | 22 | if (!doc.setContent(&file, false, &errorStr, &errorLine, &errorColumn)) { 23 | return false; 24 | } 25 | 26 | root = doc.documentElement(); 27 | 28 | if(root.tagName()!= "program") { 29 | return false; 30 | } 31 | 32 | parseProgramElement(root); 33 | return true; 34 | } 35 | 36 | void RobotPgfXmlParser::parseProgramElement(const QDomElement &element) 37 | { 38 | QDomNode child = element.firstChild(); 39 | 40 | while (!child.isNull()) { 41 | if (child.toElement().tagName() == "program") { 42 | parseModuleElement(child.toElement()); 43 | } 44 | child = child.nextSibling(); 45 | } 46 | 47 | } 48 | 49 | void RobotPgfXmlParser::parseModuleElement(const QDomElement &element) 50 | { 51 | QDomNode child = element.firstChild(); 52 | 53 | } 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/source/decode_prg/robotvariablestruct.cpp: -------------------------------------------------------------------------------- 1 | #include "robotvariablestruct.h" 2 | #include "decode_lexical_analysis.h" 3 | 4 | class RobotVariableStruct 5 | { 6 | public: 7 | RobotVariableStruct(); 8 | ~RobotVariableStruct(); 9 | bool createNewRobotVariable(int varType, decode_type_property typePro); 10 | bool deleteRobotVariable(int varType, const char *varName); 11 | bool getRobotVarTypePropertyUseName(int varType, const char *varName, decode_type_property *typePro); 12 | bool getRobotVarTypePropertyUsePos(int varType, int pos, decode_type_property *typePro); 13 | bool setRobotVarValData(int varType, const char *varName, decode_type_data varData); 14 | bool getRobotVarValData(int varType, const char *varName, decode_type_data *varData); 15 | private: 16 | robot_var_struct robotVarArry[D_DATATYPE_END_CNT]; 17 | 18 | }; 19 | 20 | RobotVariableStruct::RobotVariableStruct() 21 | { 22 | } 23 | 24 | RobotVariableStruct::~RobotVariableStruct() 25 | { 26 | } 27 | 28 | bool RobotVariableStruct::createNewRobotVariable(int varType, decode_type_property typePro) 29 | { 30 | int i = 0; 31 | robot_variable robotVariable; 32 | 33 | robotVariable.valIndex = 0;//此处要调用函数创建 34 | if (robotVariable.valIndex == -1) {//申请失败 35 | return false; 36 | } 37 | robotVariable.varType = varType; 38 | robotVariable.typePro = typePro; 39 | 40 | while (i < robotVarArry[varType].robotVar.size()) { 41 | if (decodeStringCompare(typePro.typeName, robotVarArry[varType].robotVar[i].typePro.typeName, 0) < 0) {//按名称排序 42 | robotVarArry[varType].robotVar.insert(i, robotVariable); 43 | return true; 44 | } 45 | i++; 46 | } 47 | robotVarArry[varType].robotVar.append(robotVariable); 48 | return true; 49 | } 50 | 51 | bool RobotVariableStruct::deleteRobotVariable(int varType, const char *varName) 52 | { 53 | int i = 0; 54 | 55 | while (i < robotVarArry[varType].robotVar.size()) { 56 | if (decodeStringCompare(varName, robotVarArry[varType].robotVar[i].typePro.typeName, 0) == 0) {//变量名相同 57 | robotVarArry[varType].robotVar.removeAt(i); 58 | //此处要加调用删除变量值存储空间标记,使无效 59 | return true; 60 | } 61 | i++; 62 | } 63 | return false; 64 | } 65 | 66 | bool RobotVariableStruct::getRobotVarTypePropertyUseName(int varType, const char *varName, decode_type_property *typePro) 67 | { 68 | int i = 0; 69 | 70 | while (i < robotVarArry[varType].robotVar.size()) { 71 | if (decodeStringCompare(varName, robotVarArry[varType].robotVar[i].typePro.typeName, 0) == 0) {//变量名相同 72 | *typePro = robotVarArry[varType].robotVar[i].typePro; 73 | return true; 74 | } 75 | i++; 76 | } 77 | return false; 78 | } 79 | 80 | bool RobotVariableStruct::getRobotVarTypePropertyUsePos(int varType, int pos, decode_type_property *typePro) 81 | { 82 | if (pos < robotVarArry[varType].robotVar.size()) { 83 | *typePro = robotVarArry[varType].robotVar[pos].typePro; 84 | return true; 85 | } 86 | return false; 87 | } 88 | 89 | bool RobotVariableStruct::setRobotVarValData(int varType, const char *varName, decode_type_data varData) 90 | { 91 | int i = 0; 92 | 93 | while (i < robotVarArry[varType].robotVar.size()) { 94 | if (decodeStringCompare(varName, robotVarArry[varType].robotVar[i].typePro.typeName, 0) == 0) {//变量名相同 95 | //此处要调用变量值修改 96 | return true; 97 | } 98 | i++; 99 | } 100 | return false; 101 | } 102 | 103 | bool RobotVariableStruct::getRobotVarValData(int varType, const char *varName, decode_type_data *varData) 104 | { 105 | int i = 0; 106 | 107 | while (i < robotVarArry[varType].robotVar.size()) { 108 | if (decodeStringCompare(varName, robotVarArry[varType].robotVar[i].typePro.typeName, 0) == 0) {//变量名相同 109 | //此处要调用变量值读取 110 | return true; 111 | } 112 | i++; 113 | } 114 | return false; 115 | } 116 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/source/decode_prg/sharemempublic.cpp: -------------------------------------------------------------------------------- 1 | #include "sharemempublic.h" 2 | 3 | #ifdef Q_OS_LINUX 4 | #elif defined (Q_OS_WIN32) 5 | #include //本文件要补充完整,兼容windows和linux共享内存申请 6 | 7 | #include 8 | 9 | #define SHMEM_TYPE_CREATE 0//创建 10 | #define SHMEM_TYPE_OPEN 1//打开 11 | 12 | typedef struct { 13 | HANDLE shareMemHandle;//要兼容linux 14 | void *shareMemPtr;//共享内存数据指针 15 | int type;//创建的还是打开的 16 | int size;//共享内存大小字节 17 | }sharemem_struct; 18 | 19 | QList ShareMemInfoGlobal; 20 | 21 | int createUserSharemem(char *memName, int size) 22 | { 23 | int errFlag = -1; 24 | sharemem_struct shmemStruct; 25 | 26 | char *cstr = memName; 27 | size_t cstr_len = strlen(cstr); 28 | size_t n = (size_t)MultiByteToWideChar(CP_ACP, 0, (const char *)cstr, (int)cstr_len, NULL, 0); 29 | wchar_t pwstr[100]; 30 | MultiByteToWideChar(CP_ACP, 0, (const char *)cstr, (int)cstr_len, pwstr, (int)n); 31 | pwstr[n] = 0; 32 | shmemStruct.shareMemHandle = CreateFileMapping(INVALID_HANDLE_VALUE, 0, PAGE_READWRITE | SEC_COMMIT, 0,size, pwstr); 33 | shmemStruct.type = SHMEM_TYPE_CREATE; 34 | shmemStruct.size = size; 35 | if (shmemStruct.shareMemHandle != NULL) { 36 | ShareMemInfoGlobal.push_back(shmemStruct); 37 | errFlag = ShareMemInfoGlobal.size() - 1;//返回索引下标 38 | } 39 | 40 | return errFlag; 41 | } 42 | 43 | int openUserSharemem(char *memName, int size) 44 | { 45 | int errFlag = -1; 46 | sharemem_struct shmemStruct; 47 | char *cstr = memName; 48 | size_t cstr_len = strlen(cstr); 49 | size_t n = (size_t)MultiByteToWideChar(CP_ACP, 0, (const char *)cstr, (int)cstr_len, NULL, 0); 50 | wchar_t pwstr[100]; 51 | MultiByteToWideChar(CP_ACP, 0, (const char *)cstr, (int)cstr_len, pwstr, (int)n); 52 | pwstr[n] = 0; 53 | shmemStruct.shareMemHandle = OpenFileMapping(FILE_MAP_READ | FILE_MAP_WRITE, FALSE, pwstr); 54 | shmemStruct.type = SHMEM_TYPE_OPEN; 55 | shmemStruct.size = size; 56 | if (shmemStruct.shareMemHandle != NULL) { 57 | ShareMemInfoGlobal.push_back(shmemStruct); 58 | errFlag = ShareMemInfoGlobal.size() - 1;//返回下标索引 59 | } 60 | return errFlag; 61 | } 62 | 63 | int closeUserSharemem(int id) 64 | { 65 | int errFlag = -1; 66 | if (id < ShareMemInfoGlobal.size()) { 67 | if (ShareMemInfoGlobal[id].shareMemPtr != NULL) {//将指针和句柄都关闭 68 | UnmapViewOfFile(ShareMemInfoGlobal[id].shareMemPtr); 69 | } 70 | if (ShareMemInfoGlobal[id].shareMemHandle != NULL) { 71 | CloseHandle(ShareMemInfoGlobal[id].shareMemHandle); 72 | } 73 | ShareMemInfoGlobal.removeAt(id); 74 | errFlag = 1; 75 | } 76 | return errFlag; 77 | } 78 | 79 | void* mmapUserSharemem(int id, int size, int initFlag) 80 | { 81 | if (id < ShareMemInfoGlobal.size()) { 82 | ShareMemInfoGlobal[id].shareMemPtr = MapViewOfFile(ShareMemInfoGlobal[id].shareMemHandle, FILE_MAP_READ|FILE_MAP_WRITE, 0, 0, 0); 83 | if (initFlag == 1) { 84 | memset(ShareMemInfoGlobal[id].shareMemPtr, 0, size); 85 | } 86 | return ShareMemInfoGlobal[id].shareMemPtr; 87 | } 88 | return NULL; 89 | } 90 | 91 | #endif 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /GRS_Pro/robDecodePrg/source/test.cpp: -------------------------------------------------------------------------------- 1 | 2 | 3 | void add(int a, int b) 4 | { 5 | a = a+b; 6 | } 7 | -------------------------------------------------------------------------------- /MFC框架显示库/GLUT32.DLL: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/GLUT32.DLL -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.CRT/Microsoft.VC90.CRT.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.CRT/msvcm90.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/Microsoft.VC90.CRT/msvcm90.dll -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.CRT/msvcp90.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/Microsoft.VC90.CRT/msvcp90.dll -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.CRT/msvcr90.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/Microsoft.VC90.CRT/msvcr90.dll -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.DebugCRT/Microsoft.VC90.DebugCRT.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.DebugCRT/msvcm90d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/Microsoft.VC90.DebugCRT/msvcm90d.dll -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.DebugCRT/msvcp90d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/Microsoft.VC90.DebugCRT/msvcp90d.dll -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.DebugCRT/msvcr90d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/Microsoft.VC90.DebugCRT/msvcr90d.dll -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.DebugMFC/Microsoft.VC90.DebugMFC.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.DebugMFC/mfc90d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/Microsoft.VC90.DebugMFC/mfc90d.dll -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.DebugMFC/mfc90ud.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/Microsoft.VC90.DebugMFC/mfc90ud.dll -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.DebugMFC/mfcm90d.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/Microsoft.VC90.DebugMFC/mfcm90d.dll -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.DebugMFC/mfcm90ud.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/Microsoft.VC90.DebugMFC/mfcm90ud.dll -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.MFC/Microsoft.VC90.MFC.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.MFC/mfc90.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/Microsoft.VC90.MFC/mfc90.dll -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.MFC/mfc90u.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/Microsoft.VC90.MFC/mfc90u.dll -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.MFC/mfcm90.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/Microsoft.VC90.MFC/mfcm90.dll -------------------------------------------------------------------------------- /MFC框架显示库/Microsoft.VC90.MFC/mfcm90u.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/Microsoft.VC90.MFC/mfcm90u.dll -------------------------------------------------------------------------------- /MFC框架显示库/RoboSim.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/RoboSim.exe -------------------------------------------------------------------------------- /MFC框架显示库/glu32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/MFC框架显示库/glu32.dll -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Arm_Robot_Sys 2 | 3 | [![GitHubStars](https://img.shields.io/github/stars/luhuadong/Arm_Robot_Sys?style=flat-square&logo=GitHub)](https://github.com/luhuadong/Arm_Robot_Sys/stargazers) 4 | [![GitHub](https://img.shields.io/github/license/luhuadong/Arm_Robot_Sys.svg)](https://github.com/luhuadong/Arm_Robot_Sys/blob/master/LICENSE) 5 | [![GitHub release](https://img.shields.io/github/release/luhuadong/Arm_Robot_Sys.svg)](https://github.com/luhuadong/Arm_Robot_Sys/releases) 6 | 7 | ## 介绍 8 | 9 | 本项目设计一个工业机器人控制系统(手持示教器),包括界面设计、机器人控制语言解释器、插补算法等等。项目目前包含以下部分: 10 | 11 | - MFC 框架显示库 —— 是一个基于 MFC 的工业机器人模拟器(RoboSim),运行在 Windows 平台,支持 scara、delta、puma 模型。 12 | - GRS_Pro —— 目前包含 GR_HMI、GRS_Core、robDecodePrg 三个部分。其中是 GR_HMI 是基于 Qt 设计的界面,GRS_Core 是系统的核心和通用模块,robDecodePrg 是控制语言解释器模块。 13 | 14 | ## 启动程序 15 | 16 | RoboSim 与 GRS_Pro 之间通过共享内存进行通信,并且目前设计为由 RoboSim 创建共享内存,因此需要先启动 RoboSim,再启动 GR_HMI 界面部分。 17 | 18 | 控制器主界面: 19 | 20 | ![image](./screenshots/GR_HMI_Main.png) 21 | 22 | 点击右侧控制面板的“Switch”按钮,可以隐藏显示窗口: 23 | 24 | ![image](./screenshots/GR_HMI_Main_small.png) 25 | 26 | 菜单功能: 27 | 28 | ![image](./screenshots/GR_HMI_Menu.png) 29 | 30 | Jogging 手动控制界面: 31 | 32 | ![image](./screenshots/GR_HMI_Jogging.png) 33 | 34 | 切换运动模式界面: 35 | 36 | ![image](./screenshots/GR_HMI_Jogging_Motion.png) 37 | 38 | 切换坐标界面: 39 | 40 | ![image](./screenshots/GR_HMI_Jogging_Coordinatee.png) 41 | 42 | 增量设置界面: 43 | 44 | ![image](./screenshots/GR_HMI_Jogging_Increment.png) 45 | 46 | Align 界面: 47 | 48 | ![image](./screenshots/GR_HMI_Jogging_Align_Coord.png) 49 | 50 | 实时显示机械臂当前的位置姿态坐标,支持 Quate 和 Euler 转换,支持角度和弧度: 51 | 52 | ![image](./screenshots/GR_HMI_Jogging_Euler.png) 53 | 54 | 对机械臂进行示教,需要选择手动控制模式,并按下右侧面板的“Enable”按钮: 55 | 56 | ![image](./screenshots/GR_HMI_Mode_Manual.png) 57 | 58 | 结合 RoboSim 进行模拟: 59 | 60 | ![image](./screenshots/模拟操作.png) 61 | -------------------------------------------------------------------------------- /screenshots/GR_HMI_Data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/screenshots/GR_HMI_Data.png -------------------------------------------------------------------------------- /screenshots/GR_HMI_Jogging.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/screenshots/GR_HMI_Jogging.png -------------------------------------------------------------------------------- /screenshots/GR_HMI_Jogging_Align.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/screenshots/GR_HMI_Jogging_Align.png -------------------------------------------------------------------------------- /screenshots/GR_HMI_Jogging_Align_Coord.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/screenshots/GR_HMI_Jogging_Align_Coord.png -------------------------------------------------------------------------------- /screenshots/GR_HMI_Jogging_Coordinatee.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/screenshots/GR_HMI_Jogging_Coordinatee.png -------------------------------------------------------------------------------- /screenshots/GR_HMI_Jogging_Euler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/screenshots/GR_HMI_Jogging_Euler.png -------------------------------------------------------------------------------- /screenshots/GR_HMI_Jogging_Goto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/screenshots/GR_HMI_Jogging_Goto.png -------------------------------------------------------------------------------- /screenshots/GR_HMI_Jogging_Increment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/screenshots/GR_HMI_Jogging_Increment.png -------------------------------------------------------------------------------- /screenshots/GR_HMI_Jogging_Motion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/screenshots/GR_HMI_Jogging_Motion.png -------------------------------------------------------------------------------- /screenshots/GR_HMI_Jogging_Tool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/screenshots/GR_HMI_Jogging_Tool.png -------------------------------------------------------------------------------- /screenshots/GR_HMI_Main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/screenshots/GR_HMI_Main.png -------------------------------------------------------------------------------- /screenshots/GR_HMI_Main_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/screenshots/GR_HMI_Main_small.png -------------------------------------------------------------------------------- /screenshots/GR_HMI_Menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/screenshots/GR_HMI_Menu.png -------------------------------------------------------------------------------- /screenshots/GR_HMI_Mode_Manual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/screenshots/GR_HMI_Mode_Manual.png -------------------------------------------------------------------------------- /screenshots/模拟操作.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luhuadong/Arm_Robot_Sys/12984bf48a63cbd39f64a8c1f206966a27b66eaf/screenshots/模拟操作.png --------------------------------------------------------------------------------