Measurement Studio Visual C++ 6.0 Multithreads

I want to use the dialog editor to add NI controls to a dialog (or CFormView) and want to set CNiInterface to SingleThreaded. How do I do this. I do not want to create the controls dynamically because I do not want to deal with license strings. I get an error if I close the dialog box when a control is added with the dialog editor. Is this because the controls by default are created as multithreaded with caching? I get by this by calling destroy window on the control. Is this the proper way? Will I have to do this if I use singlethreaded?
Next the documentation says I need to initialize COM. Is this true. Is it not enough to call
AfxEnableControlContainer() in OnInitInstance of my application.
By the way
National Instruments, Your documentation leaves quit a bit to be desired!! Good grief.

The default thread access for the Measurement Studio C++ controls is CNiInterface::MultipleThreadsWithCaching. You do not have to dynamically create the control if you want to create the control with CNiInterface:ingleThread - just specify it in the dialog class constructor's member initialization list. For example, if you had a dialog class called CTestDialog and you had a member variable for the graph in the dialog class called m_graph:
CTestDialog::CTestDialog(CWnd* pParent /*=NULL*/)
: CDialog(CTestDialog::IDD, pParent), m_graph(CNiInterface:ingleThread)
Also, you should not need to initialize COM to use the controls in a dialog. The call to AfxEnableControlContainer in your InitInstance method should be sufficient.
- Elton

Similar Messages

  • 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

  • Application distribution Measurement studio

    We have now developed a software application using Measurement Studio and VC++ for "capturing" live communication data from line as step 1 of the application and "analysing data" separately as step 2. We can do the 2 steps without any problem on a data acquisition machine. However, when we run the same application on a desktop PC (not a digitizer or not connected to digitizer) we expect the application to RUN only step 2. The question here is then, in order to set application up on a desktop PC (not a digitizer or not connected to digitizer) what changes I should do (in terms of un-tying NI scope acquisition functions)?
    NI Software : Measurement Studio for Visual C++ version 7.0
    NI Hardware : High-Speed Digitizers (Scopes) device PXI-5122
    Driver Version : NI Scope 2.6
    OS : Windows XP

    THanks for response.
    >>> Aha, I didnt realize that you were using the C++ scope classes. The scope driver does not >>> get loaded until the very first call to the scope class. So you would not need to setup >>> delay loading nor would you use LoadLibrary or GetProcAddress.
    Our application was developed using MFC VC++ 2003 .NET edition. Sorry I missed the details.
    >>> You will get an exception when you use the CNiScope constructor and if the system does >>> not have the scope driver installed.
    Exactly, I do get an exception when I use the CNiScope constructor. However, what I do is create CNiScope 2 times. The first time a dummy construction is done with function like this...
    bool CMainFrame:copeExists(void)
    bool scopeExists = true;
    CString errorMsg = "NiScope device absent.\r\nNo Scope controls will be available";
    try
    // Instantiate a scope to test is it exists
    CNiScope ProbeScope ("PXI1Slot2", false, false, "");
    catch (CNiIviException* e)
    e->Delete();
    AfxMessageBox (errorMsg, MB_OK | MB_ICONEXCLAMATION);
    scopeExists = false;
    return scopeExists;
    I use the returned boolean to identify if scope driver is PRESENT or ABSENT in the system. Using this boolean result I then do the actual scope dialog bar and CNiScope construction (the second time is when the actual CNiScope is created and used).
    If boolean is FALSE
    no scope dialog bar controls is created
    only the analyses dialog bar controls are created
    else
    application starts up with scope and analyses dialog controls
    >>> Are you using the .NET class libraries? Or is this just MFC code?
    Just MFC code with Measurement Studio
    >>> For a list of components that need to be distributed, refer to the Measurement Studio Help topic Distributing Measurement Studio Visual C++ Applications.
    This was helpful to the extent that I got the active X controls loaded and distributed with application. But analyses part of application crashes when it tries to use the CNi such as CNiMatrices, CNiReal64Vector. I found this using the debugged in Microsoft's VC++ .NET 2003.
    >>> Are you checking for exceptions when you start the analysis routines?
    I do have a few exceptions being checked. However, can you tell the exceptions you have in mind that need to be included.
    >>> Is this crash happening on the development machine or the deployment machine?
    The crash is happening only on machines NOT having scope drivers. I tried on a 2 machines.
    One WITH Measurement Studio and WITHOUT scope controls - it crashes
    Second WITHOUT Measurement Studio and WITHOUT scope controls - it crashes
    Is there something I am missing??
    >>> Could you provide more information about the crash, perhaps a code snippet or a sample app ( with only the analysis section).
    Here is code snippet....
    m_digIntpolRowLength and m_digIntpolCoeffRows are unsigned int types.
    m_farrowFilterCoeff is CNiReal64Matrix type. This is the first moment in application when a CNi is used. When the matrix elements are loaded with values, it crashes at the line
    m_farrowFilterCoeff(0,0)=0.00252;.....
    I know this may or may not give you whole lot of information. If we can go offline from discussion forum (becuase of proprietary information), I can provide more details about application etc. Thanks.
    void CDAQ_DigitalInterpolator::ResetLarge(void)
    m_digIntpolRowLength = c_digIntpolRowLengthLarge;
    m_digIntpolCoeffRows = c_digIntpolCoeffRowsLarge;
    m_farrowFilterCoeff.SetSize(m_digIntpolCoeffRows, m_digIntpolRowLength);
    m_delayLineBuffer.SetSize(c_delayLineBufferSize);
    m_delayLineSize = m_digIntpolRowLength;
    m_delayLinePtr = &m_delayLineBuffer[c_delayLineBufferSize - m_delayLineSize];
    /////Row 0//////
    m_farrowFilterCoeff(0,0)=0.00252;
    m_farrowFilterCoeff(0,1)=-0.0087823;
    m_farrowFilterCoeff(0,2)=0.0218283;
    m_farrowFilterCoeff(0,3)=-0.046127;
    m_farrowFilterCoeff(0,4)=0.0909993;
    m_farrowFilterCoeff(0,5)=-0.1884611;
    m_farrowFilterCoeff(0,6)=0.6283543;

  • NI Measurement Studio UI components for Visual Basic 6.0 message box

    Hey All,
    North West Quality Analyst was recently installed on my LabVIEW development machine. Whenever I launch NWQA I get a dialog box to install "NI Measurement Studio UI Components for Visual Basic 6.0" for program called "Program Name."
    I cancel out of the install and I can use NWQA just fine. However, I would like to eliminate the install attempt. Any ideas on how to do that?
    I've tried to find the installer file on the Distribution discs, but on the two that I thought it would be on, "Measurement Studio Enterprise Support for Visual Studio 6.0" and "Measurement Studio Enterprise Edition" the file named "MStudioUIDemo.msi" was not found.
    Thanks,
    -Andrew

    Below is the text from the event viewer warning...
    Detection of product '{7B0F253A-C7A2-4335-B041-99868E9EDEE8}', feature 'UI_Controls', component '{A44FC66B-252B-11D4-A77B-00104B6CE77D}' failed. The resource 'C:\WINNT\system32\CWHlpBtn.ocx' does not exist.
    I have lots of stuff installed on the computer... MS Office, Codewarrior, Roxio, IE, MatLAB, etc.
    Looking under MAX, I have the following NI software installed.
    LabVIEW 6.1 (Advanced Analysis, Application Builder, Database Connectivity Toolset), 7.1 (Advanced Analysis, Application Builder), Runtime 6.0, 6.1, 7.0, 7.1, MAX 3.1.1.3003, NI-488.2 2.20, NI-CAN 2.2f2, NI-DSA, NI-IMAQ, NI-Motion, NI-PAL, NI-Switch, NI-USI, NI-VISA 3.2, Measurement Studio 6.0 (For Visual Basic(ActiveX User Interface, ActiveX 3D Graph, ActiveX DataSocket, ActiveX IMAQ))
    The Dell box is running Window's 2000.
    I found a listing under "Computer Management" -> System Information -> Software Environment -> Loaded Modules
    that seems to have all the installed apps and such. I can send that to you privately if you desire.
    Thanks,
    -Andrew

  • What version of Measurement Studio do I buy for Visual Studio 6.0?

    I am consulting for a company that requires me to use VB 6.0 and I am looking for the NI Measurement Studio version to purchase but this particular part of this web site is as confusing as HP's(Agilent) so I have yet to figure it out. The evaluation software I have for Measurement Studio lists Visual Studio.net 2003 as a requirement. Has NI assumed everyone has migrated to .net?

    National Instruments is actually one of the few companies that IS still supporting Visual Basic 6.0. We currently offer both an evaluation for Visual Studio 6.0 and Visual Studio .NET. From the Measurement Studio home page (ni.com/mstudio), you will see two different path options: 6.0 & .NET. If you select the 6.0 option and scroll down, you will see the option to request the 6.0 evaluation software here: (https://sine.ni.com/apps/we/nigb.guestbook?code=GB_EVALMSSTUDIO6〈=US&gb_prof_id=1907&scode=&pr=1907).
    To purchase the 6.0 tools, you simply need to purchase Measurement Studio 7.0 which includes the 6.0 tools as outlined in the package comparison chart here: http://volt.ni.com/niwc/common.jsp?page=mstudio_package_compare&node=3769
    The Measurement Stud
    io 7.0 packages (Professional and Enterprise) include both the Visual Studio .NET and Visual Studio 6.0 tools.
    Please feel free to contact me if you have any further questions.

  • Salut je cherche un logiciel support measurement for visual studio 6.0

    j'ai installé le logiciel measurement studio for Visual studio C++ 6.0 mais chaque fois il me demande d'installer le microsoft visual studio que j'ai installé mais aucune résultat

    Avez-vous l'installation de Microsoft Visual Studio avant d'installer de mesure de studio? L'environnement de programmation doit être installé en premier.
    Ian M.
    National Instruments

  • Can you tell me how to measure audio signal frequency in measurement studio with visual basic 6.0?

    I'd like to measure two differential input signal(I.e. A+ and A-),below is two test projects,
    1.connect A+/A- to PCI 6052E card's ACH0/ACH8 ,and refer to GND for testing
    2.connect respectively A+/A- to PCI 6052E card's ACH0/ACH8 for testing
    Could you tell me the details of the second project?and give me a illustration in measurement studio with visual basic 6. 0 about the second?
    In addition,I would like to measure the audio signal frequency,could you give me a illustration in measurement studio with visual basic 6.0?
    Wait for your reply!

    Dear kelven,
    Thank you for contacting National Instruments.
    To address your question, there are Analog Input shipping examples that demonstrate how to measure an analog input differentially, as you specify in (2).
    As for measuring the audio signal frequency, you may want to check out the following KnowledgeBase. The link is:
    http://digital.ni.com/public.nsf/websearch/4b08380530d72d3b86256340004c3005
    Let me know if you have any further questions or if this does not resolve your issue.
    Thanks again and have a great day!
    Chad AE
    Applications Engineer - National Instruments

  • Setting Z Order of measurement studio controls in Visual C++

    How can I set the Z Order of a measurement studio control (such as a button, numeric edit, etc.) from within a VC 6.0 application? I have several overlapping controls in which the first control is on top and the controls I apply later are below. I must go through all kinds of gyrations to control the Z Order.

    Tab order in Visual C++ dialogs controls Z-plane order. You can set the tab order under Layout->Tab Order. The lower the number in the tab order, the higher on the Z-plane.
    Best Regards,
    Chris Matthews
    National Instruments

  • 有measurement studio for visual c++ 6.0方面的资料吗?

    measurement studio for visual c++ 6.0在本论坛讨论很少,能给一些连接吗?

    您可以参考下面的链接:
    http://www.ni.com/support/toolsupp.htm

  • Why can't visual basic 6 load CWDAQ.OCX in the example programs? I am using the latest Measurement Studio 6 and VISTA OS.

    Can someone help me with getting controls to work with Visual basic 6 in an Vista environment?  I cannot get the examples to work that use the CWDAQ.OCX control.  I did a search on my computer and the file is not even there.  What functions are in CWDAQ.OCX?  Is there a descriptions of what functions are included in this control and other controls?  It is not obvious where to find these descriptions. 
    I did install Measurement Studio 6 with all the options for Visual basic 6.
    I am new to programming NI cards with visual basic so any help in getting me started will be greatly appreciated. 
    I need to talk to a PCI-6110 card in visual basic 6.  I would like to preprogrammed the D/A fifos, store to two analog inputs simutaneously, and use some of the digital I/O.  Can someone direct me the direction as to what controls I need to use?
    Thanks in advance for any help or guidance. 
    Tony

    Hi Tony,
    So the reason you can't find the CWDAQ.OCX ActiveX controls in VB 6.0 in Vista is because that is a Tradtional DAQ (legacy) control meant to work with the Traditional DAQ Driver.
    The Tradtional DAQ drivers aren't officially supported in Windows Vista (KnowledgeBase 4FDH4MZN: Traditional NI-DAQ (Legacy) for Windows Vista OS) and so the CWDAQ.OCX controls don't get installed.
    However, the good news is that the PCI 6110 is a newer card that uses our newer driver, NI-DAQmx. DAQmx is supported in Vista and you can communicate to your card from VB 6.0 using DAQmx in Vista.
    There are several examples that show you how to communicate using DAQmx in VB 6.0.
    These can be found in:
    <Users>\Public\Documents\National Instruments\NI-DAQ\Examples
    This is also mentioned in the following Knowledgebase article:
    KnowledgeBase 47CCSQ5B: NI-DAQmx, NI-VISA and NI-488.2 .NET Example Locations
    Also, the DAQmx functions are documented in the following locations:
    Start»Programs»National Instruments»NI-DAQ»NI-DAQmx C API Visual Basic 6.0 Help
    Start»Programs»National Instruments»NI-DAQ»NI-DAQmx C Reference Help
    Hope this helps!!
    Message Edited by Jervin_J on 06-05-2008 02:58 PM
    Jervin Justin
    NI TestStand Product Manager

  • Measurement studio for visual studio 2005

    Hello, I'm currently using an ELVIS-II with Visual Studio 2005 for the measurement studio. I'm attempting to light up the 8 LEDs on the right of the ELVIS-II using a connection to the DIO 0 - DIO 7 ports, and a Digital Output program created using the NIO DAQ Windows application. However after I compiled the program and clicked the "Write" button on the Form1.cs it displays a message saying "You must populate the data to write before writing the data" . Can someone explain to me what's wrong with the program? many thanks: )
    Attachments:
    LEDerror.JPG ‏174 KB

    So sorry, the code I've posted was sightly modified by me while trying to find a solution. This is the "unmodified" version. basically the "//" was removed before the "throw new System.NotImplementedException("You must populate the data to write before writing the data.");" line.
    Attachments:
    LEDRun0003.txt ‏2 KB

  • Measurement studio plot data vs. date/time (Measurement studio for Visual Basic 6)

    Hi, I'm trying to do something that should be simple and appears totally possible but I can't get there.
    I'd like to plot some data on the y axis vs. the date/time on the x-axis.  I've looked at the samples, and tried modifying the chart properties but I'm doing something wrong and can't get it properly.
    Any chance someone has a very simple example of plotting a few points vs. date/time that they can share?
    Thanks for any feedback!!

    Hey Larrymcd,
    What format is your date/time currently in? That might help us find the best way to do this. I was able to find a few examples of plotting a graph with time on the X-axis:
    http://forums.ni.com/t5/Measurement-Studio-for-NET/Measurement-Studio-Graph-to-plot-with-time-scale/...
    http://digital.ni.com/public.nsf/allkb/FFC867DDE42029BA8625760300477BEB
    http://zone.ni.com/devzone/cda/epd/p/id/3334
    Hopefully some of these can point you in the right direction. If you have any more questions after checking those examples out, please let us know!
    Daniel E.
    TestStand Product Support Engineer
    National Instruments

  • How can i understand all the functions provided in the measurement studio for visual c++?

    Hoew do i choose the AppWizard wich ensure i have the correct header files, libraries...? What is th eMFC ClassWizard use for? How can i more understand all the functions provided in this software?

    Hi,
    It all depends on what you want to do! but in general to use MStudio the best way is to select a NI Measurement Studio AppWizard this way you will have all the classes for the MStudio components to gether with a dilog based MFC application.
    The ClassWizard will help you create classes for the components of your user interface, you can use it with the MStudio components just the same way that you use it with any control in VC++.
    If you go to the start menu and programs you should see under National Instruments a link for MStudio where you can access the help file with all the information on the components and classes. However for specific tasks or questions the best way is to use http://www.ni.com/support.
    Good luck!
    Regards,
    Juan Carlos
    N.I.

  • Visual Studio 2012 crashes at startup after installing Measurement Studio 2013

    Hi,
    History:
    VS2012 (with Update 4) has worked without problems for a few months.
    Installation of Measurement Studio 2013: at first, everything is ok.
    Reboot of the PC: VS2012 crashes at startup, showing the splash screen, "not responding"
    Deinstallation of Measurement Studio: VS2012 is working again.
    Re-Installation of Measurement Studio: VS2012 is crashing again.
    Repair-Installation of Update 4 of VS2012: VS2012 is working again ... until a reboot of the PC.
    Starting VS2012 in SafeMode: working, but i cannot use Measurement Studio in this mode (of course).
    PC is Windows 7 Professional 64Bit, Service Pack 1
    I also reinstalled VS ... without success. Any other ideas?
    Log of eventviewer has two entries, see attached File

     
    Hi,
    There were no updates during that night, but some during last night. And I'm not sure if the update 4 really is responsible for that behaviour:
    Yesterday after the crash I installed Update 4 again: it worked. Reboot: it worked.
    Starting System right now: it is crashing again.
    Currently  there are 3 Updates on the system related to VS:
    KB2707250 (The Update 4)
    KB2781514
    KB3002339
    With KB3002339 an issue with ASP.NET will be fixed. Well....i'm not using ASP.NET, just a step in the dark: i made a repair installation of this update and it is working again. How long? Maybe even god doesn't know ...

  • I have programmed a visual basic application using activex controls. WHen I run this application through internet, it appears a message box indicating that the measurement studio is a demo, but I have the correct license. What can I do?

    I run the application in a computer without measurement studio because my application is stored in a web server and I access to the application downloading it from a web page of that server.

    Have you included the lpk file with your control? I've attached the tool you'll need and here is a nice link that goes thru it step by step.
    Hope this helps
    Bilal Durrani
    Bilal Durrani
    NI
    Attachments:
    lpk.zip ‏74 KB

Maybe you are looking for

  • Plug the converter into an adapter?

    Will my 60w MagSafe Power Adapter that came with my MacBook work if I plug it into one of those simple outlet adapters for Europe. Because I know it does it's own converting so I figured...

  • Dynamic Text in Externally Loaded swf

    hi. i have a dynamic text field in an externally loaded swf. Its a digital clock so i want the numbers to update in the dynamic text field. this is not my exact code but it is very similar. i show below that i add the loader.swf, and once its loading

  • Slow TCP performance for traffic routed by ACE module

    Hi, the customer uses two ACE20 modules in active-standby mode. The ACE load-balances servers correctly. But there is a problem with communication between servers in the different ACE contexts. When the customer uses FTP from one server in one contex

  • Don't have 2560x1440 resolution on Dell U2711

    Hi, I've recived the mac today and I have a monitor DELL U2711. The monitor is connected with an HDMI cable. This is what I can set now. Someone know what I can do to get 2560x1440 resolution? Thanks Ivan

  • Where can I download JUST the uninstallers? A Catch 22 mystery....

    MacbookPro, 2.9 gHz Intel Core I7, OS X 10.9.2 I'm in a weird Catch 22 situation, I recently wiped my hard drive and used a backup disk to reinstall everything, but for whatever reason, I didn't get either the Adobe CC uninstaller or the CS6 uninstal