Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
229 views

LabVIEW Formula Node Example

This document provides instructions for creating a LabVIEW subVI that uses a Formula Node to calculate the slope and intercept of a linear equation from two data points. It is a 10 step process that involves creating the front panel, block diagram, and C code for the Formula Node to evaluate the mathematical formulas and expressions for finding the slope and intercept. The subVI takes x1, y1, x2, y2 as inputs and produces the slope a and intercept b as outputs.

Uploaded by

nicelio_alves
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
229 views

LabVIEW Formula Node Example

This document provides instructions for creating a LabVIEW subVI that uses a Formula Node to calculate the slope and intercept of a linear equation from two data points. It is a 10 step process that involves creating the front panel, block diagram, and C code for the Formula Node to evaluate the mathematical formulas and expressions for finding the slope and intercept. The subVI takes x1, y1, x2, y2 as inputs and produces the slope a and intercept b as outputs.

Uploaded by

nicelio_alves
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Telemark University College

Department of Electrical Engineering, Information Technology and Cybernetics

LabVIEW Formula Node Example


Description: A Formula Node in LabVIEW evaluates mathematical formulas and expressions similar to C on the
block diagram. In this way you may use existing C code directly inside your LabVIEW code. It is also useful when
you have complex mathematical expressions.
Task: Create a simple SubVI where you use the Formula Node to calculate a (slope) and b (intercept) in the
equation
when you have two points
and
.
The Procedure is as follows:
Step 1: Create a New VI (FileNew VI) (Blank VI)
Step 2: Give the VI a Name (Linear Scaling.vi)
Step 3: Create your Front Panel with your necessary Controls and Indicators.
Example:

Step 4: Switch to your Block Diagram (Ctrl+E).

Step 5: Add the Formula Node to you Block Diagram:

Faculty of Technology, Postboks 203, Kjlnes ring 56, N-3901 Porsgrunn, Norway. Tel: +47 35 57 50 00 Fax: +47 35 57 54 01

Step 6: Add Inputs and Outputs:

Step 7: Create your C-code inside your Formula Node.


The formula for finding the slope (a) and intercept (b) is as follows:

The Block Diagram could look something like this:

Step 8: Create the Input and Output Connectors. Right-click on the little icon in the upper right corner and
select Show Connector.
Step 9: Create an Icon using the Icon Editor. Right-click on the little icon in the upper right corner and select
Edit Icon.
Step 10: Create a new VI that you use to test your Sub VI.

Hans-Petter Halvorsen Blog: http://home.hit.no/~hansha/

You might also like