How to call Labview-VI​s in a AgilentVee​-function?

Hello,
i have some good running Labview-Vis and want to use them in a Agilent-Vee-function (*.vee).
Is there a way to make a DLL from the VIs?
Or is it possible to run a VI from a C++-DLL? Then i could create this DLL and call the DLL in VEE.
But i would be easier if i could call the VIs direct in VEE, so if any VEE-users are reading this... perhaps someone has an idea.
Thx for any
ideas.
best
regards
J.

Or you could use the VI server ActiveX interface to do this.
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be!

Similar Messages

  • How to call LabVIEW dll from ATL COM dll

    I have tried to call simple LabVIEW 8.6 Dll from win32 test application, class Library.
    I have include LabVIEW generated SharedLib.h file and SharedLib.lib file in the test application which I created as simple win32 console project and also from win32 class Library. I was sucessfully able to call my LabVIEW dll funtion. 
    But when I create ATL COM project and try to add SharedLib.h file and SharedLib.lib file I used to get following erors
    Error 1 error C2733: second C linkage of overloaded function 'StrCatW' not allowed d:\program files\national instruments\labview 8.6\cintools\extcode.h 463 
    Error 2 error C2733: second C linkage of overloaded function 'StrCpyW' not allowed d:\program files\national instruments\labview 8.6\cintools\extcode.h 464 
    Error 3 error C2733: second C linkage of overloaded function 'StrCpyNW' not allowed d:\program files\national instruments\labview 8.6\cintools\extcode.h 465 
    Error 4 error C2733: second C linkage of overloaded function 'StrCmpW' not allowed d:\program files\national instruments\labview 8.6\cintools\extcode.h 466 
    Error 5 error C2733: second C linkage of overloaded function 'StrCmpNW' not allowed d:\program files\national instruments\labview 8.6\cintools\extcode.h 467 
    these many errors.
    Will some one explain me how to call LabVIEW dll from ATL COM dll.
    Thanks & Regards,
    Jay

    I also had this problem.  My application is unicode-aware, but I was attempting to link it to a library with primitive C-string arguments.  You could dynamically load the DLL as suggested (more work), modify the header files (really not recommended), or if you are feeling lucky you could try fooling the compiler, as I was successfully able to do in Visual Studio 2010, by steering the preprocessor around those functions (assuming you're not using them, of course -- otherwise this probably wouldn't work):
    // prepare for NI extcode.h inclusion. avoid linker errors for this project.
    #define StrCatW(a,b)     IgnoreLinkError_StrCatW(a,b);
    #define StrCpyW(a,b)     IgnoreLinkError_StrCpyW(a,b);
    #define StrCpyNW(a,b,c)  IgnoreLinkError_StrCpyNW(a,b,c);
    #define StrCmpW(a,b)     IgnoreLinkError_StrCmpW(a,b);
    #define StrCmpNW(a,b,c)  IgnoreLinkError_StrCmpNW(a,b,c);
    // header file for my LabView-built DLL (ASCII single-byte character arguments)
    #include <MyLibraryHeader.h>
    // clean up afterwards, put things back to 'normal'
    #undef StrCatW
    #undef StrCpyW
    #undef StrCpyNW
    #undef StrCmpW
    #undef StrCmpNW

  • Where can I get an example of how to call Labview.exe (Active X Server) from Visual C++

    I would like to Call Labview application (as Active X Server) from Visual C++. I need any type of exemple on how to do this, any input will be greatly apriciated.

    In the summer there has been an example in the Developer Zone, but i can't find it again. I can send you the attached zipfile from that example. The example is resricted to single threaded applications. In multi threaded applications you must initialise OLE in the thread where you communicate with the active-X server.
    If you need more information contact me at [email protected]
    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
    Attachments:
    VCandLabVIEW.zip ‏91 KB

  • How to call LabVIEW ActiveX dlls into VB6

    I'm jumping in on a project written primarily in VB6. I'd much rather wirte code in LabVIEW so what I am looking for is some example code for calling LabVIEW activeX dlls into VB6. Does anyone have example code? I need to see how the LabVIEW libraries and classes are called and used in VB6.

    Hi Drewdafis,
    Refer to this link for example code on calling a LabVIEW DLL from Visual Basic.
    Hope this helps!
    Best Regards,
    Jonathan N.
    National Instruments

  • How to call Labview DLL from VB2005

    Dear all expert,
    I'm a student and very new in Labview programming.
    Currently i have build a simple vi and need to convert it to dll so that i can call it from my VB.net. But the problem is how to call the labview dll from my VB.net?
    I know we must declare function something like this,
    Auto function Bodeplot Lib"..\\Bodeplot.dll" (Byval Val1 as double, Byval Val2 as double,...) as double
    but how to determine Val1, Val2 (and so on) is input for which data?  if my vi have 10 input (frequency, Kc,Fcz,Fcp,Wzrhp,Wp,k,Wz,Beta and Operation) ? and how to select the output (my application have 3 possible output : magnitup loop,phase loop, and degree loop)
    In addition, since I'm using Labview 8.0 , and as i know apllication  builder for this version cannot convert vi to dll which contain Mathscript (but unfortunely, my vi all use Mathscript), so really hope someone can help me to convert my vi to dll using Labview 8.2 (which remove this limitation).
    here I'm attach my Vi and really hope someone willing to help.
    Thank you.
    Attachments:
    bodeplot.vi ‏1049 KB

    On Sep 17, 6:40 am, cckoh <[email protected]> wrote:
    > Dear all expert,
    > I'm a student and very new in Labview programming.
    > Currently i have build a simple vi and need to convert it to dll so that i can call it from my VB.net. But the problem is how to call the labview dll from my VB.net?
    > &nbsp;
    > I know we must declare function something like this,
    > &nbsp;
    > Auto function Bodeplot Lib"..\\Bodeplot.dll" (Byval Val1 as double, Byval Val2 as double,...) as double
    > &nbsp;
    > but how&nbsp;to determine Val1, Val2 (and so on) is input for which data?&nbsp; if my&nbsp;vi have&nbsp;10 input (frequency, Kc,Fcz,Fcp,Wzrhp,Wp,k,Wz,Beta and Operation)&nbsp;? and how to&nbsp;select the output (my application have 3 possible output : magnitup loop,phase loop, and degree loop)
    > &nbsp;
    > In addition, since I'm using Labview 8.0 , and as i know apllication&nbsp; builder for this version cannot convert vi to dll which contain Mathscript (but unfortunely, my vi all use Mathscript), so really hope someone can help me to convert my vi to dll using Labview 8.2 (which&nbsp;remove this limitation).
    > &nbsp;
    > here I'm attach my Vi and really hope someone willing to help.
    > &nbsp;
    > Thank you.
    > &nbsp;
    >
    > bodeplot.vi:http://forums.ni.com/attachments/ni/170/272124/1/bodeplot.vi
    If you insist on using Labview with your project then you should
    consider using ActveX in place of using a dynamic link library to
    interface to your VB.net code. You don't need "Application Builder"
    if you use ActiveX. The Student, Basic and Full development versions
    of Labview for Windows come with ActiveX capability. For more
    information on ActiveX look up the subject ActiveX in Labview's Help
    File.
    Howard

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

  • How to call LabVIEW from TestDirector

    Hai to all,
    I want to call LabVIEW function from TestDirector. That TestDirector using VBScript. is it posible? if posible can you give the procedure.
    thanks for advance!
    reddy

    Hello,
    in this case you have to contact Mercury for more informations. There are no experiences in this way from the LV side.
    Regards
    Thomas D.
    NI Germany
    (SRQ 204139)

  • How to call the java method in java script function in a portal application

    Hi Friends,
    I am developing one application where i need to fetch the data from KM content and displaying it on the screen in regular interval. I wrote one method in JSPdynpage for fetching data from KM content now I need to call that java method in java script function.
    java method(IComponentRequest request)
    //Coode for fetching the KM content
    function()
    <b>//Need to call the java method</b>
    setTimeout(function, 5000);//setting the time interval for this function
    <<htmlb display code>>
    If anybody can help me in calling the java method in java script function that will be very helpful for me.
    Thanks in advance,
    Sandeep Bonam

    Hi,
    Pls see if the following links could help.
    http://www.rgagnon.com/javadetails/java-0170.html
    http://www-128.ibm.com/developerworks/library/wa-resc/?dwzone=web
    Regards

  • How to call LabView function with nested structs and arrays from C#

    Hi,
    I've got the following functions defined in a LabView-dll:
    uint32_t __stdcall VOSC04_General(uint32_t Command, TD18Hdl *Messages);
    uint32_t __stdcall CheckDiameter(uint32_t Command, TD6 *Parameter);
    typedef struct {
     double SP_Diameter;
     double SP_Tolerantie;
     double PV_Diameter;
     } TD6;
    typedef struct {
     int32_t dimSize;
     int32_t Numeric[1];
     } TD18;
    typedef TD18 **TD18Hdl;
    I've got some C#-code (generated by PInvoke-wizard) to call these functions:
    [DllImport("vosc04.dll")]
    public static extern uint32_t VOSC04_General (uint32_t Command, ref TD18Hdl Messages);
    [DllImport("vosc04.dll")]
    public static extern uint32_t CheckDiameter(uint32_t Command, ref TD6 Parameter);
    [StructLayout(LayoutKind.Sequential,Pack=4)]
    public struct TD18
       public int32_t dimSize;
       [ MarshalAs( UnmanagedType.ByValArray, SizeConst=1)]
       public int32_t [] Numeric;
    [StructLayout(LayoutKind.Sequential,Pack=4)]
    public struct TD6
       public Double SP_Diameter;
       public Double SP_Tolerantie;
       public Double PV_Diameter;
    The problem now is that when I try to read the Messages-output-parameter, I get wrong values (pointers?). I think that the problem lies in the fact that LabView generated a TD18 AND an TD18Hdl struct.
    How can I correct this problem?
    Can anyone give me some advise to correct this problem? I'm not an expert in C, only in C#.

    I think the problematic line is this:
    public struct TD18
       public int32_t dimSize;
       [ MarshalAs( UnmanagedType.ByValArray, SizeConst=1)]
       public int32_t [] Numeric;
    It looks like C# is forcing the array to be of size 1. The thing is, LabVIEW stores arrays as handles which are double pointers to a structure which contains a size element followed by the elements of the array. For your example, int32 arrays are stored in memory as:
    handle -> location -> |size|element 1|element 2| .... |element size-1|
    Because C does not do runtime array bounds checking, you can get away by declaring the structure as:
    typedef struct {
     int32_t dimSize;
     int32_t Numeric[1];
     } TD18;
    The correct declaration would've been:
    typedef struct {
     int32_t dimSize;
     int32_t Numeric[size];
     } TD18;
    But size is not a constant, so C/C++ won't let you do that. So, even though the array is declared to be of size 1, it can (and usually does) have more than 1 element. This does not cause a problem because LabVIEW allocates memory based on the actual size of the array.
    If I were you, I'd try to change the prototype of the LabVIEW DLL function to accept a pointer to array data, rather than an array handle, pre-allocate memory for the array in C# and pass a pointer to the allocated memory into LabVIEW so that LabVIEW can "fill it up".
    Let me know if you need more information.
    Pramod

  • How to call labview DLL from visual C++?

    Hi,
    I'm trying to call a LV DLL from a VC++ application
    by using the LoadLibrary and GetProcAddress functions.
    The DLL contains a simple sum function. The Library is
    loaded correctly, but the result is always 0.0000.
    I have loaded a VC++ DLL in a similar way and it works
    correctly. Also, I have tested the DLL by loading it in LV,
    and it works correctly. The calling convention is defined
    to be stdcall in LV Application Builder.
    I have also tried this solution, but I will get a compiler error
    from one the header files that are created by the LV when
    the DLL is made. The error comes from this line
    typedef char                int8;
    and the error states that
    ..\fundtypes.h(107) : error C2371: 'int8' : redefinition; different basic types
    If someone knows of newer tutorial(for LV 8.2) or knows how to use those
    LoadLibrary and GetProcAddress function for LV DLLs, I will appreciate the
    information greatly.
    Below is the code that I'm using for loading the LV DLL.
    Thanks
    #include "stdafx.h"
    #include <stdio.h>
    #include <stdlib.h>
    #include <map>
    #include <windows.h>
    int _tmain(int argc, _TCHAR* argv[])
        HINSTANCE LVLib = LoadLibrary(TEXT("Testdll"));
        typedef double (__stdcall *MYPROC)(double, double);
        if (LVLib != NULL)
            MYPROC ProcAdd = (MYPROC) GetProcAddress(LVLib, "Add");
            if (ProcAdd != NULL)
                double d = (ProcAdd)(5.5, 6.6);
                printf("sum = %f\n", d);
            else
                printf("Invalid function pointer\n");
        else
            printf("Failed to load the library\n");
        return 0;

    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.

  • How to call Copy.GetItem Method in Excel vba function

    Hi,
    I want to use sharepoint copy services to download/upload or retreive field information of a sharepoint file.
    For that i want to sharepoint web services. One class among them is copy. I want to call the GetItem method present in that class.
    Think that modules are not installed or not found in excel vba editor tools reference library list to enable.
    So please provide me the steps from scratch to install the sharepoint library. and call the Copy class methods in my script.
    Just send me a sample vba code to accomplishes the same requirement. I appreciate the help.
    Regards,
    SUBBA

    Hi SUBBA,
    The following articles for your reference:
    VBA - Download files from sharepoint
    http://ckannan.blogspot.com/2012/09/vba-download-files-from-sharepoint.html
    Using Microsoft Windows SharePoint Services with the Microsoft Office System
    http://msdn.microsoft.com/en-us/library/office/aa159897(v=office.11).aspx
    How to download a file from a Sharepoint server via Excel VBA?
    http://www.justanswer.com/computer-programming/7ntq7-download-file-sharepoint-server-via-excel-vba.html
    About the Excel VBA questions, you can also post it to Excel for Developers Forum, you will get more help and confirmed answers from there.
    http://social.msdn.microsoft.com/Forums/office/en-US/home?forum=exceldev<o:p></o:p>
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How to call the integration engine not the remote function.

    Hi!
    I want to get the data from the client 000 with an rfc call through the xi (client 001). But when I call the function via rfc, the funciton is executed in the client 001, instead of forwarding the call to the integration engine.
    How can I forwarded to the engine this call?
    I only made a sender communication channel in the DI which is an sener adapter type RFC.

    Thanks for the reply.
    But I have no receiver channel yet. so i can't even reach any server if my call would be catched by the intergration engine.
    But unfortunately I can reach the target system without the engine.
    I use java connector to connect the external system to my intergration server.
    Please help.

  • How to call a bean method through a javascript function

    I dont discover any problems calling the bean method in this maner:
    <%= helpdesk.data() %>
    But, when I use a Button Onclick= to call the script function and which then is going call my bean method
    an error on the page is reported!
    I have include som code which gives you the idea of what Iam searching for. And is it possible to call
    the bean method without doing from a new jsp page?
    If you have any suggestions to why it doesnt work, please let me know.
    I use Apache Tomcat 4.0
    Best regards Micah.
    <jsp:useBean id='helpdesk' scope='application'
    class='helpdesk.testdb'/>
    <html>
    <head>
    <script language="javascript">
    function broadcast()
    helpdesk.data();
    </script>
    </head>
    <body>
    <input type="button" value="Broadcast" onclick= broadcast()>
    </body>
    </html>

    It's actually quite simple:
    Beans run server-side
    Javascript runs client-side
    So you will never be able to run server-side-code thru the client...

  • How to call formhandler handler method using js onclick function

    I need to call formhandler handle method when user clicks on a link. I want to call that method in js function.
    any help will be appreciated.

    Please try the below.
    In jsp page:
    <a(HTML tag) href="javascript:submitfunction();"> My Submit Link </a(HTML tag end>
    <dsp:input type="hidden" bean="MyFormHandler.handleMethod" id="submitForm"/>
    In js file:
    submitFunction(){
    $(#submitForm).submit(); //or you can try .click();
    Note: I am using jQuery library.
    Thanks,
    Gopinath Ramasamy
    Edited by: Gopinath Ramasamy on Nov 29, 2012 1:06 PM
    Added comment to 'a' tag to get the code displayed in the page

  • How to call an include in a field Exit?

    Hi Guys,
                  i am having a doubt ,How to call an Include in a field Exit function module.
                i wrote as "include zxx_incl." but if i wrote like this in my Field Exit i am getting a Suntax error
    "Recursive INCLUDE nesting in program "ZFLDEXIT_INCL". It contains an
    INCLUDE statement which calls itself or a previously read program
    ("ZFLDEXIT_INCL                           ").
    '                 i am having other doubt while creating an include program does we need to write a 1st statement as include zxx-incl within the same include ZXX_incl? if not i am getting a syntaxt error.
    thanks,
    Gopi.

    Yes, thats the problem.
    Your include is named ZFLDEXIT_INCL and in the first line of that include you probbaly wrote
    include ZFLDEXIT_INCL.
    Delete that, includes don't need a reserved word like programs and reports

Maybe you are looking for

  • String substitution on Weblogic

    Hi experts. As you know, the WLS domain template provides the string substitution mechanism. (startscript.xml and stringsubs.xml) Here you should specify your entries that will be processed during the template applying. After being applied, these ent

  • Searching for code for giving headings to certain group of rows dynamically

    Hi All, We have a requirement of giving headings to the group of rows. For eg: there are three categories A,B&C. under each category the query returns say a set of 3 rows each. Now we have the requirement of arranging these rows under proper category

  • Is a DSN (ODBC-derived) accessible from the Eclipse Java SDK?

    I'm in the process of evaluating alternatives for implementing a (seemingly) straight forward Crystal report in the Eclipse environment.  I can access a report (.rpt) that uses JDBC data source connection, but not DSN (ODBC) data source connection. 

  • Tethered shooting incompatibility

    Is there a plug-in for tethered shooting in Adobe Lightroom 5 with a Nikon D2x?

  • Openbox+FBpanel+wbar+conky: total disaster at startup

    I've been tinkering with openbox for a few days and love how can I tweak everything. I first installed pypanel, and had problems at startup (error 957), so started looking for other panels and found fbpanel to be very good. However, when i put it int