LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Scaled Data in a Formula Node

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 is found as follows:

Programming -> Structures -> y=f(x)

 

The Formula Node found in Formulas is able to accept the 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

 

 

0 Kudos
Message 1 of 6
(3,094 Views)

You do not need to use the formula node to do that. All you need is to wire your array of values into an Add function. Try it. Smiley Wink

 

If you're dealing with dynamic data then use the Split Signals function which you can find in the Express -> Signal Manipulation palette.

Message Edited by smercurio_fc on 10-14-2008 05:27 PM
0 Kudos
Message 2 of 6
(3,084 Views)

Thanks Smercurio,

 

Best I can tell your solution doesn't break the eight analog data streams out individually so that I can perform calculations on each of them and then re-assemble them for plotting. I don't need to multiply them all by 3 for example.

 

Also, how many data types does labview have? The tutorials I've been studying mention only three types: numeric, boolean, string (I think). But as I study actual VI examples I see other types such as the "dynamic data" you mentioned. What's "timing information"? Where is that explained? Another data type I've run into is "Scaled Data". What's that? Where can I learn about these other data types?  

 

For that matter, what's an "Express VI"? I see them in Labview but what are they for? I've been searching labview help, NI web site, and the internet but I can't find any explanation for what they are or why they exist. Is Labview trying to convert to a new way of doing things? Maybe "labview lite" or something?

 

thanks again

0 Kudos
Message 3 of 6
(3,050 Views)

There was an almost identical question asked here.

 

For an explanation of the various data types, just open the on-line help and find the 'data types' topic. 

 

Express VIs were introduced with LabVIEW 7. Intended to make things a bit easier for newbies to get started. They encapsulate lower level functions and you configure them with a gui that pops up that provides all of the different options that the Express VI has.

 

 

0 Kudos
Message 4 of 6
(3,040 Views)

Hi km4hr,

 

To help you the best way, you should add a copy of your program to a post in this forum, then others can have a look at it, giving better solutions after reviewing it.

 

When you want to know more about data types, express VI's and more you can use the weblinks below. Also you can consider following the LabVIEW Basics I course. During this course the LV fundamentals will be explained, giving you some tools for your programming work.

 

Express VI's

Dynamic Data Type

Several Data Types

 

I hope this will help you!

 

Best regards,

 

Peter Schutte

0 Kudos
Message 5 of 6
(3,036 Views)

km4hr wrote:

Thanks Smercurio,

 

Best I can tell your solution doesn't break the eight analog data streams out individually so that I can perform calculations on each of them and then re-assemble them for plotting. I don't need to multiply them all by 3 for example.


That's why I said to use the Split Signals function, assuming you're using dynamic data. As the name implies it ... splits signals. If you have an array of waveform data, then you just need an Index Array

 

To learn more about LabVIEW it is recommended that you go through the tutorial(s) and look over the material in the NI Developer Zone's Learning Center which provides links to other materials and other tutorials. You can also take the online courses for free.

0 Kudos
Message 6 of 6
(3,031 Views)