Grab one data point

Hello,
I am writing a labVIEW program that is measuring strain as well as load.  I have the DAQ Assistant set up within a while loop and I condition the signal first, then extract a portion of the signal and then collect that portion of the data before I take the measurement readings.  I need to be able to tare the data as well as grab only one data point at a time from each instrument when I want to grab the data.  
Eventually I also need to write the information to an excel file.
Is a while loop the way I should be tackling this?
Thanks-!
P.S. I'm using LabVIEW 10

For continuous data acquisition you use while loop. so yes, you are on the right track. Is that all you are asking?
Kudos are (always) welcome for the good post. :-)

Similar Messages

  • How to save one data point at every 10th cycle?

    Hello,
    I am using LabVIEW 5.1 and PCI-6023E. In my application, I need to detect peak values from a load cell and save the one data point that detected at every 10th cycle. Do you know any ideal way to do this? Mine always save data values the whole time that the condition is true which is about 26 values; not one value as I want. Any help would be greatly appriciated.
    Hao

    Hello Justin,
    Thank you very much for helping me out. I did not state my question clearer last time. Actually, the cycle here is the number of life cycle of a valve that being tested; therefore, the iterator i can be any number when the valve's life cycle reaches its 1st, 11th, 21st....cycles. Do you know any other way to do this?
    Thank you in advance
    Hao

  • Boolean indicator come on and stay on if only one data point outside of limits

    Okay, here goes my second rookie question.  My first one was solved in a matter of hours after posting here, so I am going to give it another shot.  This has probably been posted elsewhere, but I just am not familiar enough with the terminology and know how to find it in this forum... sorry for that.
    Currently, I have a setup where I am using an In Range and Coerce function in the Comparison Pallette to check the output of my source and compare it with a user inputted upper and lower limit.  I have hooked up an LED indicator to the Index Array and then to the In Range output.  Right now, if my data goes outside of the limit, the LED Indicator will light up, but it will immediately turn off if the data goes back within the limits.  I want my LED indicator to come on and STAY on if even 1 data point goes outside of the limit.  What can I connect between my LED Indicator and my In Range Comparison to make this happen?  
    Sorry for being so new to this!!

    Hi Spsuengr,
    I have attached a boolean toggle vi for you. You can insert this vi in between your led indicator and in range output. It will latch the output by default. You can use the latch(t) input to disable the latch feature (to perhaps reset).
    Above is the boolean latch vi
    Above is how you need to insert it into your code. If you leave the Latch(t) input unconnected it defaults to a latch output. Only wire a control to this if you want to either change the output so it follows the input or if you need to reset the output.
    Rgs,
    Lucither
    Message Edited by Lucither on 04-15-2010 05:22 AM
    "Everything should be made as simple as possible but no simpler"
    Attachments:
    Boolean Latch.vi ‏18 KB

  • Showing one data point on a line chart - X-axis label placed away from its actual position

    Hi Guys,
         In line chart, i used CircleItemRenderer to show single data point. It shows correctly if it is single data point. But the x-axis label placed away from its actual position. Right now it displayed left most position where the line chart starts. I need to move that label straight of that datapoint where it plotted.  Please see the screen shot attached with this post.
    In screen shot, x-axis label "Jan" displayed in left most position.
         And how can we show the datatip for single datapoint. At present, we can't able to see the datatips also with single datapoint.
         Can any body help me to fix those two issues.

    I figured out a way to customize a single datapoint in a line series.  The solution is at this link:
    http://www.flexdeveloper.eu/forums/flex-charting/customize-a-datapoint-in-a-line-series/

  • Color Highlights not working in bar chart with two data points

    Iu2019m using Crystal Reports 2011.  I have created a bar graph using two data fields in the Chart Expert.  I have set the colors for the bars in the Color Highlights tab, but the colors that I have defined have not been applied to the graph.  
    I have tried changing the colors numerous times and have done it in both design and preview modes.  It seems to be somethign with having two data points because I don't have this problem when using just one data point.  Please help!

    is the colour mode Color by group or color by series

  • How to resample a waveforem sample every n data points

    I would like to convert a waveform data set that has 1746 data points into a signal that has 500 data points by selecting the x-value from every 3.5 (1746/500) points and eliminating all other points. Ideally I would like to average the x-value of every 3.5 points and turn that into one data point in the resulting signal but I am not sure if that is actually possible. If at all possible I want to use the express VI's as I am not too familiar the other programming language.  I have been unsuccessfully trying to use the Align and Resample express VI because it is supposed to re-sample a signal every n data points but for some reason isn't working.  I have attached the data set (titled: Input) as well as a simplified program (titled: Resample Example).  Please contact me if you require any further information. 
    Thanks HEAPS!
    Attachments:
    Attachments.zip ‏55 KB

    I have a similar re-sampling issue and think I'm missing something here.
    The attached vi reads two analogue voltage levels one is a noisy signal (from leg muscle activity EMG) the other is from a foot switch, which I am using to partition the EMG into blocks of data (strides). There may be up to ten blocks of data which I'm trying to average, but they first need to be re-sampled to get them the same size (such that they represent one complete gait cycle). I am currently saving the blocks to TDMS file (for my benefit) then opening the file and re-sampling by changing dt based on the data size. But it's not working. I've also tried using the express resample vi that is used in the examples here, but it outputs nothing.
    Any ideas?
    Note: Change the file extention of test.vi to .tdms. It is an example data set. .tdms isn't a valid extension for upload to the forum :-(
    Attachments:
    EMG using NI-6008.vi ‏133 KB
    test.vi ‏772 KB

  • LineChart data tip won't display with single data point?

    Hi,
    I have a Flex 3 LineChart with LineSeries which use CircleItemRenderer. If there is only a single data point to display, the data tip is not displayed. If there are several data points, each data tip is displayed correctly.
    How can I make the datatip appear correctly with even just one data point? Any workarounds for this problem?
    Quick googling found that I'm not the only person with this problem. A suggested workaround is to use PlotChart instead, but I don't want to go there unless there is absolutely no good way to solve this problem directly.
    http://www.pubbs.net/200911/flex/28102-flexcoders-line-chart-data-tips-dont-display-when-t heres-a-single-data-point.html
    Thanks for any clues!!
    BR,http://forums.adobe.com/people/sikkfgkwwsdfkjkjwjfhjdskj
    sikkfgkwwsdfkjkjwjfhjdskj

    No one wanted to help me but I figured out that I was not referencing the DSN on the test server, only the local DSN. 
    The information to connect to the MSSQL database given by my hosting company was not correct for Dreameweaver (or MS Access) either.

  • Help: Chart with multiple data points

    I would like to create a chart which has 2 data points. The way I know it works, each metric has only one data point. If I want the metric history chart shows 2 data points (y axis) over the same period of time (x axis). Is it possible to do such metric?
    Thanks for the help.

    Don't believe you can have 2 data points as you are suggesting. Oracle is working on enhancing the reporting framework for EM, but not sure when BI will be there. You can send data from the OMR to an existing BI infrastructure and report from there.
    Sorry...
    Have a good day.

  • How to Open another WEBI from one WEBI by clicking a data point on the first tab?

    Hello Guys,
    I have a requirement in which user wants to open another tab by clicking a data point on one tab.
    So, lets say we have a table in one Webi and its has following fields:-
    Customer : Sales DOC: Month : Year : Qty : Amt
    User wants, that if they click on Customer, it should open another webi which should show them a chart reflecting the data about that customer only.
    How can I do that?
    Regards
    Prashant

    Hi,
    Check Below links about Hyperlink details
    http://scn.sap.com/docs/DOC-21161
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0daee1d-0e38-2d10-0c91-8bb4ab5aa266?quicklink=index&overridelayout=true
    Regards,
    Anish

  • SSRS 2008 Column Chart with Calculated Series (moving average) "formula error - there are not enough data points for the period" error

    I have a simple column chart grouping on 1 value on the category axis.  For simplicity's sake, we are plotting $ amounts grouping by Month on the category axis.  I right click on the data series and choose "Add calculated series...".  I choose moving average.  I want to move the average over at least 2 periods.
    When I run the report, I get the error "Formula error - there are not enough data points for the period".  The way the report is, I never have a guaranteed number of categories (there could be one or there could be 5).  When there is 2 or more, the chart renders fine, however, when there is only 1 value, instead of suppressing the moving average line, I get that error and the chart shows nothing.
    I don't think this is entirely acceptable for our end users.  At a minimum, I would think the moving average line would be suppressed instead of hiding the entire chart.  Does anyone know of any workarounds or do I have to enter another ms. connect bug/design consideration.
    Thank you,
    Dan

    I was having the same error while trying to plot a moving average across 7 days. The work around I found was rather simple.
    If you right click your report in the solution explorer and select "View Code" it will give you the underlying XML of the report. Find the entry for the value of your calculated series and enter a formula to dynamically create your periods.
    <ChartFormulaParameter Name="Period">
                      <Value>=IIf(Count(Fields!Calls.Value) >= 7 ,7, (Count(Fields!Calls.Value)))</Value>
    </ChartFormulaParameter>
    What I'm doing here is getting the row count of records returned in the chart. If the returned rows are greater than or equal to 7 (The amount of days I want the average) it will set the points to 7. If not, it will set the number to the amount of returned rows. So far this has worked great. I'm probably going to add more code to handle no records returned although in my case that shouldn't happen but, you never know.
    A side note:
    If you open the calculated series properties in the designer, you will notice the number of periods is set to "0". If you change this it will overwrite your custom formula in the XML.

  • Plotting of graph with more than 4000 data points in Excel

    Hi All,
    I am fairly new to labview world. I am trying to plot out line graphs of the results from my program into Excel worksheet. I have huge set of data points(10000) stored in each of 10 different worksheets in MS Excel workbook. I am trying to compile results into last sheet as graphical representation of all the various dataset into 10 different graphs.
    My problem is that I am getting error because MS Graph does not allow me to plot more than 4000 rows or datapoints. Is there better and cleaner way of programming this? Or if some one can provide an example of how to handle such case. I'll appreciate any help.
    My goal is to able to plot one set of data 1st then I will be able to run through various worksheets to compile into standalone results.
     ERROR MESSAGE: "Report Generation Toolkit: Graphs you create or edit in Microsoft Graph cannot contain more than 4,000 rows or columns, including row and column headers. "
    Also for example if we run Line Graph example and change the # of data points from 100 to 4000, we get same message.
    Error -41114 occurred at NI_ReportGenerationToolkit.lvlib:Excel_Insert_Chart.vi -> NI_Excel.lvclass:Excel Insert Graph.vi -> Line Graph (Excel).vi
    Thanks,
    Saurabh

    Hi Dennis,
    I am collecting waveform data from oscilloscope using labview in both data & graph format. So my program collects data for a particular operating condition & then saves the data on a worksheet. After it loads new operating condition & goes over same cycle. I have to save all the data points in excel for different use cases, which I am saving in different worksheet for each specific operating condition.
    Since I already have data saved in excel at the end of test, I am trying plot each use case in the same report for study & presentaion after tests are finished. I have not been able to do so. I read the post which you have mentioned, seems like newer excel or labview version have same issue. I am using LV 9.0
    I will try using decimation but if you have any better way of handling this problem, I'll appreciate if you can share that.
    Thanks for your help.

  • How to remove noisy data points read from a text file

    Reading data measurements taken in from a txt file.  How do I get rid of noise aside from going into the text file and deciding point by point what to delete.

    Well going in point by point and deleting is certainly one way of going about it. Of course that would defeat the entire purpose of having this great programming enviroment that is capable of doing that kind of thing for us.
    Is your text file small enough to upload? Obviously you know what the criteria are for judging whether or not a data point is acceptable so it should be simple enough to program. Give us a bit more information and I can assure you there will be a race between LabVIEW experts to see who can post the cleanest, simplest, and fastest piece of code that will do what you need. My wager is on altenbach, but there are a few others here that are almost as impressive.

  • How can I connect dots across missing data points in a line chart?

    Hi all!
    I have a table in Numbers that I update every few days with a new value for the current date (in this case body metrics like weight, etc.), which looks something like this:
    Column 1              Column 2      Column 3
    Aug 16, 2011         87.1             15.4
    Aug 17, 2011         86.6
    Aug 18, 2011         86.1
    Aug 19, 2011              
    Aug 20, 2011         85.7             14.6
    Aug 21, 2011         85.3
    Every once in a while there will be a missing value for a given date (because I didn't take a reading on that day). When I plot each column against the date on a line chart, there is a gap where there are missing data points. The line does not connect "across" missing data points. Is there a way to make the line connect across missing data points?
    Thanks for any help. This thing has been driving me nuts!

    Leave your nuts in peace.
    Don't use line charts but scatter charts.
    These ones are able to do the trick.
    Of course to do that you must study a bit of Numbers User Guide.
    In column D of the Main table, the formula is :
    =IF(ISBLANK($B),99999,ROW())
    In column E of the Main table, the formula is :
    =IF(ISBLANK($C),99999,ROW())
    Now I describe the table charter.
    In column A, the formula is :
    =IFERROR(DAY(OFFSET(Main :: $A$1,SMALL(Main :: $D,ROW())-1,0)),"")
    In column B,the formula is :
    =IFERROR(OFFSET(Main :: $A$1,SMALL(Main :: $D,ROW())-1,1),"")
    In column C, the formula is :
    =IFERROR(DAY(OFFSET(Main :: $A$1,SMALL(Main :: $E,ROW())-1,0)),"")
    In column D, the formula is :
    =IFERROR(OFFSET(Main :: $A$1,SMALL(Main :: $E,ROW())-1,2),"")
    In this table, select the range A1 … D5
    and ask for a Scatter chart.
    You will get what you need.
    I asked that points are joined by curves
    I just edited the parameters of Xaxis and Yaxis to get a cleaner look.
    I repeat one more time that knowing what is written in the User Guides is useful to be able to solve problems with no obvious answer.
    Yvan KOENIG (VALLAURIS, France) samedi 27 août 2011 15:59:20
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.0
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community
    To be the AW6 successor, iWork MUST integrate a TRUE DB, not a list organizer !

  • Single Chart Series with multiple color data points

    I am developing an application using the flex chart component
    and I am binding data to 3 different chart series which is pretty
    intense processing. I was wondering can I use only one chart series
    and when I bind the data points just to change the color per data
    point which meet certain criteria?
    Here one method from my application where I am dynamically
    binding data to my series.
    private function loadSeries(data:XMLList, yAxis:String):void
    seriesAdd.yField = yAxis;
    seriesAdd.xField = "Date";
    //seriesDelete.yField = yAxis;
    //seriesDelete.xField = "Date";
    //seriesChange.yField = yAxis;
    //seriesChange.xField = "Date";
    seriesAdd.dataProvider = data.Trade.(A == 'Add');
    seriesAdd.//Can I change the color per each data point if I
    have multiple data sets?
    //seriesDelete.dataProvider = data.Trade.(A == 'Delete');
    //seriesChange.dataProvider = data.Trade.(A == 'Change');
    Thank you

    I think I found something to get me started:
    http://livedocs.adobe.com/flex/3/html/help.html?content=charts_displayingdata_09.html
    My next question is if I have the following function to fill
    my data points:\
    private function myFillFunction(element:ChartItem,
    index:Number):IFill {
    var c:SolidColor = new SolidColor(0x00CC00);
    var item:ColumnSeriesItem = ColumnSeriesItem(element);
    var sales:Number = Number(item.yValue);
    if (sales >= 50000) {
    return c;
    } else {
    // They have not met their goal.
    c.color = 0xFF0000;
    return c;
    How can I access values that pertain to the specific chart
    item, but are not plotted on the x and y axis. Something similar to
    the checking on the above function, but check if value that is not
    plotted but still exists on the data provider.
    Thanks in advance.

  • How to take a single data point for each trigger pulse ( synchronou​s acquisitio​n).

     hi
              im using the pci-mio-16E1 card, with the IDE VC++, so  im looking for an example to explicate me how to make an synchronous acquisition data using an external timing, so the idea is to acquire (take) a single data point for each trigger pulse  from one  input channel ,and saving  the data in a file .
    now im making a code using the AI_setup and DAQ_op functions, im getting  a speed acquisition (it is the start of acquisition data), and  it is  a synchronous acquisition just for one trigger pulse, and me i looking for an acquisition for each trigger pulse. 
      so to  understand my problem you can see my code :
    iStatus = Timeout_Config(iDevice, lTimeout);
             iRetVal = NIDAQErrorHandler(iStatus, "Timeout_Config", iIgnoreWarning);
       //  configuration and selection of  signal trigger  
             iStatus = Configure_HW_Analog_Trigger(iDevice, ND_ON, iLowValue,iHighValue, ND_ABOVE_HIGH_LEVEL, ND_THE_AI_CHANNEL);
            iRetVal = NIDAQErrorHandler(iStatus, "Configure_HW_Analog_Trigger", iIgnoreWarning);
      iStatus = Select_Signal(iDevice, ND_IN_CONVERT, ND_PFI_2,ND_HIGH_TO_LOW);
             iRetVal = NIDAQErrorHandler(iStatus, "Select_Signal", iIgnoreWarning);
        iStatus = AI_Setup(iDevice, iChannel, iGain);
       iRetVal = NIDAQErrorHandler(iStatus, "AI_Setup", iIgnoreWarning);
       while ((iReadingAvail != 1) && (iStatus == 0)) {
     /* Wait until reading is available. */
             iStatus = AI_Check(iDevice, &iReadingAvail, &iReading);
            iRetVal = NIDAQYield(iYieldON);
           //  Acquire data from a single channel 
        iStatus = DAQ_Op (iDevice, iChannel, iGain, piBuffer, ulCount, dSampRate);
       while ((iDAQstopped != 1) && (iStatus == 0)) {
            iStatus = DAQ_Check(iDevice, &iDAQstopped, &ulRetrieved);
            iRetVal = NIDAQYield(iYieldON);
           iStatus = DAQ_VScale(iDevice, iChannel, iGain, dGainAdjust, dOffset,ulCount, piBuffer, pdVoltBuffer);
          iRetVal = NIDAQErrorHandler(iStatus, "DAQ_VScale",iIgnoreWarning);
       /* Set analog trigger mode back to initial state. */
           iStatus = Configure_HW_Analog_Trigger(iDevice, ND_OFF, iLowValue,iHighValue, ND_ABOVE_HIGH_LEVEL, ND_THE_AI_CHANNEL);
      /* Set PFI line back to initial state. */
           iStatus = Select_Signal(iDevice, ND_IN_START_TRIGGER,ND_AUTOMATIC, ND_DONT_CARE);
              iStatus = DAQ_Clear(iDevice);
     /* Plot acquired data  */
          iRetVal = NIDAQPlotWaveform(pdVoltBuffer,ulCount, WFM_DATA_F64);
    so this is the data acquired -0.900879,-0.900879,-0.900879,-0.900879,-0.900879,​-0.900879,-0.900879,-0.900879 and i think that is a noise because all time i get this data.
    tank you very mutch fo your help

    Hello,
    Please see the responses to this thread at the following post.
    http://forums.ni.com/ni/board/message?board.id=250​&message.id=13686
    Also, please only post one thread per issue.
    Regards,
    Sean C.

Maybe you are looking for