Coding error using measurement studio

hello..
can somebody tell me where can i get help on coding the measurement studio using VB.i'm doing an interface programing with a dc servo motor.i'm using a fuzzy logic controller(FLC) to make the output of the servomotor to follow the input, which i'm using a square wave input.i'm having coding problems on linking the FLC with the harware.i'm not quite good in visual basic, so can anybody help me with the coding?i can send the vb coding of the FLC and the hardware interface coding. i've successfully implement PID controller.. but i can't seem to make the FLC work. i think there's something wrong with the coding.
and how can i make the graph go more faster? output from the graph is very slow, compared if i probe the output from the servomotor harware using a digital oscilloscope.

Hi,
I recommend the Measurement Studio Reference as a resource. This reference is installed with Measurement Studio and can be found on your computer from Start>>Programs>>National Instruments>>Measurement Studio>>Help. The Measurement Studio Reference includes information on the Measurement Studio ActiveX controls and tutorials.
Next, is the FLC you are using part of a Measurement Studio Add On? Are you using the PID Toolset for VB?
Then, if the graph you are using is a CWGraph, you can access the properties of the graph by right-clicking and selecting Properties…. Click on the Graph Tab of the Property Pages window and check that Control Refresh is set to Immediate. This has the graph redrawn as soon as new data is available.
Regards,
Eric M

Similar Messages

  • How to save the value in Cedit control into a text file bu using measurement studio c++?

    Im using measurement studio c++ to create a application. How to save a randomly generated value which display in the CNumberEdit Control to a text file? how to do the coding part?

    You can use the CNiFile class to write the value out to a file. For example, create a new Measurement Studio C++ project and follow these steps:
    Add a CNiNumEdit to the dialog.
    Add a member variable for the CNiNumEdit called m_numEdit.
    Add a button to the dialog.
    Double-click the button to add a message handler for the button's BN_CLICKED message.
    Add the following code to the button's BN_CLICKED message handler:
    CNiFile file("C:\\Values.log", CFile::modeCreate | CFile::modeWrite | CFile::typeText);
    file << m_numEdit.Value << endl;
    file.Close();
    Run the application, edit the CNiNumEdit's value, and click the button. The value should be written to the Values.log
    file as specified in the code above.
    Hope this helps.
    - Elton

  • How to use Measurement studio math lib in VC6

    dear sir,
        I get the evolution version of measurement studio, which works well in DotNet and I confront with the problem that i do not know how to use measurement studio math library in VC6, please help me out ?

    All versions of Measurement Studio released to date include support for Visual C++ 6.0 (and Visual Basic 6.0).
    This support is on a separate CD from the support for Visual Studio 2003 and Visual Studio 2005.
    For example, the Measurement Studio 8.0.1 kit includes 5 CDs. One CD includes support for Visual Studio 2003 and 2005. Another CD includes support for Visual Studio 6. The other 3 CDs are Device Driver CDs.
    You want to use the CD that includes support for Visual Studio 6.0. This CD contains 2 installers. First run Setup.exe. Then run MeasurementStudio6Updater.exe to get the latest components. See UpdaterReadme.htm for information on what components are updated by MeasurementStudio6Updater.exe.

  • I'm looking for code to measure SNR, SNDR, etc. using Measurement Studio, Visual Basic.

    I've collected audio ADC data and wish to measure signal-to-noise, frequency, amplitude, etc. I'm using Measurement Studio with VB.

    Frequency and Amplitude should be easy to measure. The CWDSP frequency domain processing methods perform transformations between the time domain and frequency domain and perform analysis in the frequency domain. Slightly more difficult is the measurement of SNR. I would recommend the following tutorial:
    "The Fundamentals of FFT-Based Signal Analysis and Measurement in LabVIEW and LabWindows" available here. This page also links to a LabVIEW example, which can be used to understand the dataflow and functions necessary to create the system.
    There is also a good signal to noise ratio tutorial here.
    regards,
    Eric Meyer
    Applications Engineer
    National Instruments

  • Can I acquire data with VB from my DAQCard without using Measurment Studio?

    I have the Measurement and Automation Software on my computer and VisualBasic.NET. Do I need any other software if I am receiving 2 analog signals and outputing 1 analog signal on my NI DAQCard-6024E PCMCIA?

    The short answer is yes, you can acquire data with VB.NET from your DAQCard without using Measurement Studio.
    There are a variety of ways to do it. All of them require that you install either the Traditional DAQ driver or the DAQmx driver in addition to Measurement and Automation Explorer. The DAQ drivers are included on a CD or CDs with your hardware. They are also available on the quarterly National Instruments Device Driver CD.
    1) You can use the Measurement Studio DAQmx .NET API. This is far and away the easiest API to use to program DAQ cards in VB.NET and C#. This API is included in the DAQ installer and does not require you to purchase Measurement Studio. However, without Measurement Studio you do not get the benefit of the DAQ Assistant integrated into Visual Studio .NET. The DAQ Assistant, when integrated into Visual Studio .NET, allows you to graphically configure your DAQ tasks, generates the code you need to configure your tasks, and generates a .NET user control (with user interface) that demonstrates how you use the tasks that you created. The caveat to this approach is that PCMCIA cards are not directly supported under DAQmx 7.0. There is, however, a beta versin of DAQmx PCMCIA support as described in this KB article.
    2) You can use the .NET P/Invoke services to call the Traditional DAQ or DAQmx C API directly. See MSDN for more information about P/Invoke. If you choose the DAQmx API, you will need to install the beta of the PCMCIA support as described in this KB article. National Instruments does not provide any examples, language-specific documentation, or code generation for this method. You'll need to look at the C API documentation to see what to do.
    3) You can use the Measurement Studio Traditional DAQ ActiveX controls. These are included in the DAQ installer and do not require you to purchase Measurement Studio.
    The absolute quickest and easiest way to get started using an NI-DAQ card in VB.NET is through the DAQ Assistant and Measurement Studio Professional or Enterprise edition.
    Your next best approach is to use the native .NET DAQmx API. This API was designed from the ground up to support .NET languages. There are examples written in VB.NET to help you get started.
    If for some reason, you don't want to use the native .NET API (or your hardware is not supported under DAQmx), whether you use P/Invoke or the ActiveX controls is a toss-up. It depends mostly on whether you are already familiar with the C API or the ActiveX API.
    David Rohacek
    National Instruments

  • Unable to Build VC++ application it showing error 1 LINK : fatal error LNK1104: cannot open file 'NiFieldPoint71D.lib' but I am Using Measurement Studio 2009 ,NI DAQ 7.01 and Field Point 6.05.

    I am having a application in Visual Studio 2003 on Windows XP  , Now I am Migrating the application in Visual Studio 2005 on Windows-7 .
    In my Development PC , I was install Measurement Studio 2009 ,  NI DAQ 7.01 and Field Point 6.05.
    my application is Showing following error:
    Linking...
    LINK : fatal error LNK1104: cannot open file 'NiFieldPoint71D.lib'
    Build log was saved at "file://c:\EdacsNt\Source\SaftyServices\NICfpDAQDl?l\Debug\BuildLog.htm"
    NICfpDAQDll - 1 error(s), 0 warning(s)
    When I copy from NiFieldPoint71D.lib library from Measurement Studio 7.1 and put in :\Program Files\National Instruments\MeasurementStudioVS2005\VCNET\Lib.
    my application is Showing following error:
    1>Linking...
    1>atlsd.lib(atltrace.obj) : error LNK2005: "unsigned int (__stdcall* ATL::g_pfnGetThreadACP)(void)" (?g_pfnGetThreadACP@ATL@@3P6GIXZA) already defined in NiFieldPoint71D.lib(StdAfx.obj)
    1>atlsd.lib(atlbase.obj) : error LNK2005: "class ATL::CAtlWinModule ATL::_AtlWinModule" (?_AtlWinModule@ATL@@3VCAtlWinModule@1@A) already defined in NiFieldPoint71D.lib(StdAfx.obj)
    1>   Creating library ..\..\lib\debug\NICfpDAQDll.lib and object ..\..\lib\debug\NICfpDAQDll.exp
    1>..\..\bin\debug\NICfpDAQDll.dll : fatal error LNK1169: one or more multiply defined symbols found
    I want to ignore NiFieldPoint71D.lib from using project setting(Linker->Input->ignore Specific Library ) but still it is showing same error.
    In the project Setting I am done following setting:
    "C:\Program Files\National Instruments\MeasurementStudioVS2005\VCNET\Lib";"
    C:\Program Files\National Instruments\NI-DAQ\Lib"
    Linker->Input->ignore Specific Library: mfcs71d.lib;libc.lib;'NiFieldPoint71D.lib
    Please provide some solution.
    Thanks
    Nityanand

    You posted this in the LabVIEW forum.
    Are you programming in LabVIEW?
    There is a separate Measurement Studio for VC++ forum. http://forums.ni.com/t5/Measurement-Studio-for-VC/bd-p/231

  • Unable to Build VC++ application it showing error 1 LINK : fatal error LNK1104: cannot open file 'NiFieldPoint71D.lib' but I am Using Measurement Studio 2009

    I am Migrating a application in Visual Studio 2005.
    In my development PC I install the Measurement Studio 2005.
    my application is Showing following error:
    1>Linking...
    1>LINK : fatal error LNK1104: cannot open file 'NiFieldPoint71D.lib'
    1>Build log was saved at "file://c:\EdacsNt\Source\SaftyServices\NICfpDAQDll\Debug\BuildLog.htm"
    1>NICfpDAQDll - 1 error(s), 0 warning(s)
    In the project Setting I am done following setting
    "C:\Program Files\National Instruments\MeasurementStudioVS2005\VCNET\Lib";"
    C:\Program Files\National Instruments\NI-DAQ\Lib"
    but in  "C:\Program Files\National Instruments\MeasurementStudioVS2005\VCNET\Lib";"  directory Not having the 'NiFieldPoint71D.lib' because Measurement Studio 2009 not provide this dll.
    Please provide some solution.
    Thanks
    Nityanand

    You posted this in the LabVIEW forum.
    Are you programming in LabVIEW?
    There is a separate Measurement Studio for VC++ forum. http://forums.ni.com/t5/Measurement-Studio-for-VC/bd-p/231

  • Why the wave is disvisible?? I used measurement studio 7.0.1 in my existing VC++ 6.0 project

    I have an existing Microsoft Visual C++ project  MyProj. I  have installed the NI measurement studio 7.0.1 on my computer yesterday.
    I have added a CWGraph control on a dialog of MyProj via "Project-> Add To Project->Components and Controls...->Registered ActiveX Controls->CWGraph Control".
    It created 22 classes such as "CCWGraph/CCWPlots/CCWPlot/CCWAnnotations......." in my MyProj,
    Now, I create a variable m_GraphCtrl for the CCWGraph Control by classwizard.
    I want to used following codes to create a wave and show on the control,  in my debugging , it's running no problem, but the control not show a wave.
    I have add a plot "1" in the contrl's Properties "Plots".
    I have set the "Axes-XAxis-Auto scale" and "Axes-YAxies-1-min 0: max 255" in the control's Properties.
    code:
    VARIANT vrtItem, vrtData, vrtFirst, vrtInc;
    vrtItem.vt = VT_BSTR;
    vrtItem.pcVal = "1";
    vrtFirst.vt = VT_I4;
    vrtFirst.lVal = 0;
    vrtInc.vt = VT_I4;
    vrtInc.lVal = 1;
    vrtData.vt = VT_BYREF|VT_UI1;
    vrtData.pbVal = CH1WaveData;//unsigned char CH1WaveData[2500];there have had value already.each value is between 0~255.
    // Graphs
    m_GraphCtrl.GetPlots().Item(vrtItem).ClearData();
    m_GraphCtrl.GetPlots().Item(vrtItem).PlotY(vrtData, vrtFirst, vrtInc);//no wave show on the CWGraph control
    //annotations
    m_GraphCtrl.GetAnnotations().Item(vrtItem).GetCaption().SetXCoordinate(0.00);
    m_GraphCtrl.GetAnnotations().Item(vrtItem).GetCaption().SetYCoordinate(200.00);//this codes worked good,
    m_GraphCtrl.Refresh();
    Who can tell me why ???

    Hi Johannes,
    Did you get a chance to read this thread?
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=506500000008000000B3E20000&UCATEGORY_0=_342_%24_7_&UCATEGORY_S=0

  • Using measurement studio with my own circuit

    Im a computer engineering student
    I have designed a circuit which do analog-digital convertor and the computer reads the digital value from the parallel port, and Im looking for an application
    I found this nice topic in your site : Measurement Studio Analog Output -- Waveform Generation in Visual Basic
    http://zone.ni.com/devzone/conceptd.nsf/webmain/9C9F9227D165EF6C8625687E006CEFF5
    and I hope that I can do it for my project
    my question is : can I use the parallel port of the PC instead of National Instruments data acquisition (DAQ) hardware in the measurement studio 6.0 ??
    thank you alot .
    Bader

    Hello,
    It sounds like your question is really if you can access the parallel port from your Measurement Studio Environment. The answer is yes, and one way to do this is using NI-VISA. In general, I imagine you will be performing viOpen, viRead, and viClose operations on your parallel port. The following discussion forum links should help you get more well rounded on the idea: (note: many of these forum posts have helpful links as well!)
    1. http://forums.ni.com/ni/board/message?board.id=170&message.id=25066&requireLogin=False
    2. http://forums.ni.com/ni/board/message?board.id=170&message.id=109253&requireLogin=False
    3. http://forums.ni.com/ni/board/message?board.id=170&message.id=112975&requireLogin=False
    4. http://forums.ni.com/ni/board/message?board.id=170&message.id=96478&requireLogin=False
    5. http://forums.ni.com/ni/board/message?board.id=170&message.id=118167#M118167
    6. http://forums.ni.com/ni/board/message?board.id=170&message.id=86769#M86769
    Repost if you have further questions!
    Best Regards,
    JLS
    Best,
    JLS
    Sixclear

  • Using Measurement studio with Tabs

    Whenever I place a measurement studio control on top of a tab control it goes underneth the tab control and can no longer be seen.  In the code I can tell it to come to the top using 'BringWindowToTop" and it is visable but while in the editor it is not, making it hard to place controls properly.  Is there a way to force the control to the top in the editor and if so how?

    Hi Born2Burn,
    The way controls on a form are displayed is determined by their z-order. The control's z-order is determined by its position in the form's Controls collection, with the first control in the collection being at the front (top layer) and the last at the back.  You will need to change control's z-order in order to make things look right.
    There are a few options to fix this at design time:
    Right-click on the Measurement Studio Control and select Bring to Front. This will change it's position in the form's Controls collection to 0, making it the top of z-order. Similarly, you could right-click on the Tab control and choose Send to Back.
    Select the Measurement Studio Control and click Format » Order » Bring to Front from Visual Studio's menu. There are also two icons on the Layout toolbar that will allow you to either "Send to Front" or "Send to Back".
    Additionally, Visual Studio 2005 also includes a very useful tool window called Document Outline.  You can access this from View » Other Windows » Document Outline, or by using the keyboard shortcut: Ctrl+Alt+T.  The Document Outline will allow you to rearrange controls by simply draging and droping them into their correct z-order
    Thanks,
    Jonathan C
    Staff Application Engineering Specialist | CTD | CLA
    National Instruments

  • Using Measurement Studio tools on PDAs

    Is the latest version of Measurement Studio compatable with the .net compact framework?
    I'd like to be able to use some of the Measurement Studio objects in an application to run on a PDA running PocketPC 2003.

    Regretably, we have not seen enough customer interest for Compact Framework Measurement Studio class libraries to justify the development expense. I will document your inquiry.
    Any additional information about your needs would be useful to me in documenting your request. For example, which controls, libraries, and hardware (e.g., analysis, DAQ, serial) would you use, what types of applictions you would develop, how many development licenses would your request would cover, and how many run-time licenses (if we were to choose to have run-time licenses for the Measurement Studio Compact Framework libraries) would you need per year.
    Some PDA application scenarios can be covered with the ASP.NET controls. If your PDA application just needs to act as a display for a headless device (such as a PXI chassis), you could implement an ASP.NET application on the headless device and access it from a web browser on the PDA via a wireless network. Would this work for your application or do you need a rich client on the PDA?

  • Using Measurement Studio with Silverlight

    Hi,
    Does the newest Measurement Studio support usage in a Silverlight project? It does not in my version (2009).

    Hi Willy,
    Thanks for your answer, I was trying to embed a NIDaq application in a webpage, so I was exploring all the options, I found thooses:
    -Develop an XBAP application (does not seem to be compatible with more than IE and Firefox(with some actions) under Windows, plus I haven't found the way of making it work with NIDaq)
    -Develop an ASP.NET application (maybe it is because I don't have much knowledge of it, but it does not seem to fit my needs as I am activating DAQ Digital Output when mouseenter and mouseleave on a led events are fired(which I manage on client side with javascript), and asp.net refresh the whole page each time, I would need it to refresh the control only).
    Do you have any suggestions on how to make a measurement studio daq application embeded in a webpage to control an NIUSB6501 board connected to the server?
    Thanks,
    Best Regards,

  • How do I perform an FFT or ReFFT in VB6 using measurement studio

    I am trying to make a filter by taking a 1D array of voltages and doing a ReFFT() and padding the high frequencies in the array with a value of zero and then going back to time domain with ReInvFFT().  Here is my code which does not seem to be filtering any high frequency content.
    lngReturn = frmMain.CWAI1.AcquireData(varData, varBinaryCodes)
    frmMain.CWDSP1.ReFFT varData, realdata, imgdata
    For i = (UBound(realdata) / 100) To UBound(realdata)
        realdata(i) = 0
        imgdata(i) = 0
    Next
    frmMain.CWDSP1.ReInvFFT realdata, imgdata, varData
    After the function is done varData has a 1D array of filtered real voltage values.  It does not seem to be filtering and I get back exactly what I pass in.  I know it must be something simple that I am missing perhaps the variable cannot be used to pass in and then  back out the values??
    Please shed some light as there are NO examples of this use of FFT.
    Thanks

    Arthur,
    Thank you for your reply.  But at this point, one of my points of confusion is what software I have available to me.  I wish I had a useful central help desk to call up and just say, "Hey, load me up with all of the professional version(s) of Visual
    Studio.  But I do not know what we have license to.  And I kind of need to know what the options are, so that I can ask a specific question of our vast buracracy.
    For now, I have downloaded only free versions of Visual Studio client software.  Since my company does have servers running Microsoft SQL Server, I am going to assume that we have proper licensing for those servers.  But does that server license
    allow me to get any professional versions of the PC client software for the various Visual Studio(s) 2012?
    And if I get a professional version of Visual Studio 2012, does that do away with the three different flavors that I have right now?  I have 2012 versions of SQL Server Management Studio, Visual Studio Express, and Visual Studio Shell (Integrated).
    Your feedback is much appreciated.
    Thanks!

  • How do I print the displayed graph? I am using Measurement Studio for Visual Basic.

    a

    It is true that calling the PrintForm method is the easiest way to print your graph. However, if you wish to print only the graph, and not the rest of your form, there is a way to do this also.
    The CWGraph control, and some other CW controls, supports the ControlImage method which returns a Windows metafile containing an image of the graph. You can then send this image to your printer using environment-specific printer commands.
    In Visual Basic, use the Printer.PaintPicture command to send the metafile, and top and left coordinates to the printer. Then call Printer.EndDoc to flush the job to the printer:
    Printer.PaintPicture CWGraph1.ControlImage, 0, 0
    Printer.EndDoc
    In the above code, the second and third parameters specify the position of the image o
    n the page; you can also enlarge or shrink the image by specifying width and height. You may want to take a look at the Visual Basic PaintPicture function help for more details on this function.
    J.R. Allen

  • Installing Measurement Studio 2010 has caused error PRJ00003 errors in VC Projects

    After installing MS 2010, I tried opening and even creating a basic project from existing code and when compiling, I am now getting the following error:
    error PRJ00003: Error spawning 'rc.exe'
    which seems related to not being able to find kernel32.lib
    Anyone know any insight about this?  I've found lots of other people having this issue and it seems some path or something got messed up.  Just wanted to check to see if anyone else had this happen.
    Some system info
    C:\Program Files\Microsoft SDKs\Windows has v5.0 folder with Include and Lib\IA64 folders (kernel32.lib is in there) and a v6.0A folder which has an empty bin folder and Bootstrapper with bunches of stuff
    And my MVS folder is such: C:\Program Files\Microsoft Visual Studio 9.0
    And regedit sdk key has CurrentIA64Folder and Version as the two keys pointing to v5.0

    Hi ngay588,
    I have a couple of questions about what you are experiencing:
    1. Is this happening  with all projects or do projects not using Measurement Studio functions compile successfully?
    2. I'm assuming you are building Visual C++ projects, but have you tried compiling other projects in Visual Studio?
    3. What version of Visual Studio are you using?
    Also, some things to check:
    1.  Some people who have ahd this problem found that their virus scanner thought rc.exe was an infected file and was isolating it.
    2. Check to see if rc.exe is located in the following:
        C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin
        C:\Program Files\Microsoft Visual Studio\VB98\Wizards
        C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin
        C:\Program Files\Microsoft Visual Studio 8\VC\bin 
    Regards,
    Hassan Atassi
    NI Community Project Engineer

Maybe you are looking for