Remove a zero array
Started by
Ano Ano
, May 09 2012 02:34 PM
8 replies to this topic
#1
Posted 09 May 2012 - 02:34 PM
Hello,
I am aquiring data from 8 channels (4 devices) so in order to plot them I added a build array (see attached picture) and created a 2d array. If one or more devices are switched off or disconnected this will create an array full of zeros (column H).
How can I avoid this?
I am aquiring data from 8 channels (4 devices) so in order to plot them I added a build array (see attached picture) and created a 2d array. If one or more devices are switched off or disconnected this will create an array full of zeros (column H).
How can I avoid this?
#2
Posted 09 May 2012 - 03:08 PM
Quick answer could be something like this :
But maybe you could change your whole application to only acquire the data you're going to plot.
Can you show how you setup your data acquisition?
Hope this helps
But maybe you could change your whole application to only acquire the data you're going to plot.
Can you show how you setup your data acquisition?
Hope this helps
____________________________
most boring end of the world ever!
#3
Posted 09 May 2012 - 03:11 PM
Don't turn the device off? You should describe what your ideal outcome is. What you probably should do is conditionally disable plots on your graph.
#4
Posted 09 May 2012 - 05:40 PM
I would use an array of waveforms instead of a 2D array, using an array of waveforms you can have an empty waveform.
Ton
Ton
#5
Posted 09 May 2012 - 09:21 PM
Ton's solution should work well. What this comes down to is needing an array of arrays. By luck Darren Natinger posted a nugget on this today (which is essentially the same as Ton's solution): http://forums.ni.com...012/m-p/1984521
James McNally
AE Specialist, NI UK & Ireland & CLA
#6
Posted 09 May 2012 - 09:40 PM
My suggestion is similar to Tons. I just use an array of cluster, where each cluster contains just an array.
#7
Posted 10 May 2012 - 12:01 AM
I should have read Darren's article first, because that is exactly what he suggested.
#8
Posted 15 May 2012 - 08:56 AM
Thank you all for your replies,
Ton's idea works but I notice a "display delay" when the waveform array data appear on the chart. When the 2d array is connected to the chart the data appear to move faster.
Darren's article is very interesting, how do I plot an array of clasturs of arrays into a chart?
Antoine's idea creates zero columns like 1 & 2 where as I would like to create columns like 3 & 4:
Ton's idea works but I notice a "display delay" when the waveform array data appear on the chart. When the 2d array is connected to the chart the data appear to move faster.
Darren's article is very interesting, how do I plot an array of clasturs of arrays into a chart?
Antoine's idea creates zero columns like 1 & 2 where as I would like to create columns like 3 & 4:
#9
Posted 09 July 2012 - 05:58 AM
Check attached file.
I have generated data and also removed zero from the data.
I have generated data and also removed zero from the data.













