03-18-2010 11:10 AM
Je lance un exe par la fonction Systen exe.vi, celui ci génére un event que je souhaite récupérer sous LabView 8.2.
Est ce possible et si oui comment faire pour se synchroniser sur cet event.
La fonction que j'utilise en C est "hEvent = OpenEvent(SYNCHRONIZE,TRUE,"event1");
Par avance merci pour votre aide
03-19-2010 02:03 AM
I launch an exe Systen exe.vi function, that it generates an event that I want to recover under LabView 8.2.
Is this possible and if so how to sync this event.
The function I use in C is "hEvent OpenEvent = (SYNCHRONIZE, TRUE," event1 ");
03-29-2010 10:53 AM
Hi,
To use the OpenEvent function, you have to call the Win32 API in LabVIEW as it is a Windows Event. In order to do that, you have to use the Call Library Function Node in LabVIEW.
Here is a link to the LabVIEW 8.2 Help of this function. This link might also be useful to help you understand how call to a Win32 API can be done : Example 3: Call the Win32 API. Here is a link for the OpenEvent function details in the MSDN Library. And finally this is a forum post from a user who is using the Call Library Function Node to call CreateEvent which will give you a good example on how to use it.
I hope this will help you,
Charlotte F. | CLAD
National Instruments France
03-30-2010 09:46 AM
HI,
Thanks for the answer but I can't do it. I have always an LabView error
Follow my vi try
03-31-2010 01:09 AM
03-31-2010 01:39 AM
Hi,
See the screen copy of the error.
03-31-2010 01:44 AM
03-31-2010 01:51 AM
I assume it's a call problem but I can't determine what is the cause of the crash.
If somebody can help me to found the reason of it.
03-31-2010 10:57 AM
Utilisant de le "stdcall (WINAPI)" a resolu ce probleme pour moi dans le passe.
04-01-2010 01:58 AM
It doesn't work by changing the Calling convention but what Labview version do you use.
We can see the Function prototype it isn't the same.
hEvent is declare as non signed integer 32 bits
dwDesiredAccess is declare as non signed integer 64 bit value
bInheritHandle is declare as signed integer 8 bit value
lpName is declare as signed integer 8 bit pointer
See screen copy file