LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Table not appending

I am trying to use the build table feature in labview to show data as it is collected.  The table however will not add a new entry, but rather overwrite what is already there.  I cannot figure out why it will not append to itself as I do not see anything in the examples that I have reviewed that would explain what is different.  Any help would be greatly appreciated.  A little background on this project:  I am new to labview and I am working on data acquisition as a part of my senior design project using the labview software and Loadstar iLoad sensors.  I have copied the sensor vi's from the company and I am trying to incorporate them into the software.  I would like to be able to see the data as it appears as well as have it write to a file.  Currently I would prefer a way to have the time change recorded from the start of the test rather than using the tick count, but due to time constraints that will suffice for now however.

Download All
0 Kudos
Message 1 of 14
(3,295 Views)

Some observations and questions.

1) The program does not have any loop, so it only runs once.  This is probably why your table is not updating as desired.

     Are you wanting it to run continuosly?  And then have a stop button?

     Do you want to only collect a data set each time you press the "Start Recording" button?

     Do you want to write all data to file or only once you press "Start Recording"?

     Do you want to show all data in table or only after pressing "Start Recording"?

2) You need to know the frequency you want to collect data and setup you loop timing to match.

    This code needs to be inside a loop with timing and logic depending on the desired functionality.

 

I'm not much on using Express VIs, so my suggestions would mean re-writing code.

Instead, I'll point you to an example that might help you with developing the structure.

     ...examples\express\Cycle Analysis.vi

 

Good luck,

 

James

LabVIEW 5.0 seems so long ago...
0 Kudos
Message 2 of 14
(3,282 Views)
Currently without the LED that I am using as a start/stop button it ends up recording everything, including when we are zeroing the sensors.  Unfortunately the Cycle Analysis VI was what I was trying to use to get this to work in the first place but I couldn't.  As it stands data is collected every time the Start Recording button is pressed.  That is also the point at which I wanted the data to display in the table.  What you mentioned about the frequency of collection etc, is solves another problem I have been having with trying to determine when the data was collected which is why I placed the tick count in there.  The only reason I was using the Express VI to begin with was due to my lack of knowledge with LabVIEW.  If re-writing code is the better way of performing this than I would much rather do that and learn the software better rather than stumble along like I have been.
0 Kudos
Message 3 of 14
(3,261 Views)

Can you please provide some specifics on the project?

Without better understanding what you need I cannot give you good advice or point you to better examples.

LabVIEW 5.0 seems so long ago...
0 Kudos
Message 4 of 14
(3,249 Views)
The project will be a part of a senior design project and our project was designing a low power low rpm test rig for a lightweight rotor blade.  We will also be adding more calculations and formulas into the data processing within LabVIEW and having those data points exported to a file as well.  I still have to add data coming in from a USB connected voltmeter so we can calculate how much power is being drawn by the system.
0 Kudos
Message 5 of 14
(3,238 Views)

OK, by specifics I didn't mean a vague overview of the entire project.

What specifically do you need the LabVIEW code to do?

For example:

  Collect what data from what sources and at what interval and log to what file(s) in what format.

 

That line could be the brief intro and then follow up with detailed specifics on all the "what"s you replace.

 

Things to think about regarding the file format.

1) Do you need timestamps for each set of data points

2) Will some other program be using this data (will the .lvm structure be a problem?)

3) What analysis or presentation will be required

 

Again, your current program only runs one iteration.

The "Run Continuously" button is not intended to replace the functionality of a loop for multiple iterations of code.

 

Have you done any first steps such as drawing a state diagram of the desired functionality?

That diagram will go a long ways towards helping you write the LabVIEW code.

 

Regards,

 

James

LabVIEW 5.0 seems so long ago...
0 Kudos
Message 6 of 14
(3,226 Views)

Ok James,

 

That was a bit harsh, maybe not enough detail has been provided yet, but we have an idea of the project. We can infer quite a bit from this post:


j.kentfield wrote:
The project will be a part of a senior design project and our project was designing a low power low rpm test rig for a lightweight rotor blade.  We will also be adding more calculations and formulas into the data processing within LabVIEW and having those data points exported to a file as well.  I still have to add data coming in from a USB connected voltmeter so we can calculate how much power is being drawn by the system.

 future requirements of the code (scalability)

 - requirement to add in a USB voltmeter later

 current project looks academic "senior" level - therefore not comercial and we may have time/experience issues here with not much external support.

 

 "We will also be adding more calculations and formulas into the data processing within LabVIEW" - this is either subVIs, or Matchscript functions we have to be careful of.

Low power, low RPM "Test rig" - so it's logging data about a lightweight rotor blade moving a low speeds and low power, This is looking like a Mech Eng style project.

 

Data points are going to be exported to a file - the file format and logging format does not appear to have been thought about or defined yet.

 

Smiley Wink

 

Although I would agree, much more information needs to be given - I would say we are possibly being asked to help someone with their exam coursework!

 

James

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 7 of 14
(3,220 Views)

It is indeed an ME project.  It is not however a part of any examination.  I would not be willing to jeopardize my graduation on something like that, also my advisor has also given the ok on posting here for assistance.  I am intending to use the math functions in order to do the power requirements off of the voltmeter.  Also the data currently is being set up to export to a .lvm file because I am able to open that within Excel.  We do not currently have any of the other software systems NI offers at our disposal.  As it is set up right now James was correct in that I had originally set up the project to make use of the continous run feature, not realizing that I needed looping.  The one instrumentation course I have taken had one lab using LabVIEW and was nowhere near as complex as it could have/should have been.

 

Requirements of the Code as of right now:

 

Receive input from either 4 or 6 Loadstar iLoad load cells, which uses an attached VI provided by the manufacturer.(current intention is to have two seperate VI's although a unified VI would be nice it is not neccessary.)

Log this data to an exported file

Receive information from a USB voltmeter

Transform this data from the voltmeter into Power

Log the transformation to same file

Log a timestamp for each data input to same file

 

Things that would be nice to include on the front panel:

 

Table on the front panel displaying lift force generated from each load cell, the combined lift, the power calculated.

Graph of the combined lift force versus power.

 

Sorry if I have not been that clear.  It is only the second project I have worked on in LabVIEW and I didn't realize how much was truly involved.  Thank you for your time and help on this project.

 

 

Edit:  I forgot to mention, the VI from the load cell company has a tare feature. The way I have the code done currently allows me to use the tare function without recording that data which is another aspect that I need to have.

Message Edited by j.kentfield on 05-04-2010 02:09 PM
Message Edited by j.kentfield on 05-04-2010 02:09 PM
0 Kudos
Message 8 of 14
(3,206 Views)

I haven't forgotten you, I've just gotten busy at work.

Thanks for the additional details. 

I'll try to provide you some feedback on structure, might be tomorrow.

 

Do you only need this application to collect data when you press a button?

Or, do you need it to run in a continuous acquisition mode?

Or, both?

 

For you data, you might want to look into writing to text files.

You can write tab or comma delimited files, either is easily imported to Excel.

This provides a simple method of controlling the file setup.

Just decide the Columns required and order (timestamp usually first), then assemble the data in LV to match.

 

In addition, look at some examples that use the Event structure.

This would allow simple user controls for single data point, tare function and a continuous data collection.

 

Gotta run,

 

James

 

PS.  What's your timetable for this project?  

LabVIEW 5.0 seems so long ago...
0 Kudos
Message 9 of 14
(3,190 Views)

I understand the busy thing and totally appreciate any help you can give.  My goal is to get data acquisition continuously after a button has been depressed, but while still allowing for the tare function to operate outside of that loop.  As of right now I have it set up to write to a .lvm file which has been exporting to Excel without too many problems, although it would be nice to figure out a way to label the columns, given the way the input has been placed it has been fairly easy to determine which signal is which column.  I will definitely take a look at the Event structure like you mentioned though.  Thank you!

0 Kudos
Message 10 of 14
(3,180 Views)