Jump to content

Arithmetic is different in formula nodes


jpdrolet

Recommended Posts

That must be very old but anyway...

For example, the result of arithmetic operations on uInt8 are coerced to 0-255.

5-10 gives 0

250+10 gives 255

Edit: This is alos true for expression nodes

That is a quite different implementation than the arithmetic nodes, where the results are modulo 255.

5-10 gives 251

250+10 gives 4

Link to comment
Interesting to note, thank you. I also came across another interesting deviance. TheĀ  Formula Parsing requires ^ for exponent while the Formula Node requires **.

I was trying to be able to read in formulas from files into the formula nodes but it doesn't seem to have a way. Does anyone know of one, or do I have to continue using Eval?

5953[/snapback]

Formula nodes can only be modified at edit time. Use Eval.

And the original post also holds for expression nodes.

Link to comment
Interesting to note, thank you. I also came across another interesting deviance. TheĀ  Formula Parsing requires ^ for exponent while the Formula Node requires **.

5953[/snapback]

This is a bug. Originaly (pre-LV6i), the formula node used ^ for exponent. I think in LabVIEW 6i they changed the exponent to ** for the formula node. They forgot to change the Eval node. See attached image of the formula node online help for LabVIEW 51 showing the exponent notation used.

post-2-1125628486.png?width=400

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.