5/12/2007 10:50 AM | |
Posts: 3 Rating:
|
Hi every body, Does anyone has an idea about this subjet? Thanks. |
5/15/2007 1:54 AM | |
Joined: 12/5/2005 Last visit: 8/30/2023 Posts: 239 Rating:
|
HI Iyad, the Nemo is right. Exists severals tools to exchange data between WinCC and others applications, for exemple: - Dat@Bridge for exchange of MS-SQL Server of WinCC and others DB, like Oracle. - ConnectivityPack to accessing to DB of WinCC; - OLE Objects to accessing the online tags of WinCC; - ODK that provide severals API to accessing the data of WinCC. Well, all tools above has a excelent performance, being tested by Siemens in many plataforms. Is not justified to use other technologies to exchange data between WinCC and others applications. But, I consider your question a nice example to demonstrate some advantages of structure of WinCC. In the WinCC is possible create scripts with C-ANSI, where is possible call externals functions with #pragma directive. Exemple: ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// #pragma code("C:\CC_SHAREPROJECT\VC_Project\Release\DLLShare.dll") short GetValue(void) ; short SetValue(short nValue); #pragma code () ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// Ok, but unlike the 16-bit Windows operating system, the 32-bit Windows operating system does not allow sharing of data in DLLs from different applications. This is because applications are not prevented from sharing memory directly between processes. Two methods may be used for sharing data between processes. One is use of memory-mapped files and the other is creation of a shared data segment. Using memory-mapped files is the recommended method by several literatures, but the creations of a shared data segments is more easy, and I will use this method to demonstrate how to make the data sharing. In the DEF file (that define the exports functions, variables and sections) I created the following entries: ///////////////////////////////////////////////////////////////////////////////////////////////////////////////// ; The DEF File LIBRARYDLLShare EXPORTS SECTIONS __declspec(dllexport) short GetValue(void){ __declspec(dllexport) void SetValue(short tnValue){ |
Márcio Santos |
|
5/15/2007 1:48 PM | |
Posts: 1275 Rating:
|
That makes for a reeeeeeally nice return, Marcio... Welcome back! |
Follow us on