DLL function called on input change

Hi everybody,
I know this is very basic; but I didn't get it by my own. I'm very new to LabVIEW and wasn't able to find a solution in the forum.
I want to call a function from a DLL every time when I press a button; but unfortunately the function is only called at start-up.
So, how can I call a DLL function on a change of some input?
I attached a screenshot. With the stuff I tried. It didn't work. Now the function is called twice during start-up.
Thanks in advance and best regards,
Chris
Solved!
Go to Solution.
Attachments:
2014-12-22 03_32_04-PwrInterface.vi Block Diagram _.png ‏7 KB

Hi Dennis,
Thanks that helped me out. Now I know also where to find good examples.
Thank you also Natas!
Best regards
-Chris

Similar Messages

  • Error 0x80040707 - DLL function call crashed QTInstallCode

    Installing QuickTime Stand-Alone QuickTimeInstaller.exe Version 7.0.4.0 I get the following error and QuickTime will not load or function:
    Unhandled Exception
    Error Number: 0x80040707 - DLL function call crashed: QTInstallCode.QuickTimePostInstallProc
    Setup will now terminate.

    I was able to solve this, but I had to uninstall all instances of iTunes, ipod and QuickTime, delete their directories, use http://support.microsoft.com/kb/290301/
    to delete the installations of each and then use msconfig to remove them from the Startup.
    After that I rebooted and did a new install with the QuickTime Stand Alone and it worked!

  • Thrid party DLL function call.

    Hello,
    I am a programming novice trying to learn more about Java. I am currently working on a project for my employer (a side project really) that is used in generating some specific alpha-numeric codes. Actually, I am re-writing an existing program into Java as a personal exercise for myself but it may have some useful applications down the line.
    This project requires me to use a 3rd party DLL function call. I have been trying to follow through the process of using the JNI interface, however, I believe that I need to create a wrapper DLL to handle the function call. Does anyone know how to do this or can they point me in the right direction? I believe the 3rd party DLL was written in C++ but that's all I know at this point.
    Any help is appreciated.
    TIA

    To those of you who will look this topic up and wonder how I was able to do that here:
    (using Visual C++ for the example)
    3rd party DLL : Key32.dll
    wrapper DLL: Key32Liaise.dll
    SWIG interface: Key32Liaise.i
    wrapper class: Key32Liaise
    1) Make reference to your external function call as if it were a class method. The class name should be that of your "wrapper" class. (e.g. Key32Liaise.getHashCode() ) I like to call the wrapper class the "laise" class because it acts as the go-between.
    2) Download SWIG. Create your interface file and run the command: swig -java -shadow -c++ Key32Liaise.i This will generate Key32Liaise.java shadow class and Key32Liaise_wrap.cxx wrapper code.
    3) Compile the Java code into Class files and generate a header file for the wrapper class (i.e. javah Key32Liaise). You will need this header file even though the SWIG site doesn't mention this.
    4) Open VC++ and open a new project file Key32Liaise to create a DLL. Write the C++ code that calls up the function from the Key32.dll file. You will have to look that up from the MSDN site...too much to put down here.
    5) Include the appropriate files and complile the wrapper DLL.
    Hope that make sense!!!

  • Error: 0X80040707 DLL Function call crashed: QTInstallCode.QuickTimePostIns

    Hi,
    After installing the latest Quicktime on my XP 64-bit OS I get the following error message:
    Error: 0X80040707
    Description: DLL Function call crashed: QTInstallCode.QuickTimePostInstallProc
    Running quicktime and iTunes has not been a problem in the past.
    I done have absolutely everything that is avaliable on the support site. And I still have had no luck. Please help, I really appreciate it.

    That worked. Thanks for your help.
    I hope I dont have to encounter this problem again with Apples next release of iTunes or for that mater Microsofts next update patch.

  • How to get parameter information on DLL function call (CVI) in TestStand?

    Hi,
     I wrote a simple Instrument Driver in CVI, and it has 3 parameters Voltage, Current, Channel.
    I made a DLL in order to call this function in TestStand as an action.
    That works fine, the only problem I have is that it shows my function as DC_Conf (arg1, arg2, arg 3) and I only get the type information like double double int.
    I do not get the parameter names Voltage, Current, Channel...
    How can I get this information to be displayed in TestStand so I know which parameter arg 1-3 is Voltage,Current,Channel in case I forgot?
    or 
    Is there a way to display the help text of the driver in TestStand?
    I tried clicking on the (?) button next to the function call but it did not do anything...
    My TestStand is version 4.1
    Thanks...Ness

    Ness,
    When TestStand populates the parameter information, it does so by looking at the dll's type library.  CVI automatically creates a type library for a dll based on the function's signature, which can include the parameter names.  However, if the function prototype does not contain variable names, then CVI cannot include names in the type library.
    You can define your own type library to directly control the information available to TestStand from your dll.  If you want to define your own type library, you can do so using a .fp file.  This will allow you to use complex data types (such as structs), and to rename your parameters.
    Here's a KnowlegeBase describing the process: Embedding Type Libraries in a LabWindows/CVI DLL for use in TestStand
    Either solution proposed here will work, and they each have tradeoffs:
    You can definte the variable names in the function prototype.  This keeps the functions self-documenting, and is the easiest solution.
    You can create a .fp file and define your own type library.  This allows you the most control over exactly what you will see in TestStand, but requires you to create a new file, and to keep that new file up to date if you make any changes to your source code.
    Message Edited by Josh W. on 12-11-2009 01:08 PM
    Josh W.
    Certified TestStand Architect
    Formerly blue

  • Dll function calls from VB6 to Labview do not work.

    HI,
    We are transferring our production test systems from VB6 to Labview, and we are using "CAN-AC2-PCI" cards. When call functions of dll "canacpci.dll", UUT does not response at all, and Labview program does not report any error either. Attached are the user manual and my labview codes.
    I guess the DeviceNe_init.vi works because if run it twice, second runing will report error. To correct the error, the card has to be closed first..
    I close the card first, then initialize it. After then send the data. But I can not see any communication by DeviceNet Analyzer when sending data.
    All function parameters are copied from existing VB6 program. The VB6 program works fine.
    Please help me out,
    Thanks,
    Xiang Zhan
    Attachments:
    DeviceNe_init.vi ‏36 KB
    DeviceNet_SendDataXXXX.vi ‏18 KB
    CAN-ACx-PCI.pdf ‏139 KB

    Hi Turck,
    I'm not familar with this device, and it is difficult to say in this case.  I would recommend calling into National Instruments support or contacting the vendor of the device for additional assistance in this case.  As this isn't one of NI's Industrial Communications devices, you could also post on the LabVIEW forums for additional assistance, as there are a lot more people looking at that board than this one.
    Thanks!
    Matt S.
    Industrial Communications Product Support Engineer
    National Instruments

  • Function call from Input schedule

    Hi Expert
    Let say I have a sub function can I call them by button click from input schedule
    Please note I do not want them to be executed from Default logic.
    SUBFUNCTION.LGF
    *SUB MYSUB(Param1,Param2,Param3,Param4)
    [AccountDim].[#Param1]= [AccountDim].[Param2]+ [AccountDim].[Param3]
    [AccountDim].[#Param4]= [AccountDim].[#Param1]* [AccountDim].[Factor_Param4]
    *ENDSUB
    Thanks
    GAN

    Hi,
    As Sorin said that you can call the logic from DM package. In that case you need to create a SSIS package with run logic task and you need to pass the logic name to that task alongwith the other required parameters. You can refer to the FX restatement package to check the parameters to be passed to a run logic task. In the same way you can call your script logic.
    Hope this helps.

  • Getting the:   Error Number: 0x80040707 Description: DLL function call....

    solution that worked for me (copied from another site):
    I found this solution on another website, but I wanted to share it with all of you here. The problem seems to be with the automatic updating of iTunes. Apparently it can whack-out if you have any older version of Quicktime installed.
    Here's how I fixed my iTunes: I uninstalled both iTunes AND Quicktime and then restarted. I then went to www.oldversion.com and downloaded an old version of Quicktime. In my case I wasn't sure how old I should go, so I chose Quicktime 6.4. I downloaded and installed that older version, restarted, then UNINSTALLED Quicktime again. This install/uninstall helps clear out any older registry entries that might be interfering with the new installation. Once I had uninstalled the old version, I rebooted one more time and then installed iTunes, and iTunes is working again!
    So, to recap: Uninstall both iTunes and Quicktime, Restart, Install old version of Quicktime, Restart, then Uninstall Quicktime, Restart, Install iTunes.
    I hope this helps someone else, because I know how frustrating it can be not to have iTunes.
    dell dimension 4600   Windows XP  

    PhotoShop has its own forum:
    http://forums.adobe.com/community/photoshop
    Ken

  • Quicktime 7.0.4.0 DLL Function Call Crashed Message Error 0x80040707

    Quicktime 7.0.4.0 won't install and the above error message occurs, and because that program won't install, the latest version of iTunes won't install either. What's the solution?
    Others have posted the same problem, but I can't find any answers on this Board, thanks.
    Gareway   Windows XP   Athlon 64 dual core

    That worked. Thanks for your help.
    I hope I dont have to encounter this problem again with Apples next release of iTunes or for that mater Microsofts next update patch.

  • Error: 0x80040707 DLL Function Call Crashed: PSAPI Enum Process

    can ANYONE help me with this one. Ive just bought an iPod Nano and have tried to install the cd. It tries to go through the process but then i get this error message.
    Its really irritating cause i have searched the internet for this error and can not seem to find a solution.
    From a few sites ive been on it looks like it might be the Service Pack I have on XP. I have SP1 and i read that i need SP2 to run itunes. Is this correct?
    Any help would be VERY much appreciated.
    Yvonne

    hi thank u for ur reply. i have gone to windows update and it gives me a list of things that can be updated. It mentions service pack 1 but does not say that it will update to service pack 2. Is this something that can be definitly done or does it depend on how old or updated the computer is?
    Apolgies if i sound stupid on this one, im not too hot with computers!!!!

  • Advantages of Solaris 10 library function calls over Solaris 8 calls.

    Hi,
    We are planning for a migration of OS from Solaris 8 to Solaris 10. We referred some documents related to Solaris 10 features and the 'What's new' document for Solaris 10. However we couldn't find much difference on library function calls.
    It would be really grateful if anybody could give some more information on the function calls that are changed from Solaris 8.
    Thanks,
    Palani_techm.

    Can you be more specific? There's are whole slew of changes (dtrace, driver framework changes (usb, gldv3, sata...), graphical changes (gnome, opengl) ), some function additions to make linux source compatibility easier. I don't think the C library (3C) has been changed that much minus new functions, since it would make forward compatibility more difficult.

  • Call multiple functions from same dll with call library function

    hi,
    i am working on a project in wich we need to make a UI to read out a sensor network.
    the UI should be usable in any project, but every node needs a different piece of code depending on the type of sensor with wich it is equipt.
    so i need to be able to call different pieces of code when i need them, and still be able to use the UI in future projects with possibly new types of node we now don't have.
    so someone told me to use DLL's, cause then i would be able to call the code i need the moment i need it.
    but i have never worked with DLL's (just learned about this option 3 day's ago) so i have a question.
    i know i can dynamicly change the DLL i call with the call library function, but can i dynamicly change the function i call from that DLL ?
    or do i have to put a new call library function for each function i want to call, even if its from the same DLL ?
    kind regards,
    stijn

    nazarim wrote:
    ok so there is no (easy and ubderstandable) way for me to dynamicly change wich function i want to call from a certain DLL.
    but now i started wondering, the path on the call library function is not ment to dynamicly change a DLL
    but it does work so, if i am carefull, can i use it for that purpose or will labview give me a series of problems once i start using it in larger programs ?
    Thepath on the Call Library Node can be used to load a different DLL. Obviously since you can't change the function name your other DLL would have to export exactly the same function name and of course with the same parameters. This is seldom the case so it is not the main use of the path input to the Call Library Node. It's main use is as indicated to load DLLs at runtime rather than at load time of a VI. So that an application can run even when the DLL is missing, until the moment the functionality from that DLL is needed.
    If you can make sure that all your DLLs export the same function name with the same parameter you can use the Call Library Node to call into different DLLs through the path input. If however you would need to call different function names you would have to resolve to some DLL which does do the dispatching and invocation using LoadLibrary() and GetProcAddress(). But unless you need to go with DLLs for some reason using the Call By Reference Node can give you an even more flexible approach. 
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Call library function will not retain change of directory for the library.

    I have created a call to a dll made in Visual C++. Everything works fine. I then configure the vi to call the a newer version of the library that is in another directory. The Call Library Function dialog box updates with the new path. I click the OK button. Then configure the vi again to very my change took and it is back to the original path to the library.
    Why can I not change where to find the library? I am sure that I can make a new vi an input all the parameters again, but I have many parameters and calls to the same dll. Making new ones each time the location of the dll changes is not an option.
    Thanks for your help.
    Attachments:
    code.zip ‏106 KB

    If you have more than one VI accessing the same DLL, then you can't
    change the DLL location without unloading all the other VIs first. This
    is because Windows will always look first for the DLL in memory, before
    even attempting to load it from disk. And if another VI makes use of
    that DLL it will be still kept in memory.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Call a special function in the dll using Call Library Function Node????

    Dear all,
          I am calling a special function in the dll using call library function node. There is a input parameter that it is a enum type in this function. I don't know how to deal this parameter for calling this function.Has anybody solved this problem?Please advise!
          I am appreciated of you anytime. 

    Most of the times an enum is just a U8/U16/U32, internally so probably you can call it with just a U8/U16/U32 or something. For the correct value you have to look at the definition.
    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!

  • LabVIEW call Win32 API DLL function from third party

    Hi everyone,
    I'm trying to build a LabVIEW 2010 interface on 32-bit Window XP system to configurate and communicate to an Anglient laser head through its USB expansion box. I contacted the vendor and they shared a win32 API with some dll files. I started with a function called "A55292Find", but the CLF node always pop up error 1097.I checked the MSDN to get the corresponding LabVIEW data type for CLF.
    My question is: Do I need to initialize those arguments? (How can I know the values of them if initialization is needed?)
    Could anyone help me figure out what's the problem?
    Here is what I have from API documents about this function:
    The A55292Find function returns lists of handles and board types for all the 55292 USB
    Expansion Modules connected to the system.
    A55292RC __cdecl A55292Find(
    HANDLE hBoxes[], // List of handles for the boxes found. (as Unsigned 32-bit integer numeric)
    BOARDTYPE PortABrdType[], // List of board types for slot A boards (as Unsigned 16-bit integer numeric)
    BOARDTYPE PortBBrdType[], // List of board types for slot B boards (as Unsigned 16-bit integer numeric)
    WORD *spMaxBoxes); // dimension for all of the passed arrays. (as Unsigned 16-bit integer array data pointer)
    // (function return type as Unsigned 32-bit integer numeric)
    Parameters
    HBoxes[] Array that will receive the list of HANDLES for all the 55292 boxes connected.
    PortABrdType[] An array that will receive Slot ‘A’ board type information for each 55292 box.
    PortBBrdType[] An array that will receive Slot ‘B’ board type information for each 55292 box.
    spMxBoxes Passes the maximum number of values that can be held in hBoxes, PortABrdType, and PortBBoardType arrays to the A55292Find routine and returns the actual number of boxes found
    The return value will be one of the following A55292RC return codes:
    Value Meaning
    A55292_NO_ERROR No error
    A55292_TIMEOUT Timeout accessing a shared memory
    Remarks
    This routine must be called to obtain handles and board type information used in calling all the other routines. If there are significantly more array elements than boxes, the routine will take longer to complete.
    These are the definitions: 
    typedef DWORD A55292RC; enum{A55292_NO_ERROR, A55292_HANDLE_ERROR,...}
    typeder WORD BOARDTYPE; enum{A55292_PCAL_BOARD, A55292_NO_BOARD, ...}
    Thanks a lot,
    Kang
    Solved!
    Go to Solution.
    Attachments:
    call A55292Find.vi ‏10 KB

    nkang11 wrote:
    Hi Mr. Kalbermatter,
    As you told me, I should try to use the defined enumeration words as control and indicator.
    For the previous CLF node, it successfully returned the hardware configuration (I have only connected a board at slot A):
    But I really want to see a string return as "A55292_PCAL_BOARD" which is defined by "typedef WORD BOARDTYPE; enumeration {...}; Does that mean I need to change the data type or do something like "converter"? Or initialize the array first, then convert it to string type?
    Right now, I'm trying to open the laser card by using "A55292PcalOpen(HANDLE hDev, SLOTSELECT SlotSelector);" function which requires to use the enumeration constants from " typedef WORD SLOTSELECT; enum {A55292_PORT_A, A55292_PORT_B};" but I'm confused to shot an constant control to a new CLF node.
    Since almost all of the arguments in dll function are typedefined as WORD, short and struct et al, I hope you could give me some hints on it.
    Thank you very much sincerely!
    Kang
    Depending on the actual C implementation you can simply create a LabVIEW enum with the according item names or use a ring control instead. Teh enum requires the numeric values of the items to be in consecutive order without any gaps in between. This is a given if the C definition never assigns a specific number to the item. If the C enum is not consecutive you need to go with a ring control instead.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

Maybe you are looking for

  • Major instability with Network Magic for Mac

    First of all, I'm a long time LELA user which has been great for quickly gaining an understanding of what is connected to the network.  I like being able to see both connected and disconnected devices.  I thought I would give Network Magic a shot sin

  • Dynamic embed images?

    Hi, Here is one of ways to embed image in Flex: [Embed (source="img0.jpg")] public var Img0:Class; But I want to embed a bunch of images, is there a syntax like this, or a better coding method? for (var i:int = 0; i<10; i++) {     var img:Image = new

  • Problems with Premiere Pro cc2014 on Yosemite

    Macbook pro early 2013 2.7ghz, 16mb ram, SSD system drive, OS 10.10 Issues: 1) Premiere drops video in program monitor while editing. Anything will make it happen, changing settings, playing etc. This also happens in source monitor but less frequentl

  • Mapping to different databases

    We currently use TOPLink as persistence layer in our product. Currently the complete object model maps to one database. I was wondering if it is possible to map different objects to different physical databases (with different structures). E.g. We ma

  • Patch Level upgrades

    I am planning an upgrade for a 2007 A customer from PL08 to PL 41. Can I do this in one hit? The help file is a little misleading - is it implying that I have to do an upgrade to PL 30 first? Thanks