visual basic link with national instrument

잠김 visual basic link with national instrument

  • 2012년 5월 11일 금요일 오전 5:24
     
     

    hi,

    i am new to VB2010. Right now, I am trying to make the CWGraph control (National Instruments) to plot a graph by loading data from database Access. Can anyone help me? Is that possible? I want it to plot graph offline before doing online using NI-DAQ.

모든 응답

  • 2012년 5월 11일 금요일 오후 5:59
     
     답변됨

    Yes, you can do this.  Just load an array from the database with the numbers that you want to display.  Then use the .PlotYAppend(array) or PlotYAppend(ItemFromArray) in a loop.  You can plot any numeric value this way, though the control normally expects a numeric Double.  Also look at the PlotWaveform. PlotX and other methods that may apply.

    You also might want to look at the Visual Studio built-in Chart control, which may do all that you need.

    Dick


    Dick Grier. Author of Visual Basic Programmer's Guide to Serial Communications 4. See www.hardandsoftware.net.

  • 2012년 5월 14일 월요일 오전 9:06
     
     

    Thanks for your reply.

    If possible, can you show me an example coding vb for this? because I don't quite familiar with vb programming. I already load the data from database.

  • 2012년 5월 16일 수요일 오후 6:18
     
     

    The code is as simle as

    control.PlotY(Buffer)

    where control is the name of the NI waveform graph control, and Buffer is an array that you have populated from your database.  Of course, you will have set the appropriate waveform graph properties to select the type of graph that you want to display, and other properties that may be required.

    Take a look at this example: http://zone.ni.com/devzone/cda/epd/p/id/1687

    Dick


    Dick Grier. Author of Visual Basic Programmer's Guide to Serial Communications 4. See www.hardandsoftware.net.

  • 2012년 6월 13일 수요일 오전 3:19
     
     

    The link you gave results empty file.

    I need to plot contour graph for three parameters which are magnitude,time, and frequency in vb 2010. By using Matlab, we can plot the contour graph by simply insert contour(x,y,z). Any idea on how to plot the contour in vb2010?

  • 2012년 6월 13일 수요일 오후 4:13
     
     

    You may not be able to duplicate it exactly, but take a look at this: http://msdn.microsoft.com/en-us/library/dd489232 (the .NET built-in Chart control), and http://zone.ni.com/devzone/cda/epd/p/id/1641.  To use the NI plotting solution, you must build x86, not AnyCPU (or x64).

    Dick


    Dick Grier. Author of Visual Basic Programmer's Guide to Serial Communications 4. See www.hardandsoftware.net.

  • 2012년 7월 19일 목요일 오전 3:40
     
     

    anyone know how to plot contour using 3d graph in VB like below that made out using matlab??

  • 2012년 8월 2일 목요일 오전 7:26
     
     
    i got it ;)