Graphing data of different data point amounts I get errors

I'm using Labview 7.1 and I'm graphing a group of data sets on a single graph display.
These data sets have different numbers of total points and the sets with a less number of points wind up going back to the origin (0,0).
This seems to be due to where they stop in data points labview fills in the vacancy with a 0,0.
The result is (other than addiing erroneous data points) is the scaling is way off because I'm not near the origin.
How can I( get round this problem?
Thank you,
Philip

Your code seems to be highly flawed. Does it even work at all?
Some comments.
If you load more than one data file, the data from the files read in the previous iteration gets lost. You'll only get the set that you read last. (for example, the 2D array output from case "=0" will be empty at all later iterations. That's why you get all these zeroes!
Why do you need to do all the array extraction and manipulation at every while loop iteration. Everything prior to the division by the FP control belongs outside the while loop.
"Array subset" is better than "delete from array".
The while loop spins at infinite rate calculating the same old stuff over and over again, millions of times/second. Use an event structure so it recalculates exactly once whenever the control changes.
All the Array manipulation is done identically in four different places, you only need that code once in a loop, you can even do it right in the FOR loop when you read the data.
The label.text properties need to be written exactly once, ouside the loop.
You don't need to connect an indicator to the slide. Just right-click on the slide and do "show..digital display".
You don't need a stacked sequence. It only hides code and forces backwards wires, making the code hard to debug.
You don't need to transpose following by gettting a row. Just get a column instead!
Attached is a quick attempt at some simplification according to my comments above. I cannot test it so it probably needs a few tweaks here and there. Still, it should give you some ideas.  Modify as needed.
LabVIEW Champion . Do more with less code and in less time .
Attachments:
Read_from_Text_File_chirpTemp_thingMOD.vi ‏192 KB

Similar Messages

  • Transparency fill in line graph data points does not copy over to Pages

    I have created some line graphs in Numbers, and they look beautiful. Since some of my data overlap and I want users to be able to easily see where all data is on the graph, I have made the data points transparent on the foremost line. This allows the other line (which data points are filled in with another color) visible "through" the foremost line.
    However, when I attempt to copy the graphs into Pages, the data points of the foremost line are no longer transparent - they are filled with white. Obviously, this defeats the entire purpose of using a transparency fill!
    What can I do to make this work?
    Thank you,
    G. Pasarescu

    Hi Yvan,
    Thank you for the tip. Unfortunately, I need to embed several of these charts into the Pages document, and cannot use Numbers instead of Pages for the document.
    Interestingly, if I copy the chart from Numbers and paste it into some graphics programs (like Pixen and Pixelator), the transparency is preserved. However, pasting the same copy into other graphics programs (such as Seashore or Photoshop) somehow flattens the image, removing the transparency, and I'm back to square one.
    Using a graphics program as the bridge between Numbers and Pages reduces the quality of the chart - that's why I'd like to try to make this work in Numbers / Pages.
    Thanks,
    Geoff

  • Health app not graphing data points.

    I have been playing around with the new Health app recently. I do not use any third party apps for Health, but I am running iOS 8.0.2 anyway. So far, I have plotted 4 points on the sleep monitor, for example. I can press Show All Data to see the individual sleep and wake times I inputted, but they are not showing up graphically as the data "Points" that I wanted to add. Instead, the graph (which I added to Dashboard) just says No Data.

    I have the identical problem with the Walking/Running Distance App in Health.  If I manually enter that I walked 1.75 miles it is 50/50 whether that shows up on the graph.  This makes the walking distance data useless if one doesn't want to wear the iPhone while walking.

  • 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.

  • Plug-in page tells me all plug-ins are up to date, but I keep getting error messages from Firefox telling me they are not and are unstable

    I keep getting error messages stating that my Adobe Flash is out of date and vulnerable. I go to the Add-ons Manager, click "update" and it takes me to the plug-in page which shows it's up to date!! Same with Java DT and Shockwave Flash. How can I update if I have the latest versions already!?! I am inclined to just allow the plug-ins to work but don't want my pc to become vulnerable. Please help!

    hello Danagriz, unfortunately the plugin check page lags behind. adobe has released a critical patch for a vulnerability in its flash plugin, which is reportedly already exploited in the wild. therefore firefox will block insecure versions from running by default on websites for your protection.
    https://helpx.adobe.com/security/products/flash-player/apsb14-27.html https://addons.mozilla.org/firefox/blocked/p794
    please update to Adobe Flash Player version 16.0.0.235 as soon as possible, which you can download from http://www.adobe.com/products/flashplayer/distribution3.html (use the windows-exe for plugin-based browsers).
    in order to update java, go to java.com (or if you don't need the plugin you can also uninstall it though the windows control panel)

  • Attempting to write data to file, but getting error 200279

    I am having trouble when writing data to a file. About 10 seconds into the saving process, I get the error 200279. I have done some research on the topic, but am unable to corect my code. I believe I do not want to increase the buffer size, but would rather, I assume, read the data more frequently. The way I save my file is, before running the VI, I assign a location and name of the file (e.g. data.csv). The date and time is appended to the end of the actual file when the I begin to save the data (e.g. data_07-26-13_122615.csv). If the file does not exist, it creates a new file, then appends data to that file after every loop iteration. The reason I did it this way was so I do not have to worry about running out of memory, but apparently my code is flawed. 
    I will include a copy of the flawed section of my code. Any help would be greatly appreciated.
    Thanks.
    Solved!
    Go to Solution.
    Attachments:
    data_acquisition.vi ‏127 KB

    Your problem is that writing to disk is slow.  It is slow enough that it is causing your DAQ buffer to overflow and cause the error and loss of data.  What you need to do is implement a Producer/Consumer.  This will put the daq and the logging to disk in seperate loops.  This will allow the DAQ to run at the speed it needs to keep up with incoming samples and the writing to disk can run at whatever rate it can.  You send the DAQ data to the logging loop using a queue.
    You might also want to think about changing how you write to the file.  That VI is constantly opening and closing the file, which is a very slow process if you are doing it inside of a loop.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Insertin Data useing SQL Procedure Getting Error ORA-00942 and ORA-06512

    I have two Schemas ISYS and ISYSTWO
    I had created a Stored Procedure RECINC2 in Schema ISYS
    as
    procedure recinc2(cName IN CHAR,cWhere IN CHAR,cTable in CHAR)
    AS
    cQry VARCHAR2(1000);
    BEGIN
    cQry := 'INSERT INTO '||cName||'.'||cTable||' SELECT * FROM '||cTable|| ' WHERE ||cWhere;
    dbms_output.put_line(cqry);
    EXECUTE IMMEDIATE cQry;
    end;
    NOW WHEN in Run it gives error
    SQL> begin
    2 recinc2('ISYSTWO','CODE=4','AGENTS');
    3 end;
    4 /
    INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
    begin
    ERROR at line 1:
    ORA-00942: table or view does not exist
    ORA-06512: at "ISYS.RECINC2", line 8
    ORA-06512: at line 2
    BUT IF I EXECUTE
    the DBMS output
    INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
    it executes and gives fine result
    Please help
    Thanks
    Chaand kackria

    SQL> conn ISYSTWO/ISYSTWO
    Connected.
    SQL> grant all on agents to isys;
    Grant succeeded.
    SQL> conn isys/isys
    Connected.
    SQL> exec recinc2('ISYSTWO','CODE=4','AGENTS');
    INSERT INTO ISYSTWO.AGENTS SELECT * FROM AGENTS WHERE CODE=4
    PL/SQL procedure successfully completed.

  • Apple TV won't load up. the light flashes and the logo appears on the TV then it just goes off and starts again. I've tried restoring via USB on 5 different computers and I keep getting error message 9? Can anyone please help?

    I have a black Apple TV that has recently stopped working. It loads the Apple Logo on screen then goes off and starts again. It's as if it is stuck in a loop. I've tried a re-boot and this has failed. I have tried a restore using a USB cable on 5 different computers, including a Mac Book Pro and it downloads the update file but when it tries to restore I get the error code 9 showing on screen. I just can't get it to do anything.
    Can anyone please help?

    Thanks for that information!
    I'm sure I will be calling AppleCare, but the problem is, they charge for the phone calls don't they? Because I don't have money to be spending to be on the phone with a support service.
    In other things, it seemed like the only time my MacBook was working was when I had Snow Leopard without the 10.6.8 update download that was supposed to be done to prepare for OS X Lion.
    When I look at the information of my HD it says that I have 10.6.8 but that was the install that it claimed to have failed and caused me to restart resulting in all of the repeated problems.
    Also, because my computer is currently down, and I've lost all files how would that effect the use of my iPhone? Because if it doesn't get fixed by the time OS 5 is released, how would I be able to upgrade?!

  • Restore points keep disappearing get error 0x80070032

    HP Pavilion Elite HPE
    Prod# AY602AA-ABA
    Error # 0x80070032
    OppSys Microsoft Window 7
    8 gig memory
    t t Hard Drive
    Microsoft latest update
    I can manual load a restore point but it does not stay loaded after I work on computer. I have checked for Malware none was found.I don't know how to continue with this problem.I have no other problems like this. I have researched the internet and found other people have had the same thing happened.
    This question was solved.
    View Solution.

    Hello ouch-ouch-ouch,
    It seems it may be an issue with how you are setup or the profile within Windows that you are using.
    See if one off the solutions mentioned in these two forums help resolve your issue.
    Error 0x80070032 when creating a System Restore point in Windows Vista
    0x80070032
    If I have helped you in any way click the Kudos button to say Thanks.
    The community works together, click Accept as Solution on the post that solves your issue for other members of the community to benefit from the solution.
    - Friendship is magical.

  • 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 can I plot two sets of data points in 3d graph?

    I am trying to plot two sets of data points in 3d graph. I also need to make a set of data with one color and the other set with a different color. For example, I need to plot 10 (x,y,z) data points in 3d. Maybe 6 points need to be blue, and the other 4 red. Could you tell me how?

    What is your LabVIEW version? (things are a bit different in 8.6).
    Basically, you create multiple instances of the VI that gets placed automatically when you drop the 3D graph and then wire a different number to the plot ID at the bottom.
    You define all the plots (color, style) via the properties dialog.
    Have a look at my example posted here. One plot is "blue dots" and one is a "shaded surface". See how far you get.
    Message Edited by altenbach on 04-23-2009 01:11 PM
    LabVIEW Champion . Do more with less code and in less time .

  • How to update multi-handle graph with a new set of data points

    I have multiple sets of data that all have the same number of columns but different numbers of rows. Each column is plotted on a graph. I want to keep the format of the original graph with the same number of handles, and update each handle with new data points by bringing in a new set of points.
    See attachment for example.
    Attachments:
    hiqgraph.HiQ ‏14 KB

    There are several ways to do this.
    1. You can create a HiQ script that plots the new data to the graph using the existing plots. The following three lines plot the new data into the three existing plots (indicated by the plot handles.) Put these lines into a HiQ script object, right-click and select Run.
    addplot(Graph2D_1,-1,data2[*,1],data2[*,2]);
    addplot(Graph2D_1,-2,data2[*,1],data2[*,3]);
    addplot(Graph2D_1,-3,data2[*,1],data2[*,4]);
    2. You can do it interactively by right-clicking on the individual plots and choosing Change... This will being up a dialog you can use to change the data in that plot. This will be difficult to do when plots are right on top of each other, so you may want to display the plot legend, where you can also right-click a
    nd select Change...
    3. I like your idea about DataSocket. This way it will happen automatically. Whenever the matrix published to DataSocket changes, the plot should automatically update.
    I hope this helps.
    David

  • 3D Line Graph.vi not displaying line connecting data points.

    I'm having trouble getting 3D Line Graph.vi to display the line connecting my data points.  I'm collecting latitude, longitude, and depth data from a binary file, loading this data into arrays with a while loop, and sending those arrays to 3D Line Graph.vi.  When I tried doing it with arrays created by random number generators, the line is displayed, but when I use it with my actual data, no lines are displayed.  I can only see where the data points are when rotating the 3D graph.  Any ideas on this would be appreciated.
    Thanks,
    Morgan
    Attachments:
    Plot Depth.PNG ‏61 KB

    Karunya,
    Thanks for the info on the 3-D Curve VI.  I tried it and it works.  I think I was able to find the problem with 3D Line Graph.vi.  It has something to do with plotting very close points away from the origin and scaling the axes to view the line.  I have attached an example of where the vi breaks down.  In this example, you can see that part of the line is drawn, but when you rotate the graph, you can see that the line is not drawn through all of the points.  If you change the scale of the axes, then you eventually get the line to go through all of the points, but then the graph is not very "readable" at that point.  It's when you try to zoom in really close to the plotted points.
    Thanks!
    Morgan
    Attachments:
    3d Line Graph Error.vi ‏16 KB

  • Graphing Multiple 3D Graph Types with Spherical Data Points

    I have data points that are in theta, phi and r (magnatude) that I would like to be able to 3D plot and change the text/contour to either wireframe or contoured or points on the fly.  I believe this is possible however, after looking at the NI examples, they are all done with xyz coordinates and have yet to see a 3D graph with spherical (NI, take this as a suggestion ).
    Over a year ago, I was able to create data in spherical by giving it 3 1D arrays, but it only plotted it in the form of point or line.  The examples that have a torus use parametric plots?! although I am not entirely sure I understand how it works nor how to convert to it from spherical.
    Attached is a sample input file/array.  Wanted to see if anyone had experience using the built in 3D libraries (CW 3D Graph
    8.0) to achieve something similar.
    Note: the Amplitude column is absolute and could be made positive for ease of use as well.
    Thanks
    Attachments:
    example.txt ‏47 KB

    I'm just trying the following in the main loop to get something to graph, and nothing is showing up but this error - 80020009
    static int panelHandle;
    static CAObjHandle gGraph;
    //==============================================================================
    // Static functions
    //==============================================================================
    // Global variables
    //==============================================================================
    // Global functions
    /// HIFN The main entry-point function.
    int main (int argc, char *argv[])
    int error = 0;
    VARIANT xVt, yVt, zVt;
    HRESULT hr;
    int i,j;
    char errCode[100];
    double xData[50], yData[50], zData[50][50];
    /* initialize and load resources */
    nullChk (InitCVIRTE (0, argv, 0));
    errChk (panelHandle = LoadPanel (0, "3D Analysis.uir", PANEL));
    /* display the panel and run the user interface */
    errChk (DisplayPanel (panelHandle));
    CA_VariantSetEmpty(&xVt);
    CA_VariantSetEmpty(&yVt);
    CA_VariantSetEmpty(&zVt);
    for (i = 0; i < 50; i++) {
    xData[i] = yData[i] = i;
    for (j = 0; j < 50; j++) {
    zData[i][j] = i*j;
    GetObjHandleFromActiveXCtrl(panelHandle, PANEL_CWGRAPH3D, &gGraph);
    errChk (CA_VariantSet1DArray(&xVt,CAVT_DOUBLE, 50, xData));
    errChk (CA_VariantSet1DArray(&yVt,CAVT_DOUBLE, 50, yData));
    errChk (CA_VariantSet2DArray(&xVt,CAVT_DOUBLE, 50,50,zData));
    errChk (CW3DGraphLib__DCWGraph3DPlot3DSurface(gGraph, NULL,xVt,yVt,zVt, CA_DEFAULT_VAL));
    //errChk (CW3DGraphLib_CWPlot3DPlot3DSurface (gGraph, NULL, xVt, yVt, zVt, CA_DEFAULT_VAL));
    errChk (RunUserInterface ());
    Error:
    /* clean up */
    sprintf(errCode,"%X",error);
    MessagePopup("",errCode);
    CA_VariantSetEmpty(&xVt);
    CA_VariantSetEmpty(&yVt);
    CA_VariantSetEmpty(&zVt);
    CA_DiscardObjHandle(gGraph);
    DiscardPanel (panelHandle);
    return 0;
    At this point, I am just trying to figure out which function to call and what to set the input Variants.  Seems somethings they are 1D and sometimes they are 2D.  Unfortunately the documentation is very slim and doesn't explain what the actual functions or variants represent.

  • How to show health app data points as a graph

    Some data points form a graph and others do not.

    0FI_AP_0 - go to the master data infoobject of this datasource. Check mark charercteristics is an export datasource in the master data tab
    Go to the infoprovider tab in RSA1, Insert this charecteristics as data target.
    Use export data mart of this infoobject in your cube creation. You can use this in update rules for update of cube

Maybe you are looking for

  • Windows 8.1 desktop empty after updating and application

    I was at the Windows 8.1 desktop. while updating an application (not Microsoft) all seemed to go well. AT the end the desktop was completely empty. No Taskbar, no desktop picture, or desktop icons. The Windows logo key on the keyboard wouldn't take m

  • USB ports have no power

    It first started happening on my Late 2012 model iMac 21.5" a couple weeks ago. What I found was that nothing seemed to work when connected directly to the iMac's USB ports. However, if you attach an externally powered USB hub, then all devices attac

  • How to link 2 different database

    Hi, I'm having a problem. I have two databases name FLARE and MP5PROD. When I execute the triggers from FLARE DB, error displayed. ORA-04052: error occurred when looking up remote object [email protected] ORA--12203: ":TNS unable to connect to destin

  • Regarding order by clause

    the values of a column are: 1 - 5 hours 20 mins - 1hr greater than 5 hours less than20 mins I want the output in the order as: less than20 mins 20 mins - 1hr 1 - 5 hours greater than 5 hours This is neither ascending nor descending order. Is there an

  • MaxDB Systemcopy different versions

    Hi, I have a question regarding Maxdb and systemcopy. We have an ECC 6.00 EHP4 System with latest MaxDB 7.8.0.1.20.  The system was installed with Maxdb 7.7 and then upgrade to 7.8. Now I want to perform a homogenous system copy with backup/restore m