06-14-2010 08:07 AM - edited 06-14-2010 08:09 AM
06-22-2010 07:09 AM
06-22-2010 09:27 AM
This has come up before with no response from NI. When I looked at it back then I remember tracking the problem down but I can't remember if I actually fixed it or not. I'll try to look at it again (it wasn't pretty).
Here is something you can try to workaround the problem. It is a snippet so I have attached the 8.2 version as a VI. It encloses a number preceding a exponentiation operator in parentheses.
06-22-2010 09:57 AM - edited 06-22-2010 09:57 AM
@RuedigerE wrote:
Hi, I tested it in LV 2009 and couldn't reproduce what you mentioned (please see Pictrue_1.jpg). Could you test the VI I attached in LV 8.2? Regards Rüdiger
Rüdiger,
While it works correctly using variables as in your example, the result is wrong even in 2009 SP1 if we use constants. This needs to be fixed!
06-23-2010 08:29 AM
Hi,
thanks for reply! I will write a CAR (Corrective Action Request) and hopefully the problem will be fixed in the next lv version.
Kind Regards
Rüdiger
06-24-2010 03:47 AM
06-24-2010 09:28 AM
@RuedigerE wrote:
I will write a CAR (Corrective Action Request) and hopefully the problem will be fixed in the next lv version.
Thanks. Make sure to post the CAR # once you get it.
07-18-2012 04:57 PM
I have had great success recently using the SubVI setup 'Suspend When Called' which suspends execution when a SubVI is called, pops up its Front Panel and let's you manually enter the values you think it should have produced. I decided to practice by trying to squash one of the more irritating bugs in vi.lib, the one described here.
Normally when you dumpster dive into about three layers of these formula parsing VIs your head is spinning. This time I was undeterred and systematically worked through tracking down the problem. Using the Suspend When Called I could see that when I gave the output I expected, the value was correct, so then I just had to track down the code that was making the change. This greatly reduced the number of VIs to go poking into.
Finally, I got to NI_Gmath.lvlib:Backward Decompose Number.VI, I'll spare you the rest of this lovely VI and only show the cause of this bug:
The purpose of this VI is to split an expression into a number plus operator followed by another number. For example 1-2 should split into 1- and 2. For some reason, unbeknownst to me, they added that check at the end which changes 1- and 2 to 1+ and -2. Simply removing wiring a false constant to the case fixes the bug, and also seems to handle the unary minus tests I quickly threw at it.
I am sure this predates all forms of Perforce logging so we may never know why this check is there. Bottom line, Suspend When Called rocks, it cut through the vi.lib morass like a hot knife through butter.