Using gpib-32.dll in Labview 7.0

Hi there,
I am relatively new to Labview and I need some help trying to program an old HP3488A switch/control unit using the Call Library Function Node. I would like to convert the existing VB6 code, which uses gpib-32.dll, into Labview. What I have done in the VB code is to call the ibdev function to set up the HP instrument. I would like to do the same in Labview. How would I even go about setting up the .dll files as I am revamping the existing code (running on a Pentium II computer) and trying to create an identical code in Labview (running on a Pentium III computer). Also, after I have set up the .dll files (done any system configurations if necessary), how do I actually implement this file in Labview?
I have tried calling the ibdev function in the properties of the Call Library Function. I created 6 parameters of return types with ranges of type long. Then I pass integers into the input of this node and when I tried running it I get an error exception within the external code as follows:
"An exception occured within the external code called by a Call Library Node. This might have corrupted Labview's memory. Save any work to a new location and restart Labview. VI "switch.vi" was stopped at Call Library Function Node 0x1D7C of subVI "switch.vi"
Can someone please help me? Thanks.

I actually tried that before. As the HP3488A switch instrument is very old and came out before IEEE488.2 got introduced, it still uses IEEE 488.1, or HPIB commands. When I try using MAX or even my Agilent IO Control, it shows that there is an instrument connect to GPIB address 10, but neither programs can auto-identify the instrument using the *IDN? query. Even so, I tried typing ID? in both programs and I got no data back from the instrument. I'm not too sure as to what the problem is since I always get "\n" back from the instrument's reply. I even tried changing the termination character enable to TRUE and I still got nothing back.
However, on the front local display of the switch, I can see arrow indicators moving between TALK and LISTEN whenever I perform a write or write/read command. But no data gets sent or received because I couldn't perform any write commands to change the switch. If anyone can tell me what the real problem is that would be great. But if not, then I will have to use the Call Library Node because I know that my VB6 code actually works on the HPIB instrument and I could simply use this gpib-32.dll file on Labview and perform the same instructions, which should allow me to talk to the switch. Can anyone tell me how to properly set up a Call Library Function Node as I have errors using the gpib-32.dll file (please see my previous message)?

Similar Messages

  • How to use a C# dll in Labview?

    How can I use a C# dll in Labview 8.2? With the "Import Shared Library" Wizzard I need the header file which I don't have. Is there another way
    to use such .dll to import the functions created in C#?
    Thanks in advance
                                  Norick

    Norick,
    afaik there is no tool which provides you the possibility to create something like an instrument driver for .NET assemblies.
    Maybe we should take a look into terminology:
    - Instrument driver: This is a set of functionality, which provides the user with an easy to use API for a special instrument. Very often, the driver itself is written in C/C++ and provided as a DLL.
    - "Import Shared Library" Wizard: This wizard enables the user to create an own API for any C/C++ DLL (or compatible) for LabVIEW. This wizard requires the information on all exported functions; this info is contained in the header file. The result of the wizard is a set of VIs containing one Call Library Function Node each for each exported function.
    - .NET assembly (extension .exe OR .dll): This can be compared to ActiveX. So the way to program with .NET is similar to ActiveX. Maybe you want to take a look into the examples of LabVIEW regarding .NET...
    - Global Assembly Cache (GAC): All assemblies contained here are registered in the system. Every application can easily work with assemblies contained here.
    - Private assemblies: This would be the way to work with .NET assemblies which are built on your own. You have to select the .DLL-file itself and make sure that the file can always be found in the same (relative)folder of your application.
    hope this helps,
    NorbertMessage Edited by Norbert B on 02-21-2007 02:16 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • How to use matlab compiled DLL in Labview ?

    I have LV 8.5, and am unable to use a matlab compiled DLL in my LV code. I have tried the 'import'  command, but it does not list any functions. However, it does not show any errors during its execution. The existing solutions/responses to this question do not work either. I would also like to know of a way to deal with mxArray datatype. What is its equivalent in C (or any other high-level language) ? How do I retrieve an array that is returned from the matlab dll ?

    I'm assuming you have either Matlab installed or at the very least the Matlab Runtime, otherwise the DLL won't work. The "import" command relies on having a header file. Do you have one? You also need to make sure the DLL has been compiled so that it's compatible with LabVIEW. The most likely problem is name mangling, which also occurs when you try to compile a DLL written in C++. See this post, which contains links to useful posts.
    The mxArray datatype is a special datatype which is actually a structure. It's complicated. Your best bet is to create a C DLL that acts as an intermediary between the Matlab DLL and LabVIEW. If you are able to, you can, instead, simply call the Matlab code directly using the Matlab script node.

  • Using a cygwin DLL in LabVIEW 7.0

    Hallöchen!
    I try to use a function from a cygwin DLL in a LabVIEW 7.0 VI. So
    I wrote
    void funcName(double values[], long number_values)
    for (int i=0; i < number_values; i++) values[i] /= 2.0;
    to the file test.cc and said (cygwin gcc 3.3.1)
    gcc -c test.cc
    gcc -shared -o hall.dll test.o
    Then I included it as a shared DLL in LabVIEW, added the correct
    parameter sequence and return value. The name of the function was
    a little bit different (Z8funcNamePdl).
    But: LabVIEW crashes every single time. Not matter what I say about
    calling convention or reentrance. As soon as the "configure" window
    is closed, *all* LabVIEW windows are closed.
    What am I doing wrong?
    Thank you!
    Tschö,
    Torsten.
    Torsten Bronger, aquisgrana, europa
    vetus

    Hallöchen!
    LarsRoe writes:
    > [...] LabVIEW arrays have a different structure than the
    > traditional C arrays. As a quick test, try passing in a single
    > DBL value by pointer for the first argument, and 1 for the second
    > argument.
    Even a "void Test()" lets LabVIEW crash. I now say
    extern "C" {
    void Test();
    void Test() {
    return;
    > The prototype in your C function needs to match the prototype you
    > get from the "Create C File..." Dialog.
    Granted, but quoting the gcc manual: "Good compilers never crash."
    I didn't *start* the VI after all.
    Tschö,
    Torsten.
    Torsten Bronger, aquisgrana, europa vetus

  • How to use GPIB communication check in LabVIEW

    There is one power supply in our office from Agilent. How to develop software for that Power supply using LabVIEW we should be able to change the
    voltage via GPIB interface.

    If you have the GPIB commands for your Agilent device in its product manual and a GPIB card, just go to Block diagram functions-> instrument i/o-> gpib and you have a set of GPIB functions.
    Also look at attached VI ( taken from labview examples shipped with labview) to get an idea on how to do GPIB write
    Regards
    Dev
    Attachments:
    LabVIEW_GPIB.vi ‏44 KB

  • I would like to convert a matlab file into a .dll and use it in LabVIEW. However, when I run the .dll in LabVIEW I get an error stating "... Procedure not found". What could this be? Can anyone help me...

    I wish to convert my Matlab files into .dll's so that I can use them in LabVIEW. I am using 'mcc' and 'mbuild' of Matlab to convert my .m files into .c and .dll.
    When I try to run the .dll's in LabVIEW, I get an error message in a modal window stating some required .dll or procedure is not found.
    How should I resolve this issue. Should I add any other Matlab .dll's in course of making my .dll?
    Please help in solving this issue... Thankyou very much.

    KJV wrote in message news:<[email protected]>...
    > When I run the matlab generated dll, it is stating 'matllb.dll not
    > found'. Is it that I should set the path for matlab\bin to include
    > all the dll's before I compile? When I make dll from C, it works fine
    > in LabVIEW. The problem is from .m to .dll. The problem also arises
    > when I convert my .m to .exe. The same error of 'matllb.dll not
    > found' comes over. Should I change my matlab compiler options or
    > something else? Please help me?
    I have the same question,I don't know how to use the matlab DLL file in labview,
    I hope someone can descripe the procedure in detail.

  • How to use dll in Labview ?

    I compile this code to dll file with VC++2010 filename is test_dll.dll .
    #include "stdafx.h"
    #include <iostream>
    #include <Windows.h>
    using namespace std;
    int main(int a){
        cout << "Test dll...............\n";
        return a;
    After that, I put Call Library Function node in editor and double click Call Library Function node. I browse test_dll.dll into Library name or path and set function prototype to int32_t main(int32_t a); but it show error Call Library Function Node 'test_dll.dll:main':function not found in libraly. How to use dll in Labview ?  And I have more question is what is differrent from Tools -> Import -> Shared Library(.dll) and use Call Library Function node.
    Solved!
    Go to Solution.

    The issue you are having is that LabVIEW is not capable of using C++ DLLs directly. It only handles C DLLs. This does not mean that if you you cannot use the DLL if it's compiled with the C++ compiler as opposed to the C compiler. Rather, it means that you must take extra steps in order to use it from LabVIEW. The primary issue is that of name mangling or adornment. This is discussed here: http://zone.ni.com/devzone/cda/tut/p/id/4877. Basically you need to prepend extern "C" in front of your prototypes in your header files. I would also suggest reviewing this article: https://decibel.ni.com/content/docs/DOC-14564.

  • Creating a DLL in LabVIEW containing a function using pointer to pointer

    Hi!
    I´m facing the problem to create a DLL from LabVIEW containing the following C-function:
    functionF(structS** arrayA) ,
    where:
    structS is a struct of various data-types (e.g. int)
    arrayA is an C-array of structS
    How can this be done? Any ideas?
    Thank you in advance for your support

    This cannot be done in LabVIEW. LV doesn't have the data type "Pointer" as C has.
    The only workaround I can think of is to use an array of strings in LV and in the interface define the parameter as "by reference". In LV you have to typecast the wire with the string to a cluster withthe layout of structS.
    As far as I know an array of strings is represented as an array of pointer to strings. This is because strings are variable in length and therefore LV uses this method storing the pointers to the strings in the array and not the elements as usual.
    You have to read the document about memory and data types of LabVIEW. In elder versions this was in the LabVIEW Bookshelf but I haven't found it in short in the newer version.
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

  • Build a DLL in LabVIEW & Use the DLL in LabVIEW

    I am trying to build a DLL for the simple vi with LabVIEW and want to use the DLL in LabVIEW. is it impossible?
    I wrote a vi and it have 2 terminals. one is the input for numeric dbl data type and one another is the output for numeric dbl 1D array data type.
    It was built with the Application builder for LabVIEW 8.0 and DLL was created successfully.
    I want to use this DLL in new vi with LabVIEW.
    Call library function used. I wrote a new vi to use that DLL.
    In config dialog I config each parameter for dll and connected terminals. but it doesn't work
    pleas refer to the attatched file and let me know what I missed.
    Attachments:
    Array1D.zip ‏60 KB

    At first I kept scratching my head wondering why someone would want to do this. Create a DLL in LabVIEW to call it from LabVIEW. Seems redundant. But, perhaps it's an exercise or perhaps it's for testing the DLL...
    In any event, calling the DLL worked for me in 8.2. How are you configuring your Call LIbrary Function node? I have it set up as follows:
    return type: void
    iteration: Numeric, Signed 32-bit Integer, pass by value
    array1D2: array type, Signed 32-bit Integer, 1 dimension, "Array Data Pointer" format
    len: Numeric, Signed 32-bit Integer, pass by value
    Then I called the DLL like this:
    Message Edited by smercurio_fc on 03-16-2007 12:57 PM
    Attachments:
    Example_BD.png ‏2 KB

  • How to use third party DLL's in LabVIEW

    Hi all,
    Am using maxon EPOS 2 (Easy Positionning system) to control the EC motor. It comes with the 32-Bit Windows DLL for labVIEW. How to use these library unctions in labVIEW properly? When i try to call those library function in a LabVIEW program, it's showing me that one warning affecting one caller and so the subVI is not executable. Do i have to change the location of the library files or make to make any other changes??  
    Solved!
    Go to Solution.

    Have you seen the KB: Program a Maxon EPOS Controler using LabVIEW ?
    Christian

  • Using dll in labview realtime

    Hi to all,
    I would like to know the best way how to open a file DLL in labview.
    I  created this dll with matlab, real time-workshop, nidll.tlc
    after that I have to use these dll in a real time VI, for using that into a cRIO,does it exist a tutorial in order to explain the procedure?
    thank you

    No it is not! As it uses Cygwin to port the Gnu Unix tools so they can run under Windows. Cygwin is a great tool but had always a hard time to run on newer Windows versions than what was released at the time a particular Cygwin version was created.
    The VxWorks versions that NI used for their realtime controllers is very old. There is no hope that someone would go through the trouble of trying to backport the Cygwin bugfixes since that time to this Gnu toolchain, nor has VxWorks any interest in creating a new Gnu toolchain based on modern Cygwin and Gnu tools for older VxWorks versions.
    NI has moved since away from using VxWorks. In fact the only reason they went with VxWorks, was because Pharlap ETS was not compatible with the PPC CPU and at that time the choice in powerful x86 compatible CPUs for embedded applications was VERY small or actually non-existent.
    As you can see Open source observes similar rules as commercial software. Don't spend much time in trying to make old stuff work on new versions. In fact commercial software usually makes a lot more effort to be portable across different versions. In Open Source the general tenor is, I want feature X, that requires GCC Y, which will only work with glibc x.z.v. Don't spend time in trying to make any of these work with older versions too, or update older applications to work with newer OSes etc. If you want Windows 7 or 8 you have to have Cygwin 1.7.something and that will usually require GCC 4.something and a myriad of other dependencies. The gnu toolchain for VxWorks 6.3 which is used on the NI controllers since LabVIEW 8.5 uses GCC 3.4.4.
    Considering that LabVIEW 8.5 was released in 2008 and the VxWorks tools to create the OS for the controllers obviously even quite some time before that, but Windows 7 RTM was only in July 2009, there is not much you can complain about the fact that those tools do not run on Windows 7 or 8.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Using ModelSupport2.dll in LabView without TestStand

    I would like to use the ModelSupport2.dll purely in a LabVIEW environment as either by a "Call Library Function Node" or "Active X" or ".NET" without using TestStand.
    In particular I would utilize the the "DisplayPassBanner" and "DisplayFailBanner" functions. I want the banner pop-up's so I can provide a consistency between applications that don't use TestStand and those that do.
    The DLL call requires a numeric input "context" which I am not sure what it needs for a reference number.
    In teststand it is passed an "Object", "CVI Active X Automation Handle", "By Value" from the "ThisContext"
    How replicate this or create equivalent in LabVIEW
    Any suggestions appreciated
    A

    A,
    if you are looking into the sources of ModelSupport2.dll (the sources are included as LabWindows/CVI project and the needed C files), you will see that the display banner functions do access the object referenced by the parameter 'context'. The context is a reference to the dataset of a running TestStand execution when called from the TestStand process model.
    So it will not be possible to use those functions if you are not going to use TestStand/running an actual sequence.
    There are, however, two ways you can go for:
    a) Design a LV VI dialog such way that it looks like one of the banner and call it as a subVI.
    b) Use the LabWindows/CVI sources of ModelSupport2.dll to copy the banner dialogs into a new CVI project (from modelpanels.uir) and create similar functions into a custom written dll which do not require the ActiveX handle 'context' to be passed.....
    hope this helps,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Buying used GPIB/ENET100 card. What software must have with it. Have LABView 7

    Buying used GPIB/ENET100 card. What software must have with it to configure and use. Have LABView 7

    Actually, I believe the drivers that are available on the NI website are licened for upgrades only. If the hardware came with an NI-488.2 driver, you can upgrade that to the latest version with the link above.
    If your purchase did not include a software license (the hardware is sold separately from the hardware due to single- and multi-user license options), you need to purchase a license of NI-488.2.
    http://sine.ni.com/apps/we/nioc.vp?cid=10622〈=US
    The part numbers for the single and multi-user license for Windows are 778598-02 and 778598-01. Other operating systems are listed as well.
    If you have any confusion, you should contact NI to confirm licensing issues.

  • How to generate and use Matlab(R2007) .dll's in Labview

    Is there a step-by-step example on how to generate and use Matlab(R2007)  .dll's in Labview.
    Our experimenal hardware is LabView-controlled and we want to pass
    images/2d intensity arrays to a more complex matlab program that will
    return an array of extracted data which we want to use in LabView again.
    Thank you
    Carsten

    I recommend having a wrapper created around the matlab dll that converts the datatypes for you. There is a lot of fooling around with pointers involved which is very difficult in LabVIEW. btw, this got much more complicated after Matlab 7. Essentially, you need to convert your inputs into mxArrays, and then add those mxArrays to an mxArray list that you pass by pointer into the matlab dll. You also need to create a mxArray list for the outputs from the dll which you will need to extract your data out of before converting it back into a LabVIEW supported datatype. It's a big hassle. We do this pretty often, but we have created a c library that handles all the conversions, so it is feasible for us. Unfortunately, I can't share the library, but hopefully this information will help you get where you want to be.
    Like I said, it would be easier if you can just get a c developer to write a wrapper for you to keep it simple in LabVIEW. Alternatively, you might try getting your m-code to work in Mathscript.
    Chris

  • How to build a dll for labview pda, which uses the intel ipp primitives in it

    Hi all,
    For my application, I need to call a c dll from Labview PDA, and in the c function i need to use intel IPP function. When i call my dll, i get an error saying the ippfunction i use, say "ippsCopy_16s missing c or vi file". Can someone tell  me what I might be doing wrong?

    Hi Vani,
    When using a DLL in a PDA there are some special considerations you have to take. Please take a look at the following knowledgebase describing the process.
    Eli S.
    National Instruments
    Applications Engineer

Maybe you are looking for

  • Can change my password for skype account

    Hi there I hope someone can help me especially from skype tech team. Background I had to reset my andriod phone lately. Once it was ready then i try to login to skype but it wasnt recognising my password. So i tried tk reset it but that didnt work ei

  • Old Keynote files--can't open

    I have Keynote files from April 2004 that I need to open, edit and use. They won't open with '06 or '08. Here are the 2 error messages I keep getting: The error 9 was found while parsing the XML: "Found illegal character while parsing element tag." U

  • Using javadoc ant task to generate Javadocs

    Hi all this may confuse you (probably because i'm fairly confused) i was asked to write a script that in a project that could be ran to generate javadocs using ant libraries (org.apache.tools.ant.taskdefs.Javadoc) Does anybody have any experience in

  • Autorun a program on computer startup

    Hi all, I have a doubt of how can I make a program autorun on windows startup (we'll leave Linux for later). I have followed two ideas but in both cases I find the same problem. - The first idea was to put an Icon on Start Menu / Programs / Startup.

  • How do i install onto my second machine?

    Hi , I recently purchase Illustrator, I was told I can have this on two machines as long asn they aren't used at the same time, however its impossible to find out how to get it on my second machine it keeps taking me to the purchase page can anyone h