2/21/2007 3:32 PM | |
Joined: 12/5/2005 Last visit: 8/20/2024 Posts: 239 Rating: (9)
|
Hi Fran, If you use Mutex to synchronize this programs, you can use this: m_hMutex = CreateMutex( NULL, TRUE, "MyUniqueMutexIdInOS"); I will try to test its problem in my system. Tosee the manual of C ANSI for WinCC. See the the link below: The Siemens supplies a tool called ODK, that documents the API of WinCC. Maybe, be better you try to do that you need , calling the API of WinCC, without using Windows API for multithread. |
Márcio Santos |
|
2/21/2007 8:47 PM | |
Joined: 12/5/2005 Last visit: 8/20/2024 Posts: 239 Rating: (9)
|
Hi Fran I tested the Mutex's functions in the WinCC 6.0 SP3, and I didn't find problems. Inclusive, I tested the TIMEOUT situation. In my test, I created a action to running with intervals of 1s, and she don't was locked in any case. See the sources files of my test. Sorry the zip file of project has 1.8MB. AttachmentMutex_Sources.zip (221 Downloads) |
Márcio Santos |
|
2/22/2007 8:56 AM | |
Joined: 5/19/2006 Last visit: 9/5/2024 Posts: 548 Rating: (107)
|
[quote user="Fran"]Hi Marcio!. ... We have an external application which retrieves some data calculated in a C script. This same external application returns some data outputs which are used in the previous C script so this script must wait for the external application to terminate. ... You have said that the C functions are interpreted. I always though that the binary code generated during the compilation was executed by "script.exe" application, not interpreted line-by-line. That's why we need "The biggest C script in WinCC handbook ever written", to clear all these doubts. Thank you! I don't think Siemens will bother too much writing the big C Script handbook. B. Kernighan & D. Ritchie wrote "The C Programming Language"book in 1978. Why don't you call C Script functions inside your external application? C Script engine runs in interpreted mode line by line like you don't believe. See /tf/WW/en/Posts/4548 Dec |
Last edited by: Dec at: 2/22/2007 9:16 AM |
|
2/22/2007 9:21 PM | |
Joined: 12/5/2005 Last visit: 8/20/2024 Posts: 239 Rating: (9)
|
Ok, if you have any question, post here. |
Márcio Santos |
|
Follow us on