How can you incorporate your own header files in C scripts?
You can incorporate your own header files by proceeding as follows.
|1||Header definition as first statement in the function body
Insert your header definition as first statement after the brace.
|2||Extension of the standard header file "apdefap.h"
Open the standard header file "apdefap.h" with the Global Script editor or a simple ASCII editor (notepad.exe). The "apdefap.h" file is in the WinCC project path ".\library\apdefap.h".
Enter you header definition.
|3||Header definition before the function declaration
In the case of Global Script functions you can insert additional header files before the function declaration.
The requirement for all three methods is that the header file to be incorporated is located in the "Search Path" for Global Script. For example, this can be:
- "<WinCC project path>\library" or
- <WinCC installation path>\aplib"
You must make sure that the code in the header is not executed twice. You can ensure this by using appropriate C preprocessor statements.
- You have a technical question / problem: Ask the Technical Support
- You want to discuss in our forum and exchange experiences with other users
- You want to create CAx data for one or more products
- You would like to send us feedback on this Entry