Ano Ano 0 Posted May 9, 2012 Report Share Posted May 9, 2012 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? Quote Link to post Share on other sites
Antoine Chalons 87 Posted May 9, 2012 Report Share Posted May 9, 2012 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 Quote Link to post Share on other sites
asbo 157 Posted May 9, 2012 Report Share Posted May 9, 2012 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. Quote Link to post Share on other sites
Ton Plomp 171 Posted May 9, 2012 Report Share Posted May 9, 2012 I would use an array of waveforms instead of a 2D array, using an array of waveforms you can have an empty waveform. Ton Quote Link to post Share on other sites
JamesMc86 48 Posted May 9, 2012 Report Share Posted May 9, 2012 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/t5/LabVIEW/Darren-s-Occasional-Nugget-05-09-2012/m-p/1984521 Quote Link to post Share on other sites
Stagg54 15 Posted May 9, 2012 Report Share Posted May 9, 2012 My suggestion is similar to Tons. I just use an array of cluster, where each cluster contains just an array. Quote Link to post Share on other sites
Stagg54 15 Posted May 10, 2012 Report Share Posted May 10, 2012 I should have read Darren's article first, because that is exactly what he suggested. Quote Link to post Share on other sites
Ano Ano 0 Posted May 15, 2012 Author Report Share Posted May 15, 2012 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: Quote Link to post Share on other sites
Prabhakant Patil 1 Posted July 9, 2012 Report Share Posted July 9, 2012 Check attached file. I have generated data and also removed zero from the data. Remove Zero.vi Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.