LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

In terms of computational and coding time, is it benificial to use the Formula Express VI?

I want to take some rather small arrays (30 elements) and perform numerous linear and non-linear calculcations to them. The expressions are rather ugly (ex. [1097.8*X1*C1*X2*sqrt(X3/X4)]/[sqrt(1-C2*C3)]), where C's are constants and X's are arrays.

 

Assuming the code turns out to be somewhat large, in terms of the trade-off between time it takes to actually code these types of equations numerous times and the computational time saved, is it better to use the Formula Express VI or to code this the brute force way of entering each arithmetic operator seperately and wiring the constants and arrays to these operators.

 

I just began using LabVIEW, so I'm unsure of what may be more beneficial. The n00b in me says use the Formula VI.

0 Kudos
Message 1 of 3
(2,473 Views)

Coding with LabVIEW primitives is usually faster.  If you need to perform the same calculation numerous times, create a subVI containing the subVI. Use the subVI as often as required.  Then if you need to change the calculation, you only need to change the subVI.

 

Lynn

0 Kudos
Message 2 of 3
(2,470 Views)

Actually, adding to this question: I just discovered the Formula Node. This seems like it may be the best solution.

 

Also, as a note: I'm not doing the same calculation repeatedly. I'm doing several different nonlinear equations to obtain several different arrays for output. And I shouldn't have to use too many loops, but a couple will be required.

0 Kudos
Message 3 of 3
(2,468 Views)