Return value of DLL LabVIEW Build to the Prototype of the function

Hi all

I know LabVIEW can generate a DLL with return value with a function like prototype

Sub nomfonction (arguments);

We could define the return value to arguments.

However, LabVIEW build a DLL with return value instead of "null" in the United States

int nomfonction (arguments);

In fact, I could achieve this when my part of connector VI has a 1 linked indicator.

I could get my prototype of function dll in the application as Builder

Double functioname (void); or well functioname (void); or some

Although I could do above, this applies only when my VI has 1 single output.  If the VI

1 more arguments, I still get

Sub nomfonction (arguments);

So I missed something? Or is this a limit of LabVIEW?

Please don't get angry if this question has been asked before, I'm lack of subject

LabVIEW to communicate with other languages.

Thank you

Jean Cyril

You can.  In the construction specifications, under source files, go to set your prototype.  on the right, there is a drop down 'Output VI' which is what you want.  Note that I only saw him able to return numeric values.

Tags: NI Software

Similar Questions

  • Use the return value to do step digital multiple success or failure

    Hello

    I use a multiple digital step to check several measurements by an external DMM through a function created in CVI.  I would like to use the return value of the function to replace the global status of the step. The reason is that the return value indicates a communication error, while steps are being taken, and which would lead to a "fake" fake or false 'Pass '.

    What I would do is more or less this >

    If the return value is 0, then check if the measuremets are between the limits

    If return value! 0 = there was a communication error so step continues to operate independently of the measure.

    I tried combining multiple digital step with a step of pass/fail, but it does not work.

    I also trie to change the expression of the status of the multiple digital steps but basically ignores him.

    Any ideas?

    Thank you

    Javier

    Why don't you just make that return the value limits for multiple numerical limit stage.  Comparison of the EQ value and the low limit to 0.

    That would make the most sense.

  • How to have a variable the function "return" have more than one value

    @using the Sub function how can user_id accepts the values 0 and 6?

    create or replace function xxactive_user_test)

    p_schema in varchar2,

    p_object in varchar2)

    return varchar2

    as

    Start

    return 'user_id = 0';

    end;

    /

    Post edited by: 880492

    The question or needs is not clear, to me at least.

    > How user_id can take the values 0 and 6

    How the function is used.

    You mean like this:

    return 'user_id IN (0,6)';
    
  • How to set the return value of the method to the /outputText inputText field

    Hello

    How to set output return value method of a /outputText adf inputText field

    Concerning

    sevanan

    Well put method's return value to a managed bean variable.

    Create a variable in the bean and set the return value to this variable.

    the inputText and outputTextValue to this managedBean.variable value

    That's all...

    and add partial trigger for inputText programmaticly

  • the return value of tpacall(), tpcall and tpgetrply()

    The return value of tpacall() weather, tpcall and tpgetrply() has a rule? I found that the return value of them is an integer that has increased by one. What is its maximum value? Or it will be a loop in a scope? Thx for your answer!

    Bill,

    A return of tpacall(), tpcall() or tpgetrply() of-1 indicates failure. Any other return value indicates success.

    Unless the TPNOREPLY indicator is used, the value returned by tpacall() is a handle that can then be passed to tpgetrply(). (The alternative is to call tpgetrply() with the TPGETANY flag, in which case the handle returned by tpacall() will be necessary.) When using the indicator TPNOREPLY tpacall(), tpacall() returns 0 success. In both cases, the only error return value of tpacall() is - 1.

    The return value on the success of tpgetrply() is not documented (except that it is not - 1), but it seems to be the descriptor of appeal on which a message was received, which is the same information that you can place in * cd.

    The return value on the success of tpcall() is not documented (except that it is not - 1), but currently, the value 0 is generally returned on success.

    Kind regards

    Ed

  • Passing a return value of pop-up window

    I'm working on a popup to a part of the calculator. I have the calculator itself work and now I'm moving the computed value, back to the original page and close the window. It isn't working and I hope someone can point out my mistake. At the moment, it does nothing (not even close the window).

    Part of the original page: P1431_BMI
    Page item Popup containing a calculated value: P1432_BMI
    Button used to call the function: button in the area of the region, URL = javascript:passBMIBack('P1432_BMI');
    JavaScript function:
    function passBMIBack(passVal1)
     {
       var bmi   = document.getElementById(passVal1).value;
       opener.document.getElementById("P1341_BMI").value = bmi;
       opener.document.getElementById("P1341_BMI").focus();
       window.close();
     }
    </script>
    I was able to get more complicated popups works, but JavaScript is not my forte. Can anyone see what I'm doing wrong here?

    The javascript code uses 1341 as the id of the page. But your description says it's 1431. Which is correct? If it's 1431, then you will need to fix the page id in the java script.

    I'm glad A

  • Functions of DLL Labview only each returns 0 when it is called in C

    Hey guys. I'm having a problem using a dll built in labview in my code C. I did a labview program that read the current analog signals 7 analog pins and them stored in a table. Then I have a variable that corresponds to the index that you want to localize (whenever the function is called I don't read only one current value of the table) and then put this value into a digital indicator that is the result I want.

    It has worked well in labview, but after I generate a DLL to it and call the function in my c code it always returns 0 instead of reading of the axis. Even when I put constant values in the table, when I call the function I always get 0. I also did a labview program who just returned a constant number by pressing, and when I built as a DLL and calls the function in my C code it issued yet only 0.

    I am very confused how this happens. I have connected the digital indicator to the connector and component when I build the DLL it claims that I'm a function that is:

    Double Test1 (double Index)

    Where "double index" is the index of the table that I want to read, and the return value is the digital indicator that contains the value at this level.

    I call the funcition in my C code as follows:

    #include "SharedLib.h" //This is the header for the DLL file. I also include .lib, .dll, .ini, and .alias files
    #pragma how (lib, "SharedLib.lib")

    Double i = 0;   just for an example, I'm access at index 0 of the table, which I set to a constant value

    values = Test1 (i);  It will always return 0, regardless of what the index is

    I guess my big question is how is it possible to get the labview function built DLL to run C code but only eery return 0? I can show you all my Labview code, but as I tried several functions to try to get a value not zero to not think availI miss me something else which isn't regardng real labview code. Thank you very much!

    Indexing by a double seems to be ok in Labview. I understand the problem however. The labview functions actually worked, I was just incorrect printing. I was really stupid and my printf statement was printf ("%d", value) printf ("% lf, value) which is what you need for the double rooms, and he did print always 0. Thanks for your help though guys.

  • LabVIEW crashes after the call to the DLL

    Hi all

    I'm working on writing a wrapper for a dll. The call to the dll works fine a returns the appropriate values, but as soon as I close the VI dev LabVIEW environment crashes. Any help to avoid the same. I've been through a lot of posts and I tried varying the types of data sent to the dll, but again it gets crashed.

    the dll function that I use is the prototype (with the calling convention of type C)

    int nomfonction (Struct * cfg, UCHAR dNumber, UCHAR hTYPE)

    The varables UCHAR I'm passing as of 8-bit unsigned integers.

    For the structure, I did a cluster and pass with adapted to the Type and handles.

    The DLL is running very well and the VI stops, too, but as soon as I try to close the dev environment VI crashes. Help, please.

    Thank you.

    It is always possible that there is a bug in your DLL, or you're a failure calling a function in the DLL that is required in order to properly clean. The problem is perhaps not the way you have set up the call library function node.

    If you post: your VI; the header file that defines the structure of the cfg and the function prototype; and all the documentation on the function, so we can tell you if it is properly configured. Without this information there is little we can do.

  • Call the function in LabView from a DLL, and then access the global variable of DLL

    I've created a DLL in LabWindows with a function and structure.  I want to call the function from LabView and then access the overall structure.  I am able to call the function in the DLL with a "call library function node" and has access to the return value, but I can't understand how to access the overall structure.  The structure is declared in the header DLL with __declspec (dllimport) struct parameters file.

    Is it possible to access this structure without using the library of network variables?

    My guess is that you need two bytes of padding after "in_out" and another to two bytes of padding after "anin."  The reason being that ints are 4 bytes, and most of them C compilers will align on 4-byte boundaries.  The struct will naturally start to such a limit (in fact, in Windows, it will probably start to an 8 byte boundary).  If you then count bytes in your structure, you are 70 byte after "in_out."  70 is not divisible by 4, so you need 2 bytes more to reach the next 4 byte boundary.  You can also you could reorganize your struct so that "anin" follows "in_out" and this is probably the best option if it won't cause you other problems.

    Unlike most C compilers, LabVIEW compressed structures as closely as possible, without filling.  I don't know enough about the history of LabVIEW and internal parts to explain the reasons and to do this performance penalty, but, as choice of LabVIEW "endianness", it is probably a remnant of the first versions of LabVIEW that were running on the Mac.

    If for some reason you want to force your C struct to match package LabVIEW, you can use the #pragma pack (x) directive, but I wouldn't recommend that here because you can control the C and LabVIEW.

    EDIT: in the cases where it was not clear, add padding to your cluster of LabVIEW, insert appropriate size or items at the place desired in the cluster.

  • How can I get the LabView return standard splash screen after installation of the evaluation of Robotics module?

    I installed the Labview Robotics module for evaluation, but when I start now Labview I meet the following start screen:

    How to bring back the Labview standard splash screen?

    Terje,

    When LabVIEW Robotics is installed, it replaces the file LabVIEW get a window on the way.  You can return to the standard window began to to repairing the installation of LabVIEW:

    1. Go to add/remove programs from the control panel.
    2. National Instruments -click and select Change/Remove.
    3. Choosing to fix LabVIEW.
    4. Insert the LabVIEW Setup disk if you have an or navigate to the network location that you used to install LabVIEW.
    5. After you have repaired LabVIEW, you should be able to restart with the default value getting started window restored.
  • How to use the return value of TestComplete (using COM) as a variable in the conditional statement (for example loops) TestStand

    Hello

    I have setup a COM interface for TestStand (TS) to run some scripts in TestComplete (TC).  Normally, when TestComplete has finished executing the script, it returns a 0 or 1 to designate the success/failure during the TestStand step (step test for example String value).  It worked well.

    However, now I need TestComplete to regain a vaule (e.g. 32) TS and TS need to assess this value in a while statement. So if the TC value is 32, I would have some statement in TS ike:

    While (return value! = 30)

    Do something...

    Thank you

    Jigg,

    No, the program does not have a new thread.  It's just a single sequential thread. She called other sequential files, and that's all.

    I think I'll have some luck with the StationGlobal.  It seems to work (for example by setting the StationGlobal a single sequence file automatically updates the Stationglobal in another movie file, sort of like passing the reference value)

    Thank you!

  • On Windows Seven, how the LabVIEW to deploy the ws2_32.dll on my target right?

    Hello

    On Windows Seven, because ws2_32.dll is cited as a "KnownDLLs" (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\KnownDLLs) when LabVIEW is making my custom DLL which depends on ws2_32.dll, he deploys the system32 DLL ws2_32.dll instead of the 2012 LabVIEW RT image, ws2_32.dll, causing dependencies error displayed on my lens... And it is not possible to change the "KnownDLLs" list because it is a powerful mechanism of Windows System.

    I noticed that on Windows XP, ws2_32 isn't in the "KnownDLLs" list and I thought everything would be fine (I have not tried).

    To solve the problem temporarily, I changed my DLL custom so that it only depends on wsock32.dll, but this is not satisfactory for me...

    Could you help me?

    Thank you for your answer, but I'm sure that RT de NI LabVIEW 2012 supports the WinSock2 API as the ws2_32.dll is located in the directory "C:\Program Files (x 86) \National Instruments\RT Images\Base\9.0" and "2012.exe DLL Checker" program seems to confirm.

    I did a few test since my first post and I have solved my problem:

    Warns we LabVIEW to automatically download the dll in the target (and download the bad ws2_32.dll), I downloaded manually with FileZilla right DLLs (for example the ws2_32.dll located in the directory... Instruments\RT national Images\Base\9.0) in the directory system/nor-rt/system of the target RT PXI. Now, when my program according to ws2_32.dll in the target, he concludes that the dependencies are already resloved and all transfers LabVIEW is fine!

  • Executed as user: domain\username. The return value is unknown. The process exit code was 128. The step failed.

    I have a job with 20 steps. This error occurs for any stage of perticular. It produces randomally at any stage.

    "The return value is unknown.  The process exit code was 128.  The step failed. »

    This is not the right forum for SQL database issues.

    Please repost your question in the MSDN SQL forum
    http://social.msdn.Microsoft.com/forums/en-us/sqldatabaseengine/threads

    Sincerely,

    Marilyn

  • Get the .exe with LaunchExecutable() return value

    Hello

    I try to get the return value from an .exe file started with LaunchExecutable(). Do you think it is possible or am I wrong?

    Thank you!

    Adrien T.

    Adrien:

    If you run the CreateProcess() executable, you can then use GetExitCodeProcess() to read the results.

    See more details here: http://digital.ni.com/public.nsf/allkb/E250246D65A6A18D8625659F0065F310

    Note that you must have the Windows SDK (aka Win32 API) installed to use CreateProcess/GetExitCodeProcess.  The SDK is provided with CVI, but is not installed by default.  If you have not installed, reinstall CVI, selecting only SDK or Win32API (depending on the version of the CVI you).

  • Possibility to get a popup to display the display value "" and not the "return value".

    Version - Application Express 3.2.1.00.11

    I have a list of values that exceed 1500 files and am so impossible to use a Select list.

    When you use a popup lov after choosing the recording, apex displays the return value (in my case a number). Is it possible to let him use the display value (in my case, a text string).

    Concerning

    Ben

    Benton says:

    Version - Application Express 3.2.1.00.11

    I have a list of values that exceed 1500 files and am so impossible to use a Select list.

    When you use a popup lov after choosing the recording, apex displays the return value (in my case a number). Is it possible to let him use the display value (in my case, a text string).

    See limiting the number of values in a LOV

    If it comes to a page element, and then change the type of Popup LOV key.

    If there is a control in a table, it's another reason to upgrade to a supported version, or the tabular form will need to be converted to be manually generated and processed in order to allow the appropriate control be returned using the apex_item.popupkey_from_lov method

Maybe you are looking for

  • Satellite Pro 6000: What WLAn Module?

    HelloAnyone know which Module WLAn can be used in a Satellite Pro 6000.My NB is pre-installed for WLan but I don't want to use only 11MBit Module and the other are not signed for the SP6000.Can I use this module to 54 megabits?Thank youDaishi

  • only wallpeper shows on my desktop

    After starting only the wallpaper shows on my screen, no task bar, menu bar and I can not access my computer because no control panel of icons on my desktop

  • How to keep records of animation taking place

    Each program, every file, every folder I open is a small movement "unfold" animated.  I don't really like it.  I want to click on a folder and it opened with no fanfare. I can't find the option to change this.  I went to control panel and folder opti

  • Rings of call of blackBerry Smartphones

    Hello I have a bold 9000 and when I get a single phone call rings for a while, going to voicemail and miss me a certain number of calls. Anyone have any idea where I can get the handset to ring until I can answer / or the caller hangs up. Having chec

  • Video driver for my laptop controller.

    How can I get a hp dv1331se Driver video Controller for my laptop.