LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why would highlight execution make a non working program work?

In my program i have to save two different files. when i run it normally only one file saves, however if i turn on the highlight execution, they both save and the program runs perfectly. how can i fix this?
0 Kudos
Message 1 of 14
(3,802 Views)
Most likely, you have a race condition. Please attach your code.
0 Kudos
Message 2 of 14
(3,790 Views)

Sounds like this could be a timing issue, I had something similar with serial communication in the past, where the highlight execution put in the needed delays for the program (inherently labview is parallel in execution) to work correctly.  You could post the code to help out in pinpointing your problem.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 3 of 14
(3,788 Views)
Highlight execution causes the program to run much more slowly. If a program runs OK with highlighting on and not at normal speed, it usually indicates a race condition. Look for a timing error.

Lynn
0 Kudos
Message 4 of 14
(3,786 Views)
Sorry for the same answer, I am a second behind all day.
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 14
(3,789 Views)
0 Kudos
Message 6 of 14
(3,786 Views)
here is the code for you guys to look at. thanx for your help
0 Kudos
Message 7 of 14
(3,782 Views)


@smash wrote:
In my program i have to save two different files. when i run it normally only one file saves, however if i turn on the highlight execution, they both save and the program runs perfectly. how can i fix this?

Since I don't have your hardware, I cannot run your code.

Could you explain what you mean by "only one saves"? Does it ask for both file names, but one file is empty?

0 Kudos
Message 8 of 14
(3,776 Views)
I am testing transistors and my result is two seperate lines. I need to save those lines seperately on the computer so we can analysis them properly. I save one as IC and the other as IB. When i run them, only IB works, which is the second save in the program. But when i run it with the highlight execution, both IC and IB save perfectly. Both save programs are identical, so i dont understand y one wouldnt work.
0 Kudos
Message 9 of 14
(3,772 Views)

You still dont explain what you mean by "...save perfectly" and "... one wouldnt work".

Does (1) only one file get created or (2) do both files get created but one is empty?

Try inserting a wait case before the first save case, see if it helps.

0 Kudos
Message 10 of 14
(3,703 Views)