wincc调用自定义dll库
You want to use the functions of a user-created library in WinCC. In this entry we show how a sample DLL is incorporated in WinCC. At the moment, DLLs created in Visual Basic cannot be incorporated in WinCC at Runtime with VBS
.More information on the use of DLLs is available in the WinCC Information System under: "Working with WinCC > ANSI-C for creating functions and actions > Using DLLs in functions and actions".
No. | Procedure |
1 | Sample DLL: Use a C compiler to create the library "T1_C.dll" from the following program code. You can download the ready-compiled DLL here. T1_C.zip ( 17 KB ) extern "C" __declspec (dllexport) int aufruf1 (int a); #include <stdio.h> N.B.
|
2 | Incorporate the "T1_C.dll" library in WinCC with C script
and execute the "aufruf1" function: The following WinCC tags were used:
Create the following C script on the "mouse-click" event of a button: #include "apdefap.h" |
3 | Result: |