Passing an exit from a DLL to TestStand

I need to convert a VI in a DLL that will be used to the TestStand. The VI takes a delimited string of TestStand, it truncates a given length and retransmits it. The VI works fine in the sequence, but when I built it as long as DLL, it fails to return the output to TestStand. I don't really know if the problem lies in the settings of step TestStand, or how I built the DLL. Here are a few screenshots. Also, the length of the strings passed in is variable and I don't know what size to set the size of the len.

Hi Drewsali,

What I understand from your question, you have a string entry who went from Teststand, LabVIEW and Teststand back. Len determines the amount of memory of the input string for the transfer of LabVIEW. One possible suggestion would be to define a local variable that is equal to the size of your input string, and then to set the buffer Len equal to this variable so that it passes the size of the string each time. If you do not want to redefine the size of the buffer len whenever you enter a string, just make sure that you allocate enough memory for the largest input string you will be entered. Good luck with your project!

Kind regards

Jackie

Tags: NI Software

Similar Questions

  • How to pass a string to a vi from a dll?

    I have a DLL that generates errors in the log. How can I display my Panel before these errors? In other words, how to pass a string from a DLL to a vi using the library to call feature?

    Thank you

    Diego

    The DLL actually allocates memory for the string? If this is the case, there should be another function to free the memory. Otherwise you won't be able to do the deallocation of LabVIEW, which means you would have to write a wrapper DLL. If you do not have the deallocation, then you will have a memory leak.

    Are you sure that the DLL is not simply wait for a buffer "of a proper size? In this case, you can simply create a U8 in LabVIEW to a size that is larger that the largest string that you expect to get.

  • Try to create a DLL from VI to use TestStand.

    I try to create a DLL on an existing file in VI.  The VI has 4 inputs and 3 outputs.  If I go to tools > Build Application and select the target Build as a "Shared Library (DLL)" I have a dll after construction; but when I try to call this DLL to teststand, it doesn't recognize the inputs or outputs.  How to build a DLL so that teststand will recognize the inputs and outputs?


  • Pass the parameter to the functions called from a dll

    Hi all

    I am interfacing a motor controller for PMC - 100 through the Protocol of Performax using labwindows.

    I need to explicitly link the PerformaxCom.dll and call functions with him. I'm calling this function

    BOOL fnPerformaxComOpen (DWORD IN dwDeviceNum, OUT HANDLE * pHandle);

    Faithful:

    If you want to link explicitly, you can consult this article: http://zone.ni.com/devzone/cda/tut/p/id/8503

    It has a code snippet that shows passing two parameters to a DLL function.

    But as for your statement that "I don't know how to pass parameter to him", in the example, you reference, you pass a parameter: it's just a constant string rather than a variable.

  • TestStand 2012 Newbee question: How do I pass a string to a VI to TestStand to control the flow of sequence?

    I want to use a drop-down list box (or a similar control) in a VI to select from a list of strings to direct execution in TestStand.

    • How connect the channel selected in the combo box at the output of the VI Terminal so I can see it in TestStand?

    • What should I use as 'value' in the parameter module TestStand to retrieve the result of that VI?

    I tried "wiring" the result of the drop-down list box directly to a terminal of output without success.

    I tried "wiring" the exit from the drop-down list box to a wire string variable then this variable to an output without success Terminal.

    (see attached files)

    Can someone give me an example of a VI that allows you to select from a list of strings: {'Bob', 'Mary', 'Bill', 'Jennifer',...} using a

    (or similar) drop-down list box control and routing of the string selected to the output terminal?

    Also, how to reference this (result) setting within TestStand?

    It is a simple task and there can be only one solution TestStand, I'm looking for a simple direct execution sequence by the operator to select a string in a list.

    I studied this problem, but could not find instances of the digital comparisons or string canned and did not find a generic model that would return a string to a VI to TestStand result.

    Thank you for suffering through this fundamental question.

    David

    Melbourne, Florida

    Marco beat me but here is my interpretation. TS 2010, LV 2011

    Also, look at the example of demo which comes with TestStand: C:\Documents and Settings\All Users\Documents\National Instruments\TestStand 2010 SP1\Examples\Demo\LabVIEW\Computer Test of the motherboard

    Demonstration should be a version of what you want.

    See you soon,.

  • How to get the result of the test of CVI DLLs in teststand!

    I write a driver dll to test a source, I want to get the tension of world SERVERS (the instrument of the RS) and I used to call DLLs that written by CVI, teststand

    My question is what is the best way I can get the result of the test and show the user to teststand. the code below is fair? When I used to call this dll document, teststand

    "" I just get the result by setting in TS.this is a good meathod, and what should you do in teststand, I put the "outputVoltageV" point to an object?

    /*===========================================================================*/
    / * Function: read voltage/current output * /.
    / * End: this function returns the output and actual output voltage * /.
    / * current instrument.                                      */
    /*===========================================================================*/
    ViStatus _VI_FUNC rsngsm_datReadOutput (ViSession instrSession,
    ViPReal64 outputVoltageV, ViPReal64 outputCurrentA, ViPBoolean statusPeakCurrent)
    {
    ViStatus rsngsm_status = VI_SUCCESS;
    Bruno buf [BUFFER_SIZE];
    ViInt32 retCnt;
       
    FMT (buf, "%s<>
    If ((rsngsm_status = viWrite (instrSession, buf, NumFmtdBytes (), & retCnt))<>
    Return rsngsm_status;
           
    If ((rsngsm_status = viRead (instrSession, buf, 50, & retCnt))<>
    Return rsngsm_status;
    If (Scan (buf, "%s > %f [p2];")) %f [p2]; %i [b2] ", outputVoltageV, outputCurrentA, statusPeakCurrent). = 3)
    Return rsngsm_status;
           
    Return rsngsm_status;
    }

    sean_tan,

    Yes, you just pass a value of digital TestStand (e.g.; locals.number).

    If you use the adapter of the ICB, it might make more sense that you can use the Flexible DLL adapter for this type of function, that you do not use the standard settings of tTestData and tTestError. While TestStand will correctly recognize the function prototype, you want to make sure you that include the type library of your function Panel (you will need to create one if you have not already done so) in settings target of LabWindows / CVI-> type library.

    I hope this helps.

    -Jack

  • Need to create useful reports from the results of TestStand (.mdb) database

    Any help is greatly appreciated!

    We need create reports from the results of TestStand (.mdb) database.  I was not able to find much online.

    Details:

    In 2014 TestStand, we have configured to use Access database management system.  Otherwise, the database settings are default.

    These reports will be targeted to managers and engineers.  They need to show objects as:

    Which EHR past/almost?

    For each DEGREE, what past/a failed test?

    Thanks for all the suggestions!

    Because I couldn't find anything pre-made, I created reports from scratch using queries in Microsoft Access 2010.

  • How to call a dll from another dll functions

    Hi, can someone please tell me some examples or instructions on how you go about calling functions from a dll from another dll including the IUR. The two DLLs were created with labwindows cvi.

    Thank you!

    Hi Sinnas,

    You mention that you use a UIR.  A DLL does not have a file UIR as part of it.

    DLL1

    Instead, when you build the DLL first, we'll call it DLL1, you create a header or the files that contain functions that you want to the client code to call.  When you build DLL1, you must export the file DLL1 function for his client to call code header.  Whatever the calling code is (a GUI or another DLL), you must include in the exported DLL1 project headers AND DLL1 .lib file generated when you generate it.

    DLL2

    DLL2 will contain in its project, the header file exported for DLL1, DLL1 .lib file - that gives it the feature in DLL1.  The code can then call any desired DLL1, but as DLL1, you should now have a header file that exports the functions of DLL2 desired HIS client code to call.  When you build DLL2, you create a .lib for THAT DLL file to include in the code of the final customer.

    GUI

    The final customer code will be a few GUI that you create to call DLL2 functions will have the UIR upper layer file.  It will include the exported DLL2 header file and the file .lib DLL2 in his project.  It can then call any function of DLL2.  It is the most clean way to have 2 dll working together.

    NOTE: You can create a GUI to test the lower level DLL1 functions before placing DLL2 in the system.  In fact, it's a good idea to do it - you want to make sure your lower level DLL1 code works properly before construction above it.

    Simple diagram

    Client code (calls to functions of the DLL2 header files) exported

    --------------------------------------------------------------------------

    DLL2 (DLL1 function calls exported in header files)

    --------------------------------------------------------------------------

    DLL1<--------------------  you="" can="" also="" create="" a="" gui="" that="" only="" calls="" dll1="" exported="" header="" files="" to="" test="" out="">

    A suggestion... I create my dll in debug mode and use them to test my code.  But I also build as static libraries.  When I do the final version of the system, I use static libraries.  They are built with the final executable and don't require additional files to install as do the dll.  When you install your system with DLLs, you must include all THE dll and they must be installed in the folder Windows/System32 of the target computer.

    I hope this helps...

    Judy

  • Pass a variable from a link to a form of mail

    Hello

    I have a site with several pages (plain html) for products, on each page, there will be a link "order".

    When you click on the link it should achieve a simple ASP email form so that the person can fill in their data (it is a very simple e-commerce if you want), but the form should also send the data / name (invisible) produced with it and display it on the contact form, ex 'you make an order for product [Product]. " ', please enter your details below.

    In short, how to pass a variable from the link on the page of the product to the contact page (and display) as well as on sending it delivers the fields of seizure of the user with the name of the hidden product.

    Thanks in advance,

    G.L.

    > I do not know how to read the query string, then

    > he spent the form

    To assign the query string value to a local variable

    DIM productID

    productID = Request.QueryString ("productID")

    To include in the form:

  • Passing the value from one page to the other page

    Hi gurus,

    I need to pass the value from one page to the other page and two pages use different AMs.
    In the first page I have sellers results region table where the $vendor_name column is a hyperlink that navigates to the page Vendor_Sites. Now after accessing the second page, I want to excute the VendorSitesVO in PR of CO based on the value passed to VendorsVO (vendor_id) of first page.

    can someone help me on this?

    Thank you
    Vincent.

    Published by: user4933347 on December 4, 2009 12:19 AM

    You can set parameters of Pagecontext and transmit values through them. These values can be passed between pages, even if the AMs are different.

    Try:
    pageContext.putParameter ("Parameter1", value1);
    pagecontext.setForwardURL (second page)

    Concerning
    Sumit

  • Call a DLL in TestStand by reference

    All,

    I developed a DLL that control a USB based power. The call of the dll works from TestStand 4.1 most of the time. What I think is happening, is that whenever I call the dll in my main sequence of the file as well as other files in sequence, as several instances of the dll is loaded.

    Part of the init of food must pass back a SESSION number that is used in subsequent calls to the dll. I store as a global variable in TestStand and pass around sequence that never he needs.

    How can I load the DLL at the beginning of the sequence and PASS a reference (handle) to all other calls to the dll?

    Thanks in advance

    Carmine

    Doug,

    Thanks for your help. I found a UnLoadModules() in one of the child seq that I missed. Unless I missed all the others, I think this should be resolved.

    Carmine

  • How to transfer data from a DLL Delphi pascal class to a LabView data cluster?

    Hi all

    I have the following problem:

    I use a dll written in Delphi Pascal to transfer data to LabView by using the "Call library function node".

    My Delphi dll contains this class:

    TFlash = class
    Fi: TFileInfo;
    constructor Create;
    procedure LoadFi (Filedir_and_nametring);
    end;

    TFileInfo = record
    IDX:smallint;
    IdxLstSpl:array [0.4] of longint;
    Ms: Word;
    [0.4] SP:array of the word;
    end;

    I created the record datastructure of TFileInfo in a cluster of LabView to have the 'same' variable.

    My plan was to call a DLL Deplhi function with the "call library function node" and pass the address of the folder TFileInfo, so the data would be transmitted to the cluster of LabView.

    When I do a simple delphi dll function as this works because I only spend a small integer to Labview (without reference to the data structure):

    ...

    var data: TFlash;

    ...

    function GetNrOfRows(FilePath:_string):integer; STDCALL;
    Start
    Data: = tflash. Create;
    Data.LoadFi (FilePath); This function returns the number of lines in the selected file.
    Result: = Data.Fi.Idx;
    end;

    When I try to use this procedure instead of the above function, in order to pass the address of the data set structure complex 'Data' (TFileInfo), I am unable to get the information of 'Data' in my Labview cluster:

    procedure LoadFileInfo (FilePath: string;) DataPointer: Pointer); STDCALL;
    Start
    Data: = tflash. Create;
    Data.LoadFi (FilePath);
    DataPointer:=@Data;
    end;

    Parameters of call library function node:

    -stdcall (WINAPI)

    -Run in the UI Thread

    -Function prototype: void LoadFileInfo (PStr FilePath, void * DataPointer);

    * DataPointer--> Type: "adapt the type" and the format of the data: "pointers to the sleeves.

    * FilePath--> Type: 'string', format of the string: "pascal string pointer.

    I'm struggeling with this problem for almost a week now and I can't really find a solution on the forum or google.

    I also read the following posts:

    http://forums.NI.com/NI/board/message?board.ID=170&message.ID=229930&requireLogin=false

    http://forums.NI.com/NI/board/message?board.ID=170&message.ID=77947&requireLogin=false

    http://forums.NI.com/NI/board/message?board.ID=170&message.ID=51245&requireLogin=false

    (or did I miss something in these messages?)

    Hope my explanation is clear.

    THX

    A little further:

    Seems like it's not possible to pass data from Delphi to Labview through a DLL when I create a cluster with 2 bays in it in Labview.

    This part of Delphi, I've had to make in Labview:

    TFileInfo = record
    IDX:smallint; {integer; Convert tool}
    IdxLstSpl:array [0.4] of longint;
    Ms: Word;
    [0.4] SP:array of the word;
    end;

    Instead of using 1 cluster with all the different data in it, I did a unit (1) with my 2 items (smallint and word).

    To pass my data in my tables from delphi to labview, I created another group (2) in the unit (1) with 5 elements of longint (because my delphi is going to 0.4) and another group (3) in the unit (1) with 5 Word elements.

    Right-click on the unit (1) and the clusterorder in the right order. First the smallint, then the longint table, then the word and the Word table.

    When I then use this code in my dll Delphi, IT WORKS! :

    procedure LoadFileInfo (FilePath: string;) DataPointer: PtrTFileInfo); STDCALL;
    Start
    Data: = tflash. Create;
    Data.LoadFi (Copy (FilePath, 2, length (FilePath)-1));         --> I need to cut the first part of the pascal string because it's length, and I only need the string itself
    DataPointer ^: = Data .fi;       --> pass the record structure to the cluster of Labview
    end;

    Thanks for the info Ralf!

  • How can I get a picture back to labview from opencv dll code?

    Hi, I use the vi below to acquire an image of labview, then move to opencv dll code via, first getting pointer to image pixel and then passing the result parameters to create a "carpet" in my c code ++. Up to this point, everything works. Now I make opencv image treatment final resultiing I want to bring back to LabView. That I can't understand it. (btw, the image is a binary image). How can we get this image? Help, please

    P.S. actually what I get image3 is the same image I captured of LV

    Hello

    a simple example:

    OpenCV code:

    using namespace std;
    use of names cv;

    extern C
    extern "C" {}

    __declspec (dllexport) int CannyEdges (unsigned char * imageIN, int line, int cols, double lobbyist1, double Seuil2, kernel_size int, unsigned char * imageOUT);
    }

    __declspec (dllexport) int CannyEdges (unsigned char * imageIN,)
    int lines,
    int cols,
    statement1 double,
    Seuil2 double,
    int kernel_size,
    unsigned char * imageOUT)
    {
    check the size of the odd kernel
    If (kernel_size % 2 == 0) return-1;
    allocate memory
    Matt Image_input (rows, columns, CV_8U, & imageIN [0]); IT IS THE IMAGE, THE POINTER TO THE DATA ENTRY
    Matt Image_output (rows, columns, CV_8U, & imageOUT [0]); THIS IS THE OUTPUT IMAGE, POINTER TO DATA
    blur before ruse
    Blur (image_input, image_output, Size (3,3));
    Canny
    Canny (image_output, image_output, lobbyist1, Seuil2, kernel_size);
    return 0;
    }

    You can use directly on the "imageIN" by eliminating the image_output and replace them with the image_input.

    LabVIEW code:

    I enclose the Labview code (2013) and the file .dll for you to test.

    I hope this helps.

    Kind regards

    K

  • LabVIEW MoveBlock and obtaining of a string from a DLL (assigned by the DLL)

    Hello classmates addicted LabVIEW,.

    I have a small question about the LabVIEW MoveBlock function.

    For a project I need to use an external DLL that must be called by my LabVIEW program.

    Essentially, the DLL returns a void * to a buffer and the size of the buffer (size_t). This stamp is just the string being returned by the DLL data. The DLL allocates these data and later in the program that I need to pass this pointer to a second function of the DLL to explicitly inform the DLL that I made using the data, so it can release these data.

    Here is the documentation for the function I want to use:

    Since you say the works of XNode, then you're dealing with a pointer and not a handle (pointer to a pointer), so you should be to pass the address of MoveBlock by value and not as a pointer to a value.

  • VC ++ dll in teststand problem

    I have a third party DLL probably DEVELOPED in VC ++. I have even the files .h and .lib for this DLL. I want to study how this DLL can be integrated in TestStand. The problem is that when you use C/C++ adapter the TestStand concludes that a single function in this DLL and it seems to be like Class::Function. I tried to find a solution in this forum, but it seems that the solutions have access to the source code of the DLL.

    I know well develop CVI and their use in TestStand DLLs. That is my only method of CVI programming a soul to this DLL if I want to use in TestStand? If I want to communicate with the third party provider, they need to add DLLS in order to get it to work in TestStand?

    Kind regards

    Petri

    Hello

    I looked on the dll. Well TS do things. Because the GetVersion is the only public and static function inside your class.

    This dll provides a class. I think you should write your own dll-wapper around it. You must create the object next to our packaging. Then you must create wrapper functions when you access the members of the group.

    hope this helps

    Jürgen

Maybe you are looking for

  • Firefox 7 won't play YouTube videos

    Running Win7 x 64. Upgrade to Firefox 7, then YouTube videos stopped playing. YouTube keeps insisting that I have to install the latest flash player, what I've done several times ("install_flashplayer10_mssa_aih.exe" and "install_flashplayer11x64_mss

  • HP Mini 2102, wireless detects networks but does not connect

    Hi, I have recently reinstalled Windows 7 on my HP Mini 2102, downloaded this driverhttp://h20000.www2.HP.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en & CC = US & prodTypeId = 32...I tried to reinstall, but it still does not work.

  • deleted the drivers

    I deleted the files (ntoskrnl.exe drivers system32\; hal.dll;) KDCOM. DLL, how to recover?

  • error in type:application/vnd.rim.cod of support not taken in charge during the installation of the web server

    I sent the otainstall files in the IIS web server. I put for .cod mime types and extensions at the server level .jad. When I download the .cod from the server, it shows error of unsupported media type. Any help would be much appreciated.

  • Added drop-down list for the title bar

    Hi - I want to add a menu component from the 'title bar ' of my application.  Something very similar to that implemented in the Poynt application. I already gave up to use something similar to setTitle and have a horizontalFieldManager added to my re