Labview design question

Discussion in 'Programmer's Corner' started by prescott2006, Dec 24, 2010.

  1. prescott2006

    Thread Starter Active Member

    Nov 8, 2008
    72
    1
    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?
     
  2. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    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.
     
  3. Dave

    Retired Moderator

    Nov 17, 2003
    6,960
    145
    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
     
  4. prescott2006

    Thread Starter Active Member

    Nov 8, 2008
    72
    1
    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?
     
  5. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    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.
     
  6. prescott2006

    Thread Starter Active Member

    Nov 8, 2008
    72
    1
    Can you please draw a block diagram? I don't quite get what you are saying.:confused:
     
  7. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    Last edited: Dec 27, 2010
  8. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    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.
     
  9. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    show us your suggestion. My understanding was that local variables are aliases to the base variable, guess I misunderstood.
     
  10. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Something like this.
     
  11. GetDeviceInfo

    Senior Member

    Jun 7, 2009
    1,571
    230
    I see what your doing. So much to learn in such little time. Hope this all helps the OP.
     
Loading...