Jump to content

bigl00z3

Members
  • Posts

    9
  • Joined

  • Last visited

    Never

Posts posted by bigl00z3

  1. 1 If you have a labview version other than the Base version, you could use the "point-by-point" libraries to calculate mean/median/mode and MANY other functions on a point by point basis (instead of waiting for 50 points to collect at a time).

    This should help in smoothing out the data.

    Well I have the LabVIEW base version. The person who was in charge of the project at the time they ordered LabVIEW thought it would be enough.

    But if I really need the Pro version for the tests we need to do, they may decide to invest

  2. Sorry for not replying earlier I ran out off time yesterday.

    Do you not know how to do the analysis in LabVIEW? There are agreat many tools for analyzing data. You could use LabVIEW for many years and never exhaust the methods of analysis.

    Furthermore, LabVIEW is much, much better than Excel or an office spreadsheet, particualrly when the data set is quite large.

    No I don't know yet how to do the analysis in LabVIEW. I know and I can see that it's possible to do most of the data analysis in it. But I think that in my situation it's not the best solution.

    As my system is running on a machine that is constantly modified by people wanting to study different parameters, it's easier for everybody to have the raw data on their personal computer.

    I know that Excel is far from being the best solution to treat large data, but at least it's on everybody's computer and it's working for the length of data we need.

    I ask you: Why? What decisions will be made based on the visual display?

    Frankly, if I need to visually investigate a signal, I find a good fast oscillosope to to be much more useful. Then I use that information to guide me in choosing the correct speed and resolution for an LabVIEW acquisition. I then use LabVIEW to acquire a limited data set (not continuous) process the data, store it, analyze it, and present it graphically.

    Again you are right. But for this project I can't really get more hardware ($) so I'm trying to do it on the computer in LabVIEW.

    Until now, we were using PicoLog which was showing the values on the screen.

    They are time when we have to check the display to know the values. We start some parts of the machine when some values are reached. That's why I want to show it on the display.

    Until now, when we were running test which needed fast data acquisition, we were using an Agilent 34970A which was recording the data without displaying anything. So we had to run PicoLog at the same time to have the values displayed on a screen.

    I am sorry that is a self contradictory statement: ...wants to acquire at 1Hz...needs to acquire at high rate....

    And how does acquiring make sure the three sensors have the right average?

    Are you implying some sort of decision making process and manual contorl of the system?

    Sorry I don't think I explained it well.

    If for the 1Hz measurements I want the average pressure (the pressure is oscillating at 50Hz) I read the data at high rate and then I calculate a floating average on the last 50 values. That way the value my floating average is outputting is correct (I already checked the values with our other data acquisition software and they are correct. So my idea shouldn't be completely wrong).

    If I don't do this the value is just not correct at all (values are read "randomly" in different parts of the oscillation).

    Attached is what I have done so far:

    bigl00z3

    Download File:post-6798-1164875769.zip

  3. "-Read data at high speed (500-800 Hz), calculate an average value."

    How do you propse to calculate this average? Is it a running average of the data taken before and after a particular reading? Is it the average of all the accumulated data?

    I'm using a floating average VI based on this VI. It's calculating the average for 3 of my 8 signals on the last "x" (generally 50) points.
    "-Write to a file the average values at 1 Hz frequency."

    Why do you want to do this every second? Why not acquire al the data and post process the data?

    What do you gain by writing the data every second?

    On my system I have a pump generating high oscillations of pressure.

    -For some measurements, I want all the data (without the average) on short period of time (max 30 seconds) so I can analyse all the oscillations. <-- this I can already do and it's working perfectly fine.

    -For some longer mesurements (45 minutes or more), I only need my average pressure and to save post processing time & server space I only want 1 value per second.

    You can ceratinly stream data to disk, but what is the point? LabVIEW was setup to make this much easier by letting you gather lots of data into and array at very high speeds (1.25MHz for an analog channel on an E Series DAQ board), then after it is done analyze the data, store the results, and present the analysis.

    The issue with writing to files is OS related. You are fighting a headwind if you write to files all the time; so make sure that is really what you wwant to do before you do it..

    I haven't peeked at your VI yet, but I will. I am not sure if the PC architecture is the right one for what you are doing. Maybe you don't need any special architecture at all. ProducerConsumer is used to mediate between inputs or requests (often GUI) that may come in batches that the consumer cannot manage immediately. That PC allows tasks to stack up and be dealt with as resources are available. Merely reading some channels, doing a little analysis and saving the data to a file doesn't require any special effort.

    I'm using the Producer/Consumer because of my previous problem described in this post. The refresh rate of the display used to slow down my entire Vi.

    bigl00z3

  4. Here is what I'm trying to do:

    Data Acquisition vi:

    -Read data at high speed (500-800 Hz), calculate an average value.

    -Write to a file the average values at 1 Hz frequency.

    -Display calculated values on the user interface.

    First I had everything in the same while loop which was slowing down the vi. So after asking on the forum I was told to use the Producer/Consumer template.

    Now my vi is working perfectly fine for short measurements at high speed (writing to file at 500-800Hz).

    Depending on the test we want to run on our machine, I will only need one value per second. So I decided to use the ProducerConsumerData (Multiple Queue Array).vi.

    In my Producer queue, I'm reading the signal at high speed, calculating the average and then sending the values to 2 consumer loops.

    One consumer loop is displaying calculated values to the user interface. Everything is fine.

    The second consumer loop is writing to the file and that's where my 2 questions are.

    -1st question:

    When I'm reaching a certain number of values (which I set before starting the vi), I want to stop writing to the file and then stop the producer loop (which will result in stopping the VI). What is the best method to send the stop signal from a consumer loop to the producer loop?

    -2nd question:

    What is the best way to only write one value per second to my file?

    I've tried to place a wait function in my consumer loop, but that way it was only reading the first value in the queue which kept filling at 500 Hz.

    As the average is already calculated in the producer loop I only need to get the first value and then empty the queue from the other values stored during the previous second.

    The attached vi is describing what I'm trying to do.

    Bigl00z3

    Download File:post-6798-1164197967.zip

  5. Hi,

    Do you really need to pass the dynamic data in the queue?

    If not, then just feed the queue with the DBL-array you get from the "Convert From Dynamic Data" node. In the lower loop, set the array constant to an array of DBL (instead of U32) and use this in the "Variant To Data" node.

    Good luck!

    /J

    Thanks a lot,

    You were right, that fixed our problem. We can now start aquiring our data.... :rolleyes:

    bigl00z3

  6. I'm trying to create a simple data aquisition VI with 8 imputs.

    I've used the Producer/Consumer Design Pattern (Data) template.

    In my producer loop I'm writing the signals to a file.

    In the consumer loop I'm trying to display the values of the differents signals on my interface.

    I'm trying to access one of the element of a Variant data set from the queue. The Variant Data set has the folllowing structure:

    <Dynamic Data

    {[8]

    (<Waveform(DBL)

    {...}>, <Waveform(DBL)

    {...}>, <Waveform(DBL)

    {...}>, <Waveform(DBL)

    {...}>, <Waveform(DBL)

    {...}>, <Waveform(DBL)

    {...}>, <Waveform(DBL)

    {...}>, <Waveform(DBL)

    {...}>)}>

    I've tried to use "Variant to Data" but I can't find a way to set the correct type.

    How can I "split" it so I can display the values on my Interface?

    Is there an easier way to do it? It may seem logical, but I'm new to Labview... so excuse me for "stupid" questions...

    bigl00z3

    Download File:post-6798-1163665036.zip

  7. Thanks erverybody for all your imputs. And very sorry about the large pictures...

    I will definitely try with the "producer/consumer" way..

    bigl00z3

    I agree completely that the way to go is "producer/consumer" but other suggestions regarding decimation can be avoided by using a notifier instead of a queue. A notifier behaves like a queue but has a data depth of 1. So, your visual (GUI) update rate is a function of the update rate of the consumer, using a wait or wait until next multiple.

    I haven't done benchmarks of various approaches, but in terms of coding, this is the most efficient way. (IMHO).

    Barrie

  8. I'm totally new to LabView (and a bit lost...).

    I'm trying to create a simple data acquisition VI.

    I have 8 signals which I want to write to a file. I need a fairly high rate, I have to capture in between 800 and 1000Hz.

    I started from a basic VI that was developed for us and now I have to try to make it work for us.

    My problems are that I would like to display the calculated values on my interface:

    -In my first test (image below) I was placing the display inside the main while loop. The problem with this is that it's trying to refresh the values on the interface way to often (which is not needed), it's slowing down the entire vi and it's not writing to the file at the desired speed.

    DataAquisition1.jpg

    -In my second test (image below), I tried to place the display section in a second parallel while loop which had a Wait set at 1 second. I've also added a Wait set to "0" in the first loop. My problem here is that I don't know how to transfer the value from the 1st while loop to the 2nd. I tried to connect them as shown on the picture but when I run it I can see that the data are stopping on the edge of the 1st while loop.

    DataAquisition2.jpg

    I'm pretty much stuck and I cannot find a way to fix this.

    I've tried looking in the forum but couldn't find an answer... (maybe I missed it...) and I hope I posted it in the right place...

    Any help would be very welcome.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.