LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

strength of formula.vi

Would it be more expensive to use the formula vi in the Mathematics section rather than just wire up the formula manually and put it in a subvi?

In other words, does using the formula vi in place of wiring up the equation in a subvi slow the application down?
0 Kudos
Message 1 of 6
(2,989 Views)
If you are worried about performance, you should do both alternatives and then benchmark. 🙂
 
Are you talking about the formula node or the tools that parse formula strings? Parsing a formula string will always be much more expensive, but it has the advantage that you can change the formula at runtime from the UI.
 
What are you trying to calculate?
0 Kudos
Message 2 of 6
(2,980 Views)

Probably have to test that one yourself...

by formula vi, do you mean formula node?

and by "wire up the formula manually" mean using the '+ x / ' vi's from the numeric pallete?

________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 3 of 6
(2,976 Views)


it's actually formula.vi, not the formula node. I was only trying to plug in the distance formula (which is nothing for either approach). It just made me curious that if I had a much more invovled set of computations, which approach would be better? Would it be worth my time to wire up a subvi, or would it just be faster and more efficient to use this formula doo-dad.
0 Kudos
Message 4 of 6
(2,957 Views)
By no means I am a LabVIEW expert but since you will be entering your formula as a string (from the keyboard) and since the formula VI will be needing to parse it, I would think that simply wiring the formula (and making it a subVI) would generate direct code, be faster and take up less space.
 
Please correct me if I am wrong.
Regards,
Berk
Instrument Drivers / IVI
0 Kudos
Message 5 of 6
(2,952 Views)
That's what I figured, too; I just wasn't sure exactly why it would be slower. Thanks for everybody's input; it really helps!
0 Kudos
Message 6 of 6
(2,946 Views)