LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Capturing a single Instance of a RT signal

Solved!
Go to solution

Hello,

 

I've been looking through and through to find a simple way to capture a single instance of an analog input signal and store it as a constant. To be specific I want to take the very first value an analog signal outputs upon running the program and store it as a constant to be used elsewhere.

 

Thank you for any help the forum community might be able to provide.

 

 

0 Kudos
Message 1 of 4
(2,568 Views)

There isn't nearly enough information in your post to even begin giving an intelligent answer. More information? Do you have any code written yet?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 4
(2,563 Views)

Well the eventual code shouldn't be anything extensive ( First Analog Input ----> constant), so no I don't have any code to provide.

 

I've run through ideas like:

 

1. Capture the first input by looking for a rising edge. But then how do you prevent the next rising edge from overwriting your variable?

 

2. Using a logic based approach. Such as combining a counter with the analog input that when and only when the counter is 1 do you capture the analog input. but then how do you combine boolean logic with an floating point value.

 

 

0 Kudos
Message 3 of 4
(2,559 Views)
Solution
Accepted by topic author DougHallman

Hi Doug,

 

Look at this article about functional global variables. You can use this pattern to set the value once, then read it globally within your application.  

~~
Message 4 of 4
(2,520 Views)