LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Best choice to code an equation

Good day everyone.
I was wondering which option would be the best to code this equation


I have 3 choices
1)Mathscript thought I dont want to use that since it is terribly slow (Lv 8.0.1)
2)Formula node
3)Native Lv language (with the wires :P)

I was thinking that the native LV language would be the best option since some of the variables run from Real to Complex values and the formula node doesnt support Imaginary math.

What do you guys think about it?

tonh
0 Kudos
Message 1 of 8
(3,286 Views)
Hi tonH,

I would advise to use native LabView (G) even with this horrible formula.
After taking a short glance I could only recognize 4 or 5 constants. So you can wire this formula with a decent number of wires... And G is able to use complex numbers without any problemsSmiley Wink
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 8
(3,260 Views)

Wiring it shouldn't be that bad..  There are many repeats of the same value such as (kg + ko2) which would be the same wire. 

Remember to label the wires.  > kg + ko2 >  (fill with white and slide over the wire).

R



Message Edited by JoeLabView on 07-25-2008 02:22 PM
0 Kudos
Message 3 of 8
(3,252 Views)
And please watch your dataflow - that is going to determine your order of operations.

I've been bitten a few times by not interpreting parentheses CAREFULLY! Compare the results of your implementation against an existing piece of code (if one exists). That doesn't mean your code is RIGHT, it just means it's consistent with a known. You might even find a problem in someone else's code (oops!)


0 Kudos
Message 4 of 8
(3,232 Views)
A fourth option would be scilab. It is also free. I have not tried it, though.
 
Personally, I would use wires.
 
Do you have some more details on the formula, what does it do? Maybe there are some higher-level functions that could replace a lof of it.
0 Kudos
Message 5 of 8
(3,224 Views)
Thanks everyone. That helped me to set my choice and by now.. i'm pretty much done with coding it 😄
0 Kudos
Message 6 of 8
(3,221 Views)

I would just like to take a moment to appreciate that fact that I do not have to deal with equations that complicated.

This is a good example of "no matter how bad your situation is, there is always someone worse" Smiley Wink

Cory K
0 Kudos
Message 7 of 8
(3,214 Views)
Altenbach ... I would defenitly want to learn more about those "high level functions" but I dont think it is suitable for me... unless a  Labview engineer was into quantum mechanics and decided to add some function related to that subject 😛

thanks again!
0 Kudos
Message 8 of 8
(3,210 Views)