f



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. 
 


Array1D.zip:
http://forums.ni.com/attachments/ni/170/235977/1/Array1D.zip
0
x9561 (148439)
3/16/2007 12:10:06 PM
comp.lang.labview 35210 articles. 1 followers. vasusachin24 (1) is leader. Post Follow

0 Replies
1346 Views

Similar Articles

[PageSpeed] 44

Reply:

Similar Artilces:

C++ & dll & labview
Hi all,   I have C++ dll & header file provide by one of the instrument company. By using labview, I able to call several function from the dll but not all that show in the header file. Can someone help me?? Attach with the header file, only able call for the Global Function Declarations but not those API classes.   Thanks and Best Regards, Simon       iqapi.h: http://forums.ni.com/attachments/ni/170/320537/1/iqapi.h Hi simon76, Can you post the dll in question?  Also, can you give an example of a specific function you are trying to call but are unable to? simon76 wrote:Hi all,   I have C++ dll & header file provide by one of the instrument company. By using labview, I able to call several function from the dll but not all that show in the header file. Can someone help me?? Attach with the header file, only able call for the Global Function Declarations but not those API classes.   Thanks and Best Regards, Simon  It's not surprising that you can not import most of those functions using the Import Library Wizard. Most of them do use C++ object pointers as parameters and the Import Library Wizard as well as LabVIEW does not know how to deal with them.I have not looked at the details of this API but if you do not need to access any methods of those C++ objects from LabVIEW and also do not need to create and destroy those objects in La...

How can I modify the "Type definitions" of "Function Prototype" if I want build a DLL in Labview 8.5.1.?
Hello,We have a library with several VIs (API - Interfaces to our Real Time Target). This VIs we provide to our customer to generate own VIs to control the Real Time Target.Now we want to provide the functionality of this VI-library as DLL to our customer. The problem is, that labview use self definite name of type definitions. Also if I use "strict Type definition".Example:void GetOutputValues(VARIANT *Scale_In, int32_t ModelNr, uint16_t SignalID[], TD1:smileymad: *errorIn, VARIANT *Scale_Out, TD2 *Data, TD1 *errorOut, int32_t len)It is possible to modify "TD1" and "TD2"? I want to give useful names.GreetingsSteffen Hi Steffen,       Try editing the .h file as follows: CHANGE FROM: typedef struct { LVBoolean status; long code; LStrHandle source; } TD1; CHANGE TO: typedef struct { LVBoolean status; long code; LStrHandle source; } TD1; typedef struct { LVBoolean status; long code; LStrHandle source; } LVErrorCluster; then your GetOutputValues prototype becomes: void GetOutputValues(VARIANT *Scale_In, int32_t ModelNr, uint16_t SignalID[], LVErrorCluster *errorIn, VARIANT *Scale_Out, TD2 *Data, LVErrorCluster *errorOut, int32_t len) If your source-code doesn't refer to "TD1", then you probably won't need to keep the TD1 prototype! Cheers. ...

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 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 Hand...

Use a wrapper to build a C++ Dll that calls a C++ .lib and Use the Dll is LabView
Hi All,   I need to access some functions in a C++ .lib within LabView, but has no source code for the library.  Can I build a Dll in Visual C++ that calls this library, then have LabView calls the Dll? If so, how different is building this Dll compared to building a Dll from a .cpp file?  I am new to C++, could some one suggest how to use the .lib in Visual C++ 6.0 studio to build the Dll?   Thanks for your help. Bryan Hi Emilie,   Thank you for the help. Sorry for the late reply here, got caught into a few busy projects. I do have a difficult LabView problem and hope get some help.  I need to move a pop up window by using lvuser32.llb. Are pop up windows from labview or other application such as written by C++ are the same with regular windows?  Also, is there a way to find the window names of all open windows including not only labview vi windows but also windows from other applications?  Some of my non labview applications will have their names changed dynamically during execution. I need to know their exact name to access them in a vi.     Regards, Bryan  BryanL wrote:Hi Emilie,   Also, is there a way to find the window names of all open windows including not only labview vi windows but also windows from other applications?  Some of my non labview applications will have their names changed dynamically during execution...

How to interface the Labview and Simulink (Matlab) without using the "NI LabVIEW Simulation Interface Toolkit"?
Hello, I've been using the Labview for the data aquisition. And I also developed a controller in the Simulink (Matlab) environment. I'd like to control my application using both&nbsp;programs. How&nbsp;could I&nbsp;interface the Labview and Simulink (Matlab) without using the "NI LabVIEW Simulation Interface Toolkit"? thank you, Kostya. Hi Kotsya, Thank you for posting to the National Instruments Discussion Forums. If you are not using the Math Interface Toolkit, you may be interested in using the MATLAB� Script Node. This allows you to call MATLAB� commands using ActiveX and I you can call your Simulink model from MATLAB� that way. Here are some resources on how you can do this: <a href="http://zone.ni.com/reference/en-XX/help/371361B-01/gmath/matlab_script_node/" target="_blank">MATLAB � Script Node LabVIEW 8.2 Help</a> <a href="http://digital.ni.com/public.nsf/websearch/4475BC3CEB062C9586256D750058F14B?OpenDocument" target="_blank">How Can I Resolve MATLAB� script node and Xmath Script Node Issues in LabVIEW?</a> Hope this helps! Hi, Abhinav, thank you for your reply. I will try to explore the option with the Script Node. regards, Kostya. &nbsp; &nbsp; ...

Error Code &quot;1097.....this might corrupted LABVIEW's memory..........&quot; appears after exit the labview and re-start labview
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I have a probelm when I use the "tool/import shared library(.dll)" wizard&nbsp;to generate the&nbsp;API from C. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The API &nbsp;works correctly when I complete the wizard, but after I exit labview and re-start labview to run&nbsp;the API&nbsp;again. The error 1097 code "......this might corrupted LABVIEW's memory.............."appears. &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The only solution now is to re-generate or update the wizard to&nbsp;generate the API. &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I try to find the answer in &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://digital.ni.com/public.nsf/allkb/58596F5D41CE8EFB862562AF0074E04C?OpenDocument" target="_blank">http://digital.ni.com/public.nsf/allkb/58596F5D41CE8EFB862562AF0074E04C?OpenDocument</a>&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The paragraph in above article shows ........................... &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "LabVIEW does not crash until it is closedThe most likely problem is that the DLL function being called has corrupted th...

Error 1073 when building LabVIEW app which calls LabVIEW dll
I am trying to use application builder to build an application that calls a dll created in LabVIEW. I get an error referencing a vi within the dll (Parse Stored String(multibyte).vi) saying that "This property is writable or this method is available only when the VI is in edit mode." The only option is to Continue which cancels the build. I had sucessfully built this application prior to including vis that call the dll and the program runs fine in the development environment. Do you have any idea what is causing this and what I cam do about it? I have found a temporary workaround i...

plug-in &quot;not installed&quot; in my LabVIEW project's &quot;Build Specifications&quot;
I moved my LabVIEW project from one computer to another, now when I click on any item under the project's "Build Specifications", I get an error reading "The plug-in for the selected item is not installed on your system." Does anybody know how to fix this? I have no idea what this "plug-in" is.Attached is a screenshot. plug-in error.PNG: http://forums.ni.com/attachments/ni/170/222664/1/plug-in error.PNG ...

can anyone provide me the suitable material for labview fpga &amp;labview real time??
&nbsp;Message Edited by Sithu on 05-27-2008 04:32 AM <a href="http://zone.ni.com/devzone/cda/tut/p/id/3555" target="_blank">FPGA</a> &nbsp; <a href="http://www.ni.com/lwcvi/realtime/" target="_blank">Realtime</a> The following link includes training material for both LabVIEW Real-time and LabVIEW FPGA. &nbsp; <a href="http://zone.ni.com/devzone/cda/tut/p/id/6929" target="_blank">http://zone.ni.com/devzone/cda/tut/p/id/6929</a> &nbsp; If you are new to LabVIEW you should start from the LabVIEW Basics material available at the following link. &nbsp; <a href="http://cnx.org/content/col10241/latest/" target="_blank">http://cnx.org/content/col10241/latest/</a> &nbsp; KostasB &nbsp; NIUK Applications Engineering ...

Building a DLL for use with Labview
Hello, I am trying to build a DLL to allow Labview to run some C code, but I am receiving the following error at the linking stage: *********************************************************************** Linking... Creating library Debug/lib1wire.lib and object Debug/lib1wire.exp cin.obj : error LNK2001: unresolved external symbol _CINRun Debug/lib1wire.dll : fatal error LNK1120: 1 unresolved externals Error executing link.exe. lib1wire.dll - 2 error(s), 0 warning(s) *********************************************************************** There seems to be a missing symbol (_CINRun) fr...

Calling a LabView DLL from a Labview VI
Hi, I have a vi that is calling a Labview DLL and they both have a same subVI. If I drop that SubVI into the block diagram first then drop in the Call Library Function Node, when I run the VI, the DLL would not work and it did not give me any error. Does anyone know how fix this problem with Labview? or is there some configuration that I can force the all of that SubVI points into the DLL. Thanks for your help, Dan ...

can anyone provide me the suitable material for labview fpga &amp;labview real time?? #2
&nbsp;Message Edited by Sithu on 05-27-2008 04:33 AM duplicate post. Continue <a href="http://forums.ni.com/ni/board/message?board.id=170&amp;thread.id=326521" target="_blank">here</a> ...

Connection with LabView &amp; 54600B Oscilloscope &amp; Agilent E4438C
Hi, &nbsp; duplicate: <a href="http://forums.ni.com/ni/board/message?board.id=170&amp;thread.id=315504&amp;jump=true" target="_blank">http://forums.ni.com/ni/board/message?board.id=170&amp;thread.id=315504&amp;jump=true</a> So sorry my computer have some problems and error and send many post. No problem, these things happen sometimes. I only placed the links in the reply to help others find the correct post. :) &nbsp; Good luck! ...

How can I convert the &quot;AI one pt&quot; symbol from LabVIEW 6.3 to LabVIEW 8.0?
Hi, &nbsp; I've got an assignment with LabVIEW and&nbsp;I work with LabVIEW 8.0. The program I work with is written in LabVIEW 6.3 and had to be converted&nbsp;to LabVIEW 8.0. That went very well, except for one symbol. The "AI one pt" symbol (see&nbsp;enclosed figure) turned into an empty box (question mark). My question to you is how can I overcome this problem, or how can I simulate this symbol with LabVIEW 8.0? &nbsp; With kind regards, &nbsp; Sander Smeets &nbsp; <img src="http://www.ese.upenn.edu/rca/software/Labview/labview41/inputoutput/AISamplechannel.gif"> Hello, Graziano is right about this. To make it completly clear: The block you refer to as a symbol is a VI belonging to the Traditional NI-DAQ driver. Currently there are two drivers for DAQ boards: DAQmx (the new one) and Traditional NI-DAQ (the old one). Since your VI was written in LabVIEW 6.x (6.3 never existed) the VI uses the old driver. What you need to do is: install Traditional NI-DAQ on your PC to get the support VI's for the driver in LabVIEW. This Traditional NI-DAQ installer&nbsp;should be on the driver CD which was delivered along with LabVIEW 8.0 or you can download it here: <a href="http://joule.ni.com/nidu/cds/view/p/id/586/lang/en" target="_blank">http://joule.ni.com/nidu/cds/view/p/id/586/lang/en</a> There is one good point though which Graziano already mentioned: Which DAQ board are you using? I...

Error 1047 in LabVIEW 8.2: LabVIEW failed to send variable to the script server. Server:&quot;&quot;
I am working with the evaluation version of labVIEW as well and I have run into another error.&nbsp; I am using a MATLAB script node within a for loop and attempting to pass the for loop counter variable into the script.&nbsp; When I run the code it brings up a 1047 error and says "LabVIEW failed to send variable to the script server. Server:"" ".&nbsp; I looked up the error online which seems to have roots in a failed auto initialization of MATLAB.&nbsp; Is there something that I can do in labVIEW to fix the problem or is it strictly a MATLAB error? &nbsp; I really appreciate your help. Hi Patsenat, &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; We have a knowledgebase document on our system referring to this issue.&nbsp; Try reading through <a href="http://digital.ni.com/public.nsf/allkb/2B3FF46C8512C4F786256CF30071BE53?OpenDocument" target="_blank">this</a> and attempting what it says.&nbsp; If you still have problems, please post again. ...

Connection with LabView &amp; 54600B Oscilloscope &amp; Agilent E4438C #2
Hi, &nbsp; See: <a href="http://forums.ni.com/ni/board/message?board.id=170&amp;thread.id=315508&amp;jump=true" target="_blank">http://forums.ni.com/ni/board/message?board.id=170&amp;thread.id=315508&amp;jump=true</a> &nbsp; ...

Connection with LabView &amp; 54600B Oscilloscope &amp; Agilent E4438C #5
Hi, &nbsp;&nbsp;&nbsp; I am trying out an exercise on receiving the data from the 54600B oscilloscope into LabVIEW Analog and Digital Modulations VIs. Currently, i am trying out on ASK modulation and i want to grab the signal/waveform from the scope and display in the ASK modulation exactly the same as ASK modulation graph. And this ASK modulation will be used as SubVIs,which can be seen from the attachment to have a clearer image on the work.Can anyone please help me??This is very important because it is my project work..Thanks Alot!:smileyhappy: ASK modulation_modify2.zip: http://forums.ni.com/attachments/ni/170/315508/1/ASK modulation_modify2.zip Hi Serina, Are you able to communicate with and obtain data from the Oscilloscope?&nbsp; Are you specifically looking for information on how to manipulate the data once it is received?&nbsp; Your post is fairly general, so if you can elaborate on what you have accomplished so far, and what specific areas you have questions on, then I may be better able to assist you. Regards, Lauren Hi, &nbsp;&nbsp;&nbsp; I think i can understand what you are trying to say. Anyway thanks for replying i have been waiting for reply, i just manage to succeed in communicating the generator with the scope and get the square wave i want.. something like that '&nbsp;|||---|||---||| '. but i need to set the ranges for the signal generator information graph, which is the graph displaying data from the RF inst...

Connection with LabView &amp; 54600B Oscilloscope &amp; Agilent E4438C #4
Hi, &nbsp;&nbsp;&nbsp; duplicate: <a href="http://forums.ni.com/ni/board/message?board.id=170&amp;thread.id=315508&amp;jump=true" target="_blank">http://forums.ni.com/ni/board/message?board.id=170&amp;thread.id=315508&amp;jump=true</a> &nbsp; ...

Connection with LabView &amp; 54600B Oscilloscope &amp; Agilent E4438C #3
Hi, &nbsp;&nbsp; see: <a href="http://forums.ni.com/ni/board/message?board.id=170&amp;thread.id=315508&amp;jump=true" target="_blank">http://forums.ni.com/ni/board/message?board.id=170&amp;thread.id=315508&amp;jump=true</a> ...

Is LabVIEW Runtime required for a DLL created by LabVIEW ?
Hi &nbsp; Could some one&nbsp;advice me on this matter please. I am trying to build a DLL for a set of functions created in LabVIEW. Now I am&nbsp; wondering if I need to use it with some other language like VB or C++, do I need to install the LabVIEW runtime of the same version as the original functions ? &nbsp; Any settings required while creating the DLL ? I am trying to&nbsp;create it in LV 7.0 &nbsp; Thanks in advance Deepu. &nbsp; Hi Deepu, yes, if you want to use a dll, which is created with LabView you have to install&nbsp;the runtime engine. Mike Alright Mike, Thanks ! I was&nbsp;hoping it would work without the LabVIEW runtime. Anyway, thanks for the quick reply. Rgds Deepu. ...

labview crashing when calling labview-built dll
Hello I need some help with regard to calling a LabVIEW-built DLL in LabVIEW.I have created a vi in LabVIEW. I made the DLL for this vi. I called this VI as a re-entrant in another vi.This vi(calling DLL) has been working fine till yesterday. Since yesterday, it started crashing LV.I need some help in this regard.I am attaching the screenshots of the Application Builder configuration window, the B.D of the vi using DLL and that of the configuration window which pops up when i call the DLL.I made a vi which performs FRA. I built its DLL.I have around 10 inputs. I output 3 one-dimensional arrays, and a string from the DLL.When i build the DLL, the builder defines the outputs 'gain', 'phase' and 'frequency' as arrays of 8-byte double.When i call this DLL in my vi, the configuration window sets them as 'numeric' outputs.Why does this happen? What is the solution to this?When i try to set them as 'array' in this configuration window, i get a warning that i am trying to change the data types which do not match with the data type found in the DLL. Is this the problem with my code or with the Application Builder?Now, after i change the 3 output datatypes to Arrays, and set their minimum length(i assumed that this value means the size of the array ), the vi runs and crashes LV. I am nto sure when it crashes, why it crashes. It runs fine at one time. It crashes at another time. I am nto sure if these arrays are teh reason why L...

Can you tell me the purpose of measurement &amp; automation explorer software &amp; NiDAQmax driver software, &amp; LABVIEW software for DAQ system?
Hi &nbsp; I am having basic doubt related to all the softwares mentioned above. &nbsp; Can you descibe it for me? &nbsp; &nbsp; NDAQmx is the driver software&nbsp;that lets you interact with the DAQ hardware using highlevel tools. It&nbsp;also lets you explore, configure, and test your measurement hardware. It includes NI Measurement &amp; Automation Explorer, DAQ Assistant, and and LabVIEW SignalExpress LE software&nbsp;which allows you do basic measurements without programming.&nbsp; <a href="http://www.ni.com/dataacquisition/nidaqmx.htm" target="_blank">http://www.ni.com/dataacquisition/nidaqmx.htm</a> It can be downloaded freely and comes with any DAQ hardware from NI. &nbsp; LabVIEW is a development system that allows you to write programs that can do anything you want, even interact with your hardware via the NIDAQmx drivers. <a href="http://www.ni.com/labview/" target="_blank">http://www.ni.com/labview/</a> &nbsp; What do you want to do? Please read the details at the above links&nbsp;and let us know if you have any more specific questions.Message Edited by altenbach on 09-12-2007 09:07 PM I wanted to develop a USB based DAQ system for temperature&nbsp;measurement (RTD/Thermistors as sensors). Currently i am having NI PCI 4351 alongwith necessary accessories. I tried to configure one channel for thermistors using Measurement &amp; automation ex...

Is .NET DLL better to use than C/C++ DLL in labview?
I was wondering which one runs more natively in LabView8.5. C/C++ DLL or DLL by .NET ?Thank you. You can use either kind, but .NET assemblies are much easier to work with. You can find some tutorials on working with&nbsp;both by searching this site. ...

Re: VisualBasic &quot;Show &amp; Hide&quot; equivalents in LabView
Hi, I want to show/hide the Labview Help programatically. (Just on the click on single button) How it can be done? Do i have to use event structure on Ctrl + H buttons???:smileyindifferent: Please suggest some solution. Thanks There's a help palette with a primitive called Control Help Window, which should do what you want (assuming you want the context help). <img src="http://forums.ni.com/attachments/ni/170/336539/1/untitled5.PNG"> Message Edited by mathan on 07-01-2008 07:07 AM untitled5.PNG: http://forums.ni.com/attachments/ni/170/336539/1/untitled5.PNG Hi Tst, Thanks. i know that there is a Context Help Window where you can see the help for all the functions or Labview help. i want to show/hide this window programatically. Is it possible? Thanks. Thanks Mathan, This is what i wanted. Thanks. Hi Dev, the first of those functions ("context help window") is what you need - as you can read in the context help window for that function!!!:smileyvery-happy: Yes, i got it. thanks . ...

Web resources about - build a DLL in LabVIEW &amp; Use the DLL in LabVIEW - comp.lang.labview

Resources last updated: 3/19/2016 4:05:42 PM