LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NaN when used as subvi

Hi,
 
I am using DAQ assistent express VI to retrieve data from my ADC (BNC-2120).  I read about 500 samples and then use the mean function to get the averaged value.  Then I store this value with "write labview measurement file".  And I placed this in a while loop, so I can do this for several sets of samples.  This works fine, and I get a .lvm file with all my averaged data. 
 
Now, when I am using this VI as a subVI in another program, it fills the whole .lvm file with NaN values.  And when I am running the VI alone, it works fine again. 
Is it possible to read this data as a subVI?
 
Thanks in advance
(I am using LabView 7.1)
0 Kudos
Message 1 of 4
(2,870 Views)

I'm surprised that you can get data since the 2120 is just a connector block and doesn't do any A/D at all.Smiley Very Happy

If you do have a DAQ board in the PC (and what kind is that), then if you don't get the correct data when using a subVI, it would depend on how you are passing data to and from the main to the subVI and what you have wired up. Could you post the main and subVI so someone could take a look?

0 Kudos
Message 2 of 4
(2,863 Views)

Hi Fredje,

Could you send your subVI and the also the VI where you use this subVI. So I can have a look.

Regards,

Julien Roland - District Sales Manager
NI Belgium - Technical Support

Don't forget to rate a good answer
0 Kudos
Message 3 of 4
(2,824 Views)

Hi,

I already solved the problem.  The DAQ was reading continuously and I didn't stop it when my "while" loop ended.  So when I called this VI again, the DAQ was apparently still running.  So I couldn't use it.  But by assigning "STOP" to the end condition of my while loop, I solved the problem. 

Thanks for the replies

Fred

0 Kudos
Message 4 of 4
(2,817 Views)