11/2019 Quick introduction "new HMI project" (CPP)
Quick introduction "New HMI project" (CPP)
In just a few steps, this document shows how a new HMI project can be generated, started and
debugged with CPP.
The SINUMERIK Integrate Create MyHMI /3GL must have been successfully installed on
the development PC or laptop. All path data in this document refers to the substituted
installation directory of the SINUMERIK Integrate Create MyHMI /3GL.
Step 1 – Establish the connection to the NC
Here, proceed as described in the attached Installation Instructions
"SinumerikOperate_Installation.pdf":
ð Menu item "Version Switch – managing the connection (characteristic)"
Comment:
The original file "hmisl\siemens\sinumerik\hmi\cfg\mmc.ini" - but also the
OEM file "hmisl\oem\sinumerik\hmi\cfg\mmc.ini" - should no longer be
directly changed.
Step 2 – Create an HMI project
After opening Visual Studio 2017:
Start à Programs à Siemens Automation à Sinumerik à SINUMERIK
Integrate Create MyHMI -3GL à Tools à Visual Studio 2017
.. you create a new project:
Menu File à New à Project à Visual C++ à Windows Desktop Application
Fig. 1 - New HMI project
Confirm with "OK" and click "Finish" in the following window.
Frei verwendbar © Siemens AG 2019 All Rights Reserved
SINUMERIK Integrate Create MyHMI /3GL - Edition 11/2019 1/2
11/2019 Quick introduction "new HMI project" (CPP)
Step 3 – Link the C++ interface
All classes of SINUMERIK Operate CPP are defined in the following header
file. It is integrated using an inlcude instruction.
sloperatecppapi.h
The following project settings then have to be made for "All Configurations":
1) Add "$(HMI_SL_PP_SUBST)include" to
the "Additional Include Directories".
2) Select "Multi-threaded DLL(/MD)" for the "Runtime Library".
3) Add "$(HMI_SL_PP_SUBST)hmisl\lib" to
the "Additional Library Directories".
4) Add "sloperatecppapi.lib" at "Additional Dependencies".
Step 4 – Compile the example
The example can now be compiled:
Menu Build à Rebuild Solution.
Step 5 – Start SINUMERIK Operate
SINUMERIK Operate can now be started from the Windows start menu:
Start à Programs à Siemens Automation à Sinumerik à SINUMERIK
Integrate Create MyHMI -3GL à HMI
This is necessary so that the example started in the next step has a connection
to the NC/PLC.
Step 6 – Debug the example
You can now start the example in Visual Studio 2017 by pressing F5 (or menu
Debug à Start Debugging). The example is now interrupted at the set
"Breakpoints".
After exiting (Shift+F5 or menu Debug à Stop Debugging), do not shut down
SINUMERIK Operate, but rather start it again with F5 immediately after the
required code adaptations.
Frei verwendbar © Siemens AG 2019 All Rights Reserved
SINUMERIK Integrate Create MyHMI /3GL - Edition 11/2019 2/2