LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Notifier has data for graphs but empty y values for mean

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.

 

Pete
Systems engineer (CLAD LV2013)
Download All
0 Kudos
Message 1 of 9
(3,499 Views)

Hi Woody,

 

what's the data in your waveform when you get that Mean error -20003?

That's the important part you need to check! What's the array size of "Y"?

 

Btw. you don't need to wire "012" to the IndexArray function…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(3,478 Views)

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)

Pete
Systems engineer (CLAD LV2013)
Download All
0 Kudos
Message 3 of 9
(3,440 Views)

Hi Pete,

 

when the array is empty (size=0) then what do you expect from calculating the Mean?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 9
(3,434 Views)

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

Pete
Systems engineer (CLAD LV2013)
0 Kudos
Message 5 of 9
(3,432 Views)

Hi Pete,

 

Would you be able to upload your VIs? Having a look at your full code might help.

 

Thanks and Regards,

Thanks and Regards,
Supreeth.K

0 Kudos
Message 6 of 9
(3,406 Views)

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

Pete
Systems engineer (CLAD LV2013)
0 Kudos
Message 7 of 9
(3,390 Views)

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,

Thanks and Regards,
Supreeth.K

0 Kudos
Message 8 of 9
(3,381 Views)

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

Pete
Systems engineer (CLAD LV2013)
0 Kudos
Message 9 of 9
(3,329 Views)