LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to reserve data to use later

Hi,

 

I am working on data acquisition software and my problem is that first I want to get a data from a pressure transmitter and after some process inside same while loop I want to read data from same pressure transmitter and I want to subtract second value from first value. My question is how can I reserve first value. I attached a picture showing two pressure transmitters and highlighted.

 

thank you

 

0 Kudos
Message 1 of 3
(2,562 Views)

you can use a shift register to store a value.

Since it's the first value from the loop you want to save for later purpose just use it like this.

first.png

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 2 of 3
(2,550 Views)

Since you're wanting to take two consecutive measurements with some number-crunching in between, you can just use a for loop and a shift register, like this:

 

Difference.png

 

Just insert your sensor VI for the control and your number-crunching for the "Process" formula node.

 

[Unsolicited advice] Oh, three things for general LV programming use: take out the flat sequence structure in your picture, you don't need it since your dataflow is determined by the error wires, try not to have all those jags in your wires, and avoid putting wires behind opaque things at all costs. [\Unsolicited advice]

 

Cameron

 

 

To err is human, but to really foul it up requires a computer.
The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
Profanity is the one language all programmers know best.
An expert is someone who has made all the possible mistakes.

To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):

LabVIEW Unit 1 - Getting Started</ a>
Learn to Use LabVIEW with MyDAQ</ a>
0 Kudos
Message 3 of 3
(2,517 Views)