04-18-2012 11:37 AM
I think this is probably a pretty simple problem. Basically I've got a case structure and I tunnel in some values from a control and sim loop. When I probe the wires in the case structure after the tunnel and the wire before the case structure they are completely different. It makes no sense to me at all. What is even more wierd is that the program seems to be having the desired effect (well very nearly), which indicates to me that the probe is messed up, but I've restarted the program and the laptop but to no avail. I have attached a picture. Probe 7 and Probe 8 should be the same number.
Any help will be greatly appreciated.
04-18-2012 11:44 AM
When I suspect weird probing issues I typically try two things: 1) Connect temporary indicators instead of probes. 2) Put breakpoints on each of the probes.
04-18-2012 11:45 AM
There is one obvious case where the two probes should not necessarily have the same value, though it is impossible to see if that is whats going on in your case:
If you have a case with, for example true and false case, if you have a probe in the false case, but the code is currently executing in the true case, then the probe outside the case could be different than the probe inside the case.
The fast way to check for this would be to also probe the input to your case diagram and make sure you are probing the currently active case in your case structure.
That said, I have had one time were something was just not right similar to what you describe and the fix ended up being a mass recompile of the vi.lib. You may get away with only forcing a recompile of your project and/or VI's. The quickest (but most local) recompile is to hold ctrl and shift on the keyboard and clicking the run arrow. (I Think thats the shortcut for forced recompile.. someone will correct me if I'm wrong..)
04-18-2012 12:02 PM
Thanks, I did this and it turns out the probes are just acting dodgy... God knows why.
04-18-2012 12:04 PM
Thanks for the reply. That isn't the case in my one. Shouldn't rebooting my laptop make the program recompile too? I did that and I still get the same problem.
04-18-2012 12:07 PM
no, rebooting has nothing to do with recompiling or re-linking your source code or libraries.
04-18-2012 12:08 PM
@VicMackie wrote:
Thanks, I did this and it turns out the probes are just acting dodgy... God knows why.
I reported a bug re: the probes not updating.
Ben
04-18-2012 12:18 PM
Ahh I see, thank you.
I have another simple (I think) question. The same case structure as before, however the problem now is I want it to do nothing if the case is false. When I run the program, eventhough the case is false it runs the the true case. No idea why. I've again atached an image, probe 1 shows the case value and I set a breakpoint on the first division in the true case.
Thanks for all your help so far.
04-18-2012 12:26 PM
This is now pretty much identical in behavior to what I saw about a year ago. I had some boolean logic and a case structure, and the case structure did not execut the case the boolean selector indicated (I replaced probes with indicators too, thinking the problem was with the probes).
If I remember correctly, what fixed it for me was essentially to delete the case structure and re-create it from the palette.
You may want to try this in an iterative fashion.. ie. copy your case the way you have it for reference, delete the case, draw a new case from the palette, then just select and drag-drop the code from your "backup". I know it sounds crazy, but this fixed it for me when I was thinking I was going mad.
Again, forcing a re-compile of your vi.lib/NI folder may also fix this without deleting and re-doing code. You would do this from Tools menu in a project, and browse your your version of LabVIEW's vi.lib folder. It can take quite a bit of time to complete though.
04-18-2012 12:28 PM
Possible race conditions because of the way you are using local variables?
There are some funny boolean operations in there too that should be cleaned up. There is no need to compare a boolean value to True. The value is already true. No need to compare a value to False, just put a Not function in there.