Labview design question

Thread Starter

prescott2006

Joined Nov 8, 2008
72
Hi, I am a beginner for Labview. I want to design a Labview algorithm for a calibration. The calibration is for pressure sensor, i.e Flexiforce. When I put load on the sensing area then the output voltage will shown in table. The voltage is acquired by using NI USB-6009.


For example, when I put 10g, then 10 output voltage sample at 10Hz will shown in column 1 and the average will calculate at the bottom. After that I will put 20g, the corresponding voltage will shown in column 2, and the process continue for N load and voltage stored in N column of the table. After that, a graph will be plotted based on the average voltage and the load. It is possible to do this? I know how to store data in table, but I do not know how to store them column by column and plot them. Can someone enlighten me?
 

GetDeviceInfo

Joined Jun 7, 2009
2,196
I would build an n dimension array of your values, which you could then display, or process to your liking. Writing the values to a file intially may help in analysing relationships.


The last interface that I built involved the calibration of a load cell / hydraulic servo. The scaling factor was based on the log values of the samples. The sampled data stream was sent through a filter to smooth.
I found that by running the data and it's mathematical variations through the graphing capablities of Excel, that the visual results aided in identifying the relationships quickly. The collected data array which was previously saved could be 'rerun' through your math routines in Labview to confirm.
 

Dave

Joined Nov 17, 2003
6,969
Yep, arrays is definately the way to go. The array palette has plenty of tools to make accessing and manipulating data easy.

Do you have the LabVIEW code to acquire the data yet? If you could upload the VI we could have a look and give you more specific advice.

Dave
 

Thread Starter

prescott2006

Joined Nov 8, 2008
72
This is the block diagram to store the data acquired from DAQ into a table. But what I want to do is retain the data for first load and tabulate the data for subsequent load in different columns. Can you give me some advice how to do it?
 

Attachments

GetDeviceInfo

Joined Jun 7, 2009
2,196
you would likely use the 'value' property node of the table, along with a 2D array containing col/row and value. Loop through at some interval incrementing your row reference for the sampling loop. For each sample grouping, you'll have to index the col reference before initiating the sampling loop.
 

Thread Starter

prescott2006

Joined Nov 8, 2008
72
you would likely use the 'value' property node of the table, along with a 2D array containing col/row and value. Loop through at some interval incrementing your row reference for the sampling loop. For each sample grouping, you'll have to index the col reference before initiating the sampling loop.
Can you please draw a block diagram? I don't quite get what you are saying.:confused:
 

t06afre

Joined May 11, 2009
5,934
Your programming style is not very good, more or less Labview NO-NO. You are abusing locale variables and property nodes. They are NOT a tool to clean up diagram and they should be used with care. The reason is that they are NOT pointers. But copies of the data in the control/indicator. Each local/global will hold its own copy of the data. Changing data in one place will force updating on every other item. So by using for data types arrays and other large data set. You may end up producing very slow and awkward code. And you will also very soon end up with race conditions that can be hard to debug. And in this case they are not needed at all. I do not say locale/global should be banned. Some Labview programmers do. But use them with care. And never as a tool for cleaning up diagram clutter.
 
Top