Blog

LabVIEW Formula Nodes - Faster Or Not?

LabVIEW Formula Nodes - Faster Or Not?

National Instruments LabVIEW is one of our core development languages here at DMC. With four architects on staff, we often ask ourselves questions about the way LabVIEW behaves that most other people don't need to worry about.

While performance optimizing a project, I replaced some complex math with formula nodes and realized a significant improvement in performance with this simple change. Since there is often repeated conventional wisdom which says that formula nodes are either slower or, at least, not faster than traditional G code, I decided to investigate.

NI created a knowledge base article with simple calculations which show a small, 10%, performance benefit in favor of traditional G code. The diagram in my attached image for ax^4 + ax^3 + ax^2 + a shows a 10% shorter execution time for the formula node. As the complexity of the formula increased there was a definite trend toward shorter execution times with the formula node. (NOTE: Some functions, like exponentiation run dramatically slower in the formula node).

Based on your particular formula, a formula node may or may not be faster than the equivalent G code and, most of the time, it doesn't matter as ultimate performance is not usually the goal. If you are in pursuit of the ultimate performance and have complicated math functions, the formula node may help solve some of your problems.

Learn more about DMC's LabVIEW expertise.

Comments

gary
# gary
What version of LabVIEW did you use for this testing?
crossrulz
# crossrulz
The knowledge base article you linked showed the traditional G and formula node had the same execution time (78ms) while the expression node was faster (64ms). Therefore the expression nodes seem to be the way to go for single line equations with one variable.

I also remember a forum post (I think it was on LAVA) where they found that some simple addition and multiplication was a lot faster with the formula node versus the G code.

Post a comment

Name (required)

Email (required)

CAPTCHA image
Enter the code shown above:

Related Blog Posts