LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How Can I Extend the Amount of Data recorded Past 17 minutes in Labview

Hi guys, I have a question.

But before that, I would like to say this is my first post here. I have looked around the forum for a similar post but could not find one that was helpful toward solving my problem. Also, I am not an experienced Labview user. I work as an undergraduate lab assistant on campus and we use Labview to record data for our experiments. I did not set up the Labview the way it is. The previous person did. I am simply running experiments as instructed

Our experiments are simple. We record voltage readings vs. time. (Time is on the X axis, and voltage on teh Y axis)

 

Simple right?

Well the problem is that when we are recording an experiment for an extended period of time, Labview will only record the last 17 minutes of the experiments... In other words, if we ran our experiment for 30 minutes, the first 13 minutes of data gets deleted. And Labview keeps deleting earlier data as it keeps recording... only leaving the most recent 17 minutes... It is apparent because the graph of the data only keeps to the most recent 17 minutes and when we export the data to microsoft exel, only the most recent 17 minutes of readings are there.

WHY? WHy only 17 minutes?! I did not see anything in the setting specifying 17 minutes!

 

We record with the frequency of 1 data per second. 

The instrument that we have is the NI9215 and NI 9219 connected to National Instrument NI cDAQ-9174 reader.

Our set up is as followed: the computer is connected to the National Instrument, and it is connected to a DC power supply outputting a constatnt voltage towards our device. 

 

Any help on how to change the setting would help. because I have tried minor tweaks but nothing seems to work.

Download All
0 Kudos
Message 1 of 10
(3,580 Views)

Pictures of your screen of the front panel and a little of the code doesn't help us much. If it's just a school thing, you should be able to share the code so we can see inside those Express VIs.

 

17 minutes at 1Hz is approximately 1000 samples. Charts have a default history of 1024 unless you right-click and change it.

This will fix your issue with the chart, but not the data output. You almost certainly have your express VI to pull 1000 samples and then write them to file. Double-click the express VIs to configure them and play around with the settings.

 

"Give me six hours to chop down a tree and I will spend the first four sharpening the axe."  - Abraham Lincoln

 

Here are some free training tools primarily focused on LabVIEW and NI hardware to help get started.

NI Learning Center

NI Getting Started

-Hardware Basics

-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)

-LabVEW Basics

-DAQ Application Tutorials

-cRIO Developer's Guide

Learn NI Training Resource Videos

3 Hour LabVIEW Introduction

6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
LabVIEW Wiki on Training

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 10
(3,570 Views)
Why post images from your phone? Learn to use the built-in screenshot abilities of a pc. Then attach a snippet if you insist on an image. Look it up in the help. Then look up in the help how a chart works. LabVIEW will keep data on the chart for up to the programmed history length. I would advise that you take some of the free LabVIEW tutorials.
0 Kudos
Message 3 of 10
(3,565 Views)

As others have said, the export to excel function on the right-click menu of the chart exports the history of the chart - which is probably set to 1024 elements. You can increase the history length and the chart will hold/display more data.

 

What you might want to think about doing is saving the data to a file - if the PC/software crashes or you close the program without exporting the data to excel you would lose your data with your current setup but if you saved the data to a file then you could just open the file up in Excel and you'd have all of the historic data!


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 4 of 10
(3,548 Views)

@Sam_Sharp wrote:

What you might want to think about doing is saving the data to a file


His picture of his screen of his code shows that he is using a Write to Measurement File express VI but is still seeing only 17 minutes. It think there are two problems here: the chart, and the express VIs. I bet his data on file is 1000 data points (something to do with his acquisition settings) and his chart data is 1024 points.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 5 of 10
(3,542 Views)

I think you can see by the comments that the problem lies in poorly-designed LabVIEW Code.  [Believe it or not, it is possible to write Bad Code in LabVIEW, as much as we'd like to think otherwise].

 

We typically record from 16-24 channels at 1000 samples/sec, and have no problems recording for far more than 17 minutes.  Of course, we aren't trying to keep all that data in memory, don't use Express VIs for data acquisition or saving, and do other "Good LabVIEW Code" things.

 

We're more than willing to comment on the code you are running, and to suggest how it might be improved (it may take only a few "tweaks" to get it past the 17-minute barrier), but for this to happen, we need the code.  Do not attach images of the code, attach the VIs, themselves.  I'm guessing (and hoping!) that, in fact, you have multiple VIs involved in this Project, all located within a single Folder on some PC (and, maybe, within a LabVIEW Project -- wouldn't that be nice?).  If so, compress the enclosing Folder and attach the resulting .zip file.  You are sure to get helpful (?) comments.

 

Bob Schor

Message 6 of 10
(3,492 Views)

@Bob_Schor wrote:

[Believe it or not, it is possible to write Bad Code in LabVIEW, as much as we'd like to think otherwise].


I've never heard anybody say the otherwise.  And I run into bad LabVIEW code almost every day.  Unfortunately, I am forced to work with the bad code and spend as much time trying to get it to work as it would have taken to completely rewrite it.


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 7 of 10
(3,474 Views)

I got a complaint like this about some code I wrote not long ago. My code did write a log file, but somehow the user didn't realize that, and he was clicking Export to Excel at regular intervals to make sure he didn't lose any data, then merging the files. He was a lot happier when he found out that the program generated a log file of all the data, with no additional effort required on his part.

0 Kudos
Message 8 of 10
(3,452 Views)
I've run in to similar problems. If it's not made stupid clear to the customer, they will find a way to get their functionality even if you already created the functionality elsewhere. Documentation takes time, but if you already put the time in to the code you might as well show them what you did.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 9 of 10
(3,441 Views)

Crossrulz,

 

     My comment about the possibility of writing bad code in LabVIEW was supposed to be "tongue-in-cheek", a joke.  One of the Good Things about LabVIEW is that, with a little bit of care, one can write largely-self-documenting code that is relatively easy to understand, easy to grasp, easy to maintain and modify.  However, "LabVIEW Spaghetti", while more colorful than Spaghetti Code in most Text languages, is easily as difficult and frustrating to contemplate (sometimes "Starting Over" is the faster and safer alternative).

 

BS

0 Kudos
Message 10 of 10
(3,385 Views)