How do I plot an array of waveforms?

The computer on which I am building my VI doesn't have access to the internet, so I can't post any of my code (so I'll use as much detail as possible)
I am taking DAQ measurements for four devices that come in as (I believe) an array of dynamic data type. I split the signal and I have each channel outputting its own dynamic data type. After a user-specified time interval, a timed while loop will trigger the DAQ to take a measurement and write the data to a file and plot the data. The file writing was easy, but I am stuck on the plotting aspect. 
What I have: Since efficiency won't be an issue (~15 minute average time delay), I have created a shift register of dynamic data type. Each iteration of the while loop, I append the newly acquired data to an array of dynamic data using the BuildArray function. I need to be able to take this and plot it in a graph, but every time I try it tells me that the dimensions of the source and sink don't match. Also, I need to do this for each of the four sets of data (and put them on the same plot). 
What can I do to get plottable data from my shift register?
I cannot open .VI files, so I would really appreciate it if I could get responses in pictures of block diagrams or text. Thanks.
Solved!
Go to Solution.

Hi nc61,
stay away from DDT (dynamic datatype) and you will be fine. Especially when trying to collect data by building up arrays of DDT (which probably isn't doing what you really want)...
- Use DAQmxRead to get either arrays of data or waveform(s). Use BuildArray for simple data or waveform functions for waveforms to collect data in shift register. Plotting will be easy with those data!
- There's the well-known example finder in LabVIEW's help menu. Try it...
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • How do i change 2 row of array into waveform with delta time and time

    Hello,
    How do i change 2 row of array into waveform with delta time and time
    so the waveform graph will display two waveform,
    waveform, not cluster =]
    and how to extract 1d array from waveform?

    Hi AxE,
    Here is an example VI, that do what You asked for.
    Both requests.
    Hope it Helps...
    Attachments:
    2D_to_Waveform.vi ‏75 KB

  • I would like to plot an array of U32 with a digital waveform graph.

    When I try to do this I can only view the first 8 bits. How do I plot all 32 bits?

    Take a look at the attached VI, where I am able to plot all 32 bits on the graph. I have the axis autoscaling, and I made sure it was large enough to see.
    Evan
    Attachments:
    i32_to_Digital.vi ‏44 KB

  • How to efficientl​y create a single waveform based on data from two other waveforms?

    I have a 1-D array of waveform with size = 4 that contain "raw" potentiometer voltage data.  I need to manipulate waveform data from index 0 & 1 using the formula shown below to derive a single waveform of angle data.   I need to do the same for index 2 & 3 as this is a redundant circuit.   I was hoping that the formula node can work on entire arrays and although it can take an array as input, it requires me to index the array in the formula so it becomes a scalar value.  
    Since the formula is relatively complex, I'd like to keep it in text form but have it automatically work on each point of the two input arrays.  This math is done inline with pulling data out of a DAQ and so I need it to be as efficient as possible so that I don't spend too much time on it and potentially overflow the DAQ buffer. 
    The naive solution would be to wrap the formula nodes with for loops, but I don't know if this is this is an efficient way to do this.  I would appreciate any suggestions on how best to tackle this.  
    Thanks!
    Solved!
    Go to Solution.

    Here's how I would do it with no formula nodes or loops requied:
    If you want to use the formula node, then you could run a loop inside each formula node while you index through the arrays.  The performance difference between formula nodes and the graphical approach should be insignificant.  Note that my approach assumes that the array sizes are the same.  You could also create a sub VI to contain the math so you don't have to maintain two copies of the same piece of code.
    Chris M

  • How do I plot multiple points (scatter) on the same graph?

    Hello,
    I have a graph with a fixed X-axis and an array of Y values which varies. How do I plot these new y values without replacing the previous ones? E.g to have a scatter of new data? Example of shown in Figure 1 below:
    Figure 1: (Note: image was photoshopped to demonstrate goal) 
    Figure 2: Current block diagram, LabVIEW VI:
    Thank you!
    Solved!
    Go to Solution.

    Think about what you are really building. You are building an array of clusters, right? For each element in the array you have a cluster whos content has a value for the X axis and a value for the Y axis. As long as you are not connecting the datapoints in the graph (which you aren't), you can plot the datapoints in any order. If you are building your X portion of the cluster seperately than your Y portion of the cluster, you just have to make sure the indexes do not get transposed somehow.
    Build the lower half of the attached picture, and you will see what I mean. (hopefully)
    Attachments:
    Chart.PNG ‏21 KB

  • Plotting an array with a large number of data points

    Hello All,
    I am collecting data every second for 24 Hrs. How do I plot this on a XY plot? I have the data collection setup in a while loop and my initial attempt was to use a shift register and a build array to make the array and that works OK. The problem is I do not know if this is a wise option in terms of memory usage. (I end up making 3 arrays and 3*86400=259200 data points in 3 shift registers).
    What is the better way to plot 86400 data points in a XY plot? I am also writing the data to a file every second.
    Thanks,
    KB

    Allan,
    Thanks for the message. I am attaching with this message a ccpy of my vi where you can see that I am collecting data from 3 counters, writing them to a file and displaying them. Can you comment on this Vi with regard to memory management?
    Yes, I would like to see your examples. Thanks once again.
    KB
    Attachments:
    PC21.vi ‏418 KB

  • How can I plot the 3d plot of a vibrating bridge?

    Dear all
        My question is as follows:
        I want to plot the mode shape of a bridge. Now the deck of the bridge is vibrating, which can be plot. But at the same time; I want to plot the column of the bridge
    The question is: when some surface of the 3d plot are vibrating, which  means animated plot.How can I plot  the stationary multiple curves at the same time.
    The attached file is one example, but always the mutiple curves disappear when the surface vibrating.
    PS: My VI version is 8.0 How can I save the VI as version 7.x or 6.x, version 8.x seems too new.
    Any reply will be appreciated! Many thanks!
    Attachments:
    format line plot.vi ‏32 KB
    3D plot of mode shape.vi ‏33 KB
    format 3D.vi ‏31 KB

    Sorry,the attached VI should be as follows since there is not data in the array in the previous VI
    Attachments:
    format surface plot.vi ‏20 KB
    3D plot of mode shape.vi ‏31 KB
    format 3D.vi ‏27 KB

  • How can I plot  a graph in sections???

    Hi
    This is what I am trying to do:
    I have a graph class that uses a double array to plot.. surprisingly a graph. The problem is that the file that I am plotting from is too large to display all of its data at once on the screen.
    What I am trying to do is have a forward and back button that will allow you to display a fixed chunk of data at a time.
    Also does anybody know how to clone a double array????
    Any help would be great...
    Cheers...........

    Read the file.
    Write a funtion to return all values from
    starting from start to end like
    public double[] getData(int start, int end)
    Use the charting tool to plot only the current set of
    values.. Change the start and end parameters according to
    what the user wants.. (forward or backward)
    Try JFreechart... Its an excellent charting tool..

  • Best method for plotting data array?

    I am reading data from a Delta Motion controller and writing that data to an array in my vb.NET program.  The data is not time stamped but I know what the sampling interval is (0.001s).  I want to take that data and plot it on my Waveform Graph.  What is the best method for doing this?  I'm sure this is simple, but I'm new to MS and LV.
    Private Sub btnRampUpA_Click(sender As Object, e As EventArgs) Handles btnRampUpA.Click
    Dim Axis0ActualPrsData() As Single = New Single(4096) {} 'Create array for data from the RMC controller to be read into
    Dim Axis0Actual() As AnalogWaveform(Of Single)
    If RMC.IsConnected(PingType.Ping) = True Then 'Check to make sure comms to RMC is good before trying to read data from it
    Try
    RMC.ReadFFile(FileNumber150.fn150Plot0StaticUA0, 112, Axis0ActualPrsData, 0, 4095) 'read the plot data where sample period = 0.001
    Catch ex As ReadWriteFailedException
    MessageBox.Show("Unable to read plot data from the RMC. " & ex.Message)
    End Try
    End If
    End Sub
    Thank you

    PlotYAppend appears to be the answer according to the white page, although I don't have it working as of yet.  Can someone confirm?

  • Lowpass filtering an array of waveforms with different cutoff frequencie​s

    I'm trying to take an array of waveforms and have seperate filter settings for each individual waveform. For example, I want to have a 2 hz cutoff frequency on my thermocouple inputs and a 100 hz cutoff frequency on a strain gage input.
    When I try to accomplish this using the Butterworth filter (as shown in the image) I get weird results. The VI seems to be setup to only handle 1 waveform at a time. If I set the init/cont to F for init, the beginning of each waveform segment is reset to 0 which wrecks the data files. If I set the init/cont to "T" for continuous, the data is completely wrecked because the waveforms are interferring with each other.  Clearly this VI is not setup for muliple instances (for use in a for loop).
    There are the Waveform filters, but I seem to only be able to use 1 cutoff frequency for the entire set of waveforms.
    In the subVI image below, I input an array of waveforms into a for loop with the settings collection for each channel (element in the waveform array). I pass the cutoff frequency to the butterworth filter with the Y data array from the segment of the waveform.  Waveform data is supplied continuously (I need a live data filter).
    Thanks for your input.
    Attachments:
    Filter applied to multiple waveforms.png ‏17 KB

    You are correct (about the true/false on the cont/init input).  Not sure I follow what the help is saying to do...
    Is there anyway to verify the number of instanced "Filter Duplicates" are running? I'm still having a lot of issues with my implimentation and I'm wondering if I'm not initializing everything correctly.  I've even added a button that should push a new re-initialization.  I'm trying to have an interface that allows the user to turn off and on the filter while data is be aquired.  Here is some of my code that I'm using to try and accomplish that, but after I've enabled the filter on multiple waveforms and hit my "re-initialize" button I still get bizarre data artifacts (like spikes) that would not be indicative of data on the other side of a low pass filter.  Thanks for any additional feedback.
    I've modified your Filter Duplicate to have an "Enable" feature so that the waveforms that I do not want any filtering of are just passed through.
    I've tried to re-create the functionality of your Test multi-filter VI Server, but with the added boolean option to not have the filter performed:
    So when "True" is on init/cont input the VI is re-open by VI server and the true signal propagates to the Filter Duplicate Asynchronous call.  Here is a snippit from my main window call:
    Lastly, here is the noisy data I'm dealing with:
    Here is the data after I apply a 5Hz filter to each one:
    Clearly data from one is being imposed on the other.  Hitting my "re-initialize" button to send a "true" signal through doesn't fix it.  How can I verify that my filters are working independently as desired?
    Thanks!

  • 1D array of waveforms to single waveform

    I'm got a continuous data application which results in an output of a
    1D array of waveforms.  This is done because the VI reads the
    waveform out of the buffer at certain intervals in  a loop, which
    seems to be the only way to acquire data in a continuous mode at high
    speed off of a non NI card, as reccomended by the manufacturer,
    Measurement Computing.  The waveforms are passed out of the loop,
    becoming a 1D array of waveforms.  I need to append the array
    elements to one another (waveforms) to end up with a single waveform to
    ease the latter processing.  I'd prefer to do this using the time
    stamps to make sure there are no misalignments, but I'd settle for a
    simple method to append them to one another.
    I've tried using the append waveform VI in a loop with what I thought
    was appropriate logic, but I always seem to end up with just a portion
    of the original data.  Help is greatly appreciated. FYI I'll be
    out of the office until Tues, so I won't be using info this until
    then.  - Thanks.

    How exactly are you using the Append Waveform in a loop? Using it in a for loop like in the attached picture should work.
    Attachments:
    Append Waveforms.JPG ‏8 KB

  • How can i get a array from a JSP ?

    Hi all,
    i have a STORED PROCEDURE like this:
    static public void getMyArray(double [] xx) {
    for (int i=0; i<myarr.length;i++){
    myarr=3.145*i;
    xx=myarr;
    return ;
    how can i get the array with XSQL and transform with a XSL ?
    Is this at all possible?
    Thanks for any help.
    Achim

    u r asking how ca u get array from jsp?
    and u r asking xsql ...some stuff i couldnot understand .can u repeat the question properly?
    null

  • How to ask for an array and how to save the values

    I'm supposed to be learning the differences between a linear search and a binary search, and the assignment is to have a user input an array and search through the array for a given number using both searches. My problem is that I know how to ask them how long they want their array to be, but I don't know how to call the getArray() method to actually ask for the contents of the array.
    My code is as follows:
    import java.util.Scanner;
    import java.util.ArrayList;
    public class Main
        private static Scanner input = new Scanner(System.in);
        public static void main (String args[])
            //creates ArrayList
            int List[];
            System.out.println("How long would you like the array to be?");
            int arrayLength = input.nextInt();
            //Initializes array list
            List = new int [arrayLength];
            System.out.println("Please enter the first value of the array");
        public static void getArray(int List[], int arrayLength)
            for(int i=0; i < arrayLength; i++) {
                 System.out.println("Enter the next value for array");
                 List[i] = input.nextInt();
         public static void printArray(int List[])
             for(int i=0; i < List.length; i++)
                 System.out.print(List[i] + " ");
    public class search
        public static int binarySearch(int anArray[], int first, int last, int value)
            int index;
            if(first > last) {
                index = -1;
            else {
                int mid = (first + last)/2;
                if(value == anArray[mid]) {
                    index = mid; //value found at anArray[mid]
                else if(value < anArray[mid]) {
                    //point X
                    index = binarySearch(anArray, first, mid-1, value);
                else {
                    //point Y
                    index = binarySearch(anArray, mid+1, last, value);
                } //end if
            } //end if
            return index;
        //Iterative linear search
        public int linearSearch(int a[], int valueToFind)
            //valueToFind is the number that will be found
            //The function returns the position of the value if found
            //The function returns -1 if valueToFind was not found
            for (int i=0; i<a.length; i++) {
                if (valueToFind == a) {
    return i;
    return -1;

    I made the changes. Two more questions.
    1.) Just for curiosity, how would I have referenced those methods (called them)?
    2.) How do I call the searches?
    import java.util.Scanner;
    import java.util.ArrayList;
    public class Main
        private static Scanner input = new Scanner(System.in);
        public static void main (String args[])
            //creates ArrayList
            int List[];
            System.out.println("How many values would you like the array to have?");
            int arrayLength = input.nextInt();
            //Initializes array list
            List = new int [arrayLength];
            //Collects the array information
            for(int i=0; i < arrayLength; i++) {
                 System.out.println("Enter a value for array");
                 List[i] = input.nextInt(); 
            //Prints the array
            System.out.print("Array: ");
            for(int i=0; i < List.length; i++)
                 System.out.print(List[i] + " ");
            //Asks for the value to be searched for
            System.out.println("What value would you like to search for?");
            int temp = input.nextInt();
            System.out.println(search.binarySearch()); //not working
    }

  • How can I convert an array off byte into an Object ?

    Hi folks...
    I�m developing an application that comunicates a PDA and a computer via Wi-Fi. I�m using a DataStream ( Input and Output ) to receive / send information from / to the computer. Most off the data received from him is in the byte[] type...
    How can I convert an array off byte ( byte[] ) into an Object using MIDP 2.0 / CLDC 1.1 ?
    I found on the web 2 functions that made this... but it uses a ObjectOutputStream and ObjectInputStream classes that is not provided by the J2ME plataform...
    How can I do this ?
    Waiting answers
    Rodrigo Kerkhoff

    There are no ObjectOutputStream and ObjectInputStream classes in CLDC. You must know what you are writing to and reading from the DataStream. You should write the primitives like int, String to the DataOutputstream at one end and read those in exactly the same sequence at the outher end using readInt(), readUTF() methods.

  • How do I convert an array of BYTES (where each BYTE represents a bit) into a single Hex number?

    I am reading a signal from a USB-8451. This signal is stored as an array where each element represents a bit in the signal, but is stored in the array as a byte. How do I convert this array into a single Hex number. I attatched what I have so far, there are a few extra things to help me see what ia going on. One code uses Queue and the other uses arrays, let me know if you can help.
    Attachments:
    845x_EEPROMarrays.vi ‏27 KB
    845x_EEPROM.vi ‏26 KB

    mkssnwbrd wrote:
    ... so we can't introduce any other forms of signals or power into the circuit other than what the circuit already has. Trithfully I don't really know how I2C devices work, but my mentor here says that we can't use an I2C method becuase it will introduce voltage into the circuit and may damage out TCON chip.
    That makes absolutely no sense. What do you think is happening when you write the digital lines? You're setting a pin high. That voltage is being generated by the 8451x. I think you're not understanding what your mentor is saying. If it's an I2C device then you should be able to use the I2C function to simply talk to it. You still have not indicated what the device is, so there's little more I can say about that aspect of it.
    As far as the conversion is concerned, you basically need loop through your array of "bits", taking 16 at time since you said you have 16-bit values. It's not clear from your code whether your eventual goal is to get a numeric value or a string. This does not appear to be a subVI, so a simply numeric indicator formatted to display in hex format should be quite adequate. The array you are generating is an array of rings, whose datatype is I32, but they will have values of 0 or 1. You can use the example just posted, or you can use the attached variation.
    Attachments:
    Bits to Hex 2.vi ‏17 KB

Maybe you are looking for

  • Eprint doesn't open word documents

    officejet 8600 plus & mac 10.7.5 eprint (version 2.0.0) will not allow me to open anything but pdf. i can't open Word docs or images of any kind. any help? thanks from jerusalem.

  • How can I update backup of iPhone at iCloud without wifi?

    Hi Expert, Can anyone suggest how can I update backup of iPhone at iCloud without wifi? Wifi stopped working on my 4s after upgrade to iOS7. I have iTune backup but want to update at iCloud. Any suggestion? Thanks in advance.

  • Installing iOS 8 on iPhone 4S via Windows 7, hung up on "Plug into iTunes" image. "Run Diagnostics" crashes, too, btw.

    OS: Windows 7 iTunes 12.1.2.27 iPhone 4s - A1387 Trying to install new iOS (8, I'm pretty sure?) iTunes prompted to install newest OS for the phone, successfully created a backup/sync, shut off the phone, and now it's stuck waiting to be recognized b

  • How to implement this interface using jsf

    This problem's been bothering me for serval days. Just a simple question, how to render the following case purely by JSF? http://www.hcj-sh.com/temp/case.gif case 1. It includes 2 radio button2, these 2 radios are in virtual layout, this is not diffe

  • JATO 1.2.1 source code

    Dears. We are evaluating S1AF for production use. It looks good, but i miss some comprehensive documentation! "Release notes", "Overview", "Getting started" nor "Installation guide" is not enough. Is a full documentation available for download? It ha