ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unused outputs in formula node

Solved!
Go to solution

Hi,

 

To keep my code clean and avoid repeated calculations, I want to use some intermediate variables in my formula node code. To create these variables, the only way I know is to create an output variable from the node, which of course ends up unused. Is there any issue/inneficiency created by doing this?

 

Thanks

0 Kudos
Message 1 of 7
(3,622 Views)
Solution
Accepted by topic author ToeCutter
Define a variable inside the formula node. Use C syntax

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 7
(3,613 Views)

Well i never knew... Thanks Mike!

0 Kudos
Message 3 of 7
(3,602 Views)
A lot of people don't realize it, but the formula node is really a mini C compiler.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 4 of 7
(3,596 Views)

That's useful to know.

 

Does it support extended precision? I can't seem to define a float128 which I assume would be the equivalent of EXT. Not sure why it does not support the same data type names as external variable, e.g. I32, DBL etc.

0 Kudos
Message 5 of 7
(3,586 Views)

Hi ToeCutter,

 

thanks for the LabVIEW help, so we know which datatypes are supported!

In your case: float, float32, float64…

 

Not sure why it does not support the same data type names

Because it's a (subset of a) C compiler. Most C idioms use different datatype names than LabVIEW…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 7
(3,576 Views)

Indeed Gerd... RTFM... sometimes I don't take my own advice. Smiley Embarassed

 

Lack of an EXT equivalent is a bit of a pain, and also in the interests of simplicity, don't see why 'DBL','EXT' etc types cannot be #defined behind the scenes.

0 Kudos
Message 7 of 7
(3,562 Views)