LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does my program run fine in highlight execution, but not normally?

When I highlight execution, the program runs fine, but when I run the program normally, nothing happens. (I believe the program is stuck at the initialize cam vi). If someone could help me out, I'd be very thankful

0 Kudos
Message 1 of 5
(3,501 Views)

duplicate post.

 

You marked that thread as solved, implying you fixed the problem.

 

 

Code comments:

  • Your initialization stuff should be outside the loop.
  • Using an LED to act as a Stop for your overall program is confusing.
  • You have a Stop button that doesn't do anything.
0 Kudos
Message 2 of 5
(3,495 Views)

Correct, the previous problem was solved. However, this problem operates on different logic.

 

Code comments:

  • The program is designed to allow for the re-initialization if the image quality is not acceptable.
  • The LED is for test purposes only.
  • Stop button was removed.

 

Thank you for the help

0 Kudos
Message 3 of 5
(3,478 Views)

OK, different logic, but same problem. If it works in highlight mode, but not in normal mode, then clearly it's a timing problem. In other words, something is happening too fast, such as you trying to get data before it's ready, or trying to configure something before the camera is ready. Sprinkle some waits here and there to see where the timing issue is. This is basic troubleshooting.

0 Kudos
Message 4 of 5
(3,474 Views)

The first troubleshooting technique I did was to add several "waits" throughout the program, particularily with the loops. I learned the problem was actually with the hardware itself and the camera mode. The camera must take an empty frame before it can store the image, thus the for loop needed to be replaced with a while loop.

 

However, after fixing the program using boolean logic, 2 of the buttons disappear on my front panel during use (which I will have to further troubleshoot). Thank you!

0 Kudos
Message 5 of 5
(3,464 Views)