03-14-2014 11:32 AM
Hi everyone,
I'm probably doing something obvious wrong but I am getting data through a notifier for a display loop. There is an array of 3 waveforms that is generated from a cDAQ 9174 with an NI9215 module for analogue reading of voltages. The display loop is supposed to have a graph for each of these voltages and a digital display of the mean value (doesn't have to be mean but it was the best way I could see to get it into a dbl expression instead of an array)
The trouble I have is that the graph is plotting what I expect it to plot (although I am currently just looking at 5 seconds worth of data) but the mean is giving NaN (error -20003) so there is something wrong with the data being sent through the notifier.
I believe the loop should only run when a notifier is available? So there should always be data in the notifier unless the DAQ is not doing what I expect?
Any help appreciated, thanks in advance
Let me know if you need more bits, I'll probably upload on Monday.
03-14-2014 12:01 PM
03-17-2014 04:41 AM
Hi GerdW
The array size is 0 and the data is 0 except the graph shows a steady line, not dropping down to 0 each time. The data when it does come through is
I am using continuous sampling to read the data, would that be where the problem occurs? In my mind it should be fine as the output voltage is set so continuously reading that voltage should always give the same value.
I have attached the current task and DAQ configuration below. When I increase the frequency to 1khz there a more steady stream of good data but still flickers with bad data... I didn't think the notifier would take an empty array through with this DAQ configuration?
(with the array I just wanted to be doubley sure that it was getting the right arrays in, but thanks)
03-17-2014 04:46 AM
03-17-2014 04:47 AM - edited 03-17-2014 04:49 AM
Hi GerdW,
I'd expect the NaN value, but I don't expect it to be empty
Pete
Edit: maybe I've asked the wrong question in the title here
03-17-2014 08:12 AM
Hi Pete,
Would you be able to upload your VIs? Having a look at your full code might help.
Thanks and Regards,
03-17-2014 11:51 AM
Hi Supreeth,
Unfortunately not currently, I have sent the project to Petru Tarabuta at NI though. If you guys are both at Newbury you can see it there.
Apologies to people not at NI.
Pete
03-17-2014 12:21 PM
Hi Pete,
Since you have escalated this issue to NI technical support, you will be supported through that support channel.
It will be great if you can post the solution here once this issue is resolved so that the community can benefit from it (I will put in a word to Petru as well).
Thanks and Regards,
03-25-2014 06:48 AM
Hey guys,
Found the problem, it was because I was using continuous data acquisition. The logging loop was just repeating constantly sending blank information because it doesn't wait for the data to be acquired it just sends the data when it reaches the time set.
So it was sending data every 100ms as I had asked it to but because it was on continuous data acquisition it was also sending blank. I have fixed it by putting a wait command within the while loop for the time period required.
I could probably have used finite acquisition but I was running into errors, for the purpose that I need it for the wait command has worked fine. No missing data as the data is buffered with continuous acquisition I believe.
Thanks for all who suggested things.
Pete