From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Store value on button click for background subtraction

Solved!
Go to solution

Hi Folks,

 

I'm very new to labview so hopefully you'll bear with me.

 

I'm acquiring intensity data from a camera continuously in a while loop, turning it into a 1024x1 array, and displaying it in a graph.  I need a way to subtract the background signal from the camera and display whatever's left.  In a written programming language it would go something like:

 

bg = 1024 zeros

if(Button pushed)

    bg = current frame

else

    do nothing

 

new_sig = current frame - bg

 

I've tried case structures, global variables, and shift registers, but none of those seem to work.  I'm sort of at the end of my rope.  Let me know if there's any other info I can provide.

 

Thanks for your help!

0 Kudos
Message 1 of 3
(2,370 Views)
Solution
Accepted by topic author dexeqex

Something like this?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,362 Views)

Yep, that did it.  Thank you so much!  I knew it would be something simple like that.  I'm still slogging up the steep part of the Labview learning curve.

0 Kudos
Message 3 of 3
(2,354 Views)