Graph & chart history length

I was wondering why "chart" has got a "chart history length" property for the length of the displayed data, 
but "graph" doesn't have such a "history length" property. 
Why!?
Solved!
Go to Solution.

Hi Cashany,
you have to make your own buffers then.
Well, there are examples coming with LabVIEW. There ARE examples showing how to use charts and graphs!
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • Programmatically changing chart history length

    I'm creating a VI where the user can choose the data sample rate via the wait(ms) used in a while loop. However changing the sample rate effects the time length being displayed on the chart. This is dependent on the chart history length, originally I thought I could just change this programmatically, but the history length doesn't appear on the property node.
    I've had a look at the advice in the ni support section:
    http://digital.ni.com/public.nsf/allkb/E9784F413A2269E086256F3A0064C8BB
    This method seems a bit messy (especially when I'll be doing this for a number of charts), although I couldn't open the example as its v7.1 and I have v7.0.
    Is there anything I can do?
    Help would be appreciated (deadlines approaching)

    The entire point of using a chart is that you update only the last value, so there is no point in writing the history data every loop. For that you can use a graph, which will allow you to do this without using a property node.
    The history length is not supposed to control how much data is currently displayed on the screen, but how many points are kept in the buffer, so you can scroll back and see them. When you change the length of the history data array, the chart doesn't seem to like it. It starts acting a bit crazy. Also, keep in mind that there is no point in displaying 1000 points if your chart is 600 pixels wide.
    There are problems with what you want to do, like if you add points, where do the extra points come from, or since a chart uses a constant multiplier, what happens to the old data when you change it and so on.
    I've modified your example slightly, so that it doesn't write to the property every time and so it handles the enlarging the history buffer case, but it's still buggy and needs more work.
    The main problem is that the History property doesn't change the chart length. If I understood you correctly, and you want to constantly display the last X seconds, I still think your only viable option is using a graph. The transition should be fairly simple and if you use a shift register it can handle it.
    Try to take over the world!
    Attachments:
    chart.vi ‏63 KB

  • How do I programmat​ically set chart history length?

    How do I programmatically set chart history length?

    Hi, u could try instead of using a chart, u could use an xy graph with a chart buffer and with the chart buffer defining the length/amount points needed. And this also mimics what happens in a chart.
    Stuart
    Attachments:
    XY_Chart_Buffer.vi ‏54 KB

  • Snippet: "query" the chart history length programmatically

    Would have posted to this thread, but was concerned that the misspelled subject might keep it from being found by future searches.
    I have a brute force, inelegant, very mildliy tested workaround for programmatically determining the history length of a waveform chart.  In my app, I have a single chart on my gui that is meant to display history from any one of several duplicate test stations.  To help accomplish this, I wanted each station to have its own lossy queue whose size is equal to the chart history length.  Then, whenever the user chooses to look at a different station's data, I can simply copy the entire contents of the lossy queue over to the chart.  
    Here's how I "query" the chart history length programmatically:
    Note: Some of this feels a little dubious, but it has seemed to give correct results so far.  Specifically, several of the XScale properties seem to refer to the graphical rendering of the scale rather than an index # to the history data.   Can't guarantee this'll work for all combos of other properties -- I tested with a fairly generic, nearly straight from the box waveform chart.
    -Kevin P

    Intaris wrote:
    Hmm, any reason why you can't just do this?
    If you don't modify the Array, it's just copying a pointer, right?  Or does this operation automatically make a copy of the data and induce horrendous performance problems?
    That doesn't actually do what I need.  The "History" data array size works its way up from 0 to History Length as the app runs and data is written.  It *is* bounded, but until I fill the chart all the way up, this method won't reveal what that bound is.  I need to size up those lossy queues at the beginning of the program, before any data has been written to the chart.
    As to the other comments so far:
    - I chose charts over graphs to get some of the built-in features of charts for real time monitoring rather than having to manage them myself.  Things like zooming the X range, horizontal scrolling to show different segments of the history, that kind of thing.
    - just absorbed the followup comment about writing a dummy oversized array to the chart before running the quoted snippet above.  Yeah, that oughta work.  I just don't like the general case of not knowing how big a pre-write I need to do.  I guess it wouldn't be too bad to loop while writing the same big-but-not-crazy-big array until the History size is smaller than the # of samples written.  
      The main hitch I see in that approach is that I'd like this to be  a reusable utility vi, but a subvi that works by filling up the History would need prior knowledge of the chart datatype.  (Just thinking out loud here, overall it does kinda feel cleaner than the stuff I was doing with the scale properties.)
    FWIW, a little more testing led me to modify and simplify my snippet b/c the previous one might leave the X scale looking different on exit than it appeared originally.  Seems like a side effect of the way those properties are kinda more about the display of scale information than about actual index #'s.   Anyhow, here's v2, but hopefully someone else has a better generic v3 they can offer:
    -Kevin P

  • Chart History Length

    Is there a way to programmatically change the Chart History Length of a Chart Graph Indicator?

    Hi Dude,
    no.
    Option:
    Use graphs and maintain your own buffer...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Why do i get crashes when setting chart history length

    I am trying to figure out how to get my chart to eat up less memory. At the moment it is capturing from 4 channels at 44100 samples/sec. It is a continuous capture and after a few minutes, the computer just runs out of memory and can no longer keep up with the capture, at which point the Vi quits. Opening up task manager, I noticed that as I capture, the memory gets chewed up really quickly, but when I stop my VI the used memory is not reclaimed. Even if I set the chart history to an empty array when the VI stops. I tried setting the chart history to a smaller number but whenever I set it below 512 the whole computer crashes.

    I have seen similar problems. I created a simple VI to test this and am continously getting LabView crashes when I try and write an intensity chart history to an array.
    First frame of the vi sequence generates a 100 random number array for the intensity chart display. The next frame in the sequence has the property node for chart history (of the intensity chart)set to read mode and it is wired to a two deminsional array.
    So, I generate psuedo chart data and then try to recover the history into an array. It crashes every time. No matter where I set the chart history length. I attempted to do as you had previously suggested and store the data to a file. Same response.... Crashes LabView. Local and online help have not been very hel
    pful. Will search the hardcopy literature now.
    thanx
    WLS
    Attached VI
    Attachments:
    history_grabber.vi ‏22 KB

  • Chart history explanation?

    Greetings,
    Perhaps I am thinking too much on this, or perhaps too little, but I am trying to figure out what chart history length is actually doing.
    For example.  I'm developing an app right now where I am monitoring 32 channels on a system at 10 Hz.  I'm charting up to 10 of any of these channels (user selectable) at any time.  This system can expect to be run for several hours for a test and I have been doing long runs to test stability.  I've tweaked the time axis on the chart to be hours wide, 10 minutes wide, etc.
    So, when I have my chart displaying 2 hours worth of 7 channel data on the screen, I'm getting lost as to what factor a chart history length of 1024 means to me?  I'm able to have several hours of data plotted though a history length of 1024 implies I should only be able to see only 1.71 minutes.  Can I only recall the last 1.71 minutes of data out of the chart?
    Someone shine the light in the darkness for me eh?
    Cheers,
    Greg Cole
    “It is not the ship so much as the skillful sailing that ensures the prosperous voyage.”

    Hola,
    You are correct, I am using waveform data.  I'm attaching a screenshot.  Apologies for the undocumented VI's.  One sets up the daq task, the 2nd adds a channel to the front which is the sum of three other channels, and the last extracts the channels the user has selected to plot.  I have about 2 1/2 hrs up on the chart right now. (started a log after my first post)
    um... crap.  I must make a correction.  My history length is actually 180000 (I forgot I had been experimenting on it yesterday).  Man, I'm glad it's Friday.  However, I still do not understand the math.
    180000 / (5 waveforms @ 10 Hz) = 180000/50 pts. = 3600 second chart length, = 1 hr.   Yet I'm at 2.5 hrs.
    Apologies for the bad data on the first post.
    Cheers,
    Greg Cole
    “It is not the ship so much as the skillful sailing that ensures the prosperous voyage.”
    Attachments:
    daqloop.jpg ‏53 KB

  • How do I mark a "not measurable" event on a chart history?

    I have an application which is working very well and takes measurements - continuously plotting a result on a chart. The chart history is typically a 100 or so measurements. I plot on the chart both an upper and lower tolerance limit, hence the measurment plot should hopefully stay between the two (straight lines) limits.
    Occasionally a sample is "missing" and when this happens a "measurement" of zero is given. This is currently displayed on the chart as a sudden drop to zero. The users like this as it shows them clearly that the sample was missing. All OK so far, however...
    On rare occasions a sample is present and is measured but for reasons I will not go into we know (and the software can determine) that the measurement result is actually invalid. This situation I call "not measurable" in that although a sample is present it actually cannot be properly measured. The question is this; how do I show this on my chart history?The chart history plot is by far the most looked at display of data for the users. I realise that I could show a message box saying "not measurable" (and intend to do so) but this would only last for that measurement cycle. How do I "mark" the chart to show that there was a sample but that it was not measurable.
    I don't particularly want to use a zero value because that is being used quite nicely for the "no sample" situation. Also I don't want to simply not plot anything because the fact that the sample was "not measurable" is potentially very important indeed. Ideally what I would like is to put a marker, say a thick vertical line at the position where the invalid measurment is, in order to both block it out to show that it is wrong and also show there actually was a sample there in the first place.
    Any ideas as to how I can do this? Sorry this is a bit wordy!
    Regards
    Kevin

    Hi
    I have come up with a quick fix for using a chart which might give you a few ideas. This is just a quick fix and isn’t very nice at all. The green dots are meant to represent the immeasurable data, I have just triggered them by a set of limits. You would be better of using an XY plot and an array which you constantly up date. Using an XY graph will give you a lot more options such as using cursors to mark certain points.
    I have attached my quick fix and an example of using text on an XY graph
    Hope this at least gives you some ideas
    Tim
    AE NI UK and Ireland
    Attachments:
    quick fix.vi ‏17 KB
    Text_by_Points_on_XY_Graph[1].vi ‏32 KB

  • Set up history length programmatically

    Hi,
    I have a waveform chart and I would like if it is possible to change the history length programmatically. Is it possible?
    Thanks,
    ToNi.

    Hi,
    I have a waveform chart with a history length of 28800 points visible and I take a sample with a frequency of 1 second and I plot it. (I acquire data with and acquisition card). Then, I would like the user can choose the number of hours (1 to 24 hours) to visualize in the waveform chart from a configuration window and also he can modify the frequency to take the sample (1 to 60 seconds). Then each time he modify these parameters, the number of houres (1 to 24) and the frequency to take samples (1 to 60 seconds), I set up the history length from them doing the following operation:
    (60 seconds/frequency to take sample) * 60 minutes * number of hours = history length. (number of points taken during the hours you set up)
    where:
    (60 seconds/frequency to take sample)  : is the number of samples took during a minute
    (60 seconds/frequency to take sample) * 60 : is the number of samples took during an hour
    (60 seconds/frequency to take sample) * 60 minutes * number of hours: is the number of samples taken during the number of hours you set up
    So I only have the number of points in the history length necessary and not more.
    Thanks,
    ToNi.

  • Strip Chart history buffer

    Hallo,
    I have a little crazy question - is there some possibility to access strip chart history buffer?
    I'm just lazy to develop data circular buffer management ....
    Thanks a lot for any hint!
    George

    Hi, Evan,
    thanks for reply.
    My idea is use already used memory of the strip chart (not duplicate the amount of allocating memory) - mainly to export recorded traces  - e.g. when user decided: "this is interesting - let's make some analysis of this, maybe at home".
    The Strip Chart hasn't simple solution to use cursors - and by exporting the history buffer (traces) to some file / array is quite easy use standard graph with cursors etc.
    Of course, the cicular buffer is OK.
    George

  • Chart history lenght control

    Dear all,
    I use Labview 8.5 and the device NI USB6210. Following my configuration of my application and to optimize it, I need to change the Chart History lenght by program. Is it possible?
    When the chart is running, I can see that the chart can display more data than the number of data in the history. Can I have more explanation about the working?? Have you any links about it?
    Thank in advance, Daniel. 

    No, I'm afraid you can't.
    There's a property called HISTORY DATA that you could manipulate to fake it, but that is a compile-time option only.
    You can have it display any amount you want less than the history by manipulating the Xmin and Xmax, but that's just a small window on a big room.
    I can see that the chart can display more data than the number of data in the history. 
    I don't think that's true.  If you set the HISTORY LENGTH to 100 and feed it an array of 200 numbers, you see a plot with 100 numbers in it (100-199).  The first part is forgotten.
    Message Edited by CoastalMaineBird on 06-19-2009 07:53 AM
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

  • How do I manually update a graph/chart

    I have a chart on my front panel in which the data is continuously being changed.  Each loop cycle (few seconds each) I clear the chart history (property node), update the chart data, and then change the Chart range to the range that it previously had.  However every time I do this I can see (for less then half a second) the clear chart and then some segment of the new data before it shows the correct data range that I want.  Is there a way to delay graph from updating until I signal it to update so I do not see the intermediary garbage data?
    Thanks in advance,
    David

    Look for the Defer Panel updates property node.  Set it to True before you do the other properties and False After.
    But if you have the need to set the range back to a value it was before, it sounds like you might have the axes set for autoscaling. ??  You may want to turn that off.
    Message Edited by Ravens Fan on 12-18-2008 01:08 PM
    Attachments:
    Defer.PNG ‏22 KB

  • Setting Chart History

    Is there a way where I can set the chart history to a user defined value while my program is running? Example, when the program starts running, the graph history is set to 200, so the max range for the x-axis is 200, once it gets to 200 the window will start shifting. I want the user to have control over this property. If the user wants the chart history to be 500, then I want to be able to set that property of the graph to 500 through my program. How would I be able to do this?

    I'm not sure what you're looking for. The graph has a ChartLength property that will allow you to specify how many points the graph stores while charting. If you would like to make this customizable in your application, you could provide a way to do this in the interface of your application. For example, you could create a dialog that has a text box or a numeric edit, then bring this dialog up from a menu and set the ChartLength property according to what they enter in the dialog. Is there something else that you were looking for from the graph for this?
    - Elton

  • Can not edit data labels in old graph chart objects using Word 2010

    In Word 2010, Insert object "Microsoft Graph Chart", go to Chart Options and check an item in Data labels, such as "Series Name", "Category Name" or "Value". Click OK, then double-click on a data label to edit its
    settings, or right-click on a data label and select "Format Data Labels..."
    This makes Word to crash. The only way I can get out of it is by using the Task Manager to kill Word.
    This happens in Windows 7 and Windows 8. This does NOT not happen in Word 2007 nor Word 2013, so it seems specific to Word 2010. All our clients have the same problem, this does not seem related to a specific workstation configuration.
    The Microsoft Graph Chart are the old charts used within .doc files. I have an application still generating those types of files and need to edit data label settings manually before processing the files with my application.
    Also note that anytime you edit a .doc file in Word 2010 and you see "Compatibility Mode" in the title bar, the Insert / Chart option from the ribbon inserts an old type chart (same as if you use Insert / Object / Microsoft Graph Chart), not the
    new Word 2010 charts. You then have the same problem editing the data labels.
    The underlying Activex seems to be the Chart.Exe file, the one I have installed is 14.0.7012.1000. You can see the version by double-clicking the chart and then look in the Help / About menu.
    Any help will be greatly appreciated.

    As this is a configuration issue and not a programming issue I' moving your question to a more appropriate forum where you're more likely to find assistance.
    Cindy Meister, VSTO/Word MVP,
    my blog

  • How to extract data from Chart History?

    Dear all, I have read a lot of posts, but still don't understand how to extract data from Chart history.
    Suppose you acquired 1024 points of data every time, then use "build array" to build an array, then send to intensity chart to show, then save the history into a .txt file,  but how to extact data from the file?
    How Labview store the data in the 2D history buffer?
    Anybody has any examples?

    The simplest would be to save the 2D array as a spreadsheet file, the read it back the same way.
    Maybe the attached simple example can give you some ideas (LabVIEW 7.1). Just run it. At any time, press "write to file". At any later time, you can read the save data into the second history chart.
    If you are worried about performance, it might be better to use binary files, but it will be a little more complicated. See how far you get.
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    IntensityChartHistorySave.vi ‏79 KB

Maybe you are looking for

  • Preço liquido no Pedido de compra e bruto no smartform do mesmo PO

    Bom dia, Em uma empresa que adotou o preço liquido para criação dos seus pedidos de compra, mas gostaria de imprimir no formulario smartform o preco bruto (evitando desta forma a incorreta interpretação de valores negociados com seus fornecedores) qu

  • Workbook error 310 - save not possible

    Hi, when I want to save a workbook I receive error message 310 - saving not possible. Nothing in my authorizations where changed. In sdn I found also no hint. Any idea?

  • SP 2013 Running Workflow giving Error - Sorry Something went wrong

    Hi, We have publish workflow running on a document and we need to cancel/ terminate it. On the workflow Page we can see under the "Running Workflows" , the workflow is running. But when we click on that it gives the Something went wrong error message

  • Explanation of First Payment Term

    HI All, I want to get the Explanation of First Payment Term from the Payment term definition, Under the SPRO, I found the Technical Information showing table name R052, however, I cannot find it under SE16... Does anyone know the table name, pls help

  • How to destroy/expire a session?

    hello.. question, how can i expire/destroy a session when a user logs out? so that when the user clicks back he/she will be asked to relog? can you give some helpful links/codes.. thanks in advance :)