LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem: Data collected every 100ms for 10s, and every second thereafter

Block diagram pic.PNG

I'm using the above block diagram to calculate respiratory rate. It's mostly working, however, when I export the data into an excel file, I notice that data is collected and displayed every 100ms up to 10 seconds, and every 1s thereafter. 

 

Ex; I can see data points for .1, .2, .3, .4 - 1 second, which creates a very nice curve. But, the data points for 10-11 seconds are all clumped together at 10 and 11 seconds, breaking the curve. 

 

I think inherently in the program, there is a function somewhere which makes it so that after 10 seconds, something changes about the data collection. But, for the life of me, I cannot find where or what to change (I am pretty new at Labview.) 

 

If someone could help me with this problem, that would be great.

 

Thanks,

 

-ExperimentGuy

 

0 Kudos
Message 1 of 9
(2,979 Views)

It would help if you posted your actual VIs.  It is very hard to debug an image.


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 9
(2,968 Views)

Well, your file write is kind of weird.  Why do you convert a float number, to a string, to an array of integer numbers, to dynamic data, and then write it?  You lose a ton of data that way.

 

One of the conditionals on your string has it sometimes read "calculating" and sometimes show real numbers, and that "Calculating" string is getting jammed into your measurements because of that.

 

Can you just wire the data from directly before the first string conversion all the way over to the Signals input (through the dynamic data converter if you must)?

0 Kudos
Message 3 of 9
(2,958 Views)

Hello ExperimentGuy,

 

I agree with the two posts above mine, which ask for the original VI, or at least a snippet of it, so the community can help you debug further this application: Use VI Snippet to Store and Share Reusable Code Sections.

 

You might want to use some of the debugging tools that LabVIEW has built in to understand what might be happening to your application, and perhaps discover what might be causing this behavior: Debugging Techniques in LabVIEW

 

Warm regards,

0 Kudos
Message 4 of 9
(2,922 Views)

Your time information is being generated by the conversion of your I32 array into dynamic data.  You are creating false time information, why not record the actual time index for each data point?  Use time functions (Tick (ms) for example) and some basic math to determine the actual time for each iteration of your for loop.  A shift register and some basic subtraction gets you the time elapsed (in ms) for each data point from the beginning.

 

Record this data along with your raw measurements (get rid of that silly Write to Measurement File express VI while you're at it).

 

 

0 Kudos
Message 5 of 9
(2,905 Views)

Thank you for the very robust response! I see now how the picture I provided is not very useful to you guys. 

 

Sorry for the delay in response; I've been traveling - I've now attached the 4 programs provided by AndyCandy to calculate respiratory rate. These are the original programs - the only major change I made was to change "Sample Size" towards the top of the image from 1000 to 20,000 in hopes of collecting more data. It is clear to me now that it is not that simple. 

0 Kudos
Message 6 of 9
(2,894 Views)

Thank you very much for your feedback. I will get on top of learning the contents of your post (as I do not see how to accomplish that yet) and do my best to incorporate them into the VI. 

0 Kudos
Message 7 of 9
(2,893 Views)

I replied to my original post and posted the entire files supplied by AndyCandy. Thank you very much for your interest in helping! 

0 Kudos
Message 8 of 9
(2,892 Views)

My apologies, I'm don't comprehend the meaning of your question. I simply downloaded the files provided by AndyCandy (which I attached in a new post replying to my original post) and do not understand very much about Labview. I don't follow the logic of why he did what he did, or if it was efficient, or how best to modify it to make it better. However, I will do my best to read about the topics you are mentioning, and understand them better. 

0 Kudos
Message 9 of 9
(2,886 Views)