From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Formula node

Solved!
Go to solution

Dear ,

 

I would like to use formula node to build a function that does the following:

y=16 + (x and1)*16 + log2[(x and1)*(2x-65535)+(65535-x)]

In Exel is quite straight forward as in the attachment.

any help how to translate it into Labview Formula node?

 

 

=16+MOD(C6;1)*16-LOG(65536-C6+MOD(C6;1)*(2*C6-65535);2)=16+MOD(C6;1)*16-LOG(65536-C6+MOD(C6;1)*(2*C6-65535);2)

0 Kudos
Message 1 of 5
(2,526 Views)

Hi malkowki,

 

check.png

Like this?

 

Is "AND 1" the same as "MOD 1"? (My Excel doesn't know about MOD()…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(2,493 Views)

@malkowki wrote:

 

=16+MOD(C6;1)*16-LOG(65536-C6+MOD(C6;1)*(2*C6-65535);2)=16+MOD(C6;1)*16-LOG(65536-C6+MOD(C6;1)*(2*C6-65535);2)


You can copy that almost directly to the formula node like this:

formula_65532.png

 

off-topic:

Gerd, die Excel-Funktion MOD(;) entspricht in der deutschen Version der Funktion REST(Zahl;Divisor)

rest.PNG

0 Kudos
Message 3 of 5
(2,462 Views)
Solution
Accepted by topic author malkowki

I the mean time I have found the solution just using the formula expression table from :

https://zone.ni.com/reference/en-XX/help/371361R-01/lvhowto/formula_node_and_express/

 

solution.PNG

Thanks for your answers

0 Kudos
Message 4 of 5
(2,441 Views)

Why would you do a "Mod 1"? That'd be the same as "Round towards -inf".

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 5
(2,438 Views)