NI Tutorial 4070

download NI Tutorial 4070

of 1

Transcript of NI Tutorial 4070

  • 8/3/2019 NI Tutorial 4070

    1/11/1 www.ni.c

    Debugging DLL-Based IVI Drivers from LabVIEWUsing LabWindows/CVI

    1.

    2.

    3.

    4.

    5.

    6.

    7.

    8.

    9.

    10.

    11.

    12.

    13.

    14.

    15.

    You can develop Interchangeable Virtual Instruments (IVI) instrument drivers in LabWindows/CVI and create an interface to run the IVI drivers in LabVIEW, but debugging such a driver from withi

    LabVIEW can be difficult. Complete the following steps to debug DLL-based IVI drivers from LabVIEW using LabWindows/CVI. To complete these steps, you must have LabVIEW and CVIinstalled.

    Make a backup copy of the released DLL, which is in the VXI plug & play ( ) directory.VXIpnp\WinXX\Bin

    Create a project that contains the following file types: and ..c, .fp, .h, .sub

    Open the file in LabWindows/CVI..fp

    Select .OptionsCreate DLL Project

    Save the project. Click when prompted if you want to load a DLL project.Yes

    If you do not have a debug build of the DLL, you must make one. Otherwise, continue to step 8.

    Select . In the Debug configuratio n, LabWindows/CVI uses the current Debugging Level to determine how much debugging information to generate for theBuildConfigurationDebug

    debug executable or DLL. In the Release configuration, LabWindows/CVI does not generate any debugging information into the executable or DLL.

    Because LabVIEW looks for a DLL in the directory, select and use the arrows to navigate to directory in the list, asVXIpnp BuildTarget Settings VXIplug&play Where to copy DLL:

    shown in the following illustratio n. Click .OK

    Select to launch LabVIEW.RunSpecify External Process

    Click the button, navigate to , which is usually located in , and click the button.Browse labview.exe c:\Program Files\National Instruments\LabVIEW OK

    Select . You should receive the following message.BuildCreate Debuggable Dynamic Link Library

    Open file. Select . The line icon area appears to the left of the source code. Click the line icon area next to a line in your source code (for example, in thea .c ViewLine Icons

    InitWithOptions function) to create a breakpoint.

    Click to launch LabVIEW.Run

    Open and run a VI you want to debug.

    The program breaks when program execution reaches the line with the breakpoint.

    Legal

    This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial ma

    not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS

    TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF US

    ).http://ni.com/legal/termsofuse/unitedstates/us/

    :Document Type Tutorial

    : YesNI Supported

    : Oct 31, 2008Publish Date

    http://ni.com/legal/termsofuse/unitedstates/us/http://search.ni.com/nisearch/app/main/p/lang/en/pg/1/ap/tech/sn/catnav:tu,ssnav:dznhttp://search.ni.com/nisearch/app/main/p/lang/en/pg/1/ap/tech/sn/catnav:tu,ssnav:dznhttp://ni.com/legal/termsofuse/unitedstates/us/