Duplicate driver lvlib

Hello, my question is regarding to HW handling "best practice".
I have a LV project which connects (beside other things) to a MKS PR4000 control station (this is a digital PSU and readout/controller device for pressure sensors and flow controllers).
So far I have 2 flow controller units connected to this PR4000 unit. My PC (and my LV project) connects to the PR4000 via RS232. I got the drivers from NI website for the PR4000, all work just fine.
For easy project handling I have created my own drivers based on the official drivers, only including those features which I need.
I put these drivers into a lvlib library under the project tree. I have an ActionEngine (scope is private), and some wrapper VIs (scope public) to be able to set all inputs as "required" on the connector pane, and to hide the reference, etc. wires inside these wrappers. Also it is nice that all the lvlib public VIs have the same colour, easy to find them in my main block diagram.
My question: later on I will need to extend my experimental rig: I will deploy an additional PR4000 unit (and connect to the PC via USB-RS232 cable, since the native RS232 is already occupied). What is the "orthodox" way to use independently the same drivers for this second PR4000 unit? Since I have already implemented the LVLIB for this HW unit, can I just duplicate the PR4000 lvlib under the project tree? So I would have two lvlib under the project tree: lets say PR4000_1.lvlib and PR4000_2.lvlib. I could set a different colour for the second lvlib, and apply it to the VIs, so I could easily distinguish between the public VIs which will have same names. So is this the usual way to proceed?
Thanks for advice!
Regards,
Solved!
Go to Solution.

Yes, that would work. Do 'save as' on the lvlib to a different directory and you should get a copy of all of the VIs and a new .lvlib file with a different name.
Think about this though, what would you do if you suddenly had to add 10 of the devices? Would you make 10 copies of the lvlib? What would you do if you then discovered that there was a mistake in your VI - you would need to update all 10 copies of the VI!
A better practice would be to modify your action engine to store multiple device references (e.g. indexed by name (variant attributes are good for this) or by number).
I think best practice is for your 'driver' to be independent of your hardware references - so have your driver VIs with the references fed in by wire and then handle maintaining those references outside of your driver lvlib - I usually store them in shift registers in my application. There is a slightly more advanced version of that uses DVRs to store your hardware references.
Certified LabVIEW Architect, Certified TestStand Developer
NI Days (and A&DF): 2010, 2011, 2013, 2014
NI Week: 2012, 2014
Knowledgeable in all things Giant Tetris and WebSockets

Similar Messages

  • Windows 7 with Login Script from 2008 R2 server Duplicates Drives

    I have a single user that when they login to the domain and their login script runs, it ends up giving them duplicate drives. I can copy the script to another account and not have the issue. I have not tried logging in as the user on another machine yet,
    to see if the error follows the account. Anyone have any thoughts on what might be causing this? I have removed all of the drives from both the command line using
    net use /del *
    An example of the login script is
    net use z: /delete
    net use z: \\servername\sharename
    Its random which drives it will duplicate to.

    Hi Mgibson-TC,
    Can we run this script locally to check what’s the result?
    You can try Ed (DareDevil57)’s suggest first, if this issue persists, we can do some tests to narrow down this root cause.
    Alex Zhao
    TechNet Community Support

  • Ghost / duplicate drive issue again...

    Issue:  In LR, opening a raw file via "Edit in Photoshop CS4.."  (and maybe importing from CF card) creates a duplicate drive letter with the new images in the library left-side folder tree.  Thus, I end up with two "D: Drive" sections with some images in one and the rest in the other...even in the same subfolders.  It is a pain to fix...and of course the next import or Edit in...creates the problem again.
    Set up:  LR 3.3 on Win7.  LR installed on C: Drive.  Catalog and images on D: drive.  Both drives (partitions, really, of the same physical drive) are internal Sata.  My catalog is regularly optimized and checked for errors.
    Known workarounds:
    a.  I created a test catalog on C: and the problem doesn't seem to happen.
    b.  I setup Photoshop CS4 as an additional external editor.  Choosing this option in "Edit in..." dialog immediately creates the new "-Edit.psd" file which is saved appropropiately without the ghost drive issue.
    Question:  I can live with workaround B, but is there a fundemental way to avoid this issue in the first place?
    TIA
    Charlie

    Welcome to Apple Discussions!
    The three beeps after powering up sometimes is a sign the RAM banks of the motherboard have gone bad. See this article:
    http://docs.info.apple.com/article.html?artnum=58442
    Though usually it is followed by a failed boot.
    Also make sure you are using the most current Techtool. See my FAQ*:
    http://www.macmaps.com/safeutilities.html
    to find out if your version is out of date for your operating system.
    * Links to my pages may give me compensation.

  • BUG: LR2.0 shows duplicate drive after edit in photoshop export

    Lightroom 2.0 shows a new duplicate drive after edit in photoshop export. file opens as DNG in photoshop, saves as PSD, and saves to the right folder on the hard drive. But lightroom now shows 2 "drive G"'s(that's my image vault drive letter) The folders are correct, the second drive only contains the edited psd files. display in explorer shows the file in the right location with the original DNG file. This is a random event not every edited file displays under the second drive. I have a total of 6 files (I had more, but I moved my image vault to a new drive and fixed the ten I had at that time.)
    Vista Ultimate 32bit SP1
    AMD 64X2 duel core 6000+ 3Ghz
    6GB 666mhz Ram PAE force enabled
    NVIDIA Gforce 7600 256MB video card (1.75GB total with system shared ram)
    Primary hard drive: 500GB
    Hard drive 2: 400GB (system and photoshop paging files and lightroom catalog drive)
    Hdrive 3: 1TB (primary image storage)
    user control turned off
    system graphics set to performance
    Duel display
    Lightroom 2.0
    photoshop CS3

    No I had to do it manually. When I had lightroom 2, here's what would happen.
    1. My external drive would show up, but all the photos would be marked as missing.
    2. I would then relocate the photos, which I had do do directory by directory. At this time I did not have all of them under a master directory.
    3. As I relocated them, the second drive would show up, which would contain all my directories as I located them.
    4. After I had relocated all the directories, I would delete the now empty duplicate - which has been the original - drive.
    5. After I shut down LR and restarted, the whole process would begin again.
    6. After I installed 2.1, I put all my directories under a parent directory, relocated the parent, it found all the files, automatically deleted the ghost duplicate, and I have not had the problem since.
    Hope all this makes sense,
    Good luck

  • Time Machine / Time Capsule duplicate drive names

    Not sure if this belongs in Time Machine or Time Capsule thread, but here goes.
    I have a 500GB Time Capsule providing wireless to a couple of MacBook Pros and an Apple TV.
    Have been backing up 1 of the MBPs to the Time Machine internal disk (named TC internal) since January. All has been well.
    With no changes to system or setup of any kind, 2 or 3 days ago I noticed the backup taking an endless amount of time "preparing". I stopped the backup and checked my settings. Time Machine Preference showed no oldest or latest backup dates. I clicked on 'change disk' to make sure my TC internal drive was still selected, and there were 2 listings for the same drive, both named TC internal.
    I connected my MBP via ethernet to the Time Capsule, and let it run its course. The backup finished in about 45 minutes. Only when it was done, the backup drive was listed as TC internal-1.
    Backups have progressed normally since then, but sometimes the drive name in the TM preference panel is listed as TC internal, and sometimes TC internal-1.
    How do I get back to having the internal drive listed just once ?

    FWIW, after poking around for some time, I found a way to do away with the duplicate drive in the list of available drives for time machine backup.
    I turned OFF the ability to access my time capsule via the internet, in Airport Utility.
    Lo and behold, the duplicate drive name went away.

  • How can I delete a duplicate drive in the folders area?

    Not sure how I ended up with a shared network drive duplicated under the folders area of Lightroom 3.6.  Maybe it was a user error but now my network drive where I have 15,000 pictures appears twice in the folder area and it is constantly updating (since there are quite a few pictures).
    How can I delete the duplicated drive?  I have "removed" all the folders under the duplicated drive (and made it disappear) but the drive keeps coming back as the synchronization process will add all the folders that exist on that drive.
    The two drives with "Volume_1" in the name are actually one shared network drive (I only have one).
    I actually removed my network drive mapping (N:) to fix the problem but that did not even work; LR still found a duplicate name for the same network drive and started to synchronize (again). Help!!

    I found pretty good super users and a solution here:
    http://www.lightroomforums.net/showthread.php?14294-Remove-external-drive-from-Folders-vie w

  • Duplicate drives on my mini

    I think this is my first thread here and I could sure use some help please. I recently tried to fix a network problem I was having by using  Time Capsule to take my entire disk back several hours thinking I might have changed or deleted something by accident. Though I clicked that I wanted to replace my drive with the previous days profile, I ended up with 2 copies of my disk on my mini anyway and my hard drive is now near capacity. I had 165 gig of free space now I have only 29. Is there a way to get the duplicate off?  Thanks

    First, empty the Trash if you haven't already done so. Then reboot. That will temporarily free up some space.
    To locate large files, you can use Spotlight as described here. That method may not find large folders that contain a lot of small files.
    You can also use a tool such as OmniDiskSweeper (ODS) to explore your volume and find out what's taking up the space. You can delete files with it, but don't do that unless you're sure that you know what you're deleting and that all data is safely backed up. That means you have multiple backups, not just one.
    Proceed further only if the problem hasn't been solved.
    ODS can't see the whole filesystem when you run it just by double-clicking; it only sees files that you have permission to read. To see everything, you have to run it as root.
    Back up all data now.
    Install ODS in the Applications folder as usual. Quit it if it's running.
    Triple-click the line of text below to select it, then copy the selected text to the Clipboard (command-C):sudo /Applications/OmniDiskSweeper.app/Contents/MacOS/OmniDiskSweeper
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.
    The application window will open, eventually showing all files in all folders. It may take some minutes for ODS to list all the files.
    I don't recommend that you make a habit of doing this. Don't delete anything while running ODS as root. If something needs to be deleted, make sure you know what it is and how it got there, and then delete it by other, safer, means.
    When you're done with ODS, quit it and also quit Terminal.

  • How to remove a duplicate driver?

    i have a Leybold 23xxxx pressure meter. By accident there are two Leybold 23xxxx drivers in the system now and i get strange errors with my VIs.
    I have installed one driver via LV (this is a very old version)
    and there is another (newer)  Version i dont know where it came from and why NI did not install the latest version.
    How can i remove the unused drivers?
    There is a old unused 2009 LV version still installed, but i could not find a uninstaller. Will i have to remove it with some tricks, or can it stay?
    ================================
    system: Win7 and debian stable
    Solved!
    Go to Solution.

    Instrument drivers are in the "LabVIEW\instr.lib" folder. Each driver should be in its own folder. To delete it, just delete the folder. You may need to update the palette menu to reflect the removal of the directory.
    Also, what do you mean by NI installing the driver? Are you referring to using the Help -> Find Instrument Driver? If so, what did you enter in the search criteria? Leybold isn't even in the list of manufacturers.

  • Duplicate Drive on Windows 2008 SP2

    Dear Expert !
    currently. i m managed Windows 2008 x64 SP2. in the Disk Management these are three logical disk as attached . But when open windows explorer these are two Z drive duplicated similar size, file name.. . please give me advise .
    thank  you and appreciate

    Hi Viet,
    Based on your description, the issue seems to be caused by that you associate a folder path with a drive letter
    by using the SUBST command. Would you please open a command prompt and type
    SUBST command, then check if there has substituted drive letters.
    For more details of
    Subst command, please refer to following TechNet article.
    Subst
    If any update, please feel free to let us know.
    Hope this helps.
    Best regards,
    Justin Gu
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Duplicate Drives?

    I tried to search the TM forum for another answer to this but didn't find anything quite like this. My Internal HD is named 'Hendy'. Originally, I named my external HD that I use for TM backups 'Hendy', as well. At one point I realized since they looked the same mounted, I should name one something else, so I re-named the external drive 'Hendy B-Up'. Here's where it got interesting... From the Terminal, ls from hendy/Volumes/ got me:
    Hendy Hendy B-Up Hendy B-Up 1 (3 volumes)
    I thought that was odd. I changed directories to both Hendy B-Up and Hendy B-Up 1 and listing directories/files looked like the same exact thing as from within Hendy (internal HD). The Backups.backupdb folder was in neither of them, and all I saw was what would be typical from my internal HD (Applications, Developer, Library, System, etc.). Truly puzzled at this point - where's my external HD?!?!
    Next step: I renamed my external HD to 'Backup', and went back to the terminal and did ls from the hendy/Volumes/ director and got:
    Backup Hendy Hendy B-Up
    cd Backup and ls gives the true contents of my external HD (Backups.backupdb and my other folders show as matching with Finder).
    Hendy B-Up still lists the same as my internal HD.
    So, can anyone help me resolve what could be going on here!? I'm so baffled. I can't find 'Hendy B-Up' from the finder or spotlight and have no idea what to do with this... Can I just try unmounting it or something? It's like a ghost!
    Thanks for bearing with my story.
    -John

    Update - I was not looking at the correct volume previously. When changing directories, I wasn't using the \ character for the space in Hendy B-Up. I have now successfully viewed the contents of Hendy B-Up and don't need it. My new question:
    How can I delete this, as it's listed as a volume. Further, I'm not sure how it got listed as a volume in the first place and it doesn't show up on my desktop or anywhere else. Is it unmounted or what??
    If it's any help, here are the results from the mentioned volume for ls -l:
    drwxr-xr-x 3 hendy admin 102 Jan 11 14:42 Hendy B-Up
    Thanks,
    John

  • Making duplicate drive for another editor

    I have a project with media spread across two external drives.
    I want to copy the project(media) to one tb drive for back up
    and for another editor. When I did this and reconnected the
    media fcp warns of media in and out point changes.
    All I want to do is copy the media to the new drive?
    Any suggestions of the best way to make a back-up?

    If I'm not mistaken, the prompt is likely referring to 'in/out' points that have changed during editing...that differ from the original captured Media Start/End points.
    You should be fine just copying all files to the new drive. This would include project file(s), captured timecoded media, any 'created' clips (exports and such) and all non-timecoded media (graphics, music...etc.)
    You could use Media Manager for this, but make sure you fully understand the process. I've not used it much, so won't advise. Others here have more experience using Media Manager.
    Either way you go, make sure you've worked out a file naming/placing convention with the other editor.
    K

  • Trying to combine folders within LR4 from two separate drives without creating duplicates--sometimes it won't let me transfer to destination folder because it says files are there when they are not; other times, allows duplicates to transfer

    Trying to consolidate 261K+ of images within LR4 between two drives.  Someone who was "helping" me with my Library in LR4 for some reason took some but not all of the file folders from my main backup drive (M) and duplicated them onto a partitioned hard drive (E) directly on the computer.  The duplication is huge, so I am trying to condense them all back onto the original backup drive M, particularly since I believe there are also folders on the partitioned backup drive E that do not appear on the main one M, and there are many more file folders on M that are not on E, so that is the destination drive.
    CONSOLIDATION:  When I try to drag either the file folders or the individual files from the duplicate drive E to the original drive M to combine the two drives since the folders in many cases for some reason are not identical, sometimes LR4 says the files already exist when they clearly don't. Other times it allows me to drag and drop all files, even if the exact duplicates are already on the destination drive, thereby doubling the number of files per image and creating more duplicates.  Right now I am opening each file folder on the duplicate drive E, looking at what extensions and file names are there, scrolling to the original drive, making sure they appear to be identical, then going back to the duplicate drive E, deleting the images in the folder, removing the folder, and moving to the next folder on the duplicate drive E.  *There has got to be a simpler way.*
    CONSOLIDATION APPROACH: I did start to create file folders names A, B, C and group file folders under them to reduce clutter, since those header folders can be closed down when not in use, but now I am wondering if I should have done that alphabetization to the main backup drive rather than to the partitioned backup drive.
    My goal is to consolidate the two drives down to one, delete as many images along the way that I know I will never miss, then backup the catalog and export it to an external drive and then copy that to yet another drive for offside storage.  Does this sound like the proper plan?  Last time it took almost 24 hours and over a terabyte to export the catalog.
    DUPLICATION:  I also have many file folders that have the exact same image in them.  One portfolio image may actually be in eight different folders, with the exact file, file name, file size, and date, even though I always have checked "no duplicates on import,"  How can this be? What is the best way to sort through duplicates?  Why are the files in some of the duplicate folders not in numerical order? If I do a search and call up a file # and find 15 duplicates, the only way I can find where those duplicates reside is to take each duplicate, right click to Locate Folder in Library, then once I find it, I have to go back to All Photographs>Text.search for file #, go to the second duplicate, right click to Locate Folder in Library, then once I find it, I have to do it all again.  Is there a simpler way to see all the occurrences in their respective folder locations at once?
    SEARCH BY FILE FOLDER NAME ONLY: I also find I can't search for a file using a folder name (for example, "John_Doe").  I can only search by file #, keywords, or camera/lens/date, etc.  Why will it not work to use All Photographs>Text>search for Doe? In other words, if I didn't keyword the individual files as John Doe, I can't search for them by that moniker.
    BACKUP:  It also appears that the only way I can back up the catalog is to shut down LR.  Really?!
    FOLDER LIST PRINTOUT: Is there a way to print out the Folder list (other than a screen shot)? I have so many file folders on each drive since I sort not by Year/Month/Date but by subject. It makes trying to compare duplicate folders quite unwieldy. 
    SLOW RESPONSE:  And finally, as though that weren't enough, why does LR4 continually blink to a white screen after each keystroke?  Takes forever just to be able to click through images, view info after hovering, etc. All other programs are closed down and the operating system shows very little memory being used.

    A brief and probably non-helpful answer: I know of no way to eliminate your large amount of duplicates other than by repetitive, tedious manual effort.
    *There has got to be a simpler way.*
    I hope you're right, but I don't think there is a simpler way.
    BACKUP:  It also appears that the only way I can back up the catalog is to shut down LR.  Really?!
    Yes, really

  • Time Machine creates duplicate bu of external hard drive

    First, some disclosure:
    1. I utilize Logic Studio (Pro 9) and use it daily. It crashes 2-3 times a week with little justification.
    2. I have begun getting a prompt that says I’ve removed a drive without ejecting it first....but in reality, I haven’t ejected anything.
    3. I get a prompt stating that a backup has failed.... but it appears my backups have all been completed.
    With these problems I’m wondering if I’d be better off making the move to Lion, or would this just complicate my problems? Well, that's why I'm telling you folks my tales of woe....
    I was using Time Machine for about 6 months when the following problem occurred:
    Last July I went to check a backup and saw that an external drive, called...VIDEO  was backed up, BUT Time Machine also created another backup of the same drive called VIDEO 1. The same exact number of files and same number of bytes appeared to be in this "newly created" 1 backup. I did not check exactly when Time Machine starting creating this duplicate.
    I contacted Apple for service and eventually a tech walked me through the steps to eliminate the problem. I’m sorry but I don’t remember the steps that were taken. I later found the external BU drive had a problem and figured that's what may have created the duplication. I replaced it with a new BU drive and life was good. This happened last October.
    Tonight I checked one of my Time Machine backup files. I found that TM had again created a duplicate backup of an external drive. It was neither the same VIDEO drive nor the same data that had been involved in the earlier occurrence. TM again used the number 1 to differentiate it from the actual drive that it was supposed to back up.
    I went back and found this recent duplication had first occurred on a backup created Dec 21st. The backup from Dec 20th did not have this duplication, nor did any other previous backups on this new hard drive. I do not remember the significance of that date but I “think” I installed Snow Leopard sometime in December.
    Tonight, using Disk Utility, I’ve verified the permissions on the drive which TM duplicated and it says they’re OK. I’ve verified the permissions of the internal drive and they’re OK.  I’ve verified the permissions on the external BU drive and they’re OK. 
    If I need to send screenshots of logs or whatever, I apologize but I might need a bit of an explanation as to how to get to that information. 
    Thanks much in advance for all replies.

    SO, I downloaded and installed Lion. Lion seems a bit faster than SL but Time Machine is still creating the duplicate drives with the number 1 after the name of the legitimate drive.
    That's all I got.

  • Replace LabVIEW Library (lvlib) (poss. bug?)

    Hi All,
    I'm, trying to use lvlibs for shared code. Now i have some issues in version management.
    This is what I face:
    a library in a construction folder, which is copied (including sub-vi's) to a read-only version specific folder:
    -CurrentVerions\workspace
                                 -libraryproject.lvproj
                                 -library.lvlib
                                 \subvi's
     This tree I copy to:
    Version xx
    so this is the end:
    Version 2\workspace\
                                 -libraryproject.lvproj
                                 -library.lvlib
                                 \subvi's
     This directory I make read-only.
     Now if I upgrade the library to version 3, I want to upgrade my calling projects as well. So I remove the lvlib reference in the calling project, and inserts the new version (since replace is not an option).
    So far so good.
    Now if I open A VI with some controls/vi's from the library this is the message I get:
    lookup table.lvlib
    - The control expected to be at "N:\Account\NedTrain\ATBEGValidation\Lookup table\08-Delivery\V1.4\LabVIEW 8.0.1\Workspace\VIs\Defaults.ctl" was loaded from "N:\Account\NedTrain\ATBEGValidation\Lookup table\08-Delivery\V1.3\LabVIEW 8.0.1\Workspace\VIs\Defaults.ctl".
    lookup table.lvlibefaults.ctl
    - The library expected to be at "N:\Account\NedTrain\ATBEGValidation\Lookup table\08-Delivery\V1.3\LabVIEW 8.0.1\Workspace\lookup table.lvlib" was loaded from "N:\Account\NedTrain\ATBEGValidation\Lookup table\08-Delivery\V1.4\LabVIEW 8.0.1\Workspace\lookup table.lvlib".
    So what happens, he sees there is a part from the library (lookup table.lvlib) with a control (defaults.ctl) which is updated, but what LV does is take the old version (1.3 over 1.4), in addition the control gets the message that he is binded with the new library (1.4 over 1.3).
    So it looks like the control in the VI is path-bound and not namespace-bound.
    Does anybody have a solution (not a version control package), or is this like it is supposed to be?
    I can manually track down where the control should come from but what if I expand my libraries to 50 or more VI's/controls
    Thanks,
    Ton
    PS I got triggered only because i made the folder read-only, I don't want to know what cross-links I have elsewhere
    Message Edited by TonP on 06-14-2006 09:57 AM
    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!

    Hi Ton,
    This is because LabVIEW identifies each VI based on it's location and the Library (.lvlib) it is part of. (LabVIEW stores a relative path to the VI, the VI knows to which library it belongs). If LabVIEW can't find a VI at that location which is part of the correct Library it will search for it in it's search path. If it still can't find it, it will ask the user for help (Ignore / Browse / Cancel dialog). If you choose to browse and select another VI, All Intanceses of the original VI will be replaced by this VI. LabVIEW does not replace the other references to the Library because it could be that juist one VI was removed from the Library.
    You can workaround this issue by using a intermediate library. So you have the following for two versions:
    \Library\v1.0.0\driver v1.0.0.lvlib {and files}
    \Library\v2.0.0\driver v2.0.0.lvlib {and files}
    \Library\Current\driver.lvlib {and current files}
    In all the Applications that use this 'driver' library you include the 'driver.lvlib'. If you want to build a new version of this driver you duplicate the v2.0.0 folder in a v3.0.0 folder and when this version is ready for release you copy the library from folder v3.0.0 into the Current renaming it from 'driver v3.0.0.lvlib' to 'driver.lvlib'. This can be done easily using 'Save As' on the Library file or using the 'Save a Copy' method with VI Server (See attached Example).
    A down side to this is that all application will be using the new version. Instead of using a current folder you could choose to copy the version you would like to use with a application to the application folder tree and maintain a copy there. This way you can choose per application if and when you upgrade to a new version.
    In the attached example
    Look at / run the 'Application.vi'. this uses version 1.0.0 for the Driver.lvlib. (in this case the copy is maintained in the applications own folder tree).
    Close this VI and it's project file if you opened it.
    Open the Replace Library.vi
    Select '..\Application\Driver\Driver.lvlib' as the Library to be replaced.
    Select '..\Driver Versions\v2.0.0\Driver v2.0.0.lvlib' as the new version of this library.
    Run the 'Replace Library.vi'
    Look at / run the 'Application.vi' again.
    Hope this help.
    Karsten
    NI
    Message Edited by KvZ on 06-23-2006 04:41 PM
    Attachments:
    Example1.zip ‏123 KB

  • How to package instrument driver in the user.lib or instr.lib directory

    Hey guys,
    I currently am using bunch of instrument drivers in my project.
    In the VI form it works fine, but I noticed that once converted to an executable,
    there are errors regarding the DLL that the drivers are calling.
    Apparently the driver VI check if its being called in an VI or executable based on the current directory.
    I dont think this is good/correct programming to begin with... but anyways since this driver is
    saved in the instr.lib directory of LabVIEW, when I call it from the executable the default path becomes
    XXX.exe/1abvi3w/instr.lib/.../.../VI above.vi
    I saw this post  which talks about how vi's in instr.lib and user.lib will get the path 1abvi3w in an executable but never talked about how to deal with it.
    so my question is can i solve this problem smoothly without copying the entire driver.lvlib into my project and
    editing the VI above? i am fine with creating wrappers for driver vi's but would to like to avoid editing the driver vi's themselves.

    doradorachan wrote:
    I dont think this is good/correct programming to begin with...
    I don't disagree, but there is a reason this code was written like that (you might note that it doesn't actually work) - before 2009, EXEs were built as flat directory, so stripping twice would bring you to the folder. Because of the addition of libraries, where different files have different names, this was no longer possible, so 2009 builds the EXE as a zipped hierarchy of folders, which is why the check for a folder succeeds even inside the EXE.
    There are a couple of things you can do:
    Replace the VI path with the Application Directory primitive. This is designed to function differently in an EXE. Understandably, you don't want to do that.
    Check the 8.x checkbox in the advanced page of the build settings. This will make the code work correctly, but if there's LVOOP code with VIs of the same name anywhere, it will create extra folders that you need to move around with the EXE.
    Add the driver to the project (just the lvproj, don't actually copy the files) and then set an explicit destination in the build for its VIs as an LLB in the data folder. This will place the driver VIs in an wLLB, which is external to the EXE and should then strip correctly. I can't say I have much experience with this, but I'm assuming it should also work with code that was originally in user.lib. This is probably the cleanest solution in terms of number of files because you only have one extra file.
    Try to take over the world!

Maybe you are looking for