Can I call a built in LabVIEW function remotely?

I would like to call a bunch of LabVIEW's built in GPIB functions on a
remote computer to talk to a device attached to that computer. I was
able to do this using VI server and by wrapping the GPIB function in a
custom vi (this vi was just GPIB Write with controls and indicators)
Is there a way to avoid making a "wrapper" VI for built in functions
such as GPIB Write? i.e Open a VI reference to built-in LabVIEW
functions remotely using VI server?
Thanks,
Brian
Sent via Deja.com http://www.deja.com/
Before you buy.

That is one of the built-in functions and not a stand-alone VI and the best way to call it is to create a VI with it on the block diagram.

Similar Messages

  • Can you call a built-in labview VI using teststand directly? For "File last modified"...

    I am trying to use Teststand to retrieve the "last modified" timestamp property for the sequence file that is running. The purpose is to determine whether a modification has been made since the last time a sequence with the same file name was run. The "saved count" property is not a viable option since mulitple people may be working on the same sequence, and in theory two people could have started with the same sequence file, made a change, and then saved (making the saved count property the same even though they are now different sequences).
    So, unless someone knows of an easy way to do get this info (file last modified information) within Teststand, here's my question:
    LabVIEW has a built-in VI that provides this information (Programming Pallete->File IO->Advanced File Functions->File/Directory Info). This gives a "last mod" output which is exactly what I need. However, this is in Labview, not teststand where I prefer to call it and retrieve the information. I could easily just place this built-in VI into a new blank VI, and then call that with TestStand, but that seems very redundant. The built-in version is exactly what I need.
    Is there a way to call this VI directly from TestStand without having to put it into a blank VI and save it as a seperate file? I can't seem to locate it within any of the labview directories or libraries, but maybe I'm not searching for the right name. Is there an easy way to find a VI on the harddrive that is on one of the buit-in labview palletes ?
    This seems like such a simple thing but it's giving me a lot of grief!
    Thanks!

    That is one of the built-in functions and not a stand-alone VI and the best way to call it is to create a VI with it on the block diagram.

  • Application crashes when calling DLL built with LabVIEW 2011

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

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

  • Can I call a User-Defined Mathscript Function using LabVIEW 7.1?

    I am trying to use a User-Defined function call in a mathscript node using LabVIEW 7.1 and I cannot seem to make it work.
    For example, consider that my mathscript node contains:
    clear all;
    close all;
    x = linspace(1,100,5);
    y = mltp(x);
    where the labview vi is saved in the same folder as the mathlab script mltp.m that is given by:
    function out1 = mltp(in1)
    out1 = 5*in1;
    Creating an array output of the mathscript node for y yields an empty array.
    How can I use User-Defined functions in a mathscript node using LabVIEW 7.1?

    Hello,
    LabVIEW 8.2 did not yet have the MathScript page in Tools >> Options.  In this version, you need to set the search path through the MathScript Window.  Launch the window from Tools >> MathScript Window.  Then go to File >> MathScript Preferences.  It sounds like you have done this.
    A first guess is that your .m file calls some unsupported functions or uses unsupported syntax.  If that were the case, you could put the script in the Script Editor of the MathScript Window and select the "Save and Compile Script" menu item.  This will return any errors from compiling the script.  However, you said you simplified the problem to a single multiplication.  Since this still does not work, I need more information.  What are all the directories listed for the path in the MathScript Preferences dialog from the MathScript window?  What is the working directory?  Where is your .m file located on disk?  Can you attach your .m file or paste the contents in your message?
    Grant M.
    Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments

  • How can I call a Report From database function

    Hi all,
    I want to call a Report from a database function. Could you hel
    me???
    Rgds

    Hello there!
    There is a solution for executing an executable like RWRUN60
    from PL/SQL on http://asktom.oracle.com/pls/ask/f?
    p=4950:8:227101::NO::F4950_P8_DISPLAYID,F4950_P8_B:150612348067,Y
    Or you can invoke the CGI from the Reports-Server through
    UTL_HTTP
    Hope this helps
    Dannys

  • Can we call the Datagrid Column Sort function?

    Is it possible to call the same function within the datagrid
    component that is used when we do an onClick event of the column
    headers? When you click on the column header, it will sort the
    column ascending or descending.
    I would like to call that same process after the datagrid is
    loaded, programmatically. But the same as if the user had clicked
    the column.
    I have looked at examples in the help that sort the
    dataprovider array. But if we are able to do this at runtime with a
    user clicking on the column, it seems that it should be possible
    since the datagrid is doing a sort on the internal dataprovider
    object for the datagrid.
    If it is not available now, this functionality should be
    added.
    Thanks.

    Yes, you can do what you want by setting the data provider's
    "sort" property
    to be an instance of class Sort, and putting one or more
    SortFields inside the
    Sort.
    If you put just a single SortField inside the Sort, then the
    header field will
    have the up/down triangle indicating the results of the sort,
    just as if the
    user had clicked on the column. If you put two or more
    SortFields inside the
    Sort, then there won't be a triangle, because of course it
    wouldn't make sense
    to put on there.
    Here is a small sample:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:Array id="mydata">
    <mx:Object col1="b" col2="p" col3="z" />
    <mx:Object col1="c" col2="r" col3="y" />
    <mx:Object col1="b" col2="q" col3="x" />
    <mx:Object col1="a" col2="q" col3="x" />
    <mx:Object col1="d" col2="q" col3="x" />
    <mx:Object col1="c" col2="q" col3="x" />
    </mx:Array>
    <mx:ArrayCollection id="mycollection"
    source="{mydata}">
    <mx:sort>
    <mx:Sort>
    <mx:fields>
    <!-- This example has field "col2"
    as its primary sort field, and
    field, and field "col1" as its
    secondary sort field.
    If you remove one of these lines,
    so only a single SortField
    exists, you will see a triangle
    in the header of the sorted
    field in the DataGrid.
    -->
    <mx:SortField name="col2" />
    <mx:SortField name="col1" />
    </mx:fields>
    </mx:Sort>
    </mx:sort>
    </mx:ArrayCollection>
    <mx:DataGrid id="dg" height="474"
    dataProvider="{mycollection}" >
    <mx:columns>
    <mx:DataGridColumn headerText="Column 1"
    dataField="col1"/>
    <mx:DataGridColumn headerText="Column 2"
    dataField="col2"/>
    <mx:DataGridColumn headerText="Column 3"
    dataField="col3"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Application>
    Mike Morearty
    Developer, Flex Builder team
    http://www.morearty.com/blog

  • Call a dll for Labview: Function not found in library

    Hello,
    I am trying to call a very simple .dll form Labview. I compiled the .dll for x64 using Visual Studio 2010, because I am using Labview(64-bit). I did everything exactly the way I read it in several Tutorials. But the "Call Library Function Node" doesn't create a popup menu with the avalible functions like it is supposed to do. The Import Wizard doesn't find any functions neither. What is wrong with my .dll?
    I added a block marked 'extern "C" ' into my source file, but it still won't work.
    Thanks
    Matthias
    Solved!
    Go to Solution.
    Attachments:
    DynamicLibrary.zip ‏2452 KB

    You need to define an entry point to the DLL
    BOOL APIENTRY DllMain( HANDLE hModule,
                            DWORD  ul_reason_for_call,
                            LPVOID lpReserved )
        return TRUE;
    Also add extern "C" __declspec(dllexport) to your functions
    More details here: http://www.ni.com/white-paper/3056/en
    Beginner? Try LabVIEW Basics
    Sharing bits of code? Try Snippets or LAVA Code Capture Tool
    Have you tried Quick Drop?, Visit QD Community.

  • How can I called java.lang.Math.sqr function from PL/SQL?

    JVM is loaded and I've queried the system table showing there are more than 9000 JAVA class objects.
    When I try something like:
    select java.lang.Math.sqrt(9) from dual;
    I get ORA-00904 (invalid column name) error. How can I invoke standard java.lang.Math methods in PL/SQL?
    tia

    You need to write a PL/SQL wrapper for the java call.
    Then you just call the PL/SQL function..
    -------PL/SQL wrapper
    FUNCTION GetFullName( code varchar2) RETURN NUMBER
    AS LANGUAGE JAVA
    NAME 'ResponseXml.GetPersonFullName(java.lang.String) return java.lang.String';
    Now you can do
    Select GetFullName( 'mycous' ) from dual;

  • Can we call LabVIEW VI's (saved at shared location say server)from two different test stations?

    Hello All,
    My question is related to calling and execution of LabVIEW Vis  from two or more different teststation(Test System) using NI TestStand.
    Following are some definitions to understand the question better
    A Test Station:is a independent sytem.different instruments(Multimeter,Function generator etc) are connected to this Station.Teststaion using NI TestStand for Test managment.
    A LabVIEW :LabVIEW vis are saved at share location(server).These vis are responsible for communicating with different instruments connected to TestStation.
    Execution:TestStand calls these Vis in sequene to perform particular test.
    My query is to know ....Can we call and execute shared labVIEW vis from two or more TestStation simulatneously and cummunicate with connected instrument on each teststation.
    Is there any possiblity of conflict as using same vis but on different station?
    My concern is to avoid duplicacy of similar vis.Is there any better option to implement the same concern?
    Thanks in advance
    Regards:
    Vaibhav Kanchan
    Sr. Engineer
    NI Certified LabVIEW Developer(CLD)
    NI Certified TestStand Developer(CTD}

    I suggest you to try adding the shared vi to the labview project(.lvproj) running in same or different stations which is connected to the instrument. Adding the vi to a project will open it in the project instance instead of default application instance. Hence there won't be any conflict in execution.
    Anand kumar SP
    Senior Project Engineer
    Soliton Technologies Pvt Ltd

  • How to call Python Scripts throght Labview

    Hi all,
    I am new to this community. Need some inputs  for following Questions
    Questions:
    1)  How can I call python script from LabView?
     (Basically this python script calls some other DLL and print some message, to run the script using Python net in my application .To run my script in python net using following commands: import python script name )
    2)  In how many ways we can call Python scripts from labview?
    I have tried with this option "System Exec.vi "in labview , able to calling pythonnet but unable to send commands and arguments to run python script(i.e  import python script name ). 
     If anyone have samples".VI " please send to me. If you people want any information and clarification  from my side please let me know. Thanks in advance.
    Regards,
    Sambasivareddy

    One way is to create a client server app and to send arguments to python (and back) over TCP/IP. This work very well.
    There is an example on the old OpenG Website about this. Look it up.
    Python client to LabVIEW Server.
    PJM
    Message Edited by PJM_Labview on 03-12-2008 09:00 AM
    Got EasyXML?
    JKI.VIPM.EasyXML.OpenG.LAVA.Builder.blog

  • Can I call a function from a dll in LabVIEW that returns:double*string and int.?

    I have a function from a dll that return a double* string and an integer. How can I call this function from LabVIEW? There is a possibility to work in LabVIEW with a double* string?

    pcbv wrote:
    > Hello all,<br><br>The header of the function is:
    >
    > "HRESULT WRAPIEnumerateDevices(WRAPI_NDIS_DEVICE **ppDeviceList, long *plItems);"
    >
    > where WRAPI_NDIS_DEVICE have this form:
    >
    > typedef struct WRAPI_NDIS_DEVICE<br>{<br>
    > WCHAR *pDeviceName;<br>
    > WCHAR *pDeviceDescription;<br><br>}
    > WRAPI_NDIS_DEVICE;<br><br>
    >
    > The function is from WRAPI.dll, used for communication with wireless card.
    > For my application I need to call in LabVIEW this function.
    Two difficulties I can see with this.
    First the application seems to allocate the array of references
    internally and return a pointer to that array. In that case there must
    be another function which then deallocates that array again.
    Then you would need to setup the function call to have a pointer to an
    int32 number for the deviceList parameter and another pointer to int32
    one for the plItems parameter.
    Then create another function in your DLL similar to this:
    HRESULT WRAPIEnumExtractDevice(WRAPI_NDIS_DEVICE *lpDeviceList, long i,
    CHAR lpszDeviceName, LONG lenDeviceName,
    CHAR lpszDeviceDesc, LONG lenDeviceDesc)
    if (!lpDeviceList)
    return ERROR_INV_PARAMETER;
    if (lpDeviceList[i].pDeviceName)
    WideCharToMultiByte(CP_ACP, 0,
    pDeviceList[i].pDeviceName, -1,
    lpszDeviceName, lenDeviceName,
    NULL, NULL);
    if (lpDeviceList[i].pDeviceName)
    WideCharToMultiByte(CP_ACP, 0,
    pDeviceList[i].pDeviceDescription, -1,
    lpszDeviceDesc, lenDeviceDesc,
    NULL, NULL);
    return NO_ERROR;
    Pass the int32 you got from the first parameter of the previous call as
    a simple int32 passed by value to this function (and make sure you don't
    call this function with a higher index than (plItems - 1) returned from
    the first function.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Can i call winmain function in labview

    hello everyone,
    Well i have written a C++ code that uses the  winmain function (windows function). i want to convert this code into dll and call that dll into labview.
    Is it possible to  call winmain function as one of the functions in labview. Please let me know as soon as possible.
    Thank you.
    Royal  tiger......

    You didn't say what development environment you're using, so I'm assuming Visual Studio. It sounds like you created a Win32 app (as opposed to an MFC app). This has a "WinMain" function. The prototype for WinMain is geared towards it being called by the OS when you run the executable. You could just add the __declspec(export) directive in front of the return type, but you also need to change some build functions in Visual Studio to get a DLL. You probably also don't need all the arguments that WinMain uses. You're probably better off by starting with a new DLL project in order to get the framework for a DLL, and then copy and past the function code. That's what I would do.
    I would also strongly suggest that you crack open the "Using External Code in LabVIEW" manual that gets installed when you installed LabVIEW. It's in the "manuals" directory, filename of "lvexcode.pdf".

  • Programming a c application which is calling a *.so built by LabVIEW.

    Hello all,
    This question probably has been asked, but I can't find the answer.  So here's my question:
    I have built a LabVIEW *.so in Linux and I want to call it from a "c" application.  The LabVIEW *.so is returning a cluster of strings and I want to know how to call it from my c application (memory allocation?).
    Here's the *.so source code, the function is named "testvi":
    Here's my c application source code:
    #include <stdio.h>
    #include <string.h>
    #include "testclusterofstrings.h"
    int main()
    Cluster_Of_Strings clusterofstrings;
    Testvi(&clusterofstrings);
    printf("-------------\n");
    printf("String_A: %s", (*clusterofstrings.String_A)->str);
    printf("-------------\n");
    return 0;
    I'm getting the following output when calling my application:
    LabVIEW caught fatal signal
    13.0 - Received SIGSEGV
    Reason: address not mapped to object
    Attempt to reference address: 0x0x19f5c381
    Segmentation fault (core dumped)
    So, what is the proper way to do this?
    Thanks,
    Michel
    Solved!
    Go to Solution.

    smithd wrote:
    If its a labview-built dll and you're passing parameters by ref, I'm not too surprised you have to initialize it (although I would expect labview to be friendly enough to allocate the data structures for you). Maybe if you passed it a null pointer instead it would work? From your original post, maybe try this:
    int main() {
    Cluster_Of_Strings * clusterofstrings = NULL;
    Testvi(clusterofstrings);
    For some reason I remember reading that labview will interpret the null as a sign that it needs to allocate the structure, but I could be totally insane on that point.
    If that doesn't work, then yes you'll have to allocate all the handles as appropriate. From <labview>\cintools\extcode.h you can see that a string is defined as follows:
    typedef struct {
    int32 cnt; /* number of bytes that follow */
    uChar str[1]; /* cnt bytes */
    } LStr, *LStrPtr, **LStrHandle;
    Since you have size-0 arrays I think you really just need to call DSNewHClr(sizeof(int32)) which will allocate a handle with all 0s, and 0 is what you want. Final result would be...
    int main()
    Cluster_Of_Strings MeasInfo;
    MeasInfo.String_A = (LStrHandle)DSNewHClr(sizeof(int32));
    MeasInfo.String_B = (LStrHandle)DSNewHClr(sizeof(int32));
    Testvi(&MeasInfo);
     Oh, and for the string functions, make sure you look at the built-in functions first before you make your own.
    Actually, the whole thing is both a little easier and more complicated at the same time. LabVIEW is fully managed with its data types but you have to follow that management contract when you interface to LabVIEW code from C.
    First, the first attempt with allocating a string handle with sizeof(int32) + sizeof(uChar) bytes without initializing the length element is wrong. That length element could contain any value and cause LabVIEW to wrongly assume that the handle is already big enough to fill in its data and not do anything and then writing over the end of the allocated buffer.
    Also initialisation of the structure with NULL is not going to work. This cluster has to be provided by the caller as it is a fixed size data area passed in as a pointer. However initialisation of the string handles inside the cluster with NULL should work fine, since LabVIEW considers NULL handles as the canonical zero length handle.
    However after you have called the LabVIEW DLL function you are the owner of any memory that was allocated by that function and returned to you, just as you would be if you had allocated those handles yourself before the call. So proper etiquete is to also deallocate it and this is not optional but a requirement or you create memory leaks. It doesn't get noticed here since your test program terminates anyhow right after but it will bite you badly in a bigger application if you forget this.
    The code could then look something like this:
    int main()
    Cluster_Of_Strings MeasInfo;
    MeasInfo.String_A = NULL;
    MeasInfo.String_B = NULL;
    Testvi(&MeasInfo);
    printf("-------------\n");
    printf("String_A: %s\n", LV_str_to_C_str(MeasInfo.String_A));
    printf("String_B: %s\n", LV_str_to_C_str(MeasInfo.String_B));
    printf("size %d", (sizeof(int32) + sizeof(uChar)));
    printf("-------------\n");
      if (MeasInfo.String_A)
    DSDisposeHandle(MeasInfo.String_A);
    if (MeasInfo.String_B)
    DSDisposeHandle(MeasInfo.String_B);
    return 0;
    // Returns the pointer to the string buffer in a LabVIEW string handle that has been made
    // sure to be zero terminated.
    char *LV_str_to_C_str(LStrHandle lv_str)
    if (lv_str && !NumericArrayResize(uB, 1, (UHandle*)&lv_str, LStrLen(*lv_str) + 1))
    LStrBuf(*lv_str)[LStrLen(*lv_str)] = 0;
    return LStrBuf(*lv_str);
    return NULL;
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How can i call a DLL file from labview?

    Iam using a sensoray 2601 module.It is given as DLL file(S2600.DLL).How can i call this function from LabVIEW?
    Please Mark the solution as accepted if your problem is solved and donate kudoes

    As far as I can tell problems might occur with the call library function node if the the DLL from visual basic is actually an ActiveX dll if that is the case it seems calling the dll by using the Invoke node is the way to go.
    Have a look at this 
    /sletten

  • What are analogous shared libraries that can be called using a call library function to user32.dll and lvtoolbox.dll when using Linux and Mac?

    I am wondering if anyone is familiar with how to get similar information with a LV program using a Linux shared library as well as the corrolate Mac library to the Windows user32.dll and lvtoolbox.dll.  I specifically am trying to get system metrics such as screen resolution information and cursor information as well as being able to set mouse position.   I am trying to convert a LV Windows program to these other operating systems and I am unfamiliar with these platforms.
    Thanks for your time - I really appreciate it.

    There is no simple answer to that. On Linux you will likely have to call into X Server, which would be a pain to do, due to various versions and implementations of that. On the Mac there would be the difficulty that you can't call into the native ObjectiveC API but would need to find a Carbon API or something like that to do what you want.
    If you seriously want to do something like this for multiplatform, you should bite the bullet and start coding an intermediate shared library in C. This library would export a LabVIEW friendly C API and access whatever system API you need to have for the particular functions. But multiplatform programming on this level is a pain in the ass, no matter what.
    Message Edited by rolfk on 04-21-2010 08:26 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for