This content is not available in your preferred language.
The content is shown in another available language. Your browser may include features that can help translate the text.
The Formula Node in LabVIEW software is a convenient, text-based node you can use to perform complicated mathematical operations on a block diagram using the C- syntax structure. It is most useful for equations that have many variables or are otherwise complicated.
The text-based code simplifies the block diagram and increases its readability. Furthermore, you can copy and paste existing code directly into the Formula Node rather than recreating it graphically. The Formula Node is available in all development versions of LabVIEW and does not require an additional toolkit or add-on.This tutorial is useful for familiarizing yourself with the Formula Node. Follow the steps to create a simple structure to compute different formulas depending on input values. Then, compare the simplicity of your block diagram using a formula node to its counterpart using graphical programming. The Formula Node is a tool that allows the benefits of text-based code within the easy-to-use graphical LabVIEW architecture.
Note: It is considered good programming practice to keep the inputs on the left border and the outputs on the right border of the Formula Node. This helps you follow the data flow in your VI and keep your code organized.
if (x*y>0)z1 = 3*x**2 - 2*y**3;else z1 = 0;z2 = sinh(z1);
In this case, the Formula Node helps minimize the space required on the block diagram. Accomplishing the same task without the use of a Formula Node requires the following code:
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.