LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Concurrent Wait Time Issue to Generate Rate of Change Measurements

Solved!
Go to solution

Hi,

 

I am a basic user (Edit: using LabView 2014) and have been trying to correct what I assume is a fairly simple misconception about how to perform two or more concurrent rate of change measurements using the VI shown below. The issue I am running into is the output is syncing to the longest time lapse period and they are not running independently. Any advice and suggestions are welcome!

 

VI.PNG

 

0 Kudos
Message 1 of 19
(3,992 Views)

Hi,

Your main loop MUST wait that the other 2 loops finished executing before looping again. So yes, here it will wait a multiple of 5s before analyzing new data coming from your DAQ board.

The other thing that I notice is that all your loops are stopping after 1 loop because of the True value on their stop condition.Smiley Frustrated

What do you want to do exactly ? Continuously acquire a signal and get deltas within 1 and 5 sec slots ?

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
0 Kudos
Message 2 of 19
(3,962 Views)

Also, your DAQ assistant determines what is the timing being your data points.  Your delays in the loop are only going to affect how long it takes to display the data that has already been received.

0 Kudos
Message 3 of 19
(3,957 Views)

Have you tried to watch your code in execution highlighting mode?

 

It would show you when the data is being read and ...

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 19
(3,956 Views)

Yes, the intent is to continuously acquire data that I can use to perform a simple rate of change math on but it needs to be modular so I can apply it to thermocouples or transducers as well as being able to change the time delta to upwards of 30 minutes which is why I do not necessarily want to fill up lots of different arrays.

 

I understand the stop condition was in the wrong position when I screen grabbed it.

0 Kudos
Message 5 of 19
(3,950 Views)

 


@RavensFan wrote:

Also, your DAQ assistant determines what is the timing being your data points.  Your delays in the loop are only going to affect how long it takes to display the data that has already been received.


This is a test VI that will be inserted into a much larger VI with the timing on the DAQ being set by other requirements and need the timing with respect to the rate of change to function independently. I need the displayed data in real time so the operator can make an assessment of a stabilization criteria which they will have to compare different time periods.

0 Kudos
Message 6 of 19
(3,948 Views)
Solution
Accepted by dclalonde

Do you want your "30 minutes ago" to always be 30 minutes ago from now?, or every 30 minutes it stores a value and then updates that after another 30 minutes has passed.

 

If the former, then you will need to store arrays of data.  What you are doing is called a circular buffer where you continually add new data and discard the oldest, and the size of the buffer determines how far back in time you can look.

 

You need your data acquisition to run continuously at whatever data rate makes sense.  You don't want your analysis of that data to be delayed by arbitrary "wait until next msec" functions.

0 Kudos
Message 7 of 19
(3,945 Views)

@Ben wrote:

Have you tried to watch your code in execution highlighting mode?

 

It would show you when the data is being read and ...

 

Ben


I tried this and I understand the problem because I watch when the outputs of my indicators release. I have also tried Timed Loops and a variety of nesting conditions to fit this to my needs. 

0 Kudos
Message 8 of 19
(3,943 Views)
Solution
Accepted by dclalonde

Interesting problem

Lets start with the DAQmx Configuration.  I have the following config on a simulated USB 6221 ao0

Capture.PNG

 

By using a pair of Feedback nodes The task is easily accomplished thusly:

Capture Start.PNG

 

Now, if you need an nZ transform node we can look into the PtbyPt vis and calculate a delay for This fine function

Capture1.PNG

and simply take the delta between input data and eliminated data

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 19
(3,941 Views)

@RavensFan wrote:

Do you want your "30 minutes ago" to always be 30 minutes ago from now?, or every 30 minutes it stores a value and then updates that after another 30 minutes has passed.

 

If the former, then you will need to store arrays of data.  What you are doing is called a circular buffer where you continually add new data and discard the oldest, and the size of the buffer determines how far back in time you can look.

 

You need your data acquisition to run continuously at whatever data rate makes sense.  You don't want your analysis of that data to be delayed by arbitrary "wait until next msec" functions.


Thank you. I will redesign this to use arrays. Based on others experience, what size and quantity of 1D arrays typically start burdening the computer system running LabView (assume average processing power and RAM).

0 Kudos
Message 10 of 19
(3,940 Views)