LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Récupération d'event lors du lancement d'un exe développer en C sous LabView

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

0 Kudos
Message 1 of 11
(3,338 Views)

 


Translation

 

 

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 ");


 

0 Kudos
Message 2 of 11
(3,327 Views)

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,

 

0 Kudos
Message 3 of 11
(3,281 Views)

  HI,

 

  Thanks for the answer but I can't do it. I have always an LabView error

  Follow my vi try

0 Kudos
Message 4 of 11
(3,247 Views)
what is the error that you are getting?
0 Kudos
Message 5 of 11
(3,231 Views)

    Hi,

 

See the screen copy of the error.

 

0 Kudos
Message 6 of 11
(3,228 Views)
0 Kudos
Message 7 of 11
(3,226 Views)

  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.

0 Kudos
Message 8 of 11
(3,222 Views)

Utilisant de le "stdcall (WINAPI)" a resolu ce probleme pour moi dans le passe.

CallingConvention.PNG

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 9 of 11
(3,198 Views)

    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

 

0 Kudos
Message 10 of 11
(3,183 Views)