Plotting 1D array in 3DSurfaceG​raph

Hey, I am just wondering, are there any ways to use 1D Array/Vector as the third parameter in 3DSurfaceGraph or do we have to use a 2D Array/Matrix in 3DSurfaceGraph? Thanks.

Malloc'ing a 1D array vs. a 2D array doesn't matter since the CNiGraph3D methods don't accept arrays anyway - you ultimately have to convert to Measurement Studio vector/matrix types to specify to the methods. Please refer to the previous discussion about converting C array types to Measurement Studio data types to pass to the CNiGraph3D methods.
- Elton

Similar Messages

  • How to plot mutiple arrays on right and left y axes?

    Hi everyone,
    I have a (hopefully small?) problem... I have a 2D array with 6 columns of data I need to plot on a graph... I would like array 0 to plot on the left axis and arrays 1-5 to plot using the left axis... I have tried using clusters to group both sets of data wired to a for loop for each axis... But this is not working... Can't seem to find anything online to help with this..
    Any suggestions would be greatly appreciated.
    Regards,
    Jack
    Solved!
    Go to Solution.

    Not to worry.... Found this link..
    http://digital.ni.com/public.nsf/allkb/049C7E362BE​4270A8625756E005CC46F
    Thanks for vewing...
    Regards,
    Jack

  • 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

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

  • 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

  • Plotting amended arrays of temperature data

    Hi, I am trying to compare different thermocouples/temperature measuring devices. I have a little experience with labview but not too much. I wanted to know if I am approaching this problem the right way. My supposedly complete data set of temperature seems incomplete when I plot it in my "difference" and "corrected" plots.
    There are right now two sources of analog data. I am trying to compile all the data into an array then find the difference between the two data channels, take a best fit and correct the second data channel so that the two channels of data have almost no offset bewteen them. I am using Labview 8.6. I've attached the vi below.
    Thank you for any help or advice you may be able to offer. Also occasionally a error pops up when I tried to troubleshoot with the highlight excecution. It says that the data is no longer available.
    Thanks
    Attachments:
    Thermocouple2.0.vi ‏108 KB

    What exactly is your question? What isn't working on your VI?
    Regarding the error, when Highlight Execution is on, the loop runs so slow that the buffer is read dry before the next loop comes around. You can observe this by putting a DAQmx Read Property Node in your loop, and read the AvailSampPerChan and the TotalSampPerChanAcquired.
    You are taking very few samples and waiting a long time for them to come in. At a rate of 10 (S/s) and asking for 50 samples, it takes your loop 5 seconds to complete. Why so few samples? You can take hundereds of samples, even a thousand, then take a Mean of those samples and you would not need filtering.
    Richard

  • Obtaining 3D plot of array

    I need a 3 D plot which update continiously with some time delay, in order to observe the movement of the point in 3 D plane as well as the pah it is following. The datas are stored in a txt file in the format shown below.
    Data1         

    There should be lots of examples and documents online that will help you get familiar with using the 3D graph in LabVIEW. You could start here or here. You can also search for 3D in the Example Finder (from LabVIEW: Help >> Find Examples) for plenty of examples that will help.
    Jarrod S.
    National Instruments

  • 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

  • Response to Plotting 1D array

    "In general, if the prototype of the method specifies a matrix for a parameter, you must specify a matrix and vector is not an option. Depending on what you're trying to do you could try creating a matrix that has a single row and passing that for the parameter.
    - Elton"
    My response:
    "If you don't know the size of array, and want to use say "malloc," you cannot create a 2-D array using it; however, dynamically creating a 1-D array using "malloc" is no problem. Then, given the 1-D array created by "malloc," how can I apply it to Plot3DSurface?"

    Please see the answer posted in the original thread about this issue.
    - Elton

  • Create plot with time vs array

    Hi I am new in the forum.
    I have this problem.
    I would representate 7 plots versus tiime.
    I calculate time and measure the 7 values in Y-axis and put them in an array.
    How I can do to plot the array versus time?
    Thank you in advance
    Raf

    Attached is an example.  Ignore what I said earlier about keeping
    data from previous times.  IT seems to be a moot point with
    charts, which will keep previous data by default!  Oh thank
    goodness for LabView!
    Attachments:
    multi-chart.vi ‏37 KB

  • How do you update an intensity plot one element at a time?

    I would like to use an intensity plot (or other control) to plot data collected from A/D channels. How do you get the Intensity plot to update one element at a time vs. row by row? Tips and suggestions greatly appreciated!

    > I would like to use an intensity plot (or other control) to plot data
    > collected from A/D channels. How do you get the Intensity plot to
    > update one element at a time vs. row by row? Tips and suggestions
    > greatly appreciated!
    >
    You will need to use the intensity graph and keep the buffer yourself.
    Init the data with background values and start filling then in using
    Replace Array subset. Presumably you are in a loop. Recirculate the
    data in a shift register adding new data each iteration and plotting the
    array to the intensity graph.
    Once you get to the horizontal edge, you need to decide if you split the
    data to get rid of the first row and append a new background row to the
    end making a strip chart, or do you clear the array and start over from
    the initial edge again making a scope chart, or do you mod the index
    with the buffer size and erase a row at a time in advance making a sweep
    chart.
    To update the scales, you don't have to change the data. Just write to
    the Offset property each time you scroll and it will relabel the data
    with 0 mapping to the offset value.
    Greg McKaskle

  • Scatter Plot Problem!!

    Hello everyone,
    I am quite new at Labview and I have a question regarding plotting 2d-array in a scatter plot.
    I would like to plot my data as a scatter plot, which I have done with the Waveform graph, and now I would like to find out the area with the highest density in the scatter plot
    and mark the area with a circle...is it possible in Labview to realize this?? I would be very thankful for every tips!
    Thank You
    Best Regards 
    Yun

    Yes it is possible.  You said you are using a waveform graph, wouldn't an XY graph be a better choice?  I don't know the data you are getting so a waveform graph might be the right tool here.
    In either case you'll need to define a length of X that you want to find the denses amount of points.  So say X=1 so then you will find all the points between 0 and 1 and count them, then 0.1 to 1.1 and count them, then 0.2 to 1.2 for the length of X on your graph.  Doing this in a For loop will make it easy, and then your output will be an array of counts for each section.  Find the maximum using the Array Max & Min function.  
    Then you can highlight the graph using property nodes.  You can use a cursor, or annotation, or a custom picture.  The easiest would probably be an Annotation and in the Example finder there is one called "Graph Annotations" that find the minimum, maximum, and average values for a graph and put an overlay on the graph.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Write array to file

        Hi,
    i am trying to write an array coming out of a for loop into a file. If i plot the array in the Front panel everything works, but if i write it to a text file some aditional characters (empty space and this rectangle) appear.
    The file should look like the text file but without spaces before first number of row and rectangle.
    Attached are .txt and screenshot of blockdiagramm
    Thanks for any help
    Philipp
    Attachments:
    bd.jpg ‏98 KB
    summary.txt ‏1 KB

    First of all: Thanks.
    Your solution did exactely what i want, and i am fine with using a non-elegant version, if it works.
    About that autoindexing + indexing the path:
    I know this is stupid, and i changed it to not  autoindexing. But these things happen, when you try to quickly expand an already existing vi and want to automatize with for loops instead of doing the same things over and over.
    I am attaching the whole vi. it first was just the analysis, basically the inner loop, where i wanted to be able to vary the number and size of the parts of the waveform that go into the PSD to see how analysis time and numbers of averages effects the spectrum.
    In the next step i created a vi that writes a string of two variables in a file, and then i wanted to do this for all files in a directory.
    i am totally aware of the fact, that there are several dirty solutions. But i guess you are used to seeing these things, that could be done much more elegantely and efficiently, but if you try to get a quick solution that works for you and you learned Labview by trial and error, this is the way your vi´s look like.
    By the way, what would you suggest to learn "clean" labVIEW programming ?
    thanks again,
    Philipp
    Attachments:
    acc_analysis+summary+loop.vi ‏182 KB

  • Are there ways to speed up cwgraph3d plotting?

    Hi,
    I have a loop that updates the plot every time with new line data. If say for example, I am plotting an array of size 128 x 128, then initially the array is empty(0's) then the first line gets data and I plot the array, then the next loop I have a new line of data (2 total lines of data) which I plot, then 3 and so on. When I do this loop using an array of 1024 x 1024 I notice a considerable slowdown which I need to get rid of in my application. Is there some way to display one line of the array, and then just update the graph with the new line for each line so that the cwgraph3d doesn't have to plot the whole giant array each time. I'm assuming that this would speed things up.
    Or is there some way (maybe with dll'
    s) to speed up the plotting process.
    Thanks in advance.
    Kevin

    Kevin,
    Ploting 1Meg of points can take some time, the first thing to try is to set the 3D acceleration option. In the general properties of the graph there is checkbox to enable this; this will make the 3D graph use the HW 3D capabilities of you video card. In my couputer make a noticable difference. Besides from this there are a couple of advices that I can suggest:
    1.-Insted of using zeros for the points that are not drawn, you can use a "Not a Number" (NaN) value. that way the 3D graph will not plot anything for the empty points. Here is some C code yo generate a NaN constant, you can replicate this in VB and have the graph plot just what is needed.
    double xTemp=0.0;
    xTemp/=xTemp;
    z[10][10] = xTemp;
    2.- diide your data in mult
    iple plots. Instead of having one single plot with all the data, you can create 8 plots of 128 lines each to hold the data. That way you only redraw 1 plot when adding a line.
    There is also the option of decimating the array to get a lower number of points with a lower resolution, then you have some sort of zoom option that draws a smaller data set with full resolution.
    I hope this helps.
    Regards,
    Juan Carlos
    N.I.

  • Plot xy graph

    Hi I am just making a simple simulation model in which a result of a formula is the acceleration.  This result I plot it against time.  By integrating the acceleration I obtain velocity and by integrating the velocity I obtain distance.  Those last results i plot them against time.  However, when I tried to plot distance vs. velocity, it looks like a get a graph of distance against time.  What would be the correct functions to be used to plot this correctly thanks.  The first picture attached shows a view of part of the model and the second pictures shows the results of the graph that I getting.  The graph that I need is taking correctly the y axis units but the x units are incorrect, it seems like it is just plotting against time. 
    Thank you
    Solved!
    Go to Solution.
    Attachments:
    plot xy graph.JPG ‏24 KB
    graphs.JPG ‏34 KB

    Hi,
    You can use a bundly function to plot to arrays into an xy graph. Check the attached VI for explanation.
    Regards,
    Nitzz
    (Give Kudos to good Answers and Mark it as a Solution if your problem is Solved) 
    Attachments:
    Untitled 3.vi ‏12 KB

Maybe you are looking for