km4hr Posted October 15, 2008 Report Share Posted October 15, 2008 I am receiving eight streams of data from from an analog input device in the form of "Scaled Data". I am able to plot these eight streams of data in a chart. However I want to perform calculations on each stream of analog data before plotting. For example, let's say I want to add a bias of 1 to the first stream of data values, a bias of 2 to the second, and so forth, before plotting. How do break out each individual stream of values for use in calculations? It seems to me, a brand new labview programmer, that a Formula Node would do the trick if I knew how to split out each of the eight input values into an array. Of course after I did that I would then need to re-assemble the result back into a Scaled Data stream for charting. I've been trying to do this using arrays in a Formula Node but I just can't get it to work. Is it possible to do this in labview? Can anyone point me in the right direction? I've noticed that there are two forms of the Formula Node. One is found on the Block Diagram as follows; Functions -> Arithmetic & Comparisions -> Formulas The other Formula Node is found as follows: Programming -> Structures -> y=f(x) The Formula Node found in Formulas is able to accept the entire Scaled Data stream and perform calculations on all eight data streams and return a Scaled Data stream for charting. But I need to perform a different calculation on each of the 8 streams of analog data. Is that possible? How is it done? thanks Quote Link to comment
Francois Normandin Posted October 15, 2008 Report Share Posted October 15, 2008 Hi km4hr, there are more efficient ways to deal with arrays and matrices in LabVIEW than to use a Formula Node. I've simulated a Scaled Data stream with two channels (Black Box) and the video shows you where to look for when you want to play with nD-arrays. There is a lot to learn in the Array and Numeric palettes alone, and my demo is just the tip of the iceberg. Break out your individual streams using "Index Array", apply a customized function to each streams and put them back together by "building arrays". Quote Link to comment
km4hr Posted October 16, 2008 Author Report Share Posted October 16, 2008 normandinf, Wow! What a fantastic reply! Thank you VERY much. I learned more from this post than I've been able to find in days of searching. QUOTE (normandinf @ Oct 14 2008, 06:10 PM) Hi km4hr, there are more efficient ways to deal with arrays and matrices in LabVIEW than to use a Formula Node. I've simulated a Scaled Data stream with two channels (Black Box) and the video shows you where to look for when you want to play with nD-arrays. There is a lot to learn in the Array and Numeric palettes alone, and my demo is just the tip of the iceberg. Break out your individual streams using "Index Array", apply a customized function to each streams and put them back together by "building arrays". Quote Link to comment
Francois Normandin Posted October 16, 2008 Report Share Posted October 16, 2008 QUOTE (km4hr @ Oct 15 2008, 08:41 AM) normandinf,Wow! What a fantastic reply! Thank you VERY much. I learned more from this post than I've been able to find in days of searching. You're welcome. You can continue your findings about those functions by using the context help of LabVIEW. Press Ctrl-H and hover your mouse over any functions in the palettes to find out what they are, what they do and what it takes to wire them. A more detailed help link is provided with all native LabVIEW icons. Quote Link to comment
PaulG. Posted October 16, 2008 Report Share Posted October 16, 2008 It's fun watching a master work. I don't get much of that. And a pretty good sales pitch for Jing. That might be useful. Quote Link to comment
Francois Normandin Posted October 16, 2008 Report Share Posted October 16, 2008 QUOTE (PaulG. @ Oct 15 2008, 09:24 AM) It's fun watching a master work. I don't get much of that. That's because your questions are too hard!!! :laugh: QUOTE (PaulG. @ Oct 15 2008, 09:24 AM) And a pretty good sales pitch for Jing. That might be useful. Hail to Captain Kirchner for that. Quote Link to comment
Rolf Kalbermatter Posted October 19, 2008 Report Share Posted October 19, 2008 QUOTE (normandinf @ Oct 14 2008, 06:10 PM) Hi km4hr, there are more efficient ways to deal with arrays and matrices in LabVIEW than to use a Formula Node. I've simulated a Scaled Data stream with two channels (Black Box) and the video shows you where to look for when you want to play with nD-arrays. There is a lot to learn in the Array and Numeric palettes alone, and my demo is just the tip of the iceberg. Break out your individual streams using "Index Array", apply a customized function to each streams and put them back together by "building arrays". Actually using a For Loop with autoindexing would be quite a bit more efficient than using Index Array and Build Array. If you would need different operations on different indices you could still implement the operations in a case structure wired to the loop index counter. Rolf Kalbermatter Quote Link to comment
Dan DeFriese Posted October 20, 2008 Report Share Posted October 20, 2008 QUOTE (PaulG. @ Oct 15 2008, 08:24 AM) And a pretty good sales pitch for Jing. That might be useful. I'm sold!!! Quote Link to comment
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.