with an average

Hello everyone,

I have a question about signal average in labview. Please help me.

I have two entries of signals to my LabView code, one comes from a function generator (in saw teeth with a frequency of 10 Hz and amplitude of the 0.4V) and the other by a detector. For each voltage coming from the unit, there is a response of the detector so that I can have a graphic on my code that the vertical axis is the response of the detector and horizontal axes is the voltage of the generator (the graph is original linear signal from).

The frequency of the generator is of 10 Hz and I have 10 signals per second (as time passes, a lot of signals can be seen on the other). Now, how can I know LabView that update the chart every 5 seconds, what was on average 50 signals? In fact, I need to see only the final signal that is an average of 50 raw signals.

Your help will be really appreciated

Thank you

Soran

Hi Soran,

I think the problem is that when the time is up, you stop the program and draw the thing on the XY graph. Problem is that when you stop code, the graphic delete (of course there that shift registers not initialized that contains the value of your past last run results). The easiest way is to use queues via the architecture of producers consumers (http://www.ni.com/white-paper/3023/en/).

From the diagram below, you can see that I have 2 while loops. One is the producer where I store the values of the DAQ assistant in a queue while the lower loop is my consumer which I extracted the data stored in the queue. So for every 100 ms time will send the True value to the business structure that stores the value of the queue (you will need to play with the settings of the DAQ Assistant). If this is not the case, the producer while the loop runs the false cases indicated in the second screenshot. The consumer while loop, there is a queue Status.vi get that checks the State of the queues. As soon as there are 10 items in the queue, I find their (real case turns structure) which gives you an array of 10 elements. I have summarized the table of 10 elements and divide them by their size of table (10) and he draw a waveform graph. Otherwise, the consumer while loop runs the wrong case (meaning no evidence is found and allow the data to be buffered).

Just take screenshots above regarding your own reference. I'll leave the rest to you on how you want to adapt this concept in your code.

Hope that helps

Warm greetings,

Lennard.C

Tags: NI Software

Similar Questions

  • Covered wagon with an average of analog voltages DAQmx

    I searched through screws, I can't seem to find something that will automatically average numbers of boxcar fed into it. I am trying to create a feature of my software that will allow the dynamic configuration of the car covered with an average of some inputs. I would like to avoid hard-coding tables which are filled/rotation etc etc.. Any help is appreciated

    Thank you

    If you use a Functional Global to store the values and call that VI of two different screws, you will access the same data. You could use two Global in the functional shift registers and use a selector to place / extract data from / to the appropriate shift register. Only VI call access one commune VI at the time, so one of the caller of the screw will be 'blocked' until the first caller is done. This does not usually work for data acquisition applications high speed.

    You might consider using named queues instead of functioning overall. You might be interested in this thread on the forums of LAVA that deals with boxcar implimentations. You create a queue for each data stream and can perform functions such as "preview" queue to get all items without actually removing them from the queue. If you use a LabVIEW 8.6, there is a new feature called with loss of queues. You set an upper limit on the size of the queue and "lossy enqueue" allows to add items at the end of the queue. If the queue fills up, then the oldest data element will be lost.

  • With an average of a spectral waveform and view / save

    Hello world!

    I am currently on a University project that consists on the use of Labview to obtain data and spectra of atmospheric plasmas using a spectrometer Ocean Optics HR4000.

    After not not using Labview for almost a year, I managed to get most of my knowledge back and I managed to display the spectral waveform, that I expect to get. However, as this is a fairly simple design I get a lot of noise and I would on average it for a graphic display more smooth.

    I looked into a lot of messages from the forum, but I couldn't really find what I was looking for.

    I also had a problem when you try to save the data and Spectra: I can't find anything in the directory of my VI.

    In the attachment you will find the current VI I'm trying.

    Thanks in advance for your answers!

    Jeremy

    I wrote an example for you below. This is an excerpt from VI, so you can drag the .png in your diagram and it becomes code. Pretend that everything in the green box is your Subvi spectrum acquisition.

    -Place the Subvi in a loop to run as many times as you like on average there

    -Out of the loop For is a table 2D with individual spectra on the lines

    -Transpose output, so individual spectra on the columns

    -Enter the table another loop to take the average rank by rank (with an average of different Spectra togeter).

    -Output is 1 d spectra average table

  • with an average of 5 minutes of data - is no way

    I need average 5 minutes worth of data, save this average and then again on the next 5 minutes of data, with an average of this data block.  I tried to use the average function pt-pt in LabVIEW, but who seems to take an average continuous market, I do not want.  I probably read data once every 0.1 seconds, so I can not used stacked registers at offset, because it would be not very economical. I thought to build a table, but I don't know how to remove all the data at a time on average to it in an efficient manner, and more I'm stuck on the concept of re - create the table/clear the Board after five minutes of data has been collected, averaged and recorded.

    Does anyone have a suggestion?  I would really appreciate any advice or suggestions on how to go about it.

    Keep a running total in a shift register.  When your 5 minutes have expired, divide the sum by the number of samples taken, the sum to zero and start over.

  • With an average of groups of cells

    Hi, I have a question that might be a simple, but I am struggling to find a response.

    I'm looking for using blocks of cells.  The goal is to take a large group of experimental data with many different reproductions by treatment and turn it into averages by treatment.  Here's a simplified example: A1 to A3 contains data replication of treatment while A4 to A6 contains data for the next treatment, etc.  A1: a3 must be averaged and put in a new table for his special treatment.  Ditto for A4: A6, etc..  I understand how to do manually (= average(A1:A3)), (average(A4:A6) =), etc. for each cell in the new table.  However, it is simply too long for this amount of data.

    So I tried to set the function in the first cell export and dragging the AutoFill / the rest but this leads to a difference of 1 cell of the data sources.  In this example, I need to exclude the three previous average cells next and use only three cells.

    Is there a way to auto-fill the average function in groups of source cells?  If so, can you recommend the procedure?

    Maybe I'm looking just to the question in the wrong way.

    Thank you for your help.

    The f

    If I understand correctly, you could do something like this:

    The formula in A2 of the summary table is:

    = AVERAGE (OFFSET (data: $A$ 1, 3 * ROW (−5, 0, 3)))

    If your data are in groups of 4 then the formula would be:

    = AVERAGE (OFFSET (data: $A$ 1, 4 * ROW (−7, 0, 4)))

    Group 5:

    = AVERAGE (OFFSET (data: $A$ 1, 5 * ROW (−9, 0, 5)))

    etc.

    The second parameter (number of data points per set) * rangee() - (a constant), must be assessed at 1 when rangee() is set to 2.

    The last parameter is the number of data points per set.

    The first line of the data table is a header row.

    For more information about this use of the OFFSET, see the second to the last example here.  If you work with large tables you can select averages derived, command + c to copy, edit > paste formula results to remove the forms when you are sure to have the desired result. The reason is that the OFFSET is a so-called "volatile" function which can make your sluggish document.

    SG

  • Cooling fan still works with an average speed on the Satellite A100-405

    Hello guys,.

    If anyone can give me a reason why my satellite cooling fan is always running at speed average. I shot all the "Toshiba Power Saver Properties" settings, to "Battery Optimized" condition and so I took the battery, and the pleasure of cooling is still running and operating at average speed. I'm in a place of model (18 Aºc) without any direct exposure to the Sun or heat.

    If you can help me about whether or not it is a normal condition. I think that it is not normal to have fun all the time for work. Runs normally for 2 minutes and stops during a similar period (used to be the case in other phones that I had in the past).

    Maybe, I need to set or check adjustments internally or in the Bios. I really don't know and I'm really worried about it.

    Thanks guys... Please respond.

    Laptop cooling depends on the use of laptops and the applications that run on the laptop.
    Strong performance of the software is running on the laptop each part as CPU and GPU produce a lot of heat.
    Have you tried to use a material like Speedfan monitoring tool.
    SpeedFan is a freeware program that monitors voltages, fan speeds and temperatures in computers with hardware monitor chips

    But back to the energy saver. In the eve of power configuration, you should try to the CPU for auto control method and try to change the processor, the speed of processing and cooling method.

    Don't forget that there is enough free space around the laptop. It is important for the circulation of fresh air.

  • waveform, with an average of results using labview to O-scope

    Hello fellow engineers! I'm a first-yeargraduatestudent in CHEE at the University of Houston. Basically, I know nothing about labview. I am trying to program an application that looks like this - I collect a waveform of the signal of O-scope. This waveform does not change its characteristic shape. I need to find the wave form average of waveforms of N (100 for example). Thus, the slight changes (or noise) in the feature of form during the period mustbeaveraged out and I need to have a resultant waveform that represents the average waveform over a period. So, basically, I'm collecting the wave several times (for example 100) on a single period. The O-scope that I use now is Tektronix TDS 2024 B. It communicates with the computer via USB. The version of labview is 8.5. For now, I am able to communicate with the computer using our o-scope through labview. I already downloaded the driver of instruments of your Web site. It turns out that the program can give me only the average result I can get directly from o-scope manually. I need to have more say on average (100) using labview. I wrote a program that relies on the instrument driver that is downloaded on your website (for loop part is average, the waveform). The program that I modified and an instrument driver are attached. The program cannot be fully open, if the driver is not put in the right place in the labview (under lib inst.) When I run the program, the average waveform does not appear on the front panal and signal waveform file is not saved correctly. Is there someone can find where I did wrong and it develop for me? Because I barely know Labview, it will be even better if you can add an image or program that you have changed. I'm waiting for your creative ideas.
     
    With the best regards,.
    --
    Weiye


  • With an average of 10 channels of waveform separately

    I've written a VI that takes input from 10 different devices then shows in several graphics and then saves in PDM. This works perfectly well. The problem is, on my PDM data, is saving 25 samples per second creating a file of long worksheet for short durations. Im trying to figure out how to reach an average of each channel independently (average 25 samples) and print it out every second, so there should be a 1:1 ratio between my timestamps and data, not 01:25 how it is now. Thank you!

    Personally, I just averaged 100 samples you take.  If this simple solution is to replace your table decimate (inside the square structure) with a Mean.vi.  You will need to use a range of build with a single input to transform a table to write in the waveform (still inside in Place element Structure) of the average.

  • With an average of meter data

    I have a double precision scalar value to a DAC that represents the current measured in a domestic wind turbine application. This value is harvested in a home made circuit that has a little 'noise problem '.  This noise cause fluctuations in the value of more or less 20%, which appears visually in the gauge of the output of my VI as earthquake of the needle.  The value of the DAC is read and displayed 3 times per second.  I thought that there must be a way to display a moving average of the signal on the last bed N or N seconds that would moderate the noise and the hand shake a little.  Tried to play with the built in RMS VI but the data entry type is table and I scalar double-precision. I'm REALLY new to Labview and swimming with ideas of what must certainly be possible but work always on absorbing the incredibly array of features that this software has.

    Thoughts appreciated.

    You can use Point-by-Point screws.

  • with an average of 100 consecutive measurements below a threshold value

    Hello

    I just started programming labview. I'm having difficulties with just this very simple programming code. I was breaking my head all night. I'd appreciate a quick response.

    How can I make a code that would allow an average of 100 consecutive measurements which are below a certain threshold value in labview?

    Thank you.

    Try the joint.  The key is shift registers-(blue) integer is a counter of deca thresholds measures and it returns 0 if there is a measure above threshold the result is saved whenever the counter is greater than 100 (indicating > = 100 consecutive values of 'good'). This also prevents internally while loop and outer loop causes the records to shift to reset.  I added a function to "define the position of the file" then the values will be added rather than overwrite the file.  You will probably need to insert a carriage return in the string that is written in the file so that the values appear on separate lines.  I also changed your data types of DBL - they were I32 (integer) that doesn't seem to jive with your indication that you take analog action.

  • With an average of readings of the oscilloscope

    I have a virtual four-channel oscilloscope. I have spark and get values in a 2D array. I would like to the average of the five consequetive results. However, the program, I am changing is badly coded, I can't use shift registers. My only option is to store the values of the oscilloscope somewhere and after getting five of them by dividing by five.

    I tried with tables, but I have no havw a lot of experience, so I couldn't do. What would be the best approach?

    Thank you

    Erden

    Hi Erden,

    a local variable is rarely the right approach (you know LabVIEW uses a DATA flow approach?)

    Try this instead:

    Two ways, with or without change of register...

  • problem with value average.

    Hi, I had problems with the function of the average value, first of all, I have a very limited knowledge of labview, so this could be a very stupid question.

    The problem is that I want to have the average total value of a displayed sequence 'online', so that it displays the average of all the readings of an instrument of the time wherever I start the program and until I turn it off. The things ive tried just seems to take the average of the last 10 values for example, and as I said, I want too, it includes all the readings for the whole race that can last for a few hours so there are a lot of measures.

    Would appreciate all the help and advice I can get! Hope that I managed to describe the problem, im that it is difficult to find the words to use in English.

    As Philip proposed, the PtByPt means is the VI suitable for you.  It is located in the range of functions under the Signal Processing > PtByPt > statistics & probability

    Attached is a driving force that does something similar.  I hesitate to publish because it does for a single database at a time.  You can modify the code to select a single value or a table of entry (just to know the size of the array and increment the account of the size of the array).  You can do this by adding another case another selection to the enum Ctrl.

  • With an average of data points

    Hello

    My setup is run by labview and wishes to reduce the noise associated with my data by taking more medium.

    I would like to have the medium-sized data points and taking the average of them and save only the average at the same time the experience is

    instance. For example. My experience is voltage vs field. For each field, I want three readings of voltage and the software must calculate the average, then

    Enroll in the average in the data file. The reason why I do not repeat the measurement, it is that it would take some time to do it this way.

    Can you advise how to do this with labview.

    Thank you very much

    Hi Alain,

    Take a look at the attached vi. I think that this will solve your problem. It takes the average of the 3 simultaneous values of an array of random number and saves it in the txt file that you need.

    Kind regards

    Amine31

    (Bravo to give good answers, mark it as a solution if your problem is Sloved)

  • Continuous with an average of table 2D

    I am shooting an image with a CCD camera and converted to a 2D array.  I want to be able to constantly take data and ultimately averaged together 50 samples.  This is my first project in LabVIEW and I really have no idea what I'm doing.  Any help would be greatly appreciated!

    And initialize the array to the size of your image.

    For the chart of the summons, you must convert to a data type that will contain the higher values than the a U8 0.255.  At the moment where you have summarized 50 iterations, it may have exceeded 255 on a few pixels.

    You also do not have any way.  The image shows by dividing by the number of Images to get the pixels on average before you save it.   I don't have the screws IMAQ so they appear with the grey question marks.

    Lynn

  • With an average using the "basic DC/eff' VI

    I seem to end up using the "basic DC/eff" VI a little average my data to my DAQ system. However, I have a question about what's going on "under the hood".

    Let's say, for simplicity I acquire data at 1 kHz into blocks of 1000 samples.

    Thus, all the 1 second I push 1000 samples in the VI-DC/RMS database as a data type of waveform.

    This means that the outputs 'DC' and 'Eff' will update at the rate of 1 second.

    The question is, is "continuous" averaging? In the sense that if I was doing 'good' low-pass filtering (on average is just the same as the low-pass filtering) - say simple TREE with notches n - to the DSP, then the output of the filter would be updated at the same speed as data entry; That is to say. taps would be 'move along' the input data at the same rate as the input data passes through the filter. I'm guessing based on my above explanation that's not what's happening. Instead, the VI DC/RMS is on average an entire block of 1000 samples and then 'jump' 1000 samples along and doing the next block.

    This is not necessarily a problem, but it is not not true low-pass filtering and I can image some scenarios where there might be artifacts because the moyenneur filter jump 1000 samples whenever it takes on average. I assumed that the only solution is to implement filtering in a loop of much higher speed and this could prove problematic in the higher frequencies of sampling.

    Anyone got any ideas on that? I worry about anything?

    Dave

    Hi Dave,.

    The 'average base DC - RMS' feature is designed to work only with continuous acquisitions, it will lift a warning is the signal is not continuous. When you open the function and examine the code in the function there is a Subvi with status information, which permits the function to continue the average of the previous data block.

    For this reason, we provide a reset terminal if you need 'forget' the previous calculations.

    Much of this is discussed in the detailed help on function, but still sometimes there hands dirty to know how the code works and review the code.

    Concerning
    JamesC
    NIUK and Ireland

Maybe you are looking for