01-27-2022 04:33 AM
@sziszkont wrote:
It is -1 wired to the Sqrt function, only not shown in the picture.
This has been a well-functioning program for years, but now I ran into this bug that returns 0 instead of NaN. I'm looking for an explanation for this. If I use 0/0, the error is solved, but why?
How about turning Retain Wire Values on?
Then, with the VI's diagram open, you can run your code until the bug hits. Optionally, use a conditional breakpoint to pause the VI. Stop the code.
Then, go into the VI and examine all the retained wire values... Which wire is the first to give an unexpected result?
Another route to finding your problem is to copy the VI, a copy of it, or it's code in a new VI and put it under scrutiny. Remove code while you have the problem, undo if the problem disappears. That should soon identify the problem.
Or, post some code...
I put my bet on the Boolean going into the case... Maybe it comes from a control and it's default value changed?
Of course there could be some obscure bug in LabVIEW. Al the more reason to post some code.