Creation of DLL with LabWindowsCVI or MSVC?

Hello

first of all, I'm new on LabWIndows/CVI, but some experience with LabVIEW.

So far, I usually create DLLs with MS Visual Studio and call functions exported with the library call node-VI.

These dll provides some specific functions that are used in applications in real time and no time real (Windows, PXI and cRIO)

Now, I saw that it is also possible to create DLLs with LabWindows/CVI.

Is there an advantage using LabWindows/CVI? As special libraries that can be used, better integration with the rest of an application LabVIEW etc.?

For now, I don't know for what purpose LabWindows/CVI should be used when creating LabVIEW applications.

Could someone please give some short information if LabWindows/CVI provides better ways to create dlls for LabVIEW?

Thank you

Christian

I wouldn't say that there is no benefit - if you develop a CVI application, then you have as a project CVI rather than being too dependent on one non-ICB IDE (for example. MSVS).  I usually group CVI application jointly with one or more DLL projects in the same workspace of the CVI.

If you develop an application, MSVS, there is no advantage to the DLL in CVI that I can think of, unless you want to use libraries OR you cannot attach directly from your application MSVS - and I'm not sure that there are some who are like that - I think that you have access to the most If not all libraries OR through Measurement Studio when you use MSVS as your application development environment.

Maybe someone of NEITHER can talk to the question that there is an advantage to the use of DLL of CVI authors with a LabView application.

Tags: NI Software

Similar Questions

  • Access a dll with a table as argument in Teststand

    Hello

    I did a dll with the following function call:

    __stdcall __declspec (dllexport) int FSCOM_ModbusQuery (int nComport, ucAddress unsigned char, unsigned char ucFunctionCode, unsigned char ucTxData [], int nTxDataLength, unsigned char ucRxData [], int nRxDataLength)

    I want to access this function call in Teststand 2010 SP1. I did table 2 in Teststand and gave addresses to the function call (as you can see in 'Capture.png' and 'Capture1.png').

    When I try to run the sequence I get an error on the ucTxData and the ucRxData with the message "number expected, found the table of numbers.

    How can I solve this problem

    Thanks in advance

    Wissam

    I think you have misunderstood what I wanted. In the specification of the Panel Module tab, you can change the type of data that the function expects. You probably set on the wrong thing. It must be set to an array of numbers where the elements are unsigned 8-bit integers.

    -Doug

  • How to add a secondary axis in a chart excel with labwindowsCVI?

    Hello
    I am currently working on LabWindowsCVI and I treat my data in excel files. I use ExcelReport and Excel2000 instruments to build my data tables and my chart. Track, I use this function:
    ExcelRpt_ChartWizard (chartsheetHandle, ExcelWorksheetHandle, "A1: C619" ExRConst_XYScatterSmoothNoMarkers 0, ExRConst_Columns, 1, 1, 1, ' consumer mobile platform ","TIME (sec)"," current / voltage (in V & A) ", NULL);
     
    In this configuration, column A is X axis and B & C (Y axis) my blood given respective & current.
    My graphics are drawn correctly, but I find a problem, 2 curves are on the main axis and I want a trace on the main axis and the other on the secondary axis. I can not to display a secondary axis.
    This action is possible with LabwindowsCVI function and if so, can you tell me which work?
    Thank you in advance,
    Nicolas

    Thanks a lot dcl9000.

    I wrote these functions after that to trace my chart and the secondary axis appears .  It was necessary to create a second graphic handle to separate both my curve. Thanks to you, now I know a new function of Excel and I think that I will need in the future.

    Kind regards

    Nicolas

  • For the complex data type, how to generate the Dll with compatible interface to C/C++

    Hello

    I used the Labview FPGA module to develop test equipment. Now, I need to write a driver that is to be a Dll with compatible interface to C/C++ for this equipment. So that my client who is familiar with C/C++ can call the driver without any study on labview. But I had a few problem on how to convert labview for C/C++ data complex data type. To clearly explain to my question, I have attached a simple example. (see attachment) I try to generate a Dll for the attached example VI and get the the function prototype at the head of the files as below:

    ' void OpenFpgaReference (LStrHandle * RIODevice, TD1 * errorIn, LVRefNum * FPGAVIReferenceOut, TD1 * errorOut).

    As you have known, the type of data "LStrHandle * RIODevice" and "LVRefNum * FPGAVIReferenceOut" Labview data format are. C/C++ do not have this kind of data type and can not reconige it. As a result, I can't call the Dll of C/C++ programming language. How to convert these two data type of labview for the C/C++ compatible data format, and then build the Dll? Anyone know about this?

    The answer is really apprecaited! Thank you in advanced.

    Ivan.Chen wrote:

    As I found in the following article:

    http://digital.NI.com/public.nsf/WebSearch/FB001AA027C8998386256AAD006C142D?OpenDocument

    LVRefNum is the name of resource of LabVIEW VISA or refnum, and "it is impossible to convert LabVIEW VISA name of resource or refnum VISession valid ID."
    This means that external code modules can not access & control the session VISA which is open by labview. But for my purposes, I will not attempt to access this VISA extenal code(C/C++) session. I just hope that save this session VISA in the external code once I opened it in Labview dll; and pass it to the labview dll when needed. While I have not need to login again when I need to control the device. Is it possible to do?

    A LVRefNum is really just a single int32 value. Its meaning is useless for other environments than those who created it so that you Michael not any what in C/C++ caller but pass it back to other functions in your DLL, but this often isn't a problem at all.

    You can take the following statement of the LabVIEW extcode.h headers and add them to your delabviewed header files to make it work in such a way.

    #define Private (T) typedef struct T # _t {void * p ;} * T}

    Private (LVRefNum);

    The LStrHandle you must set a standard C string instead in your export DLL and document what is the size of the string buffer should have if it is an output parameter.

    TD1 error clusters should also be divided into their parameters (C compatible) separate for all items or just to the left of suite entirely.

    Rolf Kalbermatter

  • could someone give me direction towards the creation of assets with REST/javascript

    could someone give me direction towards the creation of assets with REST/javascript?

    There is a sample packaged with webcenter sites to Misc/articles. You must implement the controller of proxy which serve as an indicator of xmlhttp request.

    The proxy will redirect the REST request to the target server resource

  • Using a dll with java

    I have to use a dll microsoft with java.
    This dll allows a specific signature of SMIME. I know some more details about it.
    I loaded the dll with System.loadLibrary ("cnascapi"); but I don't know what to do next.
    I tried
    cnascapi test = new cnascapi();
    but the error is "cannot find symbol: class cnascapi.

    Thank you.

    Google for JNI tutorial and/or the tutorial of the JNA.

    JNI is the traditional way to access native libraries via Java. JNA is a newer approach that is supposed to be simpler.

  • Can I make an executable or a DLL with my extension?

    Hello

    I am completely new to the extensions package/signature and have a question before I spend too much time on the development of something that might not work.

    I need to offload certain expensive and this operations making a file executable or a DLL would be ideal.  Would not be a hybrid Extension like the docs on the creation of plugins Photoshop SDK and connecting them to the panels are much too complicated for me to follow and seems to have exceeded the information contained in the various PDF files.

    This executable must be run as a process, either by the CEP extension functions or the node.  Alternatively, I can opt for a DLL library which is loaded by JSX.

    Can one of these to be bundled with my Panel, or restricted the conditioning process which files can be included?  I have to use my own Installer deployment and not be able to use the portal of Add-ons?

    Thank you!

    You can use the api node child_process to spawn an instance of an executable. Nothing prevents you executable in something like a /bin/ directory in your extension package and then he shot with node when the extension runs.

  • With the help of a .dll with a CVS 1458RT file

    Hi, I am a student engineer currently working in my internship. I want to build a program with some OpenCV libraries using the .dll files. I can run in LabVIEW on WindowsOS. I used Visual Studio to compile and make my own .dll files. But I want to load on a CVS 1458RT. I read that this particular CVS uses 'Real-time NI Linux.'  My question is if I can load a .vi with .dll files on this particular CV, or if I have to compile the .so files so he could read since it runs on a Linux environment? I haven't tried to load it with .dll and afraid to do.

    According to this, you must compile with specific OS file type: http://digital.ni.com/public.nsf/allkb/2EA49B05E67DDECF86256F9A006FB315

  • How unload us a DLL with several different COLD?

    Hello world

    I am designing an application that implements several functions of a DLL that I build.

    I call two functions one after another to get the results of my functions. The first function (Read_Property) made many operations and saves its information in a layer of data inside the DLL. (Basically certain static arrays of string). The second one (get_Data_Array) is just a "get" function which returns the string at a position that is defined in a table.

    The first version of my application was a state machine with a façade where the user just had to enter the parameter of the function, then press a button. I wasn't unloading of the DLL at any time because I thought that LabVIEW makes itself when I close the instance of the application. I got excellent results and everything was fine and that I could make multiple calls to my pair of functions without having any problem. However, I discovered a bug when I close the instance of my application and I started another. My first function got a timeout for no apparent reason. I worked with my DLL in a context of C and I know that this kind of bug appears when multiple instances are running at the same time. After a time out, the only thing I could do to fix this was to restart LabVIEW.

    So, I think my problem comes from the fact that there is interference in some static in the first function variables because the DLL has not been discharged properly. After that, I tried to unload the dll in the last State of my state machine because it wipes out all static variables, but it was not a success. The same problem was still present. After that, I tried encapsulate my problem to a single VI. So I just tried to run my 2 functions for one after the other and then unload the DLL by connecting an empty path both of em. As my first version, after two or three tracks of my VI, I am a time-out again.

    My VI looks like this:

    Why does my DLL doesn't unload?

    Thank you

    I have some progress here.

    I just added some check to see if the DLL was attach/detach, so I would like to know if the DLL was unloaded or not.

    After a lot of testing, I realized that my first version was loading/unloading successfully my DLL every time.

    However, I still have my time-out and I bet it's because different threads execute my DLL at the same time.

    I'm going to do another topic for my problem, because it is not the same topic.

    Thank you for your help.

  • analyze the dll with the dependency walker tool

    Hello guys,.

    I can't understand why a dll from LV (probably made with LV2012) is not recognized as a windows dll to be valid by depends.exe (dependency walker tool).

    I want to know version information or more...

    Koen.


  • generation of a dll with image error

    I work with Labview 2009 and the vision module. Please find attached a project that has a DLL function. The function just to get the image and return it back without doing anything. Compilation fails, giving messages that are not relevant. Could someone advice? Concerning

    Hi gabi_hor,

    If you expand the error message, you will notice that it says that the manufacturer of the DLL is not properly registered and tells you to execute a certain file lvdb.exe. That run and rerun your build. This time, it will probably be faily with error '-2147221480 '. It is a known issue with LabVIEW 2009. It is listed in the known issues Page.

    Workaround: 1. open C:\Program NIUninstaller Instruments\LabVIEW 2009\cintools\fundtypes.h in a text editor.
    2. find the line that says #include .
    3. top of the line, add the following lines:
    #ifdef _CVI_
    #include
    #endif / * _CVI_ * /.
    4. save the file.
    5. repeat the build.

    These two things should build your DLL.

  • Using nilibddc dll with Python types

    I try to use this 'DiaDEM connectivity library' with Python to read files produced by our acquisition of data in the format *.tdms system, but examples of dll are all for C and Matlab. Has anyone else done that could give me advice? I made some progress (see below) by trial and error, but it is slow and I have to get it up and running quickly. I'm trying to reproduce the functions of the C example for reading a file (no need to write again).

    I'm using Python 2.6 on a Windows XP computer.

    Here's what I have so far:

    ------------------------------------
    # Module to manage a *.tdm and a *.tdms National Instruments TDM
    files in the format #.
    #
    types import *.

    #Define of the short names for the required dll functions
    DDCOpen = windll.nilibddc.DDC_OpenFile
    DDCNumGroups = windll.nilibddc.DDC_GetNumChannelGroups
    DDCReadGroups = windll.nilibddc.DDC_GetChannelGroups
    DDCGroupStrPropLen = windll.nilibddc.DDC_GetChannelGroupStringPropertyLength
    DDCGroupProperty = windll.nilibddc.DDC_GetChannelGroupProperty

    # File handles are pointers to 32-bit integer
    Czero = c_int (0)
    File descriptor = point (czero)

    # Retrieve a handle to the file
    DDCErrCode = DDCOpen (' Test_0919.tdms, 'PDM' file descriptor,)
    Print (DDCErrCode) # must be zero
    MyFile = real FileHandle.contents #The file handle

    # Find several groups
    grpnum = c_int (0)
    numPtr = point (grpnum)
    DDCErrCode = DDCNumGroups (myFile, numptr)
    Print (DDCErrCode)
    # Si DDCErrCode == 0: print (numptr.contents, grpnum)

    # Read groups [UNTESTED]
    groups = c_int (0) * grpnum
    grpptr = point (groups) # must be a pointer to the memory to organize grpnum
    Number of fields DDCChannelGrouphandle
    DDCErrCode = DDCReadGroups (myFile, groups, grpnum)
    Print (DDCErrCode)
    If DDCErrCode == 0: Print (groups)

    # Length of name of the Group [UNTESTED]
    namelen = c_int (0)
    nlenptr = point (name)
    DDCErrCode = DDCGroupStrPropLen (groups [0], 'name', namelen)
    Print (DDCErrCode)
    If DDCErrCode == 0: Print (namelen)

    #Make a buffer to hold the name, then get it back [UNTESTED]
    grpname = create_string_buffer(namelen+1)
    nameptr = point (grpname)
    DDCErrCode = DDCGroupProperty (groups [0], 'name', nameptr, namelen + 1)
    Print (DDCErrCode)
    If DDCErrCode == 0: Print (grpname.value)

    # Read the Group channels and get the names [UNTESTED]

    # Read the string # data values [UNTESTED]

    # Read the string of data values [UNTESTED]

    # Process the data values [UNTESTED]

    # Write data processed in a file in a different format [UNTESTED]
    ------------------------------------

    The "TESTED" sections are more or less pseudo-code representing things I have to do for now. The others work. These will be finally in a module.

    Cross-posted on some forums of Python.  Thanks in advance for any help.

    Kind regards
    Allen

    Can find out:

    http://Pypi.Python.org/Pypi/cTDMS/0.9

    or alternative link

    http://code.Google.com/p/ctdms/

    They seem to be exactly what you're looking for... (two years later)

  • Access ni4882.dll with Qt and MinGW

    I have to control some electrical loads and power supplies by GPIB. We use Qt 4.7.4 with MinGW 4.4 (32-bit) on Windows 7 64 bit.

    The drivers package GPIB-NI-488. 2 package 3.0.2 for Windows 7 64 bit is installed. GPIB Troubleshooting Utility tool displays "pass" and the application of the Measurement & Automation can connect to it and talk to an intrument. So far so good.

    Now, I want to write an application can use the NI4882.dll (3.0.0.49153). Unfortunately, there are just objects for compilers files Microsoft and Borland and no lib file.

    Therefore, generate us a def of the ni4882.dll file with:

    pexports ni4882.h ni4882.dll h > ni4882.def

    -ni4882.def-

    LIBRARY NI4882.dll
    EXPORTS
    ? compareVersion@nGPIBAPI_NI4882@@YGXABVtSSVersion@@0AAJPBD@Z
    ? getCurrentVersion@nGPIBAPI_NI4882@@YG? AVtSSVersion@@AAJ@Z
    ? getOldestCompatibleVersion@nGPIBAPI_NI4882@@YG? AVtSSVersion@@AAJ@Z
    AllSpoll@12
    DevClear@8
    DevClearList@8
    ...

    --

    Then generate the lib with:

    dlltool k d ni4882.dll d ni4882.def-l libni4882.a

    Now, I build a small test QT program.

    -.pro file-

    INCLUDEPATH += $$ PWD/include

    LIBS += $$PWD/lib/libni4882.a

    --

    -.cpp file-

    #include "ni4882.h".

    ...

    Sub MainWindow::Init()

    {

    int DD = idev (0,3,0,T10s,1,0);

    If (Ibsta () & Err)

    {

    Err (tr ("Unable to open board:ibdev=%1").arg(dd)); "))

    }

    If (ibonl (0,0) & ERR)

    {

    Err (tr ("could not close the Council"));

    }

    }

    void MainWindow::Err (QString message)

    {

    Switch (Iberr ())

    {

    case 0:

    {

    message. Append ("(EDVR-erreur système)" ");

    } break;

    ...

    }

    qDebug ("Error: %s\nibsta = 0 x %x iberr = %d\n",)

    (unsigned int) Ibsta(), (int) Iberr ());

    }

    --

    The source code will be compiled and linked without error.

    But if I run, the output is:

    Error: Could not open the Board of Directors: ibdev = 32768 (EDVR - system error)

    ibsta = iberr 0x8000 = 0

    Error: Cannot close the Board of Directors (EDVR - system error)

    ibsta = iberr 0x8000 = 0

    So the question is: what is the problem? Why am I still getting this error EDVR. I also tried SendIFC (0) with the same result.

    With interactive control GPIB tool, I can communicate with my instrument and the Trace of e/s OR it connects. But I don't see the papers in my request tracking tool. Is this an indication?

    Any ideas?

    Marko

    Hi all,

    After a few questions about the use of the GPIB with Qt library, I wrote a description step by step to create objects for MinGW files:

    1 create a folder and copy the "gpib - 32.dll' of the"C:\Windows\System32"("C:\Windows\SysWOW64"in Win7) in this folder.

    2. copy "ni488.h" to "c:\Program Files (x 86) \National Instruments\Shared\ExternalCompilerSupport\C\include\. (Not ni4882.h!)

    3. load PExports (my version is 0.44) and put the exe in your folder. I don't have a URL to load this tool but should be easy to find. It is freeware.

    4. copy "c:\QtSDK\mingw\bin\" dlltool.exe in your folder.

    5. create a batch file '1 - build def file.bat' with the content: "pexports ni488.h gpib - 32.dll h > gpib.def.

    6. create a batch file "2 - build file.bat lib" with the content: "dlltool k d gpib - 32.dll - d gpib.def-l libgpib.a.

    7. run the batch file "1 - def file.bat build" to create the file 'gpib.def' def

    8. start the batch file "2 - build file.bat lib" to create the file in the library 'libgpib.a '.

    9 copy 'gpib - 32.dll' and 'libgpib.a' in your software project. I created the 'lib' subdirectory and copied the files to.

    10. copy "ni488.h" into your software project. I created the "include" subfolder and copied the file in.

    11. in your PRO file type:

    # #####################################################################
    # Include the NI 488 library. 2
    # #####################################################################
    INCLUDEPATH += $$ PWD/include
    HEADERS += include/ni488.h

    LIBS += $$PWD/lib/libgpib.a

    12. in your type of source code:

    #include "windows.h".
    #include "ni488.h".

    bool InitializeGPIBBoard)

    {

    bool isStarting = false;

    boardID int;        / * id board @brief. */
    QString boardName;  / * @brief Committee name. */
    int boardDescr;     / * descriptor of Council @brief. */

    Get ID Board
    SendIFC (boardID);

    If (ThreadIbsta() & ERR)
    {
    ErrorHandling (tr ("failed to open the Council"));

    Return isStarting;
    }

    Open and initialize a Board or a configured by the user device descriptor
    wchar_t * aName = new wchar_t [boardName.size () + 1];
    m_para.boardName.toWCharArray (Anom);
    aName [boardName.size ()] = 0;
    m_para.boardDescr = ibfind (Anom);
    delete [aName];

    The Board of Directors is the system controller.
    If (ibconfig (boardDescr, IbcSC, 1) & ERR)
    {
    ErrorHandling (tr ("failed to create the system controller board"));

    Return isStarting;
    }

    Affirm the clear interface.
    If (ibsic (boardDescr) & ERR)
    {
    ErrorHandling (tr ("Assert clear interface"));

    Return isStarting;
    }

    ASO.

    isStarted = true;

    return isStarted.

    }

    13 be happy! :-)

    I hope this helps. If you have any problems, please write me a message or post on this thread of Council.

    Gruss und viel Erfolg!
    Marko

  • DLL with the same screws simultaneously

    Hello

    I have two DLLs that have the same names of VI compiled. Now, I have the problem, that I can not use the two DLLs at the same time. It seems that the VI of the first called dll is loaded into memory, and the second dll uses the screw of the first dll - given that the screws have the same name.

    How to avoid this failure? The only way seems to be to rename all the subVIs in the dll, so that they have a unique name.

    Or is there another possibility?

    concerning

    MB

    You can try putting each set of two different libraries (*.lvlib) int SubVIs. If delimeted names stored in the DLL, then you will be able to load the screws with the same names in memory at the same time without conflict.

    Andrey.

  • Need help on how to make dll with VC ++ 2008 for Labview function liblary

    I use VC ++ 2008Express and you want to make the DLL.

    Since I'm using VC ++ 2008, do I have to install the 'MS redistributable"on PC what dose does not have VC ++?

    Is there any free ANSI C compiler do DLL for Labview for use with the function call in libraly?

    Yes, you will probably need the Redistributable Package. Remember to distribute the "Final" of the DLL and not the "debug".

    Regarding the free ANSI C compilers, I'd do a Google search. GNU C/C++ is a very popular.

Maybe you are looking for

  • The first (emulator) HP: HP Premium differential equations

    Hello I'm looking a calculator with AC for my electrical engineering studies and just tested the first emulator to get a first impresseion. But while testing its features, I got some results of unexpectet on differential equations,that I would be con

  • iMac 3d party software updates do not work

    I have an iMac 27 OS 10.11.3 24GO RAM and enough hard disk space. Have now two 3d-party software/applications that require updates. Download software updates and then ask ok close to installation of update. This is done, but no update is run and once

  • Old photo HP7520 installing software

    I replaced a HP 3300 all-in-one with a 7520 Hp all in one. 1. is my old software compatible with the new machine? Area of the image, Solution Center, etc.? 2. If I uninstall the old software will lose I have the documents that have been created here?

  • Windows 7 user account

    Separated from this thread. I use Windows 7, but I need more information on how to convert a local account. As I'm not sure if a hacker recently added their PC to my secure devices. It seems to me a few years ago there was a page that they had which

  • Integration of TMS with Evoko Room Manager

    Hi Experts, Could if it you please let me know if activated VC rooms which exists in the TMS can be integrated with Evoko Room Manager. If so, how and what are the requirements? If I do not set up the TMSXE with TMS, will walk or not? All other views