Building a dll with labview for CVI

Hi,
I am making some abstract hardware layers for some instruments and i use to work with Labwindows CVI. But i have found ONE instrument, the Instek pst3201 alimentation which is ONLY created with Labview.
So i downloaded the 8.6 LV demo and builded the llb projet in order to obtain some .dll, .h and .lib files and included it to a CVI project in order to construct an intermediate Dll level.
Everything builds fine, like usually when i use an IVI driver but my problem is that when i try to call this intermediate Dll level with my abstact hardware layer using LoadLibrary, nothing is returned like if the DLL doesn't exist.
So my question is : Do you think that this is a problem from CVI (and i repeat that i have made a lot of others abstract hardware layers using IVi drivers except that this time i haven't got any .fp or .c but  a .h and i include the .lib to the project), or a problem from Labview and i should use the LV Application builder if it's different ?

Hi,
It's seems that you have no exported function. What function do you have in your header file? did you tryed to create a really simple dll (doing an addition for example ) in LabVIEW only to verify that you are correctly creating the dll?
Manuel R
AE dans une autre vie

Similar Messages

  • 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

  • Make a DLL with LabView??

    Hi LabViewers!!
    I'm doing a program with C++Builder and I would like to use some
    features from LabView, and I think that I can do that creating a dll
    with LabView but I dont know if this is possible. Could someone tell me
    if there is another way on making this task?
    Thanx in advance.
    Juanmi.
    Juan Miguel Delgado Garcia de Soria.
    Electronic Engineer.
    Universidad de Cádiz. (SPAIN)

    > I'm doing a program with C++Builder and I would like to use some
    > features from LabView, and I think that I can do that creating a dll
    > with LabView but I dont know if this is possible. Could someone tell me
    > if there is another way on making this task?
    >
    LV can't build DLLs yet. If you are using a recent version, > 5.0, then
    you can use the server interface to have LV carry out an execution and
    pass back the results. This will work in a separate EXE, even on another
    computer if that helps.
    The server works LV->LV over TCP, and it also supports ActiveX; so other
    environments can control it and have it do executions for them. There
    are also some C++ classes on the ftp site that make the ActiveX controls
    a little more natural in C++.
    Greg McKaskle

  • How to remove the "int len" of my return string on the DLLS header when building a DLL on LabVIEW 8.5

    Hi all.
    I'm building a DLL on LabVIEW and I choose a string as an output on the terminals connectors.
    But LabVIEW creates another output, the lenght of the return string.
    This is a problem because I have other DLLs and I need them to be compatible.
    How do I remove this length from the header? What is the difference between Pascal String and C string and String Handle Pointer?
    String Handle Pointer removes the length from the header but I don't know the difference between this data types.
    Thanks in advance for the help.
    Daniel Coelho
    Portugal
    Daniel Coelho
    VISToolkit - http://www.vistoolkit.com - Your Real Virtual Instrument Solution
    Controlar - Electronica Industrial e Sistemas, Lda

    Daniel Coelho wrote:
    Hi all.
    I'm building a DLL on LabVIEW and I choose a string as an output on the terminals connectors.
    But LabVIEW creates another output, the lenght of the return string.
    This is a problem because I have other DLLs and I need them to be compatible.
    How do I remove this length from the header? What is the difference between Pascal String and C string and String Handle Pointer?
    String Handle Pointer removes the length from the header but I don't know the difference between this data types.
    Thanks in advance for the help.
    Daniel Coelho
    Portugal
    C string pointer is a pointer to a memory location whose string information is terminated by a 0 byte. Pascal String Pointer is a pointer to a memory location where the first byte specifies the number of bytes to follow. This obviously allows only for strings up to 255 character length.
    LabVIEW String Handle is a pointer to a pointer to a memory location where the first 4 bytes are an int32 value indicating the number of characters to follow. You can read such a String handle in a function without many problems, but you can only create, resize and delete such a handle by using LabVIEW memory manager functions. So this makes only sense if the caller of such a DLL is LabVIEW too as another caller would have to go through several hoops and tricks in order to gain access to the correct LabVIEW kernel that could provide the memory manager functions to deal with such handles.
    Last but not least output strings whose allocated length is not passed to the funciton as additional parameter are a huge secerity risk (talk about buffer overrun errors). LabVIEW DLL Builder does not support the creation of DLLs with output string (or array parameters)  without the explicit passing of an additional parameter telling the DLL function how large the allocated size is (so that the DLL function can make sure to never write over the end of the buffer).
    The additional length parameter only disappears for String Handles because LabVIEW will simply resize them to whatever length is necessary and that is also the reason why those handles need to be allocated by the same memory manager instance that is also going to execute the DLL function.
    Resizing of memory pointers is non-standardized and in normal circumstances not suited for passed function parameters at all.
    Rolf Kalbermatter
    Message Edited by rolfk on 06-13-2008 12:28 PM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Help with Labview for Linux applicatio​n - datalog to XML format

    Hi,
    I am working on an application that makes use of a PDA for instrument control and data acquisition, and all our code has been written with the use Labview PDA 8.2. The instrument data is returned wirelessly to a remote server, and one of the specifications we set early in the project was the data would be returned in XML format in line with Labview's inbuilt XML schema.
    Unfortunately, this XML funtion is not available on Labview PDA! We have made a change to return the data in Labview's 'Datalog' format, and then we now intend to run an additional application on the server to convert this information to XML before passing the data to our customer's software.
    We have successfully done this with Labview for windows, but our customer's server is Linux based.
    Is anyone aware of someone (or a company) who would be able to take our existing 'datalog-to-XML' vi and compile it for Linux? The program is really simple, and I would hope that all the functionality we use is supported in Labview for Linux.
    Thanks,
    Mark

    Hi Mark
    LabVIEW VIs that are developed in a Windows environment can be used in a Linux version of LabVIEW. As long as the VIs have not got Windows specific features such as ActiveX or Windows dll call you can run the VI in Linux. Also there maybe some specific drivers that are not supported under the Linux environment (see link). The VI will simply be recompiled in Linux. The Linux user must have a copy of the Linux LabVIEW Development System installed though.
    http://digital.ni.com/public.nsf/websearch/35D2B5E​483A001A18625716B005BE464?OpenDocument
    Kindest Regards
    YatinM
    NIUK & Ireland

  • IS APPLICATION BUILDER 6 COMBATIBILE WITH LABVIEW 7 ?

    IS APPLICATION BUILDER 6 COMBATIBILE WITH LABVIEW 7 ?

    No it's not but it is a free upgrade last time I checked. Go here and click on the Upgrade Advisor link. You will need the serial number of your current app builder.
    p.s. LabVIEW 7.1 was released today so you might want to skip 7 and go straight to the latest.

  • Problem with building a dll in labview

    Hello,
    I want to be able to run a LabView vi from Java and found that the best way to do this is to create a DLL in LabView and then call it in Java using JNI. I did a dummy program in LabView to test, but the problem is that the instructions I found don't seem to exist! For example, one tutorial I was following said to: "Open a new VI and select Tools»Build Application or Shared Library (DLL).". But I don't have that under tools, just Build Application (EXE) from vi, which gives a project file. In another place it said to "Expand My Computer. Right-click Build Specifications and select New»Shared Library from the shortcut menu to display the Shared Library Properties dialog box" but I have no idea what that means.
    I have the LabView 2009 trial version, could that possibly be making a difference? If not, what am I doing wrong? Or is there a better way to run a LabView program from Java?
    Thanks a lot!
    Hugh

    Actually, the second one is from LabView help. I tried looking up Application Builder like you said but again it begins with the instructions "Expand My Computer. Right-click Build Specifications and select New»Application from the shortcut menu to display the Application Properties dialog box" and I have no idea what this means What do they mean by My Computer? And Build Specifications? I don't have any of that... I'm sorry but I'm new to all of this, I've never worked with DLLs before in any language, and all I want to do is run my LabView program when I press a button on my Java interface!! If there is a better way to do it, that would be great!
    Thanks at any rate,
    Hugh

  • Creating dll from Labview for use in VB

    In this document:
    Accessing LabVIEW 6.0 Strings from Microsoft Visual Basic
    It mentions you need to input a length for your string inputs. When I create my dll no len is available for string parameters only Arrays. Is this a typo?
    Also, In my LV code I have a path input. Can VB work with this? I have already converted my LV code to accept path as string...just wondering if I really have to do that.

    Drugar,
    Only string outputs (indicators) that are wired on the connector pane will show the length parameter selection when you try to build the dll.
    I don't think VB accepts paths, so you should convert the path to string in LabVIEW before building the dll.
    Zvezdana S.

  • Build a DLL in LabVIEW & Use the DLL in LabVIEW

    I am trying to build a DLL for the simple vi with LabVIEW and want to use the DLL in LabVIEW. is it impossible?
    I wrote a vi and it have 2 terminals. one is the input for numeric dbl data type and one another is the output for numeric dbl 1D array data type.
    It was built with the Application builder for LabVIEW 8.0 and DLL was created successfully.
    I want to use this DLL in new vi with LabVIEW.
    Call library function used. I wrote a new vi to use that DLL.
    In config dialog I config each parameter for dll and connected terminals. but it doesn't work
    pleas refer to the attatched file and let me know what I missed.
    Attachments:
    Array1D.zip ‏60 KB

    At first I kept scratching my head wondering why someone would want to do this. Create a DLL in LabVIEW to call it from LabVIEW. Seems redundant. But, perhaps it's an exercise or perhaps it's for testing the DLL...
    In any event, calling the DLL worked for me in 8.2. How are you configuring your Call LIbrary Function node? I have it set up as follows:
    return type: void
    iteration: Numeric, Signed 32-bit Integer, pass by value
    array1D2: array type, Signed 32-bit Integer, 1 dimension, "Array Data Pointer" format
    len: Numeric, Signed 32-bit Integer, pass by value
    Then I called the DLL like this:
    Message Edited by smercurio_fc on 03-16-2007 12:57 PM
    Attachments:
    Example_BD.png ‏2 KB

  • How to build demo versions with Labview ?

    Hello,
    is it possible to design Labview applications in a kind,
    that it is possible to generate "demo versions" of it ? Demo version in the means of feature-limited crippled versions of a full instrumentation software, where SOME hardware access is denied, but you can load and view and analyse data.
    Of course it might be useful to compile this demo version with the Labview Application Builder,
    What might be the business modell for demo versions:
    A hardware manufacturer creates a Labview application which controls the manufacturer's components, and allows instrumentation and data recording. The application is not free but sold for extra money.
    As pre-sales benifit, the manufacturer would like to send the (compiled) Labview application to future customers.
    Now the problem is, that the customer has not (all) the external devices or PCI/USB devices,
    on the other hand the hardware manufacturer does not want to give the "full application" as gilft to the customers.
    Now with traditional software development with C++, Java, C#,
    either a demo version is gained from the full version by replacing some module with hardware access by modules wth "empty" function body or with function body which return constant values instead of accessing the hardware.
    In the world of process industry, usual process control systems may supply "alternative" values if the original device is not available.
    What kind of software structure must I build with Labview, to do the same ?
    Now the problem with Labview applications is
    Labview applications depend on drivers. Drivers depend on hardware.
    So if the FULL commercial version of the Labview program accesses a DAQmx driver, GPIB driver or any other hardware driver by a VI,
    and often this means that a special manufacturer VI is used in the Labview program which does the actual hardware access,
    how to modify the software to make a demo version
    a) so that IF the customer buys the hardware and gets the hardware driver, he still does not have the full version
    b) so if the customer neither has the hardware nor the driver, he still can run the Labview software and load an view data, push buttons, can execute menu items even can manipulate data ect, can use the manufacturer's VI
    Unfortunately, it is no solution just to delete "some" of the VIs with hardware access from the distribution of the demo version, as this just causes error messages during the loading of the (compiled) Labview demo application.
    Message Edited by hemmerling on 01-11-2007 12:35 AM
    Message Edited by hemmerling on 01-11-2007 12:37 AM

    Thanks alot.
    Conditional Disable and Diagram Disable Structures
    http://zone.ni.com/reference/en-XX/help/371361B-01/lvconcepts/cond_diagram_disable/
    are indeed at least a part of what I wanted.
    Anyhow, as such "suspended" VIs are often the *source* of signals,
    so there must be an addtional method how to provide "alternative" signals for the demo version,
    which does not make the administration / further development the full version  too complicated...
    For example: The VI for an external signal generator device is disabled, but alternatively it would be nice if the users of the demo version can get a fixed sinus signal instead...
    How to do that with Labview and the "Conditional Disable and Diagram Disable Struktures",
    and can I test this all even without Labview Application Builder, in the full development system ( so that I don´t need the compiler for frequent checking ) ?
    Btw, with what version was this "Conditional Disable and Diagramm Disable" feature introduced ? Is ist already available with Labview 7.0, /.1 ?
    Sincerely
    Rolf

  • Interfacin​g Siemens Desigo PXC Building Automation controller with LabVIEW

    Hello everyone,
    I am currently trying to interface Siemens building Automation controller Desigo PXC100-E.D http://www.buildingtechnologies.siemens.com/bt/glo​bal/en/buildingautomation-hvac/building-automation​...
    with LabVIEW using OPC servers. I had once interfaced the S7-300 PLC of Siemens with simatic step-7 software with LabVIEW but in this case I don't which driver should I select and don't know is it possible or not. If any one of you have similar sort of expierence please I need advice..
    Thanks
    Naqqash.
    Naqqash

    Hi,
    As you have described I've done the whole configuration. I am using MatrikonOPC for BACnet and as I've checked my device and the software are working properly. Now what I am trying to is that I am connecting the BACnet OPC server with LabVIEW so that the MatrikonOPC act as a connection layer between my device and LabVIEW. So that I will be able to change values directly from my LV vi. Now when I connect that Bacnet OPC with LabVIEW using the same procedure for PLC it gets connected because it is showing all the tags from the device. But after doing the whole procedure which is the same according to the tutorial 'connecting LV to any PLC using OPC' when I deploy the variables I am getting some error. I am attaching the screenshot of the error. Please let me know if I am doing any thing wrong.
    PS: I am using a virtual machine and I've tried the whole thing with the NI OPC servers as well according to the tutorial but still when i deploy variables I am getting this error.
    Naqqash
    Attachments:
    OPC_error.JPG ‏22 KB

  • Calling DLL on LabVIEW for Linux

    I have a vi that calls a dll made with Visual C++ on windows enviroment. What are the steps for calling this same dll on Linux ? Do we need to generate another dll?

    In article <[email protected]>, Labviewguru wrote:
    > First, I don't know if LabVIEW for Linux can even call a DLL. I
    > suspect that since this technology (as obsolete as it is, at least for
    > an operating system - thank you Windows) has been adopted by Linux,
    > that you can. I don't have my linux workstation on at the moment, but
    > if you need to know, I can check.
    >
    > As for the DLL itself, I suspect you will have MAJOR problems getting
    > it to work right in Linux, and that you will almost definitely have to
    > rebuild it with a Linux native compiler. It sounds like you have the
    > source code, so it should be a matter of just porting it over, and
    > stripping out all of the platform dependent calls a
    nd substituting all
    > of the necessary function calls.
    >
    > Good luck, and please keep us up to date on your progress. Not many
    > of us use Linux, and any and all information on the matter is gold.
    In linuxland isn't a dll called a shared library? You'd basically have to
    get the source for the dll and beat on it until it turns into a shared lib
    (better still, see if you can get an already built linux library). Actually
    hooking into the library from within LV should work the same in either world.
    NI, by the way, has app notes on this subject. I haven't gotten around to
    reading any of them yet, though.
    That's my story and I'm sticking with it.

  • How to build a table with two For Loop

    Hi,
    I have two Loop For and I want to build a table with N columm (N = a loop + b loop)
    You can see my example.
    Thank's a lot
    Attachments:
    help_table.zip ‏10 KB

    I think this is the solution that you are going for.
    -Jim
    Attachments:
    help_table.vi ‏26 KB

  • Can I target the STM32 Primer2 hardware with LabVIEW for ARM

    The STM32 Primer2 hardware looks very cool.  Can LabVIEW for Arm target this hardware?  From looking at the list of ARM devices supported by LabVIEW, this would appears to be a Tier 2 device (ARM Cortex-M3) with no support for TCP/IP or IO.
    Can anyone tell me the feasibility or effort required to get TCP/IP, IO, and maybe even display support for this device? 
    Message Edited by Jim Kring on 09-11-2009 10:46 AM

    Have you ever said something you wish you could take back after having time to reflect upon it?  Another forum I like, http://newsbusters.org lets the author edit his posts for a short time.  Maybe NI could to that and I would not be pulling out my foot so often.
    Well, perhaps I was a bit more "colorful" than I meant to be.  Frustration does that to me sometimes.  Still the idea of a strong rope covered with disgusting risks does get the point across magnificently.  I just wish I had saved it for something more suitable.
    Let me think back to some of the problems I've had in which I've lost hours trying to figure out...
    1.  Can't use the Wait ms function.  It halts the program.  Express wait works fine.  It was sprinkled throughout which made it hard to isolate.
    2.  Some sub VIs don't run unless they are checked as inline code.  I don't yet understand why.
    3.  At the beginning of my main vi there was a small cluster in which I filled the data from an SD card file.  I used a constant of the cluster on the input of the Bundle function, but because my program and variable sizes were near the max I changed a number of variable representations to save memory.  ...But I didn't replace the constant.  The program started exhibiting really strange behaviors.  I couldn't even get a simple state machine to run.  I was reduced to commenting out (disable structure) sections to find the problem before noticing the coercion dot on the input to the bundle (The dot against the red string color doesn't stand out very strongly which is why I missed it).  Apparently it overwrote memory since the older cluster was significantly larger than the new.
    4.  Spent a lot of time trying to get the SD card to work with SPI functions.  Even though I read that 2009 supported SD card file services I didn't intuitively understand how to wire up since the Open/Create/Replace function has a ref num output which actually connects to the file(use dialog) input of the read and write functions.
    5.  Had a problem with breakpoints and probes not working.  That apparently was caused by item #3.
    6.  Typo bug in the Arm_irq.c file  LM3Sxxxx_GPIOCAHandlerP to LM3Sxxxx_GPIOCHandlerP
    Some of these are of the rope variety. A few are actual bugs.  All probably could have been solved in moments had I a local guru.  Anyway, I've spent hours and my hands hurt.  I hope to have this little project working on the LM3s8962 today and after some hardware changes will port it over to the Primer2... Hopefully...
    This forum has been a real help... especially your quick responses.
    regards to all,
    David 

  • Generating DLL with LabVIEW - A basic question

    Hi everybody !
    I'm trying to generate a simple DLL with LV. I have read as much as I could on the subject, prepared a small test vi (calculate x*x), built the corresponding dll, inserted and configured the ddl into another vi... Every thing seems to be fine, except that the ddl returns 0 whatever I'm doing.
    I'm obviously missing something here, and I would be very gratefull if somebody could guide me out of this stupid corner.
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

    Hi Chrisger & Becktho !
    Thanks for your replies.
    Unfortunately I'm still stuck.
    First thing is that I followed already exactly the path develepped by Chrisger. I also tried changing the calling convention as suggestedc by Becktho. No success.
    Second thing is that the ddl provided by Chrisger works perfectly (sorry Becktho, you just forgot the attachment...). At least that's something that shows I'm not entirely stupid, since I'm able to use a DDL compiled by someone else !
    So, this seems to be a problem related to the way I am generating the DLL. Just in case, I have attached here the files I'm using (the source, the .bld file, and the generated DLL. Could you give them a look/trial ?
    CC
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        
    Attachments:
    Test DLL.zip ‏18 KB

Maybe you are looking for