Teststand call cvi instrument driver

I'm new to working with instrument drivers in TestStand. I'm trying to use TestStand to call a CVI instrument driver dll (for Agilent N5767 power supply), and then perform a specific function (init, set voltage, set current, etc.) All of the instruments in my test bench are connected via LAN, and they are configured in NI MAX too. I thought it was pretty straight forward, but I'm obviously missing something. Attached is the simple TS 3.1 seq file with the steps I'm trying perform.
Attachments:
N5700_on_off.seq ‏20 KB

Hi Bkoch1,
Please elaborate on the problem you are experiencing. I am able to open the sequence file you have attached and view your steps and on the surface, this seems like it should work just fine. What indications are you experiencing that it does not work fine? Have you tried setting breakpoints and using the Watch Window to monitor variables to ensure that they are being passed into the DLL? Please explain what the problem is and try to narrow down where the problem occurs and we would be happy to help you.
Regards,
Jackie
DAQ Product Marketing Engineer
National Instruments

Similar Messages

  • Import CVI Instrument Driver failure

    Using the "LabVIEW Interface Generator for LabWindows/CVI Instrument Drivers" utility, I successfully converted (wrapped) an IVI-COM instrument driver for use with LabVIEW 8.2.1.  However, I have a customer who insists on using LabVIEW 6.0.  When I attempt to use the "Import CVI Instrument Driver" tool of version LabVIEW 6.0, I get a crash: Failure: "funcmenu.cpp", line 1873.  (Specifically, the error occurs after pressing "OK" to the "CVI Function Panel Converter" dialog and selecting the DLL.)  The pop-up suggests to navigate to www.ni.com/failure for assistance in resolving the problem, but when the proper data is entered in that web page, it errors also.
    1. Is it possible to do what I'm attempting to do?
    2. Any ideas on what is causing my problem?
    Thanks

    The import tool for CVI drivers only supported IVI-C with LabVIEW 6. If there is no IVI-C driver available, you might be able to write C wrappers around the IVI-COM functions or manually write all of the ActiveX calls to the IVI-COM driver.

  • "Import CVI Instrument Driver" doesnt work when parameter is viSession pointer

    Why does "Import CVI Instrument Driver" menu selection generate a LLB that has VIs which have not been generated correctly when a VI function parameter returns a ViSession pointer. The only one generated correctly was "initialize", however, "autoConnectToFirst" was not. They both have similar prototypes in the .FP file. When I look at the block diagram of the init VI, there is a "IVI New Session" control, but in "autoConnectToFirst", there isn't. Therefore the session returned in Labview is 0, but the session returned in C (through debugging) is a valid session.

    The strict answer to "Why?" is because we only implemented the special initialization code for the Initialize function. "autoConnectToFirst" is optional in VPP 3.2, and we chose not to implement it as a special case.
    You'll just need to fix the Call Library Node in your VI wrapper to use the proper prototype. I'm not sure how best to handle the "IVI New Session" call; it really expects both a name and viSession, and "autoConnectToFirst" doesn't seem to return the name of the resource it chose. The "IVI New Session" function is what tells LabVIEW how to connect the VISA (or IVI) resource names with your viSession. You could call "VISA Find Resource" to get the first name and see if it's a supported device; this is supposed to match what "autoConnectToFirst" does.
    Along those lines, you might be better off implementing "autoConnectToFirst" yourself in LabVIEW. I.e., call "VISA Find Resource", and loop through the results calling your "Initialize" function until you don't get an error.
    Let me pull up a soapbox for a moment...
    There's a common misconception that "Import CVI Instrument Driver" creates a perfect LabVIEW wrapper around a VXIpnp WIN or IVI-C driver with no manual intervention. The reality is that you will almost always have to do some manual fixups of the converted driver.
    In LabVIEW 7, we improved the converter somewhat, and converting an IVI-C driver is now a three-step process: pre-processing the IVI-C driver, importing into LabVIEW, and then doing some programmatic fixups of the results. The resulting wrapper is better than earlier versions of LabVIEW, but it's not uncommon that you will still have to manually fix something up to make it a good, usable wrapper.
    That's why we consider "Import CVI Instrument Driver" to be a tool for instrument driver developers. If a vendor creates an instrument driver for an instrument in C, it doesn't make sense for each end user to have to create the LabVIEW wrapper, including all the manual fixups.
    Of course, if a vendor wants the best LabVIEW connectivity, they should write a LabVIEW-based driver. But if they're going to only write C- or COM-based drivers, they should create and distribute high-quality LabVIEW wrappers and not force end users to figure out how to do it on their own.
    My two cents.
    Brian

  • No longer able to import CVI Instrument Driver in LabView 2010

    Hello,
      I used to be able to download the Import CVI Instrument Driver Wizard in LabView 2009, but there is no wizard for 2010?
    I also tried importing the driver with the shared library import, but then Binary, Slides and Rings do not come up with their values i.e. if my slide in CVI has 3 positions :
    Description      Value
    Item 1                 1
    Item 2                 2
    Item 3                 3
    or if my Binary has
    Description      Value
    On                        1
    Off                        0
    they do not import the description into LabView 2010?
    I tried copying the directories created by the 2009-wizard to the directories of 2010 i.e.:
    from     C:\Program Files\National Instruments\LabVIEW 2009\resource\CVIFpConv
    to          C:\Program Files\National Instruments\LabVIEW 2010\resource\CVIFpConv
    and
    from     C:\Program Files\National Instruments\LabVIEW 2009\project\_DriverCtoLV
    to         C:\Program Files\National Instruments\LabVIEW 2010\project\_DriverCtoLV
    and the wizard loads and runs until I specify a .fp file and then I get the error in the jpeg attached. When I try to open the block diagram (FC_RFL_Initialize.vi), it says you need a password to view it, so that stops my debugging.
    Attachments:
    Error using Instrument Driver Import Wizard in LabView 2010.JPG ‏88 KB

    HI,
      I downloaded the wizard and when I tried to import a driver I got this message shown below...(labview 2010)
    Thanks...Ness
    Attachments:
    Error message.JPG ‏140 KB

  • Import CVI Instrument driver with void pointer

    Hi,
    I would like to use a CVI instrument driver that contains void pointers as parameters in LabVIEW. There are additional parameters which declare the kind of data where the void pointer points to.
    If I try to import this driver to LabVIEW I get warnings that the void pointer paarameters are converted to I32 since LabVIEW do not have the void pointer.
    Does anybody know if it is possible to import a CVI function with void pointers that will work properly in LabVIEW? How do I have to handle this converted void pointer?
    Thnaks,
    erik.

    Erik,
    you may have a look at this discussion forum thread.
    Best regards,
    Jochen Klier
    National Instruments Germany

  • Import CVI instrument driver in 8.0

    I have CVI instrument driver which just has some c funstions and it does not communicate to any instrument.
    It always worked for me in 7.1.
    After getting 8.0 and I had to download and install LabVIEW Interface Generator for LabWindows-CVI. It did not work.
    I get following error.
    The following instrument driver VI(s) cannot be created. This may indicate that the function in the CVI function panel (.fp) file is not consistent with VXIpnp and IVI standards. For example, the function has user-defined data types or has a duplicate function name in the .fp file.
    But this works in 7.1.
    What do I have to select in Class group?
    Which step am I doing wrong?
    LabVIEW Interface Generator for LabWindows-CVI is different from 7.1's built in generator.
    Sheetal
    Thanks.
    CVI 2010
    LabVIEW 2011 SP1
    Vision Builder AI 2011 SP1

    I've been playing some more and here is where I'm at.
    I
    downloaded DriverCtoL.exe from ftp.ni.com. I
    forget where exactly I got it and I can’t find it again. I run the program and
    it installs the tool/convert cvi to vi command. When I run the command and find
    the 2533.fp file it asks for, I get and error message.
    “Error
    -43990 occurred at Not a valid function panel file.
    Verify that
    the function panel file is valid and attempt the conversion again.”
    Is there
    another way to convert the cvi to vi? Or, what step am I doing wrong?

  • Import CVI Instrument Driver in LabView 8.6

    Hi,
    I am working on Instrument Driver and have code developed in LabWindow/CVI. I have got the information of importing those code in LabVIew through Import CVI Instrument Drive option in Tools»Instrumentation but can't able to see such option on the stated menu. We are using LabView 8.6 Evaluation Version and about to get the License of the same. Does such option unavailable in 8.6 version or am i missing somewhere??
    Please help me !!
    Thanks in Advance,
    Vivek
    Solved!
    Go to Solution.

    Hey Thanks Alot Dennis. I didn't know we need to perform such things. But Why we reaaly need to install those Wizard. If possbile would definitely like to know the reason.
    Thanks,
    Vivek

  • How can I use a labview VI as a CVI instrument driver

    I have a VI for the Keithley 485 that would like to convert into a form usable by CVI. I don't have labview so I cannot generate a DLL based on the VI.

    daquiry:
    I've downloaded the 485 driver from both the NI Instrument Driver Network and the Keithley site, any they are both written natively in G (LabVIEW). The driver is rather simple, and is just making 488.2 / VISA calls. Keithley's site also doesn't offer drivers for the 485 in any language other than LabVIEW. This surprises me. I would suggest contacting Keithley and verifying that no C driver exists for the 485. If that's the case, then you may have to write a driver yourself. The 485 Quick Reference guide should have a description of all the available GPIB commands, along with sample code. Since you probably won't need the full range of functionality of the GPIB interface, writing a driver for what you do need shouldn't be t
    oo bad.
    I've written a short instrument driver which contains only a simple read() function. In implementing this, I've endeavored to translate the G code into C, but unfortunately, I don't have an instrument, so I haven't been able to test it.
    Hope this helps..
    -- Chris
    Attachments:
    cviKe485.zip ‏5 KB

  • Intermittent problem with TestStand calling CVI DLL calling MSCV DLL

    Sorry about cross post, but I am not sure which group is best to address
    this issue.
    Setup:
    Windows 2000 SP1
    TestStand 2.01f
    CVI 6.0
    MSVC++ 6.0 SP5
    Problem:
    I have a CVI Test Library DLL that contains test functions called by
    TestStand using the C/CVI adapter. The CVI Test Library DLL in turn makes
    several calls to another DLL written in MSVC++. I am experiencing an
    intermittent problem with one of the MSVC functions. The problem ~appears~
    to be stack related, but I am not sure. Among other things, this MSVC
    function accepts a const char * argument that is a TestStand lookup string.
    The function uses this string to access the TestStand API.
    What happens is this: Everything works fine. I then recompile the CVI DLL
    after making some mod, then run. The MSVC++ DLL asserts that the const char
    * arg passed by the CVI DLL is NULL. However, this is not the case if I
    single step through the CVI code. It has happened both with passing
    variables as the const char * argument and as hardcoded strings literals, so
    its not that I am actually passing NULL. The other argument to this
    function is the TestStand sequence context dispatch pointer (LPDISPATCH
    pobjSequenceContextDisp) and it always ~appears~ to be passed correctly.
    The problem is frustrating and hard to debug because I can not
    deterministically reproduce it. The problem ~never~ appears when I debug my
    MSVC++ DLL in Visual Studio. And it only occasionally appears otherwise.
    The problem, when it appears, always appears on the first run after
    recompiling the CVI DLL, though the problem does not happen after ~every~
    recompilation. I'd say it happens 1 in 6 times after a recompile.
    Recompiling the exact same code does not always make the problem disappear.
    If I change the CVI code (code that has nothing to do with the argument
    itself though) and recompile the problem almost always goes away. Selecting
    'Mark all for compilation' and rebuilding does not make the problem go away.
    Only tweaking the CVI code and recompiling does (usually).
    Whats more, the problem appears:
    * With the CVI DLL built as Debug or Release mode.
    * With the CVI default calling convention set to __stdcall or __cdecl.
    * With the C/CVI TestStand adapter set to run in-process or external
    instance of CVI.
    The problem appears to be some sort of stack or argument passing problem
    between CVI and MSVC, though thats just a guess based on the symptoms. I
    have quadruple checked the calling conventions of all declared functions.
    The CVI DLL functions all use TX_TEST (which resolves to __cdecl). The MSVC
    DLL functions all explicitly use __stdcall. Is there a problem with calling
    __stdcall MSVC functions from a __cdecl CVI function?
    I can find no other memory leaks or indications of memory corruption
    elsewhere in either the CVI or MSVC DLLs. Its only this one function that
    exhibits this strange 'null const char *' problem.
    Can anyone offer any ideas about what may be causing this problem? Anything
    else I should check/verify?
    Regards,
    Joe

    Silvius,
    > Although I'm not sure if any of the following are the real cause of
    > your problem, I have the following suggestions:
    Thanks for the reply. At this point any and all suggestions are welcome...
    > 1. There could be a problem with calling
    > __stdcall MSVC functions from a __cdecl CVI function. As a workaround
    > wrap the _cdecl call inside a _stdcall call that is exposed or
    > exported to TestStand or vice-versa. This can be a problem because if
    > _cdecl is used, the calling function is responsible for cleaning up
    > the stack and if _stdcall is used, the called function is responsible
    > for cleaning up the stack.
    I was under the impression that as long as everything was explicitly and
    consistently declared, you could safely mix cdecl and stdcall f
    unction
    calls. Is it bad to do this? Is this a known issue with the CVI compiler?
    I've never seen a problem with doing this under MSVC++.
    I'll try wrapping them in cdecl calls for CVI - though we have a
    depressingly large number of stdcall functions in the MSVC DLL ;-). They
    need to remain stdcall in the DLL because we also call them from Visual
    Basic.
    > 2.Don't mix Debug version of one DLL with the Release version of the
    > other DLL. I had some bad experiences doing this and both DLLs where
    > developed in MSVC. Allways use either Debug either Release versions of
    > DLLs.
    I verified that the MSVC DLLs were either ALL Debug or Release. I too have
    seen nasty problems when MSVC Debug and Release is mixed.
    One thing I had not thought of until your reply: What about mixing CVI Debug
    DLLs with MSVC Release DLLs? Have you ever seen issues with doing this?
    Thanks!
    Joe

  • Import CVI instrument driver issue

    When I import CVI fp into labview it converts my const char * to int without any warning...
    For example CVI function:
    void my_func(const char *value);
    Labview conversion:
    void my_func(int *value);
    Any help?
    Thanks.
    CVI 2010
    LabVIEW 2011 SP1
    Vision Builder AI 2011 SP1

    Hello Sheetal,
    I wasn't able to reproduce the problem if I use char * instead of const char * in the function panel.  Were you able to do so?   Either way, when you initially convert your FP to LabVIEW code, you are asked to specify a DLL that contains the code associated with the function panel.  I would double check that the function prototype inside the DLL specified in the 'select a shared library or DLL'. is not set to int *.  When I used char * or const char * in my DLL, LabVIEW convert the parameter to be a CStr data type, which is the same as char *.
    Thanks
    Wendy L
    LabWindows/CVI Developer Newsletter - ni.com/cvinews

  • Conversion of an Instrument Driver from LabWindows/CVI to LabVIEW

    Hello All,
    Conversion of an Instrument Driver from LabWindows/CVI to LabVIEW
    http://zone.ni.com/devzone/conceptd.nsf/webmain/9A93316BEBEDB17786256FA300675A0A 
    But I can not find any hyperlinkt to download
    "LabVIEW Interface Generator for LabWindows/CVI Instrument Drivers"
    Is there any evaluation version for downloading?
    Thanks,
    nonomiya

    So strange,
    I go through three pages but does not find any entry for download,
    hmm...,
    1. After press the hyperlink,
    See Also:
    LabVIEW Interface Generator for LabWindows/CVI Instrument Drivers
    2. and for a resuest info. form.
    3. press download..
    ====
    LabVIEW Interface Generator for LabWindows/CVI Instrument Drivers
    System Requirements
    NI LabVIEW 7.1 or later
    Windows 2000/NT/XP
    Use the LabVIEW Interface Generator for LabWindows/CVI Instrument Drivers to create LabVIEW VIs for VXIplug&play and IVI-C instrument drivers from function panel (.fp) files.
    Instrument Driver Network
    Before using the conversion utility to create a new instrument driver wrapper, please visit ni.com/idnet to see if a LabVIEW Plug and Play instrument driver is available for your device. The Instrument Driver Network (IDNET) provides support for more than 3,000 different instrument models from over 170 different instrument vendors.
    Recommendations
    This utility was created for developers of C-based instrument drivers who wish to provide a LabVIEW interface, but do not develop a LabVIEW Plug and Play driver. By developing the C and LabVIEW interfaces together, it keeps the components synchronized, and eliminates the need for customers to create their own LabVIEW interfaces. Vendors should distribute the LabVIEW wrapper files with the associated VXIplug&play or IVI instrument driver, so that end users do not have to visit multiple web sites to download the complete driver.
    If you are not an instrument vendor, we recommend that you use this utility only if you have instrument driver expertise. Access to the instrument driver source code is preferred, in case you need to edit the C instrument driver in LabWindows/CVI.
    After generation, the wrapper VIs should be tested with the instrument.
    Instructions
    Once you install the software, simply access the utility from the Tools>>Instrumentation>>Import CVI Instrument Driver...menu in LabVIEW. This software replaces the built-in tool and provides feature enhancements.
    For additional information on this utility, view the resources below.
    Readme for the LabVIEW Interface Generator for LabWindows/CVI Instrument Drivers
    Submit your Driver
    Visit the Instrument Driver Network
    nonomiya

  • Importing Instruments Driver from LabWindows/CVI

    Does anybody have got wintools_32.dll library ?
    I need it to convert LabWindowc/CVI Wintools Instrument Driver to Labview.
    Could you send it to me?
    Romek.
    [email protected]

    Hi!
    Thanks for your answer.
    Exactly, I've tried to import LabWindows/CVI instrument driver to Labview.
    This Instrument driver I've found here:
    http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B45EACE3F04956A4E034080020E74861&p_node=DZ52176&p_submitted=N&p_rank=&p_answer=&p_source=External
    During import procedure i was asked about wintools_32.dll library.
    Personally I am interested in System Tray icons functionality of this driver.
    I'm not sure that wintools_32.dll is Labwindows/CVI library, but i've searched Microsoft Windows pages with no results.
    Regards.
    Romek.

  • I have an in-house instrument driver written in labwindows, is it possible to use this driver in labview?

    If this is not possible, how do you go about converting it for use in labview?

    Just go to Tools>Instrumentation>Import CVI Instrument Driver. In LabVIEW 5, it's under the File menu and is called Convert CVI FP File.

  • 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

  • Is there a USB Instrument driver developer tool for CVI

    Is there a USB instrument driver developer tool/guide for CVI?
    Thanks
    Chip B.
    Solved!
    Go to Solution.

    Hi! ASIC LabRat,
    I agree with your comment.  IVI drivers take too much overhead and the executing speed can be very slow compared to the drivers developed using VISA platform.  The previous link sent by the NI engineer was very old (2001) and doesn't really help you at all. 
    Please take a look at this one instead: http://zone.ni.com/devzone/cda/tut/p/id/4713. 

Maybe you are looking for

  • Question regarding roaming and data usage

    I am currently out of my main country of service, and as such I have a question regarding roaming and data usage. I am told that the airplane mode is sufficient from keeping the phone off from roaming, but does this apply to any background data usage

  • How to hide/remove Particular column from the payslip in ESS\MSS Portal overview table?

    Steps to be followed. 1)Go to SE18 2)Select Enhancement spot 3)Give the Espot name 'HRESS_PAYSLIP' 4)From left side double click on the Implementing Class 'CL_HRESS_PAYSLIP_BADI_STANDARD'. 5)Within that double click on the method 'if_hress_payslip_ba

  • ABAP Rountine Conversion question

    This is a routine that was migrated from 3.5. Here is the code I have, I've bolded the area that's throwing the error message: PROGRAM trans_routine.       CLASS routine DEFINITION CLASS lcl_transform DEFINITION.   PUBLIC SECTION. Attributs     DATA:

  • I want to activate my computer but if i do that iTunes say Error (-42408)

    but if i do that iTunes say Error (-42408). I want help please, because i want to take my apps etc. on my iPhone. But I can´t do that. HEEELLLPPP

  • Major IPhoto 09 Error!

    I just imported some photos into IPhoto 09 and shortly afterwards my IMac did a hard shut down. Now when I open IPhoto I get the following error: The Photo Library nees to be upgraded to work with this version of IPhoto. After that I click on upgrade