LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Time Since Start of Data Log Display

Hello,

Working on trying to put a display of how long the data log has been running to we can record approximate seconds since start when we change things in the experiment.  The timer should only run when the switch is on.  Also, is there a way to eliminate the delay from when the switch is pressed to when the log actually starts?

Thanks,

-JL

0 Kudos
Message 1 of 15
(5,183 Views)
VI attached
0 Kudos
Message 2 of 15
(5,182 Views)
I can't open your VI, but if all you need to do is count how long something is "on", the Express VI Elapsed Time could be made to work, or make one of your own, like the one attached.
Richard






Message 3 of 15
(5,161 Views)

Ok great.  I put that in and I think it can work with some tinkering.  The problem is exactly what my other question was about.  With my program structure it takes the value of data logger freq for the switch to become true and the time only updates then, and is incorrect.  How can I move this around so it starts logging and counting as soon as the switch is pressed?  Maybe ignore the timer for the first iteration?

 

Thanks,

JL

0 Kudos
Message 4 of 15
(5,141 Views)

The issue is with your DAQ assistant.  That is controlling the pace of your loop.

 

You are collecting 1000 samples as a rate of 100 mHz  (milli Hertz) so 1 sample every 10 seconds, takes 10,000 seconds for the DAQ assistant to execute.  But you actually have a default timeout of 10 seconds.  So you wind up with only 1 sample anyway.

 

You may want to collect samples more frequently (1 sample, once per second) and only hold on to every 10th sample.

 

Take a look at a producer/consumer architecture so you can separate data collecting from logging.

0 Kudos
Message 5 of 15
(5,129 Views)

I will be gone on a trip for the next 7-8 days, but I will work on it when I'm back in.  Wouldn't it still wait the value of the data logging interval before it becomes TRUE and triggers the first log event?

-John 

0 Kudos
Message 6 of 15
(5,115 Views)

Fix your DAQ assistant first.  What rate do you want to actually measure the data?

 

As it is right now, it is 1 sample every 10 seconds, and you are trying to collect 1000 samples.  So the DAQ task won't complete until 10,000 seconds have passed.  That is almost 3 hours.  The DAQ assistant won't wait that long, it times out at 10 seconds.  So your overall loop rate is one iteration every 10 seconds and only getting about 1 sample.  Are you getting a timeout type of error when you run?

0 Kudos
Message 7 of 15
(5,105 Views)
I want the numbers in the display and graphs to update about every second.  (The numbers update very quickly as it is now.)  The graphs are about every 5 currently.  The issue is I just want to log the data at the time interval set in the control.
0 Kudos
Message 8 of 15
(5,102 Views)

Set your DAQ assistant to be 1 sample on demand and put a 1000 millisecond timer in the loop.

 

Unless your DAQ assistant is somehow set differently than the VI you posted., I don't know how you are getting rapid update on your numbers.

0 Kudos
Message 9 of 15
(5,099 Views)
Ah, there lies the issue.  I can set it to on demand just fine when using only the thermocouples, but when I add the custom voltage it says I must use continuous or N samples.  In continuos one of the settings in the assistant is for buffer size if I remember correctly.
0 Kudos
Message 10 of 15
(5,081 Views)