LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do you create a program that logs data with a one second delay?

I've been working on a program that takes the information from a DAQ unit that has been terminated with a T-type thermocouple. I would know like to change the program so that the DAQ unit will log the data from the therocouple with a one second delay. I've been trying to figure out a way to do this and would really appreciate any help that I can get. I'm quite new to LabVIEW and progamming/coding in general so could really use the help and experience of anyone who can help solve this problem

0 Kudos
Message 1 of 7
(2,953 Views)

Why do you want to delay logging?  Or do you just want to log 1 second's worth of data at a time?


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

What I want to do is for the program to measure and save the data to a file then leave a one second delay before it does this again

0 Kudos
Message 3 of 7
(2,944 Views)

By "log with a 1-second delay", do you mean "log a point once/second" or precisely what you said, "get a point, wait a second, then write it to disk"?

 

Needless to say, both are possible, but the second just seems silly.  Acquiring Data and Logging It are definitely supported by LabVIEW.  I'm guessing you have not availed yourself of the tutorial material avialable on the Web (for example, in the upper right corner of the first page of the LabVIEW Forum.

 

In order to help you along, please post your current VI (post the VI itself, not a picture of part of the Block Diagram, as we need to be able to "poke" and "prod" it).  Looking at your code will answer a lot of questions that we'd have to ask (such as What Version of LabVIEW, what Hardware, what Sampling Rate, what do you mean by "log the data", what format, etc.) and can help us point you in the right direction.  A number of us try to "teach" you how to solve your problem yourself, as that's the best way for you to learn LabVIEW, but we need to know "what you don't know".

 

Bob Schor

 

 

Message 4 of 7
(2,941 Views)

What I'm trying to do is exactly what I said, I need the program to measure the data and save it to the file then have a one second delay before it takes the next data measurement and save that, then keep this going until the program is stopped. I'm having to do this as I'm an apprentice at my compnay and am being set tasks to complete. I do not have the VI on hand at the moment as it is being looked at by some of my colleagues but I will post the VI as soon as possibel (most likely tomorrow morning)

0 Kudos
Message 5 of 7
(2,934 Views)

I am assuming you just want 1 sample per second and you already know how to read data from the DAQ here.  Set the DAQ task to be Continuous Sampling with a rate of 1Hz.  Then just read 1 sample.  When the loop comes back to the read, it will wait for that 1 sample to enter the buffer.  So the DAQmx Read will limit your loop rate, causing a 1 second delay.


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
Message 6 of 7
(2,926 Views)

Thanks crossrulz, I'll try that. If I have any problems I'll report back

0 Kudos
Message 7 of 7
(2,922 Views)