How does call library / .dll file work?

I'm helping someone troubleshoot their machine / LabVIEW program.  I'm fairly new to LabVIEW, and I'm not sure what part of the program is doing.  I've attached the .vi in question.  In the middle of the page there is a sub.vi with a blank icon with two dots in it (peak_detect_dll.vi).  This sub.vi has a call library function node, which I understand calls the file it points to in the config:  s3ilvutils.dll (also attached).  I don't understand what this file does.  I've searched the help and the discussion board.  Can anyone explain to me what this is doing?
Jeremy Backer
CLAD
Attachments:
count.vi ‏31 KB
peak_detect_dll.vi ‏8 KB
s3ilvutils.zip ‏3 KB

Well I typed too slowly! See that you have a bunch of other answers in the time I took. It was probably written in another language, but dll's can be created in LabVIEW as well. The "C" calling convention only describes a interface convention, doesn't guarantee that C was the language it was developed in, although it probably is a good bet that it was C/C++. I don't think there is an "easy" was to reverse engineer what is in the dll, that is one reasons some functions are put in them, to protect the Intellectual Property, another is to encapsulate a bunch of functionality in a portable block, although yours only has three calls, so that isn't "a bunch".  
Starting with the "peak_detect_dll.vi": this vi encapsulates a call to the s3livutils.dll, which appears to take a data array from a unit (S3?), pass in this data and parameters for a threshold level and minimum signal width (obviously, the vi's names agree with those of the dll). It returns an array of dbl's, which are apparently the detected peaks above the threshold, and a I32 giving the number of these peaks, which in the highest level vi is not used.  This information can be seen if you right click on the "call library function" in the peak_detect_dll.vi and select "configure".  Dll's are used like for a number of reasons, usually because there is an existing library call, written in another language, or a developer felt that the algorithm used was more efficient than native C. If you right click and select configure you will see (under the pulldown "Function name") that there is additional functionality contained in the dll that may (or may not) be used elsewhere in the program in another dll call.
Not sure what exactly you need, but this is just a snippet of code that apparently finds peak values in the input array above some threshold.
Message Edited by LV_Pro on 10-19-2009 08:42 AM
Putnam
Certified LabVIEW Developer
Senior Test Engineer
Currently using LV 6.1-LabVIEW 2012, RT8.5
LabVIEW Champion

Similar Messages

  • How to call Fortran .dll file that using other library files?

    Hi,
    I am trying to do some arkward tasks using LabView, and I am desperately need help....
     A little bit background:
    1. My co-worker has some code written in Fortran, where he called other libraries (many from CERNLAB or PAW). Those stuffs are pretty powerful in mathmatical calculation and simulations.
    2. In some of my LabView code, I need to call his Fortran source code in order to do some complicated calculations. I have no capablility to translate his Fortran code to Labview (or is it even possible??), so we end up with trying to use "Call library function node" where I just provide input/outputs to communicate with his code. The idea sounds simple enough?
    3. We complie the Fortran code into .dll, and then specifiy the dll in "Call library function node". The first try with a very simple Fortran code, something like c = a+b*a, was sucessful. The dll file and Call lib function worked good. It's sort of proved the concept.
    4. Now I am trying more complicated Fortran code (say Test.dll), which calling other library (.lib files) that using typical "call xxx(a,b,c)" line, and my nightmare started....  It seems nothing was excuted when I call Test.dll in LabView.
    Questions:
    1. How do LabView know if the Test.dll code needs functions from other .lib files? Do I need to copy all the .lib files to a specific folder?
    2. When I create .dll file, for LabView to be able to use it, are there any special requirement on the way the .dll is compiled?
    3. Seems there is mismatch btw the data type in Fortran and LabView. For example, LabView's  Signed 8-bit Integer seems different with a integer in Fortran. How can i know the correlation btw data type in different langurage, i.e. LabView vs Fortran?
    4. Are there any good examples that I can take a look?
    I would highly appreicate any suggestions/helps!
    Rgds,
    Harry

    You are aware that Intel Visual Fortran is the successor to Compaq Visual Fortran (I think you made a mistype with the Virtual)? So an upgrade might be at its place.
    Anyhow I'm really not familiar with Fortran at all, but lib files are usually compiled into an EXE or DLL and not loaded dynamically. 1) 
    So there should be no problem with locating those libs. What most likely is a problem are other DLL dependencies such as any Fortran Runtime library or possibly other third party DLLs the more advanced code in your DLL might be using.
    Typically most compilers can be configured to link the runtime library code statically into the DLL, as altenbach reports for the Intel compiler, otherwise you must make sure to install the  redistributable Fortran Runtime Library for your compiler. Besides that you must make sure to find out what other runtime dependencies your code might have and install them.
    1) One exception I know of is LabWindows CVI which allows to also load lib files dynamically. This is supposedly a legacy feature from LabWindows for DOS, which allowed that feature to simulate dynamic module loading in order to swap modules at runtime to work around the 640k memory limitation of DOS.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How does idx and sub files work?

    How can I get idx and sub files to work on quicktime and apple tv? I have a mp4 movie with those subtitle files and wonder how they work.
    Message was edited by: elangsru

    Go to ine.com and sign up for a free membership. They offer free streaming of the CCNA R/S and CCNA Voice videos. You can also use Google to find many resources to read on.

  • How to call a dll which has one VISA name as input

    Hi there,
    The Labview application builder can generate a dll file from a vi which is a simple serial comunication program using VISA name as one control.
    The problem is how to call the dll file in Labview which has a VISA name as INPUT?
    Thanks!
    George

    I would suggest modifying the LabVIEW VI so that the input is a string control instead of a visa control. The LabVIEW application will work the same and there is no need for any casting. All visa VIs can take a string as an input. Then when you recreate the dll make the input a string. Then you can easily pass a string to the dll from any API.
    -Josh

  • 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

  • How to create a .DLL file from a .C file ?

    Hi everybody
    I'm looking for a method how to create a .DLL file from a .C file .That Dll file will be used to perform a board to measure voice quality accoding to the international standard named PESQ (perceptual evaluation of speech qualty) P.862.
    Can anyone help to start dealing with Dlls and give some advices to avoid errors ?
    thx
    Attachments:
    source.zip ‏37 KB

    Hi sinaps,
    You mention that you want to create a DLL from a .C file. Just to clarify, are you using C (.c file) or C++ (.cpp) to write your code?
    Also, if you are using C++, are you using Visual Studio? (The reason I ask is because this forum is geared towards Measurement Studio, which is an add on to Microsoft Visual Studio).
    That being said,
    If you are using C: National Instruments provides an ANSI C Application Development Environment called LabWindows/CVI which makes building dlls a snap. It has templates for DLLs and you can build them either as stdcall or cdecl dlls.
    Developer Zone Tutorial: Building a DLL with LabWindows/CVI 8.5 for use with LabVIEW 8.5
    If you are using Visual C++: Look at the link that Al provided earlier.
    MSDN: Walkthrough: Creating and Using a Dynamic Link Library
    If you aren't using CVI or Visual Studio, then really the best bet is to do a google search for "Create C DLL" or post or a forum for the appropriate environment that you are using.
    Thanks!
    Message Edited by Jervin_J on 03-14-2009 02:02 PM
    Jervin Justin
    NI TestStand Product Manager

  • How does one remove temporary files from Safari?  A friend logged on to her Facebook account using my iMac.  Now I can't remove her e-mail address from Facebook.  It was suggested to me that I try clearing temporary files from Safari but I can't find

    How does one remove temporary files from Safari?  A friend logged on to her Facebook account using my iMac running Mac OSX 10.7.5 and Safari 6.1.6.  Now I can't remove her e-mail address from my computer.  When I open Facebook her address shows in the user button.  I do not have a Facebook account.  It was suggested to me that I try clearing temporary files from Safari but I can't find anything that tells me how to do this.  Are temporary files the same as the cache?  It also was suggested that I try clearing Safari cache.  How do I do that?

    Check Safari/Preferences/Passwords to see if the Facebook account is there. If so, select it and remove it. If you are still having problems, Safari/Preferences/Advanced - enable the Develop menu, then go there and Empty Caches. Quit/reopen Safari and test. If that doesn't work, Safari/Reset Safari.

  • How does DIADEM import TDMS files? How gets every channel his number and groupindex? How can I determine which channel has which groupindex and number?

    I store different channels in a TDMS file.
    I like to have a time channel at the first position with group index 1 and number 1.
    When I read the TDMS file with DIADEM the time channel (Float64) is on a differernt position, and the channels are not sorted alphabetically.
    Here are my questions:
    How does DIADEM import TDMS files?
    How gets every channel his number and groupindex?
    How can I determine which channel has which groupindex and number?
    Best regards
    Joerg

    Hi Jörg,
    i suppose that you´re programme whose create the *.tdms file is writing on false position. Try to create datas with timechannel on first indes in diadem, then save it and then open it again. you see that all is correct. So please tell me what programm in what version do you use and please attache it here.
    Did you use the library for creating *.tdms files like in the link ?
    http://zone.ni.com/devzone/cda/tut/p/id/6471
    Here you find the gtdms_8.x.zip - when you extract it and opened the *.llb you find vi´s for all functions e.g. writing 2d array of strings to *.tdms file
    when you open the subvi´s then you see how created and writing datas/structure to *.tdms files. Because *.tdms is binary you can´t see structure with open it in editor.
    When you don´t have Labview you can use the 30 days test of current version 8.5 under following link
    german version download link
    https://lumen.ni.com/nicif/d/lveval/content.xhtml
    english version download link
    https://lumen.ni.com/nicif/us/lveval/content.xhtml
    Hope it helps
    Best Regards

  • How to call a jar file from oracle forms (6i)

    Hi,
    I'm working with oracle 6i. I want to know that how to call a .jar file from forms menu. when I use HOST('<path>\test.jar') it is working in 'Client Server' any way. but the problem is I use application server in order to run my form. so my form is in the server and I run the form via clients web browser. in that case above solution will not work. if any body knows how to overcome this problem please reply.
    thanks.
    duminda

    I created a bean area and set the class name as implementation class. within that java bean class I called to a bat file which consists of the execution command of the jar file ( because i don't know how to call .jar file from my bean class directly).
    then i tried to run it in application server. its still not running.
    can you tell me what i have to do within my bean class? or can you suggest any solution?
    thank you.

  • How does the DAQmx read.vi work in producer/consumer mode

    Dear all,
    I have one question: how does the DAQmx read.vi work in producer/consumer mode ? 
    I mean if i set the acquisition samples quantity is 5000,(see the enclosed picture), how does the DAQmx read.vi acquire the samples ?
    5000 samples one time ?
    And how does the write. vi work ? Also 5000 samples one time ?
    Look forward to your reply.
    Thank you.
    Attachments:
    producer consumer mode.png ‏28 KB

    It will read 5000 samples per channel.
    The Write Measurement File just writes whatever you give it.  It you send it 5000 data points, it will write the 5000 data points.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • How to call a html file in a java file

    how to call a html file inside a java file ?

    Hopeless. Are you by any chance a rare gas? You seem completely inert. LOL You totally pwned him there :rolls eyes:
    well, no, I think he's looking for something to this degree:
    in HTML, there is a mailto: command that makes the system default handled way to email emails open up. He's looking for a command thats very nice and opens a html file in the system default browser.
    So, Dick, Runtime.exec would work execpt that he needs a way to find the default system browser to call exec on, AND he has to know how to pass html file locations to the executable via command line arguments
    He just didnt try to phrase it at all :P

  • How does Airplay transfer audio file format to an Airport Express?

    Hi, everyone
    How does Airplay transfer audio file format to an Airport Express?
    Many from the Internet claim that iTunes encodes an AIFF file format into an Apple Lossless Audio Codec (ALAC) file format before sending signal to an Airport Express.
    Is that true?
    If so, would it still make sense for me to have AIFF files on my music server
    or should I have ALAC files instead?
    Please advise.
    Thank you.
    BR,
    George Lien

    Many from the Internet claim that iTunes encodes an AIFF file format into an Apple Lossless Audio Codec (ALAC) file format before sending signal to an Airport Express.
    Is that true?
    Yes. The AirPort Express Base Station (AX) works only with iTunes v4.6+ and is limited to music files that iTunes can read; ie, 16-bit data only. These data, though, can be in any file format that iTunes recognizes, from lossy MP3s at the low-quality end of the spectrum to Apple Lossless and lossless AIFF or WAV files at the high end. It is also important to note that the AX functions only at a 44.1kHz sample rate. When you play 32kHz or 48kHz data, iTunes sample-rate-converts the data in real time before sending it to the AX.
    iTunes uses a QuickTime CODEC to convert audio files to Apple Lossless, and then, uses AirPlay to send them to the AX. In turn, the AX uses built-in software that converts the Apple Lossless to an Encoded Digital Audio format. From there, digital audio is sent to a optical transceiver to convert the electrical signal to an optical one before sending it to the innermost part of the audio port. For analog, the AX has a built-in DAC to convert the Encoded Digital Audio to Analog which is sent to the same audio port.
    If so, would it still make sense for me to have AIFF files on my music server
    or should I have ALAC files instead?
    If you have audio files in both formats, I would elect just to keep the ALAC (.m4a) files on the music server.

  • How to call .chm Help File

    How to call .CHM help file on click of button through the dialog? I tried using the command WinHelpCall() but unable to find the required result. Also could anyone please suggest how to I get a link/jump to the subtopics on click of help button under that module Example Under Navigator device if the help button is clicked the help file has to display Navigator Page.
    Can anyone provede me a quick suggestion.
    Thanks in Advance

    DIAdem doesn't have a method to open .chm files because these files are Microsoft help files, rather than DIAdem specific help files. However, there is a KnowledgeBase on Microsoft's web page that may be of help. You can find this document at http://support.microsoft.com/?kbid=209843. I found this by doing a web search for "Programmatically open .chm". I hope this helps you.
    Regards,
    Shannon R.
    Applications Engineer
    National Instruments

  • How does the LCM rollback feature work in theory?

    Hi
    How does the LCM rollback feature work in theory?
    Let's say
    1. I've Webi report 'x' in QA system
    2. I promote a modified version of webi report 'x' from DEV to QA using LCM. So now I've 'x1' in QA.
    3. I "rollback" this promotion job in LCM. Which means I've get back 'x' in QA system.
    So does this mean that LCM kept a "backup" copy of 'x' in QA (CMS+filestore file backup) before overwriting with the promoted 'x1' from DEV?
    If yes, does it clear the 'x' anytime from QA? (maybe after second iteration of 'x2'?)
    Thanks

    I highly recommend you read the following blog posts that contains straight answers to common questions about the automatic update feature:
    Hello, Adobe Flash Player Background Updater (Windows)!
    Adobe Flash Player Background Updater for Mac is live!

  • How does EXIT modules in DMEE work?

    Dear friends, how does EXIT modules in DMEE work?
    If I want to use this module DMEE_EXIT_DK_OCR_ACCOUNTNO to extract the account number of an OCR line, what should I do?
    And especially what do I put in the import parameters?
    /René

    The module called DMEE_EXIT_DK_OCR_ACCOUNTNO is a dummy module or template module if you like.
    The problem is that the module DMEE_EXIT_DK_OCR_ACCOUNTNO has a condition that never where fulfilled!
    I copied the module to Z_DMEE_EXIT_DK_OCR_ACCOUNTNO and changed the conditions u2013 and then everything was working with import and export parameters!
    Either is DMEE_EXIT_DK_OCR_ACCOUNTNO a serious mistake in standard SAP or just an undocumented template to be modified!
    /René

Maybe you are looking for

  • How to install Adobe Flash Player mannuly for FireFox protable, when on a limted user acount

    I have Firefox protable. Which is on my 1tb, and so i use it every where. I tryed to update Adobe Flash player on my main home computer, and it. Also on my Nanas computer, when i was there for a week, and i could play games on armor games, but, im he

  • What format to input $currentdate(datetime) Global Variable in Data Services Management Console?

    What is the correct input format for the datetime Global Variable in Data Services Management Console?  I've tried several formats and keep getting a syntax error.  The DSMC is Version: 14.0.3.451 I'm a new user and learning as I go.   Thanks for you

  • Css background image refresh

    Hi, I am using Edge inspect on my mac and pushing it towards an ipad and iphone. I did make a css change involving a background image. It seems like the image is not getting changed in the refresh by edge on both mobile devices. The whole name is cha

  • Sap BI ( for Business One ) 4.0 Run time Error

    Hi we had successfully installed BI client 4.0 trial version . when we any crystal report in B'One its shows an error Prompt. Before installing the BI.4.0, all the crystal reports were working fine, pls find the attachment of Error and suggest the po

  • Flashing procedure doesn't work

    My system working rock well with bios v3.2 i'd just tried updating new release (v 3.31T) in order to see (as this version is aiming to support future Deneb/Phenom II) whether my overclock would be better... and how big my surprise was to see that i h