Multiplot xy graph

I have a question about multiplotting a XY graph.
I deleted some of my vi to have more view in it. The XY graph I want to generate are P1 and P2 as X and Y and each plot is a flow. I can't get it right.
To work quickly I put 2 Slides in to represent those 2 pressures P1 and P2. Could someone please help me out.
Solved!
Go to Solution.
Attachments:
Flow.vi ‏363 KB

Hello Michel,
Sorry for my misunderstanding, I get the point now.
To have multi-plot in a XY Graph, you can feed the XY Graph with an array of clusters of plots, where each plot is an array of points and each point is a cluster that contains an X value and a Y value.
In your case, in your second For Loop (the internal one), you can bundle P1 and P2 values and concatenate this cluster in an array containing the previous points of the current plot (by using shift register). Then, in your first For Loop (the external one), you can bundle the array of the current plot in a cluster and concatenate that cluster in an array containing the previous plots (also with the help of a shift register). In that way, you will get at the output of that For Loop the array to feed the XY Graph.
If you want to refresh the graph with each new point, you then have to place your XY Graph inside the second For Loop (which is already the case in your VI) and feed it with a temporary array containing the previous plots plus a cluster of the array of the points already acquired in the current plot.
Is that clearer for you now?
Cédric | NI Belgium

Similar Messages

  • Multiplot XY graph : error when wiring 24 to active plot property node

    I'm using LabVIEW 2009
    When I wire 24 or higher to the active plot property node of a multiplot XY graph , I receive error message :
    error 1077
    Property Node (arg 1) in Untitled 1
    <APPEND>
    Property Name: <b>Active Plot</b>
    Anyone a suggestion ?
    Solved!
    Go to Solution.
    Attachments:
    Error1077.png ‏20 KB

    Hi,
    how many plots do you have currently plotted? ActPlot can only be as big as the current number of plots...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Large Multiplot XY Graph very slow to update visibility/color/line width changes

    Hello everyone, 
    I have an interesting problem for you all. I am trying to update characteristics of a large XY graph (3600 data points for each of 160 different plot lines, all on one graph) by reference and it's going incredibly slowly.
    What I have set up is a system where mousing over certain other indicators and buttons will "highlight" certain groups of plots by making the plot lines a thickness of 2 instead of 1. Similarly, clicking other buttons will change plot colors or toggle visibility of certain plots. To implement this I have a subvi that takes a reference to the xy graph and, in a for loop for each active plot, applies the changes I wish to see made. The problem is that this takes over a minute to complete for just one update!! I'm supposed to be plotting new points every second, and mouseovers and button clicks can happen many times in a second, so this is obviously unacceptable.
    I noticed that as I'm looping through all 160 plots in the subvi, the XY graph is updating, one plot at a time. My question is: Is there some way to keep the graph from updating until all the changes have been made? Or maybe some way of applying all the changes at one time, instead of using a for loop?
    I have discovered that if I simply drag out a HUGE xy graph property node and do everything all at once instead of in a for loop, the changes appear instantly as desired. Is this really what I have to do to achieve the results I want? It is incredibly time consuming and unmaintainable to have a gigantic property node will all stages of the for loop being applied at once.
    Help is greatly appreciated!
    -Aaron
    Solved!
    Go to Solution.

    Darin.K wrote:
    Two things you can consider:
    1) Defer Panel Updates.  Set to True before the Loop and False afterwards.  Speeds things like this up considerably.
    2) No way you can see 3600 points on a graph.  With this many plots I would consider decimation of the data to reduce the number of displayed points.
    This works amazingly well! In my absolute worst case scenario it takes about 70ms to update all 160 plots for 60 minutes worth of data (3600 points) where as before it took over 240000ms. 70ms is obviously a huge improvement and I thank you very much, this is exactly what I was looking for.
    Just as a side note, unfortunately I do have to display up to 3600 points, the end users want to see up to an hours worth of previous data (more even, if possible). Unless you are suggesting I should somehow cut out data, like 4 out of every 5 data points for instance? Part of the problem with cutting out points like that is that there are occasionally spikes in the data that consist of a single point. Cutting out data might remove these which would be a problem. The end users need to be able to spot these spikes when they occur. But perhaps a more complicated decimation that identifies outliers and plots them no matter what to ensure that the spikes remain and only decimate the remaining data? That could get tricky quickly, but doable I suppose. 
    Thanks for all the help guys, if anyone has any other methods they think might work as well, I would be interested in trying them too to compare, but Darin's solution will work great.
    -Aaron

  • Multiplot waveform graph plots are different colors when set to be the same with a property node.

    The graphs were working yesterday. I made a few changes to another part of the block diagram and now the graphs do not plot all of the plots the same color. I am using a for loop with a property node with the elements active plot connected to the iteration terminal, and plot color to a color box. My for loop increments programmaticaly from another part of the code to create plots as it runs. I have replaced the graphs with new ones and they will work sometimes.
    I am using Win2k and LV 7.1
    Thanks,
    Brett

    Hi bh3560,
    Have you tried chaging the color by right clicking on the line in the plot legend.  There is an option to change the color of the plot.
    Brian K.

  • Displaying multiplot XY graphs point by point

    Attached is a vi showing two methods for displaying plots point by point, the second method is usually but not suitable for my application because it needs one shift register per plot.
    I'd use the simplest method (the first) to display a graph with only one  shift register but the XY graph does not accept more than 2 plots!
    Attachments:
    Tableau 3 courbes XY.vi ‏26 KB

    This may just point out my relative newness to LabVIEW, but what is the problem with having a separate shift register for each plot on the graph?
    Cameron
    To err is human, but to really foul it up requires a computer.
    The optimist believes we are in the best of all possible worlds - the pessimist fears this is true.
    Profanity is the one language all programmers know best.
    An expert is someone who has made all the possible mistakes.
    To learn something about LabVIEW at no extra cost, work the online LabVIEW tutorial(s):
    LabVIEW Unit 1 - Getting Started
    Learn to Use LabVIEW with MyDAQ

  • Coloured portion in XY graph

    Dear All,
    I am trying to build a vi which starts to find the average of data points. The starting point is specified with the no of points taken for the averaging.
    I like to have a coloured region - a line to be shown in the XY graph where the starting point is given till where the region ends (end of the data or final data point).i.e In the vi included i have given the starting point as 200 and the averaging extends for 50 data points, so the region from 200 till 250 should be marked.
    Thank you,
    Bala
    (If possible please give me answers with version 7.1)
    Attachments:
    Niforum.vi ‏66 KB
    niforumdata.txt ‏58 KB

    Hello,
    You can make a Multiplot XY-Graph, where the second Plot is the Data you want coloured.
    Regard
    Marco

  • Graph values rounded

    I have a multiplot xy graph with as an input a range of x values and y values from 5.8 to 6 that are doubles.
    However, once the graph is displayed all the y values are rounded off to 6.
    I guess it must be a matter of setting somewhere that the values in the graph are not integers, but i can't seem the find it.
    I've already changed in graph settings->format and precision->digits of precision to 8 but still i get rounded off to 6?
    Where is the magical setting for this?
    Solved!
    Go to Solution.
    Attachments:
    round off.PNG ‏3 KB

    The graph autoadjusts to the datatype wired directly to it. If you wire to a local variable, you don't get that feature for good reasons.
    Most likely you had an integer wired to the graph terminal at one point in the past and LabVIEW remembered that.
    The first choices should always be to wire directly to the terminal. Don't think of local variables as "variables" in text based code, they are not and should not be used as such. Local variables break dataflow, can cause race conditions, complicate debugging, and force extra data copies in memory (can be very expensive for xy graphs!), so there is a big difference. Local variables should only be used if there is a very good reason.
    (See also this link and many other similar discussions)
    LabVIEW Champion . Do more with less code and in less time .

  • How do you obtain graph informatio​n from a subvi?

    Hello all,
    I have a working VI that varies a voltage source with certain start end and intervals. and every step it increases the voltage, it takes a look at a spectrum which is graphed in a multiplot-XY graph. the vi on its own works perfectly fine. Now the problem is: when i tried to implement this vi as a subvi to a larger VI, the graph does not get updated during the steps, but only gets updated once when the subvi finishes and displays the final graph. I have connected the XY-Graph of my subvi to an output terminal and connected that to  a local variable of my bigger proram's Xy-graph.
    I'd assume the problem is that the graph information only gets passed out of the subvi to the main vi once at the end of the subvi operation. (i have a for loop in my subvi to increase the voltage by steps, and then the same loop i take a spectrum and graph it, and i think that is the problem since i'd assume no information from this for loop will be passed out to the main  vi until the loop finishes, no?
    attached is a look at my subvi.
    thank you very much for all your help!!!!
    Attachments:
    t-series.JPG ‏165 KB

    Hello GerdW
    =P sorry about the messiness~~
    and to your answer:
    i don't quite understand what exactly you meant by your answer. "wire a reference of the indicator to the subvi" the indicator as in the xy graph? and what exactly is a reference? those static vi reference thing? (sorry, i'm veeeeeeery new at this labview as you may tell from the messiness)
    "use a proerty node to set new values in the xy-graph": isn't that what i used in my block diagram? I used a XY-graph value property node to update the xy-graph within my subvi.
    so it won't work by simply making my XY-graph an output terminal and connect that terminal to the main VI's xy-graph?
    if it's not too much trouble, please be bit more specific ><
     i uploaded the subvi even though it's missing few sub-subvis? (the main vi is 1mb big and requires like 270 different subvis so it's impossible to upload that one -_-)
    thanks again for your help GerdW!
    Attachments:
    t-series.vi ‏62 KB

  • How do you write to a 3D array?

    I know this is probably a very simple questions, but for some reason I can not think of how to write to a 3D array. The application that I am going to use this for is that I have multiple graphs with x and y data points, and I want to be able to write all the graphs with their data points to a 3D array instead of having a large amount of 2D arrays. My main goal is to be able to use this 3D array with a graph so that I can click through all the graphs after I have done my measurements. I appreciate anyone that can give me help on this matter.

    3D array handling is not much different from 2D, you just have another coordinate to specify - "page" (row, column, page). Create a 3D array constant and wire it to e.g. the replace function and it will automatically scale up to show you the index and length options involved...
    PS. If you have XY arrays why not just have a 1D array of XY sets (as one would use for multiplot XY graphs)?You could even write the whole array to a graph (save you the extraction operations) and then choose to see whatever combination you would like by setting the color of the plots you want to hide to transparent.
    MTO

  • Read several lvm files into VI

    Hello all,
    I have a question about how to load several files into a VI. I have done a long measerement with a high samplerate so LabVIEW has made approximatelly 900 lvm files. I want to do two things. The first thing that I want to do, is to see chart/graph of the data with a scroll bar so I can look trough the data. The second thing that I want to do is write the same data (approximatelly 900 files) to lets say 20 files. So the samplerate is from 100 Hz to 0.2 Hz. Is that possible?
    In the attachment I have put the VI that I currently have + one of the 900 files that I want to load.
    Thanks in advance.
    Attachments:
    VI + LVM file.zip ‏556 KB

    Hello Mark,
    I'm a bit confused about the situation:
    - Although you're talking about 900 files I only see 1 file in your attachment (as you also mentioned in the post).
    Do they all have the same format/sample rate (and amount of samples) in each column?
    If not, then please provide the necessary examples, because I don't see your variation of 0.2 Hz to 100 Hz sample rate based on this file.
    That left aside, merging files should always be possible (up to a certain point)
    - Can you also provide the code you used to generate the lvm-files?
    This will give some background information.
    Especially beccause I don't see any metadata available in your lvm-files.
    - Graph/Chart choice:
    If you only want to see all data at once, then a graph would be the solution seeing that you are not interested in the data sets while they're loading and only in the full set of data. Please do also keep in mind the size of the data set you're loading.
    If you want to plot all colums in the same graphg with different sample rates per channel/column, then a good idea would be a multiplot XY Graph.
    However, here you will also have to keep the data set size in mind.
    Kind Regards,
    Thierry C - Applications Engineering Specialist Northern European Region - National Instruments
    CLD, CTA
    If someone helped you, let them know. Mark as solved and/or give a kudo.

  • From LabVIEW, how do I programmatically determine 'open thermocouple' status on a TC-120?

    Apart from getting a large value (e.g., 1770 degC) on the channel when doing a FP Read, and getting a 33443 warning:
    'Bad channel status reported by several channels. At least one channel is in one of the following states: Unconfigured, Bad Status "A", Bad Status "B" : FP Read.vi'
    I can't find any utility VI which would give me a definitive 'open TC' status. Since MAX can report this, I figured there had to be a corresponding way in LabVIEW.
    Thanks in advance for responses!
    Dave
    David Boyd
    Sr. Test Engineer
    Philips Respironics
    Certified LabVIEW Developer

    Thanks, Aaron. I admit I hadn't tried a single-channel read to see if the error got more specific.
    I guess I shouldn't be so nit-picky, but it might've been nice if there were a multi-channel 'read status' FP VI. Having to read individual channels (with all those associated FP tags cluttering the BD) just to get status seems a bit inelegant, and defeats the efficiency gains of doing a module-wide read.
    Alternatively, this looks like one of those places where returning 'NaN', or '+Inf', '-Inf', on a floating point FPRead, would be appropriate.
    I suppose I can do an array test for '>=1770', then manipulate the data to convert open channel readings to NaN. (I like NaN since multiplot charts/graphs handle it as a pen lift, and omit it from aut
    oscaling.)
    Thanks again!
    Dave
    David Boyd
    Sr. Test Engineer
    Philips Respironics
    Certified LabVIEW Developer

  • LV FPGA XYmultiplo​t error

    Hi guys,
    First of all, this is a bug report, and not a question. But I wasn't sure where to put this on the website or forum so I put it here. If this does not belong on the forum, please feel free to remove this post and send me a message where I can put this in the future.
    This is the error I get when using a multiplot XY-graph:
    An internal software error has occurred. Please contact National Instruments technical support at ni.com/support with the following information:
    Error 1055 occurred at Property Node in nirviObjectToResholderInfo.vi->nirviMakeLineInfoSu​bTagsForDiagramObjectRef.vi->nirviMakeTreeLineInfo​TagForDiagramObjectRef.vi->nirviDiagramObjectError​.vi->nirviSplitRegisterListBySize.vi->nirviPrintOn​eClkFramework_bushold.vi->nirviGetImplementation__​_busholdModGen.vi->nirviGetImplementation___bushol​dModGen.vi.ProxyCaller
    Possible reason(s):
    LabVIEW:  Object reference is invalid.
    and the code you'll find in the attachment. The issue is solved when I use 2 separate waveform charts for the two signals instead of 1. 
    Best regards,
    Dries
    Attachments:
    lv code xy-multiplot.png ‏17 KB

    Hello Dries,
    Thank you for taking the effort and bringing this to our attention.
    The error you were seeing is not a bug. It's the build array function in the screenshot which is trying to create one big array which most likely does not fit the FPGA.
    Depending on the size of the FPGA on your device, the maximum array size will be limited accordingly.
    If the workaround which you found yourself doesn't suffice, decreasing the total size of the array will also most likely make the error go away.
    Please let me know if any questions remain.
    Kind Regards,
    Wouter
    National Instruments, Northern Europe

  • How to set the ChartLength in a multiplot graph

    I have a multiplot chart and I need to set the total number of visible points in the graph. The CNiGraph::ChartLength() sets the total number of points for each plot, not for the whole graph. How can I do that ?

    There is no way to do this automatically with CNiGraph. You should be able to do it manually, but it will require some work. The best way I can think to do this would be to create an array of CNiReal64Matrix instances. Each instance in the array corresponds to one of the plots that you have now. When a new data point is available, add it to the appropriate CNiReal64Matrix instance (instead of calling ChartXY). Then, call CNiPlot:lotXY and pass it the CNiReal64Matrix instance that contains the data. You could keep a running count of the total number of points that are in all of the CNiReal64Matrix instances in the array. When you reach the total number of annotations that you have, you will have to shift the data in one of the matrices. Unfortunately, there is not an easy way to do this with CNiMatrix alone. When it is time to shift the data, the easiest way I see to do it would be to call CNiMatrixT<>::CopyRow to extract CNiReal64Vector instances for each row in the matrix, call CNiVectorT<>:ubSet to shift the data, and call CNiMatrixT<>::AssignRow to put the data back into the matrix, and then plot.
    Will this approach work for you?

  • Placing a cursor in multiplot graph to display all values at the cusor location

    We are currently using NI based DAq system which uses LABVIEW 7.1.We would like to know whether it is possible in LABVIEW 7.1 to place a cursor in a graph having multiplot that will disply all the values of parameters at the cursor location?

    If I understand the question correctly, yes, LabVIEW can display many parameters of a cursor, including the cursor position (in X and Y coordinates), the array index of the point to which the cursor is locked, the line and point style and thickness, etc. You can also read or set how a cursor locks and whether a cursor is visible or not as well as other properties of cursors. All of this is done using property nodes in LabVIEW and can be done with multiple plots and multiple cursors.
    TylerS
    Applications Engineer
    National Instruments

  • Multiplot graph with missing values fills them with zero instead of NaN

    I have a waveform graph with multiple arrays (2D) which has different numbers of points in each array.  LabVIEW finds the array with the most points and then plots all arrays with that many points.  It assigns the missing points a value of zero and displays those zero values.  This means arrays with fewer points than the maximum will have values of zero appear in their plots.  This can be avoided by filling in missing points with NaN.  I am acquiring data in a loop and displaying it which requires continuous determination of the number of actual points and filling in of missing points with NaN.  Not difficult, but this could be avoided if LabVIEW would fill missing points with NaN instead of with zero.  Any way to have this happen automatically ?
    Steve
    Attachments:
    Graph MultiPlot Missing Data.vi ‏18 KB

    You can also consider using an XY graph so you don't have to do additional data manipulation. See attached for comparison.
    Attachments:
    Graph MultiPlot Missing Data mod.vi ‏22 KB

Maybe you are looking for