11-12-2012 03:02 PM
Hello,
I've been writing a program to analyze spreadsheets, but the VI and its subVIs aren't working correctly. There is no error, just that its not doing the right thing. To fix it, I tried turning on the highlight fuction and watching it to find where the code was wrong. However when the highlighting is on, the VI works perfectly. Does anyone know how to fix this? I dont know how to fix a problem that isn't there when I watch it step by step.
Thanks!
11-12-2012 03:07 PM
Problems that magically fix themselves when using highlight execution is symptom of a race condition. Are you using local variables in your code? If you are, then you are probably abusing them and what is happening is that you have no control over when they are being read from or written to.
If that is not it, please show us your code.
11-12-2012 03:20 PM
I don't think I have any Local Variables, but I do have property nodes. Will that do the same thing?
11-12-2012 03:21 PM - edited 11-12-2012 03:23 PM
Yes. Assuming they are Value or Value(signalling) property nodes.
11-12-2012 03:25 PM
Yes Property nodes can cause race conditions if they are abused. Any time there are multiple reads and writes to a value without enforced data dependencies yuo "Break dataflow" Ben's famous Action Engine Nugget is always a good read. Action Engines can help avoid this type of problem if they are properly implemented. http://forums.ni.com/t5/LabVIEW/Community-Nugget-4-08-2007-Action-Engines/m-p/503801