From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Feedback Loop question

Solved!
Go to solution

***SEE ATTACHMENT BELOW***

 

I have created a program which creates a constantly updating intensity image, but I would like the user to be able to adjust the "exposure" control during the camera use. Currently, the camera is set, and continously takes pictures on only one exposure setting. I am not sure as to how to incorporate the exposure time into the loop, without compromising the structure of the program.

0 Kudos
Message 1 of 4
(2,225 Views)
Solution
Accepted by BoilerUp81

There's 2 approaches (well, there's more, but I will describe 2 of them Smiley Happy )

1) Use 2 loops. The inner loop (the one you have) terminates when the user changes the exposure. The outer loop just updates the exposure and then the inner loop starts again.

2) Put the exposure VI into your acquisition loop, but only call it when the user changes it (use a shift register to check if the value changed. Place the VI so the exposure is changed while no data is acquired (e.g. between fetching the data and starting to take a new image).

 

Hope this helps.

 

0 Kudos
Message 2 of 4
(2,219 Views)

Dan,

 

First off, thanks for the input!

I tried both of your ideas, but was unsuccessful =[ so then I figured I could just have the inner while loop run once (by connecting a true constant to the true stop), then the whole outer loop would run again (checking for a new exposure setting). However, this process is either incredibly slow, or my logic is incorrect. I have attached my (fail) vi attempt =/

 

Thanks again!

0 Kudos
Message 3 of 4
(2,198 Views)
I don't have LabVIEW here and I guess I wouldn't have the SubVIs anyway. Did you make sure you only call the VI to set the exposure when the user changed it? You can store the exposure value in a shift register, then at each iteration you can check if it changed (by comparing the value from the shift register with the value from the control). When it changed, call the exposure VI.
0 Kudos
Message 4 of 4
(2,193 Views)