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!

Similar Messages

  • Download internal table from BSP application to C:\ drive of the user

    Hi,
    How do we download a internal table data from a BSP application to the C:\ drive of the user. Have tried GUI Download, but it doesn't work. Also don't want a pop up to appear while this is happening. The code has to there in 'OnInputProcessing' event.
    Regards,
    Jaison

    Hi Raja,
    I went through few of the blogs and wrote the below code for downloading data. My requirement is that in the InputProcessing event i need to write a subset of data to the users C:\ drive. But even after doing the below change i'm unable to get the requirement done. Can you please tell me as to what i'm missing. I'm new to BSP development and help would be highly appreciated.
    if not it_messages1[] is initial.
      clear wa_messages1.
      loop at it_messages1 into wa_messages1.
       clear temp_string.
       concatenate wa_messages1-PROJECT wa_messages1-FILENAME.......
       into temp_string separated by CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB.
       concatenate main_string temp_string into main_string separated by
       CL_ABAP_CHAR_UTILITIES=>CR_LF.
      endloop.
    CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
      EXPORTING
        TEXT                 = main_string
        MIMETYPE        = 'APPLICATION/MSEXCEL;charset=utf-16le'
      ENCODING       =
    IMPORTING
       BUFFER         =  xmain_string.
    EXCEPTIONS
      FAILED         = 1
      OTHERS         = 2
    CALL METHOD cl_bsp_utility=>download
    EXPORTING
        object_s = xmain_string
        content_type = 'APPLICATION/MSEXCEL;charset=utf-16le'
        content_disposition = 'attachment;filename=test.xls'
        response = mresponse
        navigation = navigation.
    Edited by: Jaison Yohannan on Jun 3, 2009 2:16 PM

  • How to add instrument driver on labview in Mac

    Hi,
    I used to use Labview on windows and there was a menu in Tools >> Instrumentation >> Find Instrument Drivers and then I was able to find the driver for the instrument I was working on and install.
    However, since I've been using labview on mac, there is no such menu. It only takes you to the website where I can search and download the instrument driver in a zip file, but then I'm not sure how to install the downloaded instrument driver on the Labview in Mac.
    Can someone give me a hint?
    Thanks,

    Unzip and move the folder to instr.lib.

  • How do I delete one of the user accounts on my computer and not lose the data in that account?

    How do I delete one of the user accounts on my computer and not lose the data in that account?

    I actually have the opposite of this problem. haha.
    https://discussions.apple.com/thread/4484354

  • How to validate input fields as the user is filling up a form with jQuery?

    Hello EA friends.
    Someone has experimented on how to validate input fields as the user is filling up a form with jQuery?, if the field is numeric and insert an A for example, an alert appears showing "insert a number" or not allowed to enter anything until a number is entered.
    Thanks and regards.
    Fer

    Hi Sudeshna.
    Sorry for not responding on time, how can I be included in this code?
    sym.setVariable("typeActivity", "input")
    var Element_1=document.createElement(typeActivity);
    $(Element_1).css({"text-align": "center"});
    //Answer
    sym.setVariable("Answer_1", "4");
    sym.$("box_1").append(Element_1)
    This code is on my creationComplete and it works fine.
    Would greatly appreciate your help.
    Regards.
    Fer García

  • Is this how I would go about letting the user choose a source file and a de

    Hello everyone.
    I wasn't sure on how I would do this but what I want is from a drop down menu (which I already have created) they are going to choose somthing.
    Once they choose somthing I want it to bring up another window that has a layout like this:
    ------------------------------------------------------------------------------------|
    JLabel->Source:[                            ] (browse) <--JButton|
    JLabel->Destination:[                      ] (browse) <---JButton|
    ------------------------------------------------------------------------------------|
    So this new window I want to show up, what would it be? Is it just a JPannel or a JFrame with JButtons?

    It might actually be more difficult the more I look at JDialog.
    Because what I need is, to allow the user to select a destination directory and a source directory so when they click the button, it will open up a JFileChooser. whatever they pick, I need the window to stay up until both directory's are selected (A source and a destination)
    Then I'll have an Ok button that will close the window.
    THen I'll use their input source/destination strings and do my other processing with that.

  • How to send external mails to the user

    Dears,
    How to send external mails to the user who creates the sales document (Quotation)
    Can you please suggest what modification required in the FM
    Thanks,
    pinky

    You can have a partner function like 'Created by' and use an exit to populate the User ID to this partner function(dont have the system right now but i think this can be done with standard partner detr. procedure also)
    Then, create an Output type for that Partner function with transmission medium as 'External Send'. You can use the standard SAP program to trigger the email. To send the actual email after the output is trigerred, the link connection has to be set up be BASIS but if you want to check, then goto SOST and see if the email got trigerred or not.

  • How to identify which record(s) the user hasbeen checked

    i have a internal table in which first field is represented as check box in the output .
    like bellow
      loop at g_it_final into g_wa_final.
            write : 5 sy-tabix ,
                   20 g_wa_final-g_v_check as checkbox,
                   25 g_wa_final-TRKORR,
                   40 g_wa_final-AS4TEXT.
      endloop.
    now the user will select some records from the output checking the check box
    NOW the QUESTION is
    how to identify which record(s) the user hasbeen checked(selected) ?
    so that i can disply only the selected records in the secondary list.

    Hi,
    You will have to use the 'READ LINE' command within a loop to retrieve the data back into your program.
    You may want to use the HIDE command to ease the retrieval of the checkbox value.
    Check out the online help for both of these.
    Darren

  • Trouble using the instrument driver for the "hp8753b"

    I am using the instrument driver for the "hp8753b", specifically the "collect and display data" driver.  I manually set my settings to the analyzer and run the VI (i.e. set start frequency to 500 kHZ and stop frequency to 1 GHz), when the VI runs with the "collect and display data" it defaults to start frequency 1 GHz and stop frequency to 3 GHz.  I have tried to modify the driver to only collect data and not to modify any settings on the analyzer but I run into errors.  Any help on this is appreciated.

    Hello,
    I have installed the instrument driver you mention in your post. I am looking at the Collect and Display Data.vi, however I need more information from you to determine why your sweep is defaulting back to 1GHz-3GHz. 
    When you say "I manually set my settings to the analyzer" are you making these settings directly on the analyzer? The Collect and Display Data.vi seems to read all of the settings from the hardware, I did not see any configuration in the VI.  What modifications were you making to the VI and what errors were you getting?
    Can you see the range on the instrument?  If so , can you determine at which point the range defaults back to the higher range?  Running in highlight-execution mode in the VI and running NI-Spy (Start->All Programs->National Instruments->NI-Spy) to perform a capture of the GPIB commands can help to determine at what point the errors are occurring.  It will also let you see if there are any commands being sent which cause the instrument to be reset. 
    Jennifer O.

  • How to start Integration server with the user XISUPER

    Hi,
    How to start Integration server with the user XISUPER?
    Regards,

    Mahesh,
    In the post installation document, under Creating User XISUPER,
    I see the following,
    1.You must now log on to the Integration server host with the user XISUPER, to switch the initial password to a valid password.
    2.You must restart the J2EE engine to transfer the user creation to the J2EE immediately.
    I am unable to proceed here.Can you please help me to resume the post installation steps ?
    Thanks,

  • When logging on to Windows 7 user gets a second mapped drive to the users home folder

    Morning,
    I'm working through an issue we've discovered whilst trialing Windows 7.  Our environment is setup as follows.
    Domain Controllers are Windows Server 2003
    Clients are Windows XP and Windows 7
    Windows XP and Windows 7 Clients are in seperate OU's
    All Windows XP Group Policies apply to Windows XP And Windows 7 clients, Windows 7 policies are then applied to Windows 7 clients after
    Windows 7 policies are setup such that any setting defined in a Windows XP Group policy is left unconfigured in the Windows 7 Group policy and only new Windows 7 settings have been set in Windows 7 Group Policies.
    We have users home folders mapped in their Account Directory account setting and set to H:\   to connect to
    \\domainname\dfs\home\username
    In addition we also as a fail safe map the drive via a login script using net use
    This has worked fine for years in windows XP, if Active Directory failed to map the drive for any reason then the login script would then map the home drive.
    In Windows 7 we have noticed a curious error.  We found after a period of a couple of weeks we suddenly started getting a new drive mapped.  This was identical to the H:\ drive mapping but was instead under drive Z:\.  In other words, the
    users home folder is mapped twice on h:\ and z:\.  This is not affecting any of the Windows XP users.
    I have gone through several logic reasons to ascertain why this has happened with the following findings.
    1. Originally we thought the error appeared when we tried out mapping the home drive using the mapped drives functionality new in Windows 7 group policy under preferences > windows settings > drive maps.  However, after forcing it to delete the
    Z:\ drive using this functionality we only succeeded in removing it with a group policy present to do it.  As soon as we removed that group policy the Z:\ drive came back
    2. Secondly i thought the reason we would be getting a z:\ drive when we haven't specified it anywhere is because active directory is trying to map to the H:\ Drive but it is already present therefore in Windows 7 it tries to map to a different drive. 
    Using Windows logic it tries the highest letter first which is unlikely to be in use i.e. z:\.  This makes sense because our logon script uses a net use h:\ command to map the drive and i believe by default these are set to perisistent.  Therefore
    the next time the user logs on H:\ is already mapped so the logic in Active Directory accounts maps the drive to Z:\ instead hence we end up with two mapped home drives.  To test this i altered the login script to set the drive maps to
    non persistent using persistent:no.  The logic here was that when the user logged off the drive would become unmapped so that when Active Directory tried to map the drive it would be able to use H:\.  Unfortunately this was not the case and
    Z:\ remains.
    3. Here is where i resolve the issue but i don't know why and is the bit i need answering.  If i go into my account on Active Directory and go to Profile and set the home folder drive letter to another letter i.e. change from H:\ to U:\,
    i get prompted to set full control etc and apply.  I then set the drive back from U:\ to H:\, again i am prompted for setting full control which i accept.  
    NOW when i login i no longer receive a Z:\ drive and only get an H:\ drive.  YAY, thats what i want, however, i do not understand why this is the case.  At first i thought it might be something in the active directory logic when i login to an XP
    machine and then login to a windows 7 machine.  IF you bear in mind that although i get a new profile in Windows 7 i still retain the same home folder setting.  However, after logging on an XP machine logging off then logging
    on a Windows 7 machine i still didn't get the Z:\ drive back. 
    I have tried creating a new user that ONLY receives our Windows 7 Group Policies and still they receive both an H:\ and a Z:\ drive which rules out the Windows XP policies conflicting with the Windows 7 policies.
    Does anyone have any ideas why i would get a second drive mapped to Z:\ logging into Windows 7 on a Windows Server 2003 domain? 
    Can anyone explain in more detail exactly how the Active Directory functionality works when you specify a connect to Drive letter for a users home folder?
    My current workaround is simply to add a net use command to remove the Z:\ drive.  I do not want to use Mapped Network drives using the new policy settings in Windows 7 RSAT because we have already found issues with it. 
    <input id="3daf20bf-4f4d-4a05-86da-2c30c205d580_attachments" type="hidden" />

    We had the exact same issue happen to us. No issue on Windows XP but Windows 7 mapped two home drives (F and Z). F was mapped during the login script and Z was being mapped by some unknown reason.
    We use Netapp for our storage and home drives and use a feature called CIFS Home Drive Mapping. This essentially maps a user to a folder not available through normal CIFS methods causing AD to error when setting the home drive. To get around this we use
    dsquery and dsmod to modify this attribute in the user account. This is the command we used...
    dsquery user -name %UserNameX% | dsmod user -hmdrv F -hmdir \\filer\$username$
    Notice there is no ":" after the F
    We determined the root causewas the value for the
    homeDrive attributefor the user account was set to "F" instead of "F:"
    When we updated our users to reference "F:" instead of "F" in their user, this problem was resolved.
    Use LDP or some other method to verify that the homeDrive attribute is set to "F:" (or any other letter) or you will have this issue.

  • How to read instrument driver dll files

    Hello,
    How to read .dll files of an instrument driver? What is the programming methodology followed in dll files? I will be grtaeful to you if someone can point me a way to do this.
    Thanks,
    Ananda H S

    If you can get your hands on the driver dll sdk or source code, you can use Tools --> Import --> Shared Library (.dll)... and use the wizard to easily generate the code you need to implement it.
    Bill
    (Mid-Level minion.)
    My support system ensures that I don't look totally incompetent.
    Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.

  • How do i get input from the user?

    For example if i wanted to ask "Whats your favorite number" and then get the input from the user and assign it to a variable how would i go about doing that?

    hi,
    if you want to get input from your console your should work with io(input and output).The BufferedReader class, InputStreamReader class
    you should import "java.io.BufferedReader" and "java.io.InputStreamReader" package, and do something like this:
    BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
    String favoriteNumber;
    System.out.println("Whats your favorite number ");
    favoriteNumber = input.readLine();
    System.out.println ("Your favorite Number Is " + favoriteNumber);
    if its a gui you should import "javax.swing.JOptionPane" and do the following
    String favoriteNumber = JOptionPane.showInputDialog(null, "Enter your favorite Number", "Favorite Number", JOptionPane.INFORMATION_MESSAGE);
    anjiie([email protected]).

  • How to get a formula from the user from a text box in a webpage

    Hi. I would like to know how to get the formula from the user who enters in a textbox. This formula can have any number of variables starting with a and goes on.
    The complexity of the formula can go upto sin, cos, ln, exp. Also user enters the minimum and maximum values of these variables. Based on a specific algorithm (which I use) I would calculate a *set of values, say 10, for each of these variables, substitute in the formula and based on the result of this formula, I select ONE suitable  value for each of the variables.
    I don't know how to get this formula (which most likely to be different each time) and substitute the values *which I found earlier.
    Kindly help me out in this issue.
    Thanks

    The textbox is the easy part. It's no different than getting a String parameter out of an HTTP request.
    The hard part is parsing the String into a "formula" for evaluation. You'll have to write a parser or find one.
    Google for "Java math expression parser" and see what you get.
    Or write your own with JavaCC.
    %

  • How to clear text fields when the user navigates back to the screen

    Hi,
    Does anyone have any idea on how to clear the text input fields and dropdown boxes when the user navigates back to the screen, say for e.g. create screen?
    My issue is that i have plenty of fields in the create screen within a form. Is there a way to avoid programaticaly blanking out every field and just do it at the form level using an api to reset to a state before the user entry?
    Thanks

    This code allows you to make it more generic, and you would need to tweak it if there are more than TextInput controls, but it should provide some ideas.
    As far as using states, you could use SetProperty to set the text to empty, but that might be messier.
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:Script>
        <![CDATA[
          import mx.containers.FormItem;
          import mx.controls.TextInput;
          import mx.events.IndexChangedEvent;
          import mx.core.Container;
          private function clearSreen(evt:IndexChangedEvent):void{
            var view:Container = tn.selectedChild as Container;
            for each(var child:Object in view.getChildren()){
              if(child is FormItem){
                var subchild:DisplayObject = child.getChildAt(0);
                if(subchild is TextInput){
                  TextInput(subchild).text = "";
        ]]>
      </mx:Script>
      <mx:TabNavigator id="tn" resizeToContent="true"
        change="clearSreen(event)">
        <mx:Form id="frm1" label="View Number One">
          <mx:FormItem label="First name:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="Last name:">
            <mx:TextInput/>
          </mx:FormItem>
        </mx:Form>
        <mx:Form id="frm2" label="View Number Two">
          <mx:FormItem label="Address1:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="Address2:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="City:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="State:">
            <mx:TextInput/>
          </mx:FormItem>
          <mx:FormItem label="Zip code:">
            <mx:TextInput/>
          </mx:FormItem>
        </mx:Form>
      </mx:TabNavigator>
    </mx:Application>
    If this post answers your question or helps, please mark it as such. Thanks!
    http://www.stardustsystems.com
    Adobe Flex Development and Support Services

Maybe you are looking for