Array of xy-graph references

Hi all,
I looked in the forum for a problem that I thought was simple, but I couldn't find anything helpful.
I'm passing an array of references to XY graphs, from one VI to another. The sub-VI extracts the references when needed and wires them to property nodes. These change the active plot on the XY graph and its visibilty.
I also tried to pass a cluster of references and convert it to an array inside the sub-VI, but it didn't help.
I noticed that all the reference wires have a coercion dot on the build array. That may be the key of the problem, even if I can't see how.
The error I get is:
Error 1055 occurred at Property Node in make_trg_vis2.vi->main10.vi
Possible reason(s):
LabVIEW:  Object reference is invalid.
The attached files explains the issue. Top.vi calls the sub-VI.
I hope all this is clear enough. The thing works fine if, instead of using a sub-VI, I use property nodes in top.vi.
Solved!
Go to Solution.
Attachments:
top.vi ‏53 KB
make_trg_vis2.vi ‏65 KB

In your subVI,  you have your index array wired to the N terminal of the for loop.  Perhaps it should be the i terminal?
N=8.  (Always, every iteration of the For Loop).  You multiply it by 3, then add 1, then another 1.  So you have indices 24, 25, 26.  But the array coming in has 24 elements which are at indices 0 to 23.  Thus you are immediately acting on an empty graph reference at index 24.
You also appear to have a lot of duplicated cases in your case structures.  For example, cases 3 6 and 7  look identical.  Rather than using 3 different cases.  You can have one case that is 3, 6, 7.

Similar Messages

  • Plotting functions in 2D array on a Graph

    Hey all,
    As an exercise I am trying to plot 2 functions placed in a 2D array on a graph, but for some reason the graph is only showing one of them.
    The functions are : y = 5x+10 and y = 6x - 10.
    I really don't see what I am doing wrong here, could anyone give me some more insight?
    Thanks in advance,
    Michiel
    Solved!
    Go to Solution.
    Attachments:
    Oefening20Plot2Graph.vi ‏12 KB

    Based on your code, I think what you really want to use is a Chart, not a Graph.  A chart keeps a history, so it just keeps adding on to the data.  A graph will get overwritten each time you write to the terminal.  So you were only graphing a single point for each plot.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Would like to use an array of XY Graphs

    I want to display subsets of data on multiple xy graphs, and would like to do this in a For loop. Is there a way to use an array of XY graphs or access them programmatically from the For Loop. I am plotting data and using XY graph properties for cursors, graph colors, visible for each graph.

    Hi All,
    Ben would like to make another suggestions that he does not have time to try out ( to many project, to little time).
    How about using a single XY graph that is "off-screen". Write the data to the graph, adjust its properties as required, then get the "image".
    Do the above for each set of data then combine them in a single Picture control.
    If you track the region where each plot is displayed, you can watch for clicks on the picture, figure out which plot the user clicked on, then move the data for that plot into that single "off-screen" graph before programatically moving that plot such that it over-lays the part of the picture where its image was presented.
    Once this app is whipped up (provided all of this works) you could have as many graphs as you
    want and have the grpahics/cpu horsepower to drive. The user could do everything with this plot as usual.
    Sharing my thoughts,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How to set the value of an array element (not the complete array) by using a reference?

    My situation is that I have an array of clusters on the front panel. Each element is used for a particular test setup, so if the array size is three, it means we have three identical test setups that can be used. The cluster contains two string controls and a button: 'device ID' string, 'start' button and 'status' string.
    In order to keep the diagrams simple, I would like to use a reference to the array as input into a subvi. This subvi will then modify a particular element in the array (i.e. set the 'status' string).
    The first problem I encounter is that I can not select an array element to write to by using the reference. I have tried setting the 'Selection s
    tart[]' and 'Selection size[]' properties and then querying the 'Array element' to get the proper element.
    If I do this, the VI always seems to write to the element which the user has selected (i.e. the element that contains the cursor) instead of the one I am trying to select. I also have not found any other possible use for the 'Selection' properties, so I wonder if I am doing something wrong.
    Of course I can use the 'value' property to get all elements, and then use the replace array element with an index value, but this defeats the purpose of leaving all other elements untouched.
    I had hoped to use this method specifically to avoid overwriting other array elements (such as happens with the replace array element) because the user might be modifying the second array element while I want to modify the first.
    My current solution is to split the array into two arrays: one control and one indicator (I guess that's really how it should be done ;-) but I'd still like to know ho
    w to change a single element in an array without affecting the others by using a reference in case I can use it elsewhere.

    > My situation is that I have an array of clusters on the front panel.
    > Each element is used for a particular test setup, so if the array size
    > is three, it means we have three identical test setups that can be
    > used. The cluster contains two string controls and a button: 'device
    > ID' string, 'start' button and 'status' string.
    >
    > In order to keep the diagrams simple, I would like to use a reference
    > to the array as input into a subvi. This subvi will then modify a
    > particular element in the array (i.e. set the 'status' string).
    >
    It isn't possible to get a reference to a particular element within an
    array. There is only one reference to the one control that represents
    all elements in the array.
    While it may seem better to use references to update
    an element within
    an array, it shouldn't really be necessary, and it can also lead to
    race conditions. If you write to an element that has the
    possibility of the user changing, whether you write with a local, a
    reference, or any other means, there is a race condition between the
    diagram and the user. LV will help with this to a certain extent,
    especially for controls that take awhile to edit like ones that use
    the keyboard. In these cases, if the user has already started entering
    text, it will not be overwritten by the new value unless the key focus
    is taken away from the control first. It is similar when moving a slider
    or other value changes using the mouse. LV will write to the other values,
    but will not rip the slider out of the user's hand.
    To completely avoid race conditions, you can split the array into user
    fields and indicators that are located underneath them. Or, if some
    controls act as both, you can do like Excel. You don't directly type
    into the cell. You choose w
    hich cell to edit, but you modify another
    location. When the edit is completed, it is incorporated into the
    display so that it is never lost.
    Greg McKaskle

  • Excel & ActiveX: Insert arbitrary columns from 2D array and create graph problems

    Hi there,
    I want to insert data from either a 1D or 2D array from LabView into Excel and create graphs.
    I used the information from the following example:
    http://www.ni.com/example/28934/en/
    and was able to create a new Excel file (I'm using Excel 2010), writing data from an 1D array to a column in excel by creating a while loop and using the first element of the array to write it to a specific cell. I use the counter of the loop to write to the next cell when the loop starts over and always delete the first value, which I write to the cell, from the array until it is empty.
    Now I also would like to write a 2D array - so the first column in Excel should be the first column from the array and so. Here I cannot use the loop counter directly as Excel only counts 1,2,... for the rows, but uses A,B,... to count columns. Also I do not know in advance how many columns my 2D array will contain, so creating a lookup table like (A means 1, B means 2,...) is not really an option (except there really is no other way). Is there a possibilty to convert numbers into letters or some way to 'explain' to the program that column 2 in the array means column B in Excel for example, or is there a way to insert new columns?
    I figured out how to add new Worksheets and as I also need to create a certain number of Worksheets and I know that on standard 3 sheets are present when creating the file, I use the 'add' methode to create every new worksheets before worksheet 3 - I could use the same methode to create new columns in Excel, but so far I didn't find a methode to do so. Or is there a way to enter the whole 2D array at once?
    Then I'd like to create a graph (in case of the 1D arrays a bar plot, when using 2D arrays a 3D plot) to view the data. I found this example:
    http://www.ni.com/newsletter/51339/en/
    -> as I do not have the toolkit I'd like to do it using ActiveX directly, so I tried to do things like shown under the headline 'DIY ActiveX/.NET'
    I tried to load the snippet to a new Excel file but got the error message 'microsoft.office.interop.excel.dll not found' and hence the code is not working. That confuses me a little as I would guess when this dll is not present I cannot access Excel from LabView at all, though my understanding of what I'm really doing so far is quiet limited. ;-)
    Also - as far as I understand from the snippet - when creating a new chart object I should be able the create methodes for it, however when I do a right click on the chart object of an ActiveX Worksheet symbol there are none listed.
    To explain my problems better I added a snippet showing my two problems: The inner of the two while loops shows how I import a 1D array. In the outer loop I seperate the columns. I know that currently this is not working as all data end up in column A of the Excel sheet - so I would need to convert the number of the outer counter to A, B,... or find a different solution.
    Moreover on the snippet I placed an ActiveX Worksheet Property with the Chart Object - as I can see the difference to the Chart Object in the example code from the last link above is the color. However I'm not sure what that means and how to change/ solve this.
    And just to make sure - I know this way the VI does not run as the Chart Object is placed completely wrong - I just did it, so it is included in the snippet.
    I'd be thankful for any suggestions,
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    ExcelAreaScan.png ‏60 KB

    Hello everyone and thanks for the answers.
    I only have the LabView Student Edition available here - is the toolkit included in it too. How can I check if it is installed/ available and in case it is installed - where can I find it?
    Today I had time to take a look at the example
    Create via ActiveX Labview a XY Scatter plot graph on an excel sheet
    It almost does what I want in terms of creating a graph. The only problem I could not fix, is that in this example a sheet is created where only the graph is present. i'd like to add the graph to a previously created worksheet. Today I tried get this working but it seems I stilll don't really understand what I'm doing, I'll post a snippet of my code as soon as I can access the PC with LabView on it again.
    I also took a look at the other example for inserting 2D attays - it seems to be what I need, I just had no time so far to test it, I'll post an update when I could test it.
    Thanks for the help so far!

  • Unknown array size to graph in LV9

    The attached program is used to measure a device at work, which currently has 3 strips, for an indeterminate length of time. It works fine (though im sure it isnt written to best NI practice!).
    My problem is in trying to change the software to test devices that dont have 3 strips. For example, we have one device that has 128 strips. The majority of the program doesnt need any changes, only changes are essentially to get the graph to plot.
    Ive written on the code where I need some help. The graph is needed to plot the currents over time and also to plot the temperature over time (on the same graph). This is for a quick visual that all is well.
    Or can anyone can point me in the direction of a relevant example?
    Merry Christmas.
    Solved!
    Go to Solution.
    Attachments:
    lifetest with switchbox using array.vi ‏72 KB

    Take a look at the attached vi, does this help you?
    Attachments:
    Variable plots.vi ‏14 KB

  • How to bring data from arrays into xy-graph?

    Hello,
    i have some data which is currently stored in two arrays. One array with values and another array with timestamps.
    Now my questions is how can i bring/convert these into the format of XY-graph?
    Thanks for help.

    Hi One,
    - Why do you use a InsertIntoArray when you want to append new plots to an array of plots? Use BuildArray!
    - Why do you initialize your shift register to already contain (atleast) one plot?
    - Why do you use a shift register at all? Why not rely on the autoindexing output tunnel? 3 iterations will yield 3 plots easily…
    - Why don't you clean up your VI before uploading?
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • TestStand Array to VI by reference

    I have a very large array in TestStand (seq.local) and I need to pass it into many steps (each step is a VI). Using the standard GetValVariant on the LabVIEW palette it takes 11 seconds. How can I speed this up, how can I just reference the existing data in memory without making a copy?
    Any help much appreciated.
    Certified LabVIEW Architect

    Before I give you some suggestions on how to workaround this I would like to say that it might help out to tell us what version of TestStand and LabVIEW you are using, so that we can try and reproduce the problem precisely. Other than that question, how big is this array that you are trying to access? Are you sure that you are not out of physical memory and you are starting to use your swap file?
    I have created a test sequence and vi that do a simple GetValVariant of a 100,000 index numeric array and on my system it takes ~.38 seconds to execute. The sequence and vi are attached to this post (note that the sequence file was made in TestStand 1.0.3 and the .vi in LV 6.1).
    Basically, all of the TestStand API vis for accessing property values will create a copy of the array in your LabVIEW vis. Have you tried setting the unload option for each of your LabVIEW steps to unload the vis after each step executes to conserve on memory consumption?
    To get around the time it takes to load this array into your LabVIEW steps you may want to use a LabVIEW global variable instead of trying to get the value from TestStand for each and every step. This way you only have one copy of the array loaded into LabVIEW's memory space, and if you don't really need this array in TestStand you may want to consider using a Global variable instead of the TestStand variable altogether. To consider whether you need it in TestStand or not, you should make note of whether you will need to pass it to any other "type" of code module (i.e. dll) or if you are going to include in a report or database. If you are not going to do any of these things, just use a LabVIEW global instead of the TestStand array. (NOTE: the use of global variables is generally not recommended because it will not scale to cases where you perform multi-UUT tests, and it should really only be considered as a last ditch effort.)
    To get the type of access speed you would get by dereferencing single memory addresses at will, you would need to use a programming language that supports this, but as you can see there are plenty of ways to get around this problem when programming in LabVIEW. Try out the example I attached to this post to see if you get the same behavior (manipulate the array size if you need to). This should be a good starting point to see if there is something wrong with your system's memory availability or how you are working with the array in your own vi (meaning, that if this example does not take that long, then you may be doing something else causing the long delay like analysis or unnecessary manipulation.) If anything you could also try narrowing down the problem only to the array access in an example vi and sequence and submit it to the forum for us to try out on our systems, but please remember to remove any irrelevant code from the example.
    I hope this information helps.
    Jason F.
    Applications Engineer
    National Instruments
    www.ni.com/ask
    Attachments:
    test.zip ‏16 KB

  • Arrays are passed by reference or value ?

    Hi peoples,
    I have something interesting here which I need to know. Look into the following classes :
         public class example1 {
         int i[] = {0};
         public static void main(String args[]) {
         int i[] = {1};
         change_i(i);
         System.out.println(i[0]);
         public static void change_i(int i[]) {
         i[0] = 2;
         i[0] *= 2;
         public class example2 {
         int i[] = {0};
         public static void main(String args[]) {
         int i[] = {1};
         change_i(i);
         System.out.println(i[0]);
         public static void change_i(int i[]) {
         int j[] = {2};
         i = j;
    Among the above classes, the class named 'example1' returns the value 4 whereas, the class named 'example2' returns the value 1.
    Any explanations to this one please....
    Cheers,
    Rasmeet

    minglu, you are not doing right.
    i just don't get it why you have i[] as instance variable but never use it ( i[] is declared in every method so each i you refer to in the method is a local varable not member variable that can be shared for the object ).
    your first solution work. but that i = j line is not needed because it has no effect you still cannot change the referrence of i to other int[]. your first soultion just need to be
    public static int[] change_i(int i[]) {
    int j[] = {2};
    return j;
    }anyway, using this solution, the method name will be misleading because the method didnot change i in anyway. i is changed because you assign the return array (j) to i.
    for that second solution also, you didn't use your member variable i at all. what you change is the content of i you pass so the result is correct. but then how is this method different from the first method the original poster posted?
    moreover, java never pass argument to the method by reference it ALWAYS pass by copy.i suppose you define passing by reference in the same way C++ does. all object variable in java is a refernce to Object so passing the variable to method is surely passing the reference to the method but that's not passing by reference. it's passing by copy because what is passed is the copy of the reference to the object, not the reference to the reference to Object. if it is really passing by refernce, then you will be able to change your reference to object to point anywhere because you have the access the address of the reference. but since you don't (you only know where the passed reference is pointing to (you have the COPY of value of reference) but you don't know where the refernce store its value) you can only change the content of the pointed object but not changing the pointed object.
    let me restate this, java always pass by reference.

  • XY Graph reference to report generator issue when program is compiled

    I am using Simplicity PDF generator to add a XY Graph to a PDF report, same handle is used in Excel report and works fine. The XY Graph shows up fine when the code it run in development mode, when run as executable, the graph insert routines fail for lack of finding the temp *.bmp fle for the graph 1172. See attachments. Anyone have any idea why the loss of the handle/temp graph error?
    Solved!
    Go to Solution.
    Attachments:
    CreadePdfFrontPageWiring.jpg ‏199 KB
    ErrorReport_SN 108 Run 005e.txt ‏2 KB

    As you said, the error simply says that it can't find the file, which most likely means that the file wasn't created.
    My guess would be this - you're creating the graph in the subVIs with the + and control icons (which is presumably PDF_Generator.Writer.AddImage.vi) and the VI which is shown in the image never has its FP displayed.
    By default, LV removes the FP of all the VIs going into the EXE unless it decides it's going to need the FP. If the FP is removed then the image of the control cannot be accessed and that would presumably prevent the file from being created. The easiest way to confirm this is to create a static property node for one of the controls on the front panel. This will force LV to keep the FP when building the EXE.
    If that doesn't help, then you need to see exactly where the BMP file is supposed to be generated and see if you can log an error from there.
    Try to take over the world!

  • Power fit function is not fitting correctly to sub-array controlled by graph cursors?

    I am using two cursors on an XY graph to select a subset of the graphed data to fit a power function to. I noticed that the first selection cursor (left-most on the graph) seems to have more control of the amplitude and power of the power fit while the second cursor only seems to limit the "range" of data selected (i.e. does not have much influence over the fit, even though it should).  When comparing the exact same data in excel using a power fit, the excel fits a completely different line.
    Any help would be much appreciated. (please disregard the local variables in my code, only been at this 3 months) I have attached the VI as well.
    Excel fit:
    Attachments:
    Hg Cp.vi ‏83 KB

    Two suggestions.  Change the default parameter bounds.  Specifically, the offset upper and lower limit are both 0, forcing this parameter to be 0.  Change the limits to be Inf for upper limit and -Inf for lower limit.  Also, tighten the tolerance of the fit to be 1E-6 or so.
    -Jim

  • Sum GETPIVOTDATA with multiple data item references using Array formula and cell references

    I'm trying to build a single formula referencing a shared pivot table. I would prefer not to create additional pivot tables etc.
    My criteria is basically the sum of multiple items in the pivot table. I am able to add multiple fields by typing item names in manually (see below Claims 1/2/3 etc) however I would also like to add a date range array in, but instead of typing them
    in I'd like to use cell values that can change dynamically, depending on previous options selected.
    My current formula is:
    {=SUM(IFERROR(GETPIVOTDATA("Count",'Settlement Pivots'!$A$1,"Loss Fin Year",$B6,"Scheme","Old Scheme","Month",{[Cell Range/Indirect Here...]},"Team2",{"Claims 1","Claims 2","Claims
    3","Claims 4","Claims 5","Major Claims","Claims Services"},"Scope","Settlement"),0))}
    Is this possible?
    Cheers

    Hi,
    Thank you for posting in the MSDN Forum.
    This forum is for developers disscussing issuses about VBA, VSTO and apps for Office. Since the issue is more relate to the end-user, I suggest you getting more effective response from
    Excel IT pro forum.
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us.
    Thanks for your understanding.
    Best regards
    Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Graph control reference array conflict

    My vi has 6 graphs, and I need to modify them through property nodes through out my vi, so I wanted to store all the graph references into an array and pass it along.  When I do that, I am getting a class conflict between my input array and array in cluster.  They are both waveform Waveform Graph Refnum (strict), so I am not sure why there is a conflict.  See attachment for additional info.
    Kudos and Accepted as Solution are welcome!
    Solved!
    Go to Solution.
    Attachments:
    ref.PNG ‏4 KB

    all elements of an array can differ only in value and must be exactly the same type of data in  this case ref classes. WHen you build an array from diferent ref types LV find the common class shared by all elelements of the array and cast them all to that type. Extreme case... if you included a boolean in your array the only property you would find are visable and lable (may a fw more).
    So by using a cluster each ref can be different and provided I coded it right be exactly the strict ref of the original and there allow me to access all of the properties associated with that class of control.
    I hope that cleared up some confusion,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Periodically updating a graph from a continually updating array

    I'm back after a few weeks of playing around with LabVIEW to try to fix it myself. I've gotten pretty far, I think, considering I have only myself and the two books "Learning with LabVIEW 7 Express" and "LabVIEW Graphical Programming" to help me!
    My previous post on this subject can be found here, though it is not necessary to read in order to help me with my current problem.
    With this post you will find 3 VI's that I have created, these are:
    "sub-test.vi" is my first attempt at creating a usefull sub-vi. I have documented it and made an icon for it, but all it does is really save me from a few extra blocks in my program.
    "neat but not working.vi" or ex1: I think it looks neat, but it will not work the way I would expect it too.
    "messy and still not working.vi" or ex2: this one looks more messy, uses a for loop instead of a while loop and is not working the way I want it too either.
    What I am trying to do:
    I have incomming serial data tagged with the channel name. I know how to extract the data (16bit unsigned int) from the header and footer using match patterns and type-cast (see sub-test.vi). I now want to "save" the incomming channel data (for simplicity lets assume that I only have one channel, called T1) in an array called T1. Naturally, I need to be relativly sure that my array actually does store my data (coming in at about 2/second). I then want to display that array in a graph at a set interval, say, every 2 seconds for example.
    So far I have been playing around like a blind person on an open field, feeling my way in the dark. I have tried a lot of solutions that seemed like good and logical solutions to me, but they didn't work, so obviously my logic is flawed.
    In Ex1 I tried to time the graphing by placing the graph and array in a sepparate while loop along with a "Wait until next ms multiple". The reading of the serial port is handled in a separate while loop running at max speed to catch all incomming data. It doesn't work the way I want it too.
    In Ex2 I tried to achieve my goal with another tactic. In this I get the graph to display stuff all the time, but I am unable to time the "refresh" of the graph.
    You may notice that I use the "old" serial port VI's (if you take context help on the Serial Port Init VI you will see a note explaining how it has been replaced with VISA VI's in the functions palette.. I have tried to use those, but I find them to be more difficult to set up. That is, I got it up and running and accepting data, but I got some errors and crashes from time to time, so I guess I used them incorrectly. Anyway, what I want to say is that if you feel that I should use the VISA VI's instead, I will need someone to set them up correctly for me the first time so I can see how it should be done.
    Both Greg McKaskle and Brian Powell provided a lot of help in my first thread at the very beginning of my project, and I hope that someone will be just as helpfull this time around!
    I use LabView 7 (the posted VI's from school) and Labview 7 Express on my personal laptop. (what -is- the functional difference between the two? I have not found anything? The only difference beeing that the Express have a watermark on the VI's?
    All the systems use Windows XP
    Attachments:
    Sub-test.vi ‏16 KB
    neat_but_not_working.vi ‏34 KB
    messy_and_still_not_working.vi ‏46 KB

    aha! I thougth that when I used the "counter" to see how many bytes waited for me at the port, then it wouldn't put lots of 0's in my array.
    I guess I could save the incomming stream to a file (that is a requirement, I need to log the data to a file) and then read the port every n'th second so that I know it contains roughly x samples and then parse and display all of that data. If I manually allocate the port-buffer size to hold the expected number of bytes + a marginal, that could work, right? In which case I should use a case structure (if "graph on" is true, then, say, every second, read the port buffer, parse the data into their respective arrays and graph/chart them).
    I don't need to display all the received data, but if I use a chart I don't have to worry about the buffers since my total data ammount (per. chart) will be less than 45000.
    I will look into charts again, I just tested to pass arrays to a chart, and that works too, with the added benefit that I can, as you say, have a display buffer so that I don't have to worry about that with my arrays. I can pass fixed size arrays to the chart and the chart will keep a (limited) history for me. I think that will work out great. The total number of data points at the end of the 6 hours should be around 43200, menaning I can hold the entire 6 hours in the chart buffer too without it impacting the performance to much.
    So what I need to fix now, regardless, is the "read from port" function so that it does not fill up my array with zeros!
    And I noticed in a test VI that generates 3 constant value arrays and one "random number 0 to 1" array, that if I pass it all to the chart, the data is not displayed as expected. In the included VI, the graph shows 3 straight lines and the random number, while the chart doesnt. In the chart there are no stright lines. Also, the top one in the chart (I have 4 on display, and I run them stacked) has all the lines, while in the other 3 I get one line (channel) just as I wanted. Why is that? I'll look into all the problems myself, but if someone could give a tip that would be great because I am still very much a student and learning by trial and error can be very frustrating.
    Attachments:
    array_and_graph_conondrum.vi ‏48 KB

  • Creating a graph by subtracting successive array elements in labview

    I have an array 'A1' of 'N' elements. I want to create an  array 'A2' of 'N-1' size having first element as A1[1] - A1[0], 2nd element as A1[2] - A1[1], and so on .
    then I want to  plot the A2 array on the graph for analysis.
    i.e i want to subtract the successive elements in an array and plot a graph of the subtracted values. 
    please help me 
    Thanks in advance. 

    Hi,
    Take a look at the attached example.
    Hope it helps.
    Paulo
    Attachments:
    ArraySubtract.vi ‏11 KB

Maybe you are looking for