Specifying parameters for labview dll

hi.
Im using the help files in labview 8.2 which are the only good directions Ive found to build a dll with labview.
I was able to go through the example without a problem.
This includes adding the needed parameters that are passed via the function (see figure below)
The problem is that, when i get to the part for the parameters i need to specify for my file, there are none listed (see figure below)
I can even copy the entire code out of the example file (meanmedianmode.vi) and paste it in my vi and the newly compied parameters dont show up why i try to export as a dll
Little help here, i dont see any documentation regarding this..
the two files i am using as source files, one is just example code and one is my file
example file has plenty of paramesters, they seem to just be indicators, nothing fancy.
my file has no parameters listed, i even copied the entire code of the example file into it trying to get some to show up.
Message Edited by jimmyinCT on 03-05-2008 05:11 PM
Message Edited by jimmyinCT on 03-05-2008 05:12 PM

here is the vi
http://www.engr.uconn.edu/~jmacione/dll3.vi
and project
http://www.engr.uconn.edu/~jmacione/labviewdll.lvproj
For this particular project, ive incorported my signal generator vis into the example file for meanmodemedian.vi (example file for building dlls)
Ive rewired the "mode" indicator into the area of code for the signal simulator, and replaced it with  "mode3" , a copy
In the project, Im only getting "mode" as an output parmeter along with the other two from the example file, "median" and "mean".
It appears i cant create any new output parameters and am stuck with the three from the example file.
Yes, this files were  recomplied with control shift run ahead of time.
I had resaved it to ahead of time.
I must be tired or getting old or something,  but ive been stuck on this for a few weeks.
I do remember making dlls in labview 3years ago, dont remember it being this hard
If it matters, this is 8.2 on vista
Message Edited by jimmyinCT on 03-06-2008 07:09 PM
Message Edited by jimmyinCT on 03-06-2008 07:09 PM
Message Edited by jimmyinCT on 03-06-2008 07:11 PM
Message Edited by jimmyinCT on 03-06-2008 07:11 PM

Similar Messages

  • Configure string parameter for LabView dll

    Hi,
    I have created a simple LV 2010 vi (Starting vi) that reads the identification of an oscilloscope. I then take this vi and build it to a LabView dll. I test the dll by calling it from LabView (RunFrom dll). It essentially seems to work but len and ReadBuffer come back blank. It has to be in the way I am configuring the parameter setup for Readbuffer (Parameter Setup) in the dll configuration. I have tried several different configurations but nothing seems to work. Any help is appreciated!
    Jim Haas
    Solved!
    Go to Solution.
    Attachments:
    Starting vi.png ‏43 KB
    RunFrom dll.png ‏29 KB
    Parameter Setup.png ‏20 KB

    What's the len parameter for?  Normally you would set that as the length of the string, but it appears you haven't done that.  Also, you're passing len by value, not by reference, so the function expects it to be an input and you'll never get back a value other than whatever value you provide.
    Don't use a local variable of ReadBuffer for the "readbuffer" input.  You need to pass an initialized string long enough to hold the expected amount of data.  The easiest way to do this is to use Initialize Array to create an array of U8, then use byte array to string.  Set the "minimum size" parameter to "len" and pass in the length of the initialized string (this isn't required but is good practice).  If you need the resulting length output, add another indicator and parameter for that value.  There might be a way to do it with a single parameter by passing len by reference, you'd have to experiment (it's definitely doable in C but I don't know if LabVIEW allows it).

  • Specifying Parameters for Fillable Form Elements

    I am trying to create a form and have so many questions. I wish I could speak with someone, but I'll try to detail it out here.
    The form is a certificate. There is a border and various text. Among the text are four fields for filling in the recipient's name, the course they completed, the date and the location. I am creating the certificate in InDesign CS5, saving it as a PDF, then opening it in Acrobat 9 to make the fillable fields. This would be so much easier if I could create the form with the font, size and position of the fillable forms in InDesign and then Acrobat would read that info and create a box with those parameters. But it doesn't.
    So when I get to Acrobat and draw the boxes (or have it draw the boxes for me), how can I size those boxes to the point? Is there a place I can type in the specific measurements of a box? I can position the type in the box L, R or center, but how about vertically? What about leading within a box? Right now I am starting in InD, saving as PDF, going to Acrboat, creating and specifying boxes, saving the file, then opening it and typing something in it to see the position, and if I don't like the size or the position of some element, then either going back to InD, making adjustments and starting all over again, or going back to Acrobat making and making adjustments. For instance, I don't know what size box to create for a particular type size. So I guess at the box size but maybe it's too small and cuts off the decenders, while at the same time having lots of space ABOVE the ascenders. By going back and forth I can kinda sorta get what I want, but it's guess then adjust, guess then adjust.
    And what about overall tracking? I'm not expecting niceties like baseline shift or intercharacter kerning, but I was using one font that was very loose and would like to tighten it overall.
    Not only this, but after I go through all this, and send the form to the customer, if the customer makes a change, even just one word, I have to go back to InD make that change and start all over again.
    Am I going about this wrong from the get-go? Is there a different version of Acrobat for what I am trying to do? Are there plug-ins?

    Hi,
    Do you want to know what values have to be passed to the following parameters:
                 FUNCTION  =
                 MANDANT  =
                 DEL_DATE  =
                 SAP_OBJECT  =
                 AR_OBJECT  =
                 OBJECT_ID  =
                 FORM_ID  =
                 FORMARCHIV  =
                 RESERVE  =
                 NOTIZ  =
    If yes? Then I could help a lil bit here:
    MANDANT = client (by default its taken as the logon client)
    DEL_DATE = date of deletion of the Outgoing document stored
    SAP_OBJECT = Business object = BUS1006
    AR_OBJECT =  Document type = ZBPDOCTYP
    OBJECT_ID = would ideally be the document number (has to be passed by the calling application)
    RESERVE = document class = PDF
    I am not sure of the FORM_ID and FORMARCHIV.
    Generally the function module ARCHIV_CREATE_OUTGOINGDOCUMENT is called for creating the ArchiveLink documents. Applications like MM, FI call this function module. This is further called by the function module CONVERT_OTF_AND_ARCHIVE. If you could check these function modules, it might be of some help.
    Best Regards,
    Sindhu Sreedharan.

  • How to call a dll with special parameters in Labview?

    Hi,
    I have a dll file (compiled in C++) and I would like to call the individual functions from this dll file.
    I do not know however, how I must correctly define the initial parameters in LabView.
    That is the function, which I would like to call:
    DWORD OpenDiagDriver ( char* port,
    LPCSTR path,
    CANObjects CANObj[],
    WORD BitTiming = 0x4167);
    CANObjects CANObj[] is a pointer to array with CAN configuration data
    typedef struct
    DWORD Ident;
    BYTE Config;
    }CANObjects;
    CANObj[0].Ident= 0x18DA0000;
    CANObj[0].Config= 0x8C;
    CANObj[1].Ident= 0x18DA0000;
    CANObj[1].Config= 0x84;
    WORD BitTiming= 0x4167;
    I made a vi, but it doesn’t work.
    Attachments:
    example.vi ‏29 KB

    Hard to say without the full C source. Are you building the DLL according to the CIN rules (see Using External Code in LabVIEW)? Mapping clusters to C code in DLLs is not a simply process and we generally recommend to create wrappers. However, since your structures are fairly straightforward, you could use the "Adapt to Type" as you are trying to do.
    I recommend checking out the mentioned manual and also the examples in \examples\dll\data passing\Call Native Code.llb and the associated C files.
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • I would like convert a c++ dll for use in labview--my device has no labview dll

    I have a piezoelectric control board (Piezomechanik gmbh) that I would like to use through LabView.  Currently, the company does not offer any support for Labview.  Windows sees the device (It came with a driver file), but the company only provides dll files for C++ and Visual Basic.  Can I convert these files to a format Labview can use?  How can I get Labview to communicate with the control board (and ultimately the piezoelectric device attached to it)?  Thanks!
    Solved!
    Go to Solution.

    This will only help you when you have the header file for the DLL, otherwise you will have to create the wrapper manually using the "Call library node" and the DLL api description or write an header file for the DLL yourself based on the api documentation and use the wizard.
    Regards,
    André
    Regards,
    André
    Using whatever version of LV the customer requires. (LV5.1-LV2012) (www.carya.nl)

  • Building Dll for labVIEW RT gives errors

    Hi All
    Does building dll for labVIEW RT using CVI require labview runtime engine to be installed?
    becuase i get some errors of unsatisfied referances to some library while building the dll with target selceted to "labVIEW real time only".
    Regards
    Arun

    Hello Arun,
    You don't need to have LabVIEW Run Time installed on your machine. Please check the link below to see the function that are supported by exporting the LabWindows/CVI LabVIEW RT Engine
    http://digital.ni.com/public.nsf/websearch/D3EFE7C6F073384886256FDD005FBCDA?OpenDocument
    Ame G.
    National Instruments

  • Deploying labview dll for vb6

    Hello,
    I have created a labview DLL that uses the modulation toolkit. The idea is to use this dll in a VB6 project and this on a PC that doesn't have anything installed from Labview, only visual basic 6.
    To test my DLL, i have created a VB6 test project on my development PC (with labview + modulation toolkit installed) which calls this DLL. On my development PC everything is working fine. The problem starts when I try to run this VB6 project on a PC without Labview. First, he asked for the labview runtime engine, so I installed this and restarted my VB6 project. But if I try to run my project VB6 automatically shuts down.
    How can I create a VB6 project on a blank PC that uses my labview DLL?
    Thanks

    Well, as you've already found out, you have to have the LabVIEW Run Time Engine installed on this other PC. This is an absolute requirement.
    Unfortunately, right now there's too many variables, so the only other answer I can give you is that you should try to narrow this problem down by creating a simplified LabVIEW DLL and try to call it in your VB6 on this other computer. To be honest, I'm not sure whether not having the deployment license for the Modulation Toolkit on this other machine would actually cause VB6 to crash. I did a search on this site and didn't find anything. Still, I would suggest trying it out with the Modulation Toolkit first,  Then work your way up until you find where it breaks.

  • How do I use "LabVIEW dll import wizard" to import NETAPI32.dll

    I am trying to use the LabVIEW dll import wizard for the first time. I am not very familiar in C-coding so this might be a good help instead of configuring CallLibraryFunction nodes myself.
    I want to import NETAPI.dll. I am interested in several functions in that dll, but my main priority is the funtion NetUserGetInfo(). On MSDN I have found that the header file for the mentioned function should be: lmaccess.h (include lm.h).
    My problem is this:
    The shared library contains 317 function(s). But no function is found and recognized in the header file. The following function(s) cannot be wrapped. If you want to import these functions, please review the warning messages next to the functions below. You will need to fix the problems before you can continue with the wizard.
    The function cannot be imported into LabVIEW. This might be caused by one of the following problems:
    The function is not declared in the header file but is exported in the library.
    Check the header file to make sure it contains declarations of the function.
    Undefined symbols can prevent the wizard from recognizing functions and parameters. To correct this problem, check the header file to determine if you must add predefined symbols. Click the Back button to return to the previous page of the wizard to add a predefined symbol (for example, "NIAPI_stdcall = __stdcall" or "NIAPIDefined = 1").
    MIDL_PASS;_STDCALL_SUPPORTED;__cplusplus;
    Any suggestions how I can solve my issue?   

    astrid wrote:
    I am trying to use the LabVIEW dll import wizard for the first time. I am not very familiar in C-coding so this might be a good help instead of configuring CallLibraryFunction nodes myself.
    I want to import NETAPI.dll. I am interested in several functions in that dll, but my main priority is the funtion NetUserGetInfo(). On MSDN I have found that the header file for the mentioned function should be: lmaccess.h (include lm.h).
    My problem is this:
    The shared library contains 317 function(s). But no function is found and recognized in the header file. The following function(s) cannot be wrapped. If you want to import these functions, please review the warning messages next to the functions below. You will need to fix the problems before you can continue with the wizard.
    The function cannot be imported into LabVIEW. This might be caused by one of the following problems:
    The function is not declared in the header file but is exported in the library.
    Check the header file to make sure it contains declarations of the function.
    Undefined symbols can prevent the wizard from recognizing functions and parameters. To correct this problem, check the header file to determine if you must add predefined symbols. Click the Back button to return to the previous page of the wizard to add a predefined symbol (for example, "NIAPI_stdcall = __stdcall" or "NIAPIDefined = 1").
    MIDL_PASS;_STDCALL_SUPPORTED;__cplusplus;
    Any suggestions how I can solve my issue?   
    Sorry I forgot the attachment, but here it is.
    Attachments:
    NETAPI32.doc ‏103 KB

  • How do I set a path in an executable for a DLL?

    I wrote a VI that is using a DLL in the Call Function Library Node. I set the parameters to Specify Path In Program in the node. I did this because I am distributing the VI as an executable and the path is obviously not the same as my VI. When running the VI I am using the Current VIs path, Strip Path, and then Build Path to get the directory for the DLL I am calling. It works fine for the VI. Where my problem lies is when I run it as an executable the filename.exe is being used in the build path and the DLL is then not being found. Is there a reason the .exe is acting different than the VI? What would a good solution be to fix this problem? Thanks in advance for any help.

    There's a perfectly good reason and this question gets asked about once a week from people new to the app builder. When you use the current VI's path in the development system, the path might be c:\folder\example.vi. When in a exe or dll, the path to the current VI is c:\folder\program.dll\example.vi. You need an extra strip path. You make it work in both development and the dll by using reading the App.Kind property and wiring the output to a case statement. Put the extra strip path in the run-time case.

  • Problems in using Labview DLL with TestStand!

    Hi,
    I tried to put the VI's to create a TCP/IP Connection, read/write Data to it and close it inside a LabVIEW DLL and use these functions with TestStand.
    The problem is to get access to the ConnectionID generated as TCP Network Refnum in LabVIEW.
    I don't know how to specify the prototype entry for this Refnum in LabVIEW and how to read it with TestStand.
    Another try to pass an ActiveXReference of SequenceContext and use the SetValIDispatch method to set a local variable (Type: ActiveXReference) to the returned ConnectionID of the TCPOpen.VI wasn't successful too.
    It seems to me that the connectionID isn't a normal ActiveXReference.
    Regards,
    Sunny

    Hi Sunny -
    You should treat this parameter as a pointer to an int when calling the DLL from TestStand (or any language like C or C++). Note that you can't do anything with the value outside of LabVIEW since it only has meaning inside of LabVIEW. You can only pass it around for use in other VIs you call from TestStand.
    Hope this helps....
    Kyle G.
    National Instruments
    Kyle Gupton
    LabVIEW R&D
    National Instruments

  • Calling LabView DLLs from C/C++

    Hi!
    Is it possible to call functions in the LabView DLLs directly from
    C/C++?
    Functions like InvChiSquare in lvanlys.dll has "Adapt to Type" void *
    parameters. How do I specify those parameters from C/C++?
    I have tried to use the "Build Shared Library" function in LabView to
    make a wrapper dll of the "Inv Chi Square Distrubution" vi, but when I
    call this function in the dll from C/C++ the function never returns.
    Other functions in the same dll that does not use functions in the
    lvanalys.dll are working ok.
    Regards
    Hans Forssell

    There are 2 great places to get infomraiton on passing data to dlls, and the data types used. First would be this manual. Using External Code in LabVIEW
    The second is the dll examples that ship with LabVIEW 7.0. Go to LabVIEW 7.0\examples\dll\data passing\Call Native Code.vi

  • Can't step into CVI step that calls LabVIEW DLL?

    Windows 2000 SP1
    TestStand 2.01f
    LabWindows CVI 6.0
    LabVIEW 6.1 Runtime
    We have a framework based on TestStand and CVI. A customer has supplied us
    with a DLL written in LabVIEW 6.1 and packaged with the Application Builder
    that we need to call from a CVI test library DLL. They say they can't
    supply us with a non-LabVIEW implementation. We installed the LabVIEW 6.1
    run-time. We added code to the CVI test library to dynamically load and
    unload the LabVIEW DLL using LoadLibrary and FreeLibrary. LoadLibrary is
    called in a function in the MainSequence Startup step group, FreeLibrary is
    called in a function in the MainSequence Cleanup step group.
    Things run as expected when the CVI DLL is built as Release or Debug and the
    CVI
    adapter is configured to run in-process.
    However, if we try to debug CVI DLL by building it as Debug and configuring
    the CVI adapter to run in an external instance of CVI, things hang the first
    time we try to step into, or run, a CVI test library step that calls one of
    the functions in the LabVIEW DLL. On the Applications tab in Task Manager,
    the item named LabVIEW is marked as 'Not Responding'. The only way to
    recover is to kill the LabVIEW process, which takes down CVI and TestStand
    with it. If none of the LabVIEW DLL functions are called, no problems are
    seen (no hang).
    I assume the problem has something to do with the library getting mapped to
    the wrong process space (TestStand v. the external CVI instance). Is there
    any way to solve this problem? Any ideas or suggestions would be
    appreciated.
    Joe

    > Out of curiousity, what happens if you attempt to debug your DLL from
    > CVI? For example, configure TestStand to run its steps 'inProcess'...
    > but then close the TestStand application and in CVI, configure it so
    > that the Specified External Process dialog points to TestStand's
    > SeqEdit.exe (CVI launches TestStand when debugging the project). Once
    > TestStand is running, run your test and set your break points as
    > usual, you should be able to step into the CVI code if nothing else.
    > If not, I would be interested in hearing what problems you encounter.
    When 'debugging' SeqEdit from CVI, we experienced no lock up.
    Thanks for this suggestion. Debugging from CVI is a workaround for now,
    though not highly desirable as it is reverse from normal debug proc
    edure
    (user can't step into CVI from TestStand). Still would like to know if
    'normal' debugging of this problem is possible.
    > The nice thing about debugging directly from Labwindows/CVI while
    > TestStand runs 'inprocess' is that you can avoid some library linking
    > errors, which may be the source of the troubles you are seeing.
    The problem appears to be general to LabVIEW DLLs called from an external
    instance of CVI under TestStand. We were able to reproduce the problem with
    a simple LabVIEW VI compiled to a DLL, then called from a simple CVI DLL
    under TestStand. We will package up some sample code and submit it to NI
    tonight or tomorrow.
    Thanks for you help.
    Joe

  • How to call labview DLL from C#, passing char, char[], float[], long, short

    Hi,
    I'm having trouble calling labview dll from C# to perform certain function.
    The function supposed to return the values in the float Analysis[] array. However, when I execute it it only returns zero values.
    It seems that some parameters are not properly passed to the dll.
    Below is the function in the header file:
    void __stdcall Optical_Center(char FileDirectory[], long ImagePtr,
        short int Height, short int Width, char ReadFromFile, float Analysis[],
        long lenAnalysis);
    and my corresponding dll import in c#:
    [DllImport(@"SMIA.dll", CharSet = CharSet.Ansi)]
            public static extern void Optical_Center([MarshalAs(UnmanagedType.LPStr)]string FileDirectory, long ImagePtr,
                short Height, short Width,char  ReadFromFile, IntPtr Analysis,
                long lenAnalysis);
    string str = @"C:\SMIA.raw";
    int len = 3;
    long m_lenAnalysis = 3;
    long m_ImagePtr = 0;
    short m_Height = 2464;
    short m_Width = 3280;
    IntPtr m_PtrArray = Marshal.AllocHGlobal(len * Marshal.SizeOf(typeof(float)));
    char m_ReadFromFile = '1';
    Optical_Center(str,m_ImagePtr,m_Height,m_Width,m_ReadFromFile,m_PtrArray,m_lenAnalysis);
    float[] m_Analysis = new float[len];
    Marshal.Copy(m_PtrArray, floatArray,0,len);
    Marshal.FreeHGlobal(m_PtrArray);
    string printstr = "";
    for (int i=0; i<len; i++)
        printstr = printstr + floatArray[i].ToString() + "\n";       
    MessageBox.Show(printstr);
    Appreciate if anyone can help, thanks.
    KL

    I was just about to post the header file of the DLL, when
    I noticed that there's a function called LVDLLStatus.
    This little thingie turned out to be a rather handy tool.
    With that function I found that in the DLL I had a problem
    with another function that prevented the DLL to be correctly
    loaded.
    This other function in the DLL is for generating digital output
    and it worked as it should, when tested from LV.
    Anyway if someone is interested, I got it working by using
    the LoadLibrary and GetProcAddress function, as in the
    source code thatI posted earlier.
    I will investigate what is wrong with that digital output, and
    post into a another thread if I have problems with that.

  • Error while installing Device Drivers from Disk1 for Labview 8.2

    I  am having trouble installing the Device Driver Reference CDs for LabView. I already installed LabView 8.2.1. When I try to install the device drivers from Disk1, I get the following error message :
    .\UberInstaller.cpp(1458): IInstallerError 10009
    Fatal Error. Unable to create temporary file.
    Unable to copy original d\SupportFiles\resourceEng.dll to C:\DOCUME~1\x0039441\LOCALS~1\Temp\nii478.tmp.
    Windows Error Windows Error 64: The specified network name is no longer available.
     I can open the cd and see its contents, but I am unable to install it.
    Can anyone help me in resolving this error.
    thanks
    Siddharth
    Message Edited by Siddharth D on 08-05-2008 06:31 AM

    Well I am stuck with this problem

  • LabView dll parallel

    Hi, all.
    More LabView-dll issues... After searching in the forums and checking documentation, I'm not yet very clear, so I decided to post this question.
    Is it possible to call an external function (using Call Library Function Node with a dll) and run two applications (LabView and the external function) in parallel?
    Moreover, is it possible to exchange data between these two different loops?
    I attach a chart so you can figure out better this problem.
    Thank you very much,
    Francisco
    Attachments:
    LabView-dll running in parallel.jpg ‏366 KB

    Hi, all.
    Dear Rolfk,
    let me see if I have understood what you stated. I've attached a flowchart with the ideas: the C++ dll includes an independent thread with the calculations and the simulation loop, and different functions for certain tasks (Initialize, Communicate and Stop Thread) that control this independent thread. This functions are called from LabView via Call Library Functions Nodes. The Communicate function, the one that sends and retrieve data from the independent thread loop, is called every cycle by LabView.
    The dataflow would follow this route:
    Join controls --> sent parameters as arguments for Communicate function (dll) via Call Library Function Node --> send parameters inside the dll (queues, for example) to Physics Engine --> dll simulation loop --> obtain parameters from Collision detection --> send them to Communicate function (queues, for example) --> send parameteres to LabView as returning values of Communicate function --> check for alarms (Generate alarm) --> correct settings (Join controls) ...
    So, does it mean that is not needed to deal with read and write problems between LabView and the dll, because the data is exchanged via a simple Library function node called every LabView execution cycle?, and that these problems only have to be treated inside the dll (between the independent thread loop, and the Communicate function)?
    Thank you very much, your support is invaluable,
    Francisco.
    PS. Happy Thanksgiving for American people
    Attachments:
    LabView and dll parallel application.png ‏72 KB

Maybe you are looking for

  • Issue with JSTL ( c:import ) tags in Weblogic 9.2

    Hi, I'm trying to migrate a struts (1.2.9) application from Weblogic 8.1 to Weblogic 9.2. This application has JSPs with JSTL (1.0) tags. I have a JSP page that has multiple (around 7) c:import statements. When I launch my application, only the conte

  • Update 10.2.1 can't restore my ITouch 3rd Gen Error 21

    Hey guys, I've been trying since the release of update 10.2.1 to troubleshoot through this problem with no success. I am here as a last resort. When I clicked Yes to the update MY Itouch stop working right away. I would constantly get the restore ico

  • Multicast in bpm

    Hi, what is the meaning of multicast in bpm ?? thanks kumar

  • IPad 2 to macbook pro

    ipad 2 will connect to all other wifi networks and iPhone hotspot, but will not connect to my 2011 Mac Book Pro. I am stumped as this should be automatic. It worked when I had an airport express connected to the DSL modem. Hooked laptop to modem and

  • How to determine column length semantics through ANSI Dynamic SQL ?

    I am looking for a way to determine the length semantics used for a column through ANSI Dynamic SQL. I have a database with NLS_CHARACTERSET=AL32UTF8. In this database I have the following table: T1(C1 varchar2(10 char), C2 varchar2(40 byte)) When I