"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

Similar Messages

  • 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 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 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

  • 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 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

  • If itunes is installed the disk drive doesnt work

    ive recently got a new laptop but everytime i install itunes the disk drive doesnt work.
    when itunes is installed it doesnt recognise that i am putting disks in.
    its really annoying, im stuck with the same songs old songs on my ipod!
    if u culd culd help it would be much appreciated!

    i dont have itunes on my laptop at the moment so i have just been trying to install it again. but everytime i try it fails and doesnt finish the installation. it did this before and last time i did over 10 attempts until it worked, then wen it finally did install the disk drive stopped working. any advice? lol

  • I synced my phone lastnight and now it says my phone cant connect to computer the Apple Mobile Device USB Driver doesnt work?!? i deleted itunes and reloaded still not working.... Does anyone know how to fix??? i just want to upgrade to IOS6

    Does anyone know why my Iphone will not connect to my computer all of a sudden? I backed it up lastnight. Now it wont even register with my computer.... It says Apple Mobile Device USB driver doesnt work all of a sudden???? i tryed deleting and reloading and nothing is working!!! someone please help =)

    Have you done:
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    What results do you get when you run this:
    iTunes for Windows: Device Sync Tests
    Do both the Home button and Power button work OK normally?

  • 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

  • My time capsule doesnt work when its conneted direct cable modem, and it start working from netgear router

    I just bought a Airport Time Capsule, time capsule is connected direct from wan to cable modem (it doesnt work). when i connect it to lan port 1, it start working. normal process i know is from cable modem to wan port. 2nd i notice, network is on bridge mode. so my question is how do i make it to work from modem to wan port.

    What model is the modem? Is it a pure cable modem or a combined modem router?
    This maybe important as the current model TC does have issues with some of the popular cable modems.. SB6121 or 6141 being often the ones complained about here.
    If it is a pure cable modem (most will have just one ethernet port). Then power down the modem for 20min. This allows enough time for the MAC address of the first device connected to be lost at the ISP end so it is ready for a new router.
    The TC must be in dhcp and nat mode.
    Please factory reset the TC and start over.
    The Factory Reset universal
    Unplug your TC/AE. Hold in reset. and power the TC/AE back on..  all without releasing reset and keep holding in for about 10sec. The time is not important.. it is the front LED rapid flashing that indicates you are in factory mode.
    Release reset.
    If it doesn’t flash rapidly you have released reset at some point and try again.
    Be Gentle! Feel the switch click on. It has a positive feel..  add no more pressure after that.
    TC/AE will reboot after a couple of minutes with default factory settings and will wipe out previous configurations.
    No files are deleted on the hard disk.. No reset of the TC deletes files.. to do that you use erase from the airport utility.
    By default the TC is in router mode after a reset.
    Restart the modem.
    The power up the TC and run through the setup utility.
    The TC should then be accepted as the main router in the network.
    If this fails check the WAN ip address. If it is 10.x.x.x or some other private IP you did not turn off the cable modem for long enough.. Try again only this time leave it off longer. (Some ISP it is just 5min.. some 15.. some will require 60min or overnight).

  • My DVD drive doesnt work

    My dvd drive doesnt work, and i want to format the HD, any ideas??? i have an external dvd drive but it doesnt recognice it when i want to install the OS,
    ... Maybe someone can tell me how. Thanks

    Time to take your disc and your computer to an Apple Store or an AASP, I'm afraid. They should be able to reinstall the OS, etc. Have no idea what they would charge but I'm sure that it would not be too expensive.
    Clinton

  • My CD/DVD Drive Only Works When I Jam the CD/DVD in hard..?

    My CD/DVD drive only works when I stuff the CD/DVD in the drive EXTRA hard. If I just try to put in with normal force (that at one time worked) it spins the disc around, makes a spinning noise, and then ejects it. I'm taking it to the Apple Store soon. What should I expect to be wrong and is it fixable? Please share details. Thanks in advance.

    Welcome to Apple Discussions!
    It sounds like the spring that loads the drive has gotten jammed by something. This can often happen if you use CDs with sticky labels, or do anything to label the discs directly. As a result of issues like these, I've not labeled any discs directly, and instead store the in jewelcases, and purchase them prepackaged in jewelcases to avoid such issues.

  • HT1766 hi, i just tried backing up my iphone on icloud but th option to 'Back Up Now" doesnt work. when i tap on it, nothing happens. Im worried because my iPhone has never been backed up before

    hi, i just tried backing up my iphone on icloud but th option to 'Back Up Now" doesnt work. when i tap on it, nothing happens. Im worried because my iPhone has never been backed up before. Please help

    Reset the phone then try it again: hold down the home button along with the sleep/wake button until you see the apple, then let go.

  • Why this path doesnt work when there is "!DOCTYPE" element?

    Hi, I need to extract contents from an xml file, which looks like
    <hr />
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE article PUBLIC "-//ES//DTD journal article DTD version 5.0.1//EN//XML" "xyz501.dtd" > <!-- LINE 1 -->
    <article docsubtype="fla">
    <item-info>
    <jid>YANBE</jid>
    <aid>12941</aid>
    </item-info>
    </article>
    <hr />
    And I have tested with this path "//article/item-info/jid/text()", but it doesnt give me anything. But I noticed that when I remove line 1, it does extract the content "YANBE"...
    why the path doesnt work when there is that DOCYTYPE element? How should I get around with this please?
    Many thanks!

    The extract of XML you gave is not valid (Line 1: <hr/>) but besides that ... I think your problem is in the DTD.
    Somewhere in the DTD it probably 'sneakily' defines a default attribute which in reality is a default-namespace for one of the elements. This means that in your XPath handling, you will have to map a prefix to a namespace-uri (NamespaceContext [1]) and use this newly defined prefix in your XPath expression.
    //tst:article/tst:item-info/tst:jid/text()[1] http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/namespace/NamespaceContext.html

Maybe you are looking for

  • How can I check a Remote Database is alive in a Stored Procedure

    Hi In a PL/SQL stored procedure, I do a select from a table on a remote database via the database link. There is a Loop around the select as it waits for a flag to be set on the remote table. However, on several occasions, while looping, the remote d

  • What is an rpd file and webcat file?

    I find the reference to RPD file and web cat file almost everywhere. However, I have not been able to find: 1. the contents of the file 2. How it is created 3. Who creates it and How it can be viewed/modified? Please let me know the same for the webc

  • Video after video

    Hi All, I'll having a video presentation thru Keynote soon. Get ready the slides now. I'm wondering, do keynote possible to play a video after a video automatically? Just like video in slide 2 will auto play after video in slide 1 stopped then? Or, A

  • Oracle Database 11gR1 32-bit upgrade to 11gr2 64-bit

    Hello All, My current server is having following configuration: OS               : RHEL 4.6 32 bit Product         : Oracle EBS 11i DB               : 11gR1 Target machine: OS               : RHEL 5.8 64 bit I want to convert my current single node E

  • Sharing a shared network variable between two PC's connected to a network

    Sharing a shared network variable between two PC's connected to a network Surely this shouldn't be so difficult! I have a little LabVIEW program running in the background of PC1. The exe's task is to collect and send OPC variables held on a SCADA sys