LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Indicator reads a number, Wire attached to it reads NaN

I have  run into a strange problem that I have not been able to figure out yet - despite multiple searches, code deletions and rebuilding and much testing.

 

I'm supporting an older system, so this is in LabVIEW RT 8.2.1 on a PXI.

 

I have a sub-VI that generates a number and I can see that number in an indicator on the front panel. When my VI wires to that indicator on the subVI, I am seeing NaN. 

 

Wrong Output.png

Here it is showing the indicator and the probe on the wire from the connector. Yes, the indicator is wired to the connector panel (I have rewired it a couple of times now to test).

 

And here are two probes: One inside the sub-VI, the other immediately outside the VI:

2 Probes.PNGLooks very strange to me. Since when does a connector change a value?

 

Unfortunately, I can not reproduce this with a simpler VI and I can not include the proprietary code.

 

I would appreciate any and all suggestions on how to get around this problem.

 

     Rob

0 Kudos
Message 1 of 3
(2,711 Views)
Something very strange is going on here. In the subvi there could be 2 terminals with the same name and the one you see is not the one connected to the connector pane. This would be more of a 1st April vi but I cannot think what else it could be. I dont think it could be representation or anything else except a one off bug which would likely be fixed by re connecting the vi terminals.
All the best.
Michael
0 Kudos
Message 2 of 3
(2,681 Views)

Some potential options:

 

  1. This is somethings specific to RT, which might have issues with debugging. This is purely guessing. I have no specific experience with that.
  2. You have two instances of the VI and the indicator shows the value from the other run.
  3. The subVI was accidentally duplicated in place and the outputs and inputs are connected to separate copies.
  4. The output is inside a structure and isn't actually reached (seems unlikely, since you say you have a probe inside the VI). LV has some rules about what value the VI will actually output, but I try never to do that, in order to avoid having to learn those rules.
  5. Maybe try adding another indicator in parallel and see what happens with that one?
  6. Bad workaround - do the conversion to a string inside the VI?

___________________
Try to take over the world!
0 Kudos
Message 3 of 3
(2,651 Views)