07-10-2015 11:49 AM - edited 07-10-2015 11:52 AM
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.
07-11-2015 03:49 AM
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 :
07-11-2015 06:04 AM
using one of the examples found in the community , i've got this work out :
07-11-2015 12:41 PM
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.
07-11-2015 12:52 PM
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 ?
07-11-2015 12:53 PM - edited 07-11-2015 12:55 PM
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 ?
im sorry for the double post, my mistake.
07-11-2015 01:45 PM
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?
07-11-2015 02:12 PM
altenbach , you absolutely right , im sorry for the messy and blurry VI , next time i post a pictures , it will be clear and actual , i found a way how to write data directly to the matlab node , and it works ok .
When the script finishes it opens a matlab popup figure with the result , is there any way to plot the answer inside the labview front panel , instead of a poping up windows ?
07-11-2015 02:35 PM
@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!
07-11-2015 02:38 PM
can you please explain how to get this done ?