LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keep dll running and waiting for parameters

Hello!

 

I am for the first time in this forum, sorry if something wrong.

 

My problem:

I have a labview aplication, which needs to pass several parameters during the run to a  .dll(c++). The .dll has to remember all the values sent in different time moments,execute some calculations and answer to the VI every time parameters arrive. All the values passed are integers.

 

I know how to run the .dll from vi, pass parameters and receive answer, but every time i pass the parameters, the .dll starts again and does not remember parameters sent before.

 

I use next line to get parameters from vi to .dll:

extern "C" __declspec(dllexport)int Myfunction( int a, int b, int c );

 

The other way I thought of would be to save the values to a .txt file, but this isn't certainly optimal solution.

 

It would be best, if the .dll would run simultaneously with the vi and listen for parameters and answer, when needed.

 

Please help, thanks.

Message Edited by redblue on 10-19-2009 01:50 PM
0 Kudos
Message 1 of 2
(2,698 Views)

Hi there,

 

Ironically, I just posted a very similar query here - today as well! (didn't find this one during my initial search...):

http://forums.ni.com/ni/board/message?board.id=170&message.id=449082#M449082

 

If you just want single strings/values, then the event posting definitely works okay (I don't know how many events per second it can handle though, if you need high data rates).

 

Anyhow, I suggest you have a look at:

 

http://zone.ni.com/devzone/cda/epd/p/id/1480

 

and

 

http://forums.ni.com/ni/board/message?board.id=170&thread.id=332674

 

 

(I don't know why I failed with passing 1D arrays, given that strings work... )

 

Regards, MT

Message 2 of 2
(2,682 Views)