LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Highlighting Error

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!

0 Kudos
Message 1 of 5
(2,127 Views)

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.

Message 2 of 5
(2,125 Views)

I don't think I have any Local Variables, but I do have property nodes. Will that do the same thing?

0 Kudos
Message 3 of 5
(2,120 Views)

Yes.  Assuming they are Value or Value(signalling) property nodes.

0 Kudos
Message 4 of 5
(2,117 Views)

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

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 5
(2,115 Views)