LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stopping VI , takes to long

Solved!
Go to solution
Solution
Accepted by topic author Cobmetal

You can do several things to fix this problem.  The easiest is to store your data in a shift register, append that data with each iteration of the while loop, and write the data after the loop is done.  You could then write a different program to play back the data, or you could use an existing sound player (like windows media player, itunes, etc.) to play your recorded sounds.  A state machine architecture would allow your vi to record and play back your sounds.

0 Kudos
Message 11 of 24
(2,601 Views)

im trying to do as you suggest , i've added shift register and trying to append an array and store it on the end ,but im missing something , 

here is what i've done : 

Capture.PNG

0 Kudos
Message 12 of 24
(2,560 Views)

using one of the examples found in the community , i've got this work out :

Capture.PNG

0 Kudos
Message 13 of 24
(2,525 Views)

There is a VI called Append Waveform.VI down in the analog subpallete of the Waveforms palette.  It will do what you are doing in you For Loops with a single subVI.

0 Kudos
Message 14 of 24
(2,422 Views)

ok , i will check this . I'm having another issue , i've added a matlab script , that should load the stored sample file for analysis .

the problem is that i can't load the sampled file correctly . what should i do , to load the stored file corrcetly ?

 

0 Kudos
Message 15 of 24
(2,412 Views)

ok , i will check this . I'm having another issue , i've added a matlab script , that should load the stored sample file for analysis .

the problem is that i can't load the sampled file correctly . what should i do , to load the stored file corrcetly ?

 

original.png

 im sorry for the double post, my mistake.

0 Kudos
Message 16 of 24
(2,411 Views)

We prefer actual VIs over blurry, oversized pictures. Hard to read, especially since you have lots of overlapping wires in all directions. At least do a diagram cleanup first!

 

Still, you have a tpyical race condition in that the matlab script starts in parallel to the file writing, so most likely the file does not even exist when the matlab script tries to read it. Why do you need to go via a file? Can't you just wire the real data to the matlab node directly?

 

 

0 Kudos
Message 17 of 24
(2,372 Views)

0 Kudos
Message 18 of 24
(2,356 Views)

@Cobmetal wrote:

... is there any way to plot the answer inside the labview front panel , instead of a poping up windows ?


Yes, of course there is!

0 Kudos
Message 19 of 24
(2,343 Views)

can you please explain how to get this done ? 

0 Kudos
Message 20 of 24
(2,337 Views)