LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dll that has while loop inetrface with JAVA

Hi all,

 

I am trying to build several LabVIEW VIs and convert them into dlls. I use these dlls then in JAVA applet. I tested many VIs and it works in the JAVA applet. But when the VI has while loop (run continuously for whether averaging process or playing waveform for instance), I have a problem in the JAVA applet that I cannot see any output from the dll. I understand the reason for this as the dll is still running and there is no any return outputs until the dll stop running. I tried to use local variables but the same problem exists. Can anyone help me please?

 

I attached the VI using LabVIEW 2011.

 

I appreciate you help

 

 

0 Kudos
Message 1 of 6
(2,618 Views)

How do you plan to press the Stop button if this is turned into a DLL?

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 6
(2,597 Views)

Thanks Yamaeda,

 

Actually the only action that we can do is that we eliminate the while loop from the VI and call the dll successively from JAVA. This affects the played waveform signal as discontinuities appears in the sound when we do that.

 

So I am asking for an alternative solution that won't affect the sound.

0 Kudos
Message 3 of 6
(2,576 Views)

What you should do is call the play sound through asynchronous call (or vi server), then you can play the sound without waiting for it to finish and dont need a loop. It spawns a separate thread/process that playes the sound.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 6
(2,573 Views)

Thanks for your reply, as I am semi-beginner in LabVIEW. I will read some tutorials about VI server and back to you if I have any questions.

0 Kudos
Message 5 of 6
(2,558 Views)

PlaySoundAsynch.png

See if that's about what you're after. 😉

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 6
(2,550 Views)