Is it possible to call DLL develloped with LabView 7.0 in LabView 6.0.2 VIs?

Hello,
I would like to devellop DLLs in LabView 7.0 and use them in LabView 6.0.2.
Is it possible???
I tried this operation. I generated an installer (with the LabView 7.0 runtime in) and tried to load the DLL in a LabView 6.0.2 VI.
When I run the VI, LabView 6.0.2 is crashing...
Here my export function prototype:
typedef struct
LVBoolean status;
long code;
LStrHandle source;
} TD1;
typedef struct
long dimSize;
unsigned char Numeric[1];
} TD2;
typedef TD2 **TD2Hdl;
void __cdecl driver(LVBoolean *SendCommand, unsigned char DataToSend[], long LenDataToSend, char RHICommandString[], TD1 *errorInNoError, LVBoolean *GetAnswer, LStrHandle *FrameReceivedID, long *Da
taLength, TD2Hdl *DataReceived, TD1 *errorOut);
Any example ???
Thanks for your help,
Regards, Pascal.

Hi Pascal,
I made a simple dll in LabVIEW 7 and called it from LabVIEW 6.0 and it worked fine.
I have attached the dll I built. It adds two numbers.
double Testdll(double B, double A);
Try using this and see if it works for you.
Feroz
Attachments:
SharedLib.dll ‏17 KB
SharedLib.h ‏1 KB
SharedLib.lib ‏3 KB

Similar Messages

  • Application crashes when calling DLL built with LabVIEW 2011

    Hello everybody,
    Our application calls DLLs built with LabVIEW 2010 SP1. We installed LabVIEW 2011 and built some DLLs. So far so good. If we start our application and run 2010 DLLs it still works fine. If we run a 2011 DLL just once no error happens, but if we try to run the same 2011 DLL our application crashes reporting the error below. I saved the code for 2010 version and built a DLL and it works fine. Does anyone know why?
    Thank you in advance.
    #Date: Fr, 16. Sep 2011 16:25:25
    #OSName: Microsoft Windows XP Service Pack 3
    #OSVers: 5.1
    #OSBuild: 2600
    #AppName: PasTA
    #Version: 11.0f2 32-bit
    #AppKind: AppLib
    #LabVIEW Base Address: 0x30000000
    16.09.2011 16:25:26.181
    Crash 0x0: Crash caught by NIER
    File Unknown(0) : Crash: Crash caught by NIER
    minidump id: 8a779b3f-51d7-4864-8e4d-6ab0195cd158
    ExceptionCode: 0xC0000005
    N
    0x3072C804 - lvrt <unknown> + 0
    0x3072CBB8 - lvrt <unknown> + 0
    0x7C864191 - KERNEL32 <unknown> + 0
    0x7C83AB50 - KERNEL32 <unknown> + 0
    0x00000000 - PasTA <unknown> + 0
    Attachments:
    error.PNG ‏11 KB

    On that note, you should be able to create DLLs in 2010 and run them with 2011, correct??  In my case, I have a 2010 built DLL (talking to sbRIO), most of the functions work when run in 2011, but a couple of them lock up LabVIEW on the desktop (but not the sbRIO), no lock ups happen with 2010 on the desktop.

  • Is it possible to call dll-functions with records/types as arguments?

    or must I use the fixed preselection of types

    LabVIEW must call DLLs with data types it is compatible. Therefore, you must use the types available through LabVIEW.
    I have two pieces of advice on this matter:
    First, contact NI and get their advice on how to call your data type. They may be able to offer a very quick solution.
    Second, if you cannot call these data types, and you have a compiler, I would suggest "wrapping" the DLL inside another, and 'translate' the data type from something LabVIEW can handle, to the type needed by your DLL in this 'wrapper' DLL.

  • Is it possible to call a webservice with just the url to its WSDL

    hi all
    can anyone tell me if it is possible to call a webservice with just the url to its WSDL file. must we create the proxy class for webservice client? thanks

    if you are in the context of a J2EE 1.4 container, you do not need to generate any stub, you can use either a dynamic proxy mechanism or dynamic invocation.
    check JWSDP tutorial.

  • Is it possible to build a project with Labview 2010 on a Windows XP system, that is useful for a system with windows 7 on it?

    Hi there,
    I am planning to use Labview 2010 in a short time.
    But before I'm going to use it I have some questions.
    I know it is possible to run Labview 2010 in an XP environment. But is it also possible to, when running Labview 2010 on a XP system, to build a project to a version that is useful in a Windows 7 environment?
    Or do I have to run Labview 2010, when I want to build a project that is useful on a Windows 7 system, on a system with Windows 7?
    Please give me some information.
    I hope to hear from one of you soon.
    Regards,
    Kenny
    Solved!
    Go to Solution.

    Is it possible to build a project with Labview 2009 on a Windows XP system, that is useful for a system with windows 7 on it?
    Thanks.
    Philippe B.
    Certified Associate Developer / Dépt Moyens d'essais
    www.ingenia-system.com

  • Is it possible to call a function with the same name from 2 different dll's at the same time.

    I'm trying to call a function ( F ) form 2 different libraries ( A.dll and B.dll ) at the same time. The first lib loaded determines the function F. A->F and B->F have same interface and name but different implementation.

    Hi,
    I tried it with two dll's, both with the same interface, and at the same
    time, in the same VI. The popups even appear at the same time.
    But now I understand the problem... Both dll's are created by LabVIEW! If
    they are not (or one is not, and the other is), this is no problem.
    And VI's in memory cannot have the same name. LabVIEW doesn't care if VI's
    are in a dll or not.
    This might not help, but if you want to make some sort of "plug in" system,
    you might consider using llb's. By loading VI's dynamically, you can select
    the path from which they are loaded. You must unload (close all references)
    one before the loading the other, or the same problem will occur. If you go
    this way, I consider a different approach. Make on
    e library (or even a dll)
    that has the interface you like, this is the "loader". Now make several
    "plug in"'s, with the same interfaces. The name of each function in a plug
    in is a concatenation of the library name and the function name. The loader
    has one extra function, that loads (and unloads, when done) references to
    all desired libraries to use (the names of the functions can be figured out
    easily). All that the loader functions do is dynamically call the library
    functions. You can use a call by reference node for this (you can use the
    connector pane or the loader vi, since the interface must be the same!).
    If you go this way, I guess the loader library can be converted to a dll...
    Hope this helps.
    Wiebe.
    "rsam" wrote in message
    news:[email protected]..
    > Thx Wiebe,
    >
    > did you load both dll at the same time? For example in 1 vi. Somehow
    > the first loaded function keeps to overrule the second. Notice that
    > the interface is
    exactly the same.
    >
    > I loaded 2 dll created in Labview with results described above.
    >
    > Regards Ruud

  • I am trying to call a function with LABVIEW developed in CCS compiler

    I used MPLAB (CCS compiler) to develop c code that is used to transmit and receive messages to and from an automotive display. It works great as a stand alone. I would like to call this function from LABVIEW but am having difficulty doing so. Does anyone have experience calling a MPLAB developed project from LABVIEW? Thanks in advance.
    Matt

    PTE wrote:
    I used MPLAB (CCS compiler) to develop c code that is used to transmit and receive messages to and from an automotive display. It works great as a stand alone. I would like to call this function from LABVIEW but am having difficulty doing so. Does anyone have experience calling a MPLAB developed project from LABVIEW? Thanks in advance.
    Matt
    MPLab is for programming PICs if I'm not mistaken. I'm not sure how you would want to call a function compiled in MPLab from LabVIEW directly. MPLab will create binary code for execution on PICs and there is no LabVIEW that could run on a PIC. On the other hand I didn't think you could create standard Windows DLLs, Mac shared libraries or similar in MPLab at all.
    You will have to recompile your code in a C compiler that can create the standard shared library format for the plaform you want to call it from LabVIEW.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Call DLL function with pointer to simple struct

    Hello,
    I try to call a function using CLFN. My problem is the parameters of the function I try to access.
    Here is the function and his parameter:
    typedef struct {
    int major;
    int minor;
    int revision;
    int build;
    } VersionNumberType;
    int Comm_BTE_softVersion( VersionNumberType *pVersion)
    BYTE byBuffer[2048] ;
    if( !Comm_BTE_readYMem( byBuffer,COMM_BTE_TX14_SOFTVERSIONADDR,
    COMM_BTE_TX14_SOFTVERSIONSIZE))
    return FALSE ;
    //. process the answer
    pVersion->major = (int) (byBuffer[0] & 0xFF) ;
    pVersion->minor = (int) (byBuffer[1] & 0xFF) ;
    pVersion->revision = (int)( byBuffer[2] & 0xFF) ;
    pVersion->build = (int) ((int) ( byBuffer[4] << 8) ) | ((int) ( byBuffer[5] ));
    return TRUE ;
    } //. end Comm_BTE
     In attached file there is the Comm BTE soft Version.vi that try to access this function. The code crashes when the function is called and labVIEW is closed.
    I probably don't pass the data parameters correctly to the CLFN.
    Thanks for help.
    Regards. NewCLAD.
    Solved!
    Go to Solution.
    Attachments:
    Comm BTE soft Version.vi ‏13 KB

    Everything is configured correctly EXCEPT the numeric representation of the values in the cluster. They must match int, which is most likely 32 bits on your platform. In your VI, they are U8.

  • Calling DLL function using LabVIEW 7.1?

    Here's the scinario:
    I have LabVIEW 7.1 and i'm trying to call a DLL function using 'CALL LIBRARY FUNCTION NODE'.
    I have used this in the past with no problem. But right now, when I use this node and link it to the
    library and function name, i get 'ERROR loading Dllname.dll' message.
    NOTE that the DLL is generated using VStudio2003 or VStudio.NET. Could this be a problem??
    Also, i noticed that there are some JUNK characters before & after the function name that show
    up in function prototype:
    long ?EcpvsSign@@YAHHPBEH0HPAE1@Z(long Signer, CStr NonRMsg, long NonRMsgLen,
    CStr RMsg, long RMsgLen, CStr SigR, CStr SigS);

    tbd wrote:
    Hi rkpat,
          You might check-out this thread on building WIN32 DLLs - expecially the bit re: "mangles names" under the paragraph titled "C Language Source File".  My recollection is that 'extern "C"' directive in the header file for the DLL solved the name-mangling problem, but it's been a few years!
    Cheers!
    Message Edited by tbd on 03-01-2007 11:19 PM
    tbd is right. You have to first disable name mangling as it creates all kind of troubles. Other issues might be that your Visual Studio 2003 or .Net edition links in dynamic runtime libraries that are not standard available on every Windows PC so that you need to redistribute the according runtime library installer together with your app for the DLL to be even loadable.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Calling Dlls from LabVIEW

    LabVIEW Gurus:
    I am working with some software engineers who have no experience in LabVIEW. Unfortunately I have little experience in C/C++ to make sense of their inquiry.  
    Basically we are dealing with “Data Marshalling”. I will call a DLL and issue a command (string) and get back a 2-D array and an integer. So far so good.
    The C/C++ programmer requested that I provide them with a pointer/memory address in which they will store data, so I can read it once the dll returns the array and integer. I browsed through the example online http://decibel.ni.com/content/docs/DOC-1690 and thought that if I wanted to read from the dll, the process is a simple as calling the appropriate function and configure the parameter (no pointers needed).
    So, is there a specific way that they need to write the C/C++ code to be used in LabVIEW? Or what else to I have to take into consideration?
    Thank you,
    Santiago 

    That example is pretty simplistic as it only deals with integers. In this case no pointers are required since everything is returned by value. When you're dealing with arrays, however, you need to deal with pointers. If you open the Example Finder (Help -> Find Examples) and search for "dll" you will see the "Call DLL" example. That contains many examples of how to call DLL functions with a wide variety of datatypes. I strongly suggest looking at that example. There is also a chapter in the LabVIEW Help on calling DLLs (Fundamentals -> Calling Code Written in Text-Based Progamming Language).
    You have 2 things to consider:
    You're dealing with arrays - this means you typically need to pre-allocate the memory in LabVIEW, and it sounds like that's what the DLL expects you to do. This amounts to using the Initialize Array function to create your 2D array of the appropriate size and datatype.
    You may be dealing with a C++ DLL. LabVIEW can only interface to C DLLs. This doesn't mean that you can't create a DLL in C++, but it does mean that the C++ programmers need to add an extern "C" modifier to the function calls, otherwise you get name mangling, and LabVIEW won't be able to call the DLL. The DLL programmers should know what that means.

  • JCA IConnection call to BAPI with table in table as import and export param

    Is it possible to call a BAPI with a table in table as import and export data?
    Please give small code example if this is possible.
    Thanks in advance.

    Inner tables can be handled with:
    IRecordSet innerTable = (IRecordSet)outerTable.getObject("INNER_TABLE");

  • Calling a page with flow logic from a controller

    Is there any possibility of calling a page with flow logic(x.htm ) from a controller?
    Also I want to know how to apply scrolling to a tableview  in a View as there is no event handler here. Iam able to view the first 30 records but want to navigate from 31 to 60...61to 90 and so on.......
    Thanks and regards,
    Sinu

    Thank you so much...
    but will I be able to call from a controller as we call  a view...similar to the below code.
    lref_first_view = create_view( view_name = 'first.htm' ).
    lref_first_view->set_attribute( name = 'MODEL' value =           mref_model_first ).
    call_view( lref_first_view ).
    I have already set the visibleRowCount....but my issue is to navigate to the next records i.e say 2nd page 3rd page..........
    Regards,
    Sinu

  • Call Library Function with C structure

    I have been given a MS C++ DLL that I need to call from LabVIEW. The input (and output) to the DLL are pointers to "C" data structures.
    The LabVIEW "Call Library Function" VI allows you to add input parameters and define their type (I.e. Numeric, Array, String, etc.) However, "C data structure" is not one of the options. Is there a way in LabVIEW to call/use a MS C++ DLL that requires a data structure as an input and returns a data structure as the output?

    It is possible to pass structures to called DLLs in LabVIEW. Typically the structure will be passed through the means of a cluster. Please see the link below for more information on calling external code in LabVIEW.
    Using External Code in LabVIEW
    You can also find a great example VI on calling DLLs in the LabVIEW example finder. Search for the keyword DLL and open up Call DLL.vi. This example shows most of the common ways to pass data between LabVIEW and external code.
    Regards,
    Matt F
    Keep up to date on the latest PXI news at twitter.com/pxi

  • Function Prototype calling dll

    Is there any way to automatically import the function prototype using
    LabVIEW Call Library Function??
    It is very boring write every time the function prototype.....
    Thank You
    Alessio Colzi

    Al S,
    that's only the half truth for the question. You can see the function names but the protoype will always be void (void); if you do not have a include file in the same directory (Tested with shell32.dll).
    With a DLL created by MS Visual C++ with the include (*.h), export library (*.exp) and library (*.lib) in the same folder I also get only the function names and no correct prototypes.
    With a DLL created with LabVIEW and the include file in the folder I get the function names and the correct prototypes.
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • Calling a VI which uses "system exec.vi" with LabVIEW run-time engine as adapter

    Hi,
    My TestStand sequence calls a VI which includes a call to "system exec.vi". When I try to load it in TestStand and if LabVIEW adapter is set to run-time engine, I get an error message "Unable to load Vi...". If I switch the adapter to "Development system", then it works fine.
    Is there any way to use "system exec.vi" in a VI which is called in TestStand with LabVIEW run-time ?
    Thanks,
    Alex
    Solved!
    Go to Solution.

    Hi Alex,
    In you case, you are getting a -18002 error.
    The reason is explained in the following link:
    -18002 Errors in TestStand
    http://digital.ni.com/public.nsf/allkb/D82FEAF0B4BA293A862575710053E252?OpenDocument
    Please have a look at the 2nd reason. This is your case.
    Hope it helps,
    Regrads
    Julien De Freitas / Applications Engineer / Certified LabVIEW Developer (CLD)
    National Instruments Switzerland

Maybe you are looking for

  • How do i make my iphone 5 bluetooth not discoverable

    How do i make my iphone 5 bluetooth feature "not" discoverable so that my phone is secure from hacking while i am in public and the bluetooth feature is turned on.

  • Error code: 0xc0000034

    I tried to put on my laptop and it displayed this error message: Your PC needs to be repaired. The Boot Configuration Data file is missing some required information. File: \BCD Error code: 0xc0000034. My laptop is a Pavilion G6. please I need help ur

  • How to create new form fields in several columns (spreadsheet) and have them named consecutively?

    Hopefully someone can help.  I created a new form from an Excel spreadsheet, but the form field recognition didn't "take" well and very little of the spreadsheet translated into form fields.  I need to create new fields (31) for each column (about 10

  • Creating a Photo Album through the Fireworks CS3

    I'm trying to create myself a photo album in dreamweaver and it says I need Fireworkds 4 or GREATER, so I click the download trial button and I downloaded thhe Fireworks CS3, but dreamweaver doesn't recognize it and keeps saying "I need a fireworks 4

  • How to process a cvs file in vbscript

    I have a several folders on a server with part of the computer names.  The computer names are csimpam3353726, csimpam3379465, etc. The Folder names are just the numbers.  3353726, 3379465, etc...  These folders contain the favorites for each of the c