Using IEngine.UnloadAllModules to unload Labview

Hi,
I currently have a problem with a DLL I'm using.  The problem with the DLL is understood but as it is from a 3rd party vendor it can't be fixed.
The DLL is called from TestStand, via a labview VI.  If the DLL returns an error, it needs to unloaded from memory - either by closing Labview or by selecting "File->Unload All Modules".
I have included a ActiveX step in the cleanup of the sequence which will call Iengine.UnloadAllModules().  This appears to work for this case but is this safe, i.e. affect database/report generation or any other known issues?
I've attached example code, if it helps.
Message Edited by SandmanUK on 02-08-2006 02:34 PM
Charlie Rodway
Test Design Engineer
Rolls-Royce Controls and Data Services Ltd
Attachments:
unloadallmodules.zip ‏72 KB

Hi Jon,
Thanks for your help
Charlie Rodway
Test Design Engineer
Rolls-Royce Controls and Data Services Ltd

Similar Messages

  • I want to use Get Panel Image in Labview 5.0.1 and need details on how to save the BMP data generated

    I am trying to generate an application that saves a copy of its front panel on completion. This is easy to do using an invoke node with Print VI to HTML but this does not work in an .exe format. I have seen elsewhere that you have to use the Get Panel Image method, but no details are supplied in LV 5.0.1 documentation of how to use the "image" data (1-D Unsigned Byte array) that is generated. I want to save this in a format that can then be read as a bitmap in any standard graphics package. Any assistance?

    Hi,
    If you'd upgrade to LV5.1 or 6 you could use the 'standard' vi's for this.
    You need a VI called "Write BMP File.vi". It's not shipped with LV5.0.1.
    This vi only uses 3 subVI's, so perhaps someone at NI can convert it and
    send it to you (sorry, I won't, it's copywrited).
    If you cannot get this VI anywhere, you'll need to figure out the BMP file
    format yourself. It's not too complicated, but still could take some days.
    Perhaps someone figured it out before LV5.1 was released.
    Regards,
    Wiebe.
    "RDK" wrote in message
    news:[email protected]..
    > I want to use Get Panel Image in Labview 5.0.1 and need details on how
    > to save the BMP data generated
    >
    > I am trying to generate an application that saves a copy
    of its front
    > panel on completion. This is easy to do using an invoke node with
    > Print VI to HTML but this does not work in an .exe format. I have seen
    > elsewhere that you have to use the Get Panel Image method, but no
    > details are supplied in LV 5.0.1 documentation of how to use the
    > "image" data (1-D Unsigned Byte array) that is generated. I want to
    > save this in a format that can then be read as a bitmap in any
    > standard graphics package. Any assistance?

  • Issues when using a Pixelink camera with LabView 9.0

    In my lab, we have a program for video acquisition using LabView and the low level camera functions for Pixelink cameras.  We run into some problems trying to run this program and other demo gui programs that came with the Pixelink SDK.  In our data acquisition program, we have problems with our image coming out all scrambled.  We use the low level functions to obtain a frame from the camera in the from of a vector.  We then reshape the vector into an array and then send the array to a vi that turns it into an image.  When we try to view this image using the standard Labview image viewer, the image comes out all scrambled if the zoom factor is not set to .5 on the image viewer.  The full resolution of the image is supposed to be a 1024x1280 image which when we use the Capture OEM software for the camera provided by Pixelink we can see.  The image that we can see through LabView when we have the correct zoom factor seems to be only the top left quarter of what the entire image is supposed to be.  We also encounter strange problems when we attempt to use the demo programs for labview 8.6 that are provided with the SDK.  When trying to run the simpleGUI.vi, for example, the program connects to the camera just fine.  After you hit play to view an image, the problems start.  The program will play the video for a few seconds until it just freezes up and quits responding.  Labview must be exited and restarted in order for the camera to connect again.  I am not sure if it makes a difference that we are running labview 9.0 on our computers or not.  Any help you have on these issues would be of great help.  Attached are pictures of the scrambled/unscrambled image and of the part of our block diagram for camera control.
    Attachments:
    Incorrectimage.jpg ‏126 KB
    Errorexplanation.jpg ‏543 KB
    correct image.jpg ‏22 KB

    IMAQdx is the driver that National Instruments provides to interface Firewire, GigE and USB cameras (Directshow compliant USB).  This is a licensed driver, so if you don't currently have it, then testing in MAX is not an option. 
    So if I understand correctly, you have the Pixelink software which works fine, but you have Pixelink VI's that are used in LabVIEW, but those do not work correctly?  That to me seems like a driver issue, which I'm not sure how much I can help with since it is not our driver. 
    Do you know what dll's the Pixel link VIs are calling into?  Are they Pixelink dlls?  If so, I would suggest speaking with the manufacturer or perhaps on of our other users has worked with Pixelink before.
    Sorry I can't be much more helpful.
    Tejinder Gill
    National Instruments
    Applications Engineer
    Visit ni.com/gettingstarted for step-by-step help in setting up your system.

  • How to use a C# dll in Labview?

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

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

  • Using "getf" command in Scilab-LabVIEW Gateway

    I am having trouble using the "getf" command in the Scilab-LabVIEW Gateway.
    I would like to load an external Scilab function using the LabVIEW script
    node and perform an operation with it.
    In Scilab, the following code works correctly:
                                 scilab-4.1.1
                          Copyright (c) 1989-2007
                      Consortium Scilab (INRIA, ENPC)
        Startup execution:
          loading initial environment
        -->getf "C:/program files/scilab-4.1.1/macros/dec2bin.sci";
        -->dec2bin(10,4)
         ans  =
          1010
        -->    
    However, when I execute the same code in the Scilab-LabVIEW Gateway, I
    receive the error:
        Error 1048 occured at LabVIEW:  LabVIEW failed to get variable from
        script server. Server:"" in Untitled 1
        Possible Reason(s):
        LabVIEW:  LabVIEW failed to get variable from script server.
    Is it possible to use "getf" in the Scilab-LabVIEW Gateway?
    Thanks,
    Joe
    Attachments:
    scilab_terminal.JPG ‏29 KB
    labview_scilab_error.JPG ‏28 KB

    Hi,
    You may want to contact the persons responsible for creating the Scilab to LabVIEW Gateway.  I have seen this error with scripts usually when it is required to have user inputs and have the user interact with the program.  Sometimes fixing this problem is if you associate the variable being called to an input in LabVIEW.
    I hope this helps,
    Regards,
    Nadim
    Applications Engineering
    National Instruments

  • How to use a c file in LabVIEW

    Hi All,
    I have a c file which communicates through serial port and J1850 protocol. I want to use the C file in labview and do the communication through serial port.
    Can any one give me an idea how I have to use the c file in LabVIEW.
    Thank you.!
    ---------------- Be Good. Do Good. ---------------------

    Have you tried reading the LabVIEW Help or even searching this web site? This question has been asked MANY times. There's a section in the LabVIEW Help called "Calling Code Written in Text-Based Programming Languages." There are also several articles written on this. Here's just one: https://decibel.ni.com/content/docs/DOC-1690
    Please do the research and then come back with a more specific question.

  • How To Use Exported Function "CallInstrument" of LabView.exe ?

    Hello!
    I want to use the function "CallInstrument" to dynamically call VIs with LabView. Did anyone has experiences with this function?
    All I kow is following:
    The function is used by LabView Internals and its Runtime Library. Its exported by LabView.Exe and lvrt.dll.
    Its prototype is maybe:
    int CallInstrument(CPStr* VIPath, int controlcount, int indicatorcount, int options, [ Variable List of Control/Indicator Parameters ]... );
    ( CPStr Type is a StringArray of PStr (Short PascalStrings) as it is used by LabView to store Path datatypes. )
    I whould be glad, if anyone has information about this function.

    Dear Rolf Kalbermatter,
    Thirst, thanks a lot for your answer! -
    You sure right, It whould be much much more comfortable to use the VI Server.
    And you're also right... using a undocumented dll-function is absolutly no longtime solution.
    Currently I am using VI Server for my problem, but it doesn't fit my interesst so much.
    But I will explain, what I'm trying to do.
    I want to call a VI dynamically from LabView, giving Parameters to its Controls and receive Results from its Indicators.
    Realy no big job, but VI Server only let you do this that easy if you have a VI Typedef. otherwise... with untyped VIs, its not that simple. Ok.. its not impossible, you can use "GetAllControlValues" and "SetControlValue" (functions from VI server) and the call "RunVi". But this can get slow (>100ms per call :/ )
    I'm looking for a alternative function, which let me call a VI dynamically with userdefined Parameters. Maybe you know the ActiveX Interface IVirtualInstrument and its Function "Call2" - it is a nice example, what kind of function i want.
    But this function is not directly available by the VI Server--- i don't know for what reason.
    Then i tried to make use of "Call2" from within LabView, and it took me some time to find out the right Parametersyntax but finnaly i got it and it worked fine ... but it was no long time until problems occur. I cannot tell what really went wrong, but sometimes labview simply crashed or hang into a loop reseting some VIs. And its also impossible to stop a running vi, with has made a call to "Call2", if the call doesn't return by itself.
    Next step is/was trying to take advantage of CallInstrument. So, yesterday... after hours of analysing assemblercode, i finnally found out the correct use of LabView.exe->CallInstrument and i'm very impressed about its speed (0-15ms per call). The prototype seem to be the same as you explained in your reply int CallInstrument(Path path, Bool modal, int32 nInputs, int32 nOutputs, ...)
    But It has the same problem as its ActiveX derivat "Call2".. if you call an endless looping VI, LabView cannot stop your caller-vi. The other bad thing is, that this function is using dynamic paramterlist, which are placed directly onto the stack!
    That means that the paramter count on the stack is NOT FIXED (printf makes it the same). LabVIews DLL InvokeNode doesn't support this.
    At my current position, it looks like i have three possiblities but no one fits into my interesst.
    (continued with next answer)

  • Req any examples of high to use midi controller/keyboards with Labview TIA

    Req any examples of high to use midi controller/keyboards with Labview TIA

    [email protected];
    Check the following:
    Communicating with a Windows MIDI Device in LabVIEW
    Regards;
    Enrique
    www.vartortech.com

  • I want to use the sound card with LabView

    Hi. Who can help me, I want to use the sound card with LabView, I have found the function but I can't use it. Thanks.

    Christi,
    In LabVIEW 6.1 I found some examples they use those sound VIs. They are located in \examples\sound folder. Those examples should give you a good overview how to use the VIs.
    Hope this helps
    Roland

  • How to use postlv user event in labview

    Hi sir 
     I am sending data labwindow cvi dll call to labview,for that we need postlv user event.please any one knows to use postlv user evenet in labview.
    Below will  be the  structureand i need to update in labview .
    typedef struct
    unsigned
    uDSPIO,
    // uDAQMode,
    // bControllerActive,
    bShutDown,
    bPowerOn,
    bPowerHi,
    bPowerFault,
    bSGIdle,
    bSGHold,
    uBitsIn,
    uBitsOut,
    uCycleCount,
    uCycResidue,
    uBlockCount,
    uLogChannels,
    uCurrentMode,
    uAsigndPhysCh[LOG_CHANNELS];
    float
    fSetPoint,
    fDAQRate,
    fRange[LOG_CHANNELS],
    fReadout[LOG_CHANNELS],
    fMax[LOG_CHANNELS],
    fMin[LOG_CHANNELS];
    char
    sChID[LOG_CHANNELS][32],
    sChUnits[LOG_CHANNELS][16];
    CTRL_CHANNEL_STATUS;
    Attachments:
    GDSCallback.vi ‏12 KB

    AThe fixed size arrays in your structure are inlined byt the C compiler. This means they are not an array pointer (and definitely never a LabVIEW array handle) but rather LOG_CHANNELS amount of unsigned ints and floats directly embedded in the structure. In LabVIEW terms this is most easily represented as a cluster with LOG_CHANNELS elements inside the main cluster.
    So basically your uAsigndPhysCh needs to be a cluster with LOG_CHANNELS elements of unsigned ints and  fRange,  fReadout, fMax and fin are clusters with LOG_CHANNELS single precision float values, and then sChID is a cluster with 32 * LOG_CHANNELS chars and sChUnits one with 16 * LOG_CHANNELS chars.
    However I would personally rethink this strategy. This huge cluster monster is passed into PostLVUserEvent() each time and copied into the event data on every event, causing quite a bit of overhead that way. Is it really necessary to post all this data every time?
    Also you have commented out uDAQMode and bControllerActive in your C structure but included it in the LabVIEW cluster which will certainly throw off your data. Last but not least the b prefix would probably indicate that you are only using that element as a boolean value, so why not consider to use bit fields there? In LabVIEW you can easily seperate those bitfields by either translating the resulting uInt32 into a boolean array or even more efficiently use boolean logic to detect the bits.
    And in order to let LabVIEW react on a user event you have to create that user event with the correct datatype (your cluster monster) and then pass the user event refnum to your DLL. This DLL then calls PostLVUserEvent() with the user event refnum as first parameter and a pointer to a data structure that matches the LabVIEW user event datatype EXACTLY whenever it wants to post an event to LabVIEW. The user event is also registered in an event structure in LabVIEW which will then get triggered everytime your DLL posts an event by correctly calling PostLVUserEvent().
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Is it possible to use an IrDA protocol with LabVIEW 8.2.1 in DSP BlackFin?

    Dears,
         I'm building a project to communicate a DSP BlackFin 533 with a Palm E2 Tungsten between IrDA Protocol. The packaged LabVIEW installed in Palm allows to use IrDA protocol, but I don't know if the packaged for BlackFin DSP allows or not.
       Is it possible to use an IrDA protocol with LabVIEW 8.2.1 in DSP BlackFin?
    Regards,
    Renato - RPS

    OpPss ...
    Sorry !!!
    Attachments:
    IrSerial.zip ‏11 KB
    IrSerial1.zip ‏11 KB

  • How to use XVID MEPG4 DECODER in labview

    May i ask how to use Xvid MEPG4 Decoder to compress the AVI file. For this decoder have been installed in my computer but the VI(IMAQ AVI2 Get Codec Names)can not list this code name. So may i ask how can i use this decoder in the labview. For this decoder is relatively has good quality and also small size. Or what kind of other solution can be provieded for the relative small size of AVI file.
    Thanks
    Daniel

    I believe this was answered already in a different thread:  http://forums.ni.com/t5/LabVIEW/LabView-to-grab-and-save-video-to-mpeg/m-p/643864
    www.movimed.com - Custom Imaging Solutions

  • Using access with 64 bit labview

    Hello,
    I have 64 bit version of Labview, and I want to use an access database.  I used the internal search for examples, and it showed an example in examples/comm/access.llb.   Well, that does not exist with this install.  (I did a 32 bit install, and they exist.)
    Has anyone have success with 64 bit LV and access?   Any links to where to start...  Just need a nudge in the right direction.  
    -- brett

    Thanks for that suggestion Ian.
    I've looked through our documentation on 64-bit compatibility for LabVIEW and it looks like you are correct, that should not have installed. What I didn't realize was that the test machine I was using also had 32-bit labview, so the example finder located all of those examples.
    Is there any reason you cannot use the 32-bit version of LabVIEW? At the moment, that is the best option we have for internal compatibility, as most toolkits have not been ported to the 64-bit version of LabVIEW, even though they can run on a 64-bit operating system.
    Past that, I've taken a look at Ian's suggestion and it seems like a pretty solid thing to try, along with the API in the second post of that thread.. Let us know if it works for you.

  • Has anyone ever succeeded to use the scope_identity() from the LabVIEW DB toolkit ?

    Hi,
    Using LabVIEW 2014 DS, and MSSQL 2008R2.
    I have configured a table with identity, so the indexed will be incremented automatically.
    I am trying to get the ID of the last Insert command that I am using.
    I am trying to SELECT SCOPE_IDENTITY() but with no success.
    I read about trying to so it with a procedure or transaction, but I just could not succeed myself.
    Has anyone ever succeeded to use the scope_identity() from the LabVIEW DB toolkit ?
    If yes, can you please elaborate more or even share the code ?
    Thanks, 
    Amitai.

    Yes I have...let me dig out some code...
    I do my INSERT query (with a semicolon at the end) and in the same query string do a "SELECT SCOPE_IDENTITY() as inserted_id;" - essentially what you're doing here is running two queries in one - one to insert your data and the second to retrieve the ID. From what I remember of when I did this (last year?), I think scope_identity() is valid for the same connection so as you're doing both queries in the same connection it should always be valid.
    I then do this to get the ID (pardon the crappy VI snippet):
    Essentially I execute the query and the result is a 2D array that contains one row/column which is your last inserted ID.
    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

  • How can I use the CAN MODULE in LABVIEW 6i?

    How can I use the CAN MODULE in LABVIEW 6i?
    HELP ME! PLEASE

    Not sure what your real question here is, but I'll take a stab at it.
    The NI-CAN drivers (module) only work with the NI CAN cards. If you have a different vendors card, you'll have to contact them to see if they have LabVIEW drivers.
    If you do have a NI CAN card, then you just need to install the NI-CAN drivers and you're ready to go. Have a look at the examples for help in getting going.
    If you're having a specific problem, please give us some more details and we may be able to help out a bit more.
    Ed
    Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
    Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.

Maybe you are looking for

  • I have a MacBook Air and when I double click on gmail in my dock I can't open

    When I double click on gmail in my dock on my MacBook Air it doesn't open.

  • What's the easiest way to move app data and data structures to a server?

    Hi guys, I've been developing my app locally with Apex 4.2 and Oracle 11g XE on Windows 7. It's getting close to the time to move the app to an Oracle Apex server. I imagine Export/Import is the way to move the app. But what about the app tables and

  • Translation text query

    Hi, we have translated BEX into catalan. Analyze shows the whole text in this language except: Result, Overall Result, not assigned. And if you go to the menu appearing after pressing the right button in the mouse on the Key Figures you find as well:

  • Counting only some rows without where or subqueries?

    Is it possible with oracle to count only some of the rows? I mean without excluding the rows in where or using sub queries. This does not work but I think it illustrates what I want: SELECT count(flags), count(flags like '%P%'), count(flags like '%F%

  • Patch appearing offscreen

    I have a problem with the position of the patch tool clone appearing offscreen in Aperture 1.5. Try this: open a photo for editing in the viewer or full screen zoom to 100% (Z) and move to RHS of photo create a patch near the RHS border of the photo