LabView Application program crashses randomly

Hi,
I have developed an application for a monochromator system using LabView 2012 (32-bit version) as my programming language.
My application performs calibrated scan using the Calibrated Photodiode from 300 nm to 1100 nm and then perform Device Under Test (DUT) scan from 300nm to 1100nm at an interval for 5nm.
My application crashses randomly when inside a for loop that goes from 300 to 1100nm at an interval of 5nm, whether it is performing a Cal Scan or DUT scan.
The one thing that is consistent is that it crashes whenever LabView executes my supplier’s .NET DLL/ function call. Once the application program goes into the monochromator function call, it does not give LabView the control back. The application is stuck inside the function call.
On Good days I am able to scan up to 30 parts with no crashing, while some days it can barely scan 5 parts. It is very inconsistent.
I am not sure if anybody have seen any problems using dll to interface with Labview 2012.
I have attached an image of problem I am encountering, where the LabView application is stuck in the DLL and it does not give control back to LabView.
I would appreciate any assistance on this subject.
Thank you,
Nirav
Attachments:
Cal Scan LabView Stuck.jpg ‏390 KB

About the only thing I can determine from that jpeg is that you could benefit greatly from this and especially this.  Please upload the actual code, if possible, so we can help you decipher it.
thanks!
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.

Similar Messages

  • How To create a Buffer Application Program in LabVIEW?

    Dear all:
    Can someone advise me on how to implement a buffer application for LabVIEW.
    Basically I have 2 application programs than run continously in paralell.
    1) LabVIEW Data Logging & Plotting Program. It takes 90 ms to excute its code
    2) C++ Data Acquisition Program. It Samples the data from a Reflective Memory Card (on the PCI bus of my PC)
    at 1ms and creates a Buffer where it store one sample per channel every 1 ms.
    I know LabVIEW have the Code Interface Node to call a C program but since both (The LabVIEW and the C) are runing (one slower than the other) in Parallel I need to somehow interrupt the C program from LabVIEW and get from it the data that it as collected so far.
    Any suggestio
    n will be highly appreciated. I attach txt file with a little more description of the problem.
    Thank You very much.
    Felix Beltran
    ALSTOM Power Conversion.
    U.K
    Attachments:
    NI_SW_Buffer_Question1.txt ‏2 KB

    Hi Felix,
    The best architecture for this application would be to have the C++ program divided into two threads. One thread is continuously acquiring data and placing it in a queue. The other "handling" thread will read data from the queue and serve it up to your LabVIEW application.
    Much better than using the Code Interface Node, build the C++ application into a DLL. You can then call a function from your LabVIEW program to start the acquisition, and then calls to the handling thread function will return data to LabVIEW.
    I hope this helps.
    Regards,
    Phil R
    Applications Engineer
    National Instruments
    http://www.ni.com/support

  • Using a LabVIEW application as default program for opening files

    Google has returned nothing useful on this.  I want to use a built LabVIEW application to open data files from the Windows desktop. It is easy to edit the Windows registry to set the application as default program - but I'm not sure how to set the event in LabVIEW to open the file.  Any suggested reading?
    Solved!
    Go to Solution.

    I have done this before...I have a small LabVIEW .exe which looks at the version of a VI and selects the appropriate version of LabVIEW to open it with if available. It also adds explorer context menu items for allowing you pick a specific version of LabVIEW to open the file with.
    This is a rough idea of the registry keys for adding a program to handle specific file types and to add items to the shell menu in the installer:
    Add your own 'LabVIEWOpenWithVersion' key and then add the key name to the OpenWithProgids for the file extensions you want to be able to open with your application. The command part looks like this:
    Look at the Windows/MSDN help for what the different keys mean and how they are used, I think you can also set a key to make one of your handlers (e.g. Open, openWithLV) the default for the file type.
    For getting the file that was opened 'with' your application, use the App.Args property, ignoring the first item (which is always LabVIEW) in the array.
    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 do I embed bitmaps into a built (.exe) LabVIEW application?

    I am trying to embedd bitmap images (icons) into the exe file of a built LabVIEW application. I tried it, and got them in a "data" folder. I want everything in the .exe file, you know, just like C/C++ or just about any other programming language.
    If anyone has any tips, I would be grateful.
    I know about embedding the images in the controls, but that is not my goal. I need images as files to be embedded, somehow, into the .exe. The reason is I am using the picture control to read the images, but they are static once they are read. If it is possible for the picture controls to somehow retrieve the images from some other source, that would work also.
    Otherwise, if someone knows how to dynamicall
    y embed bitmap or other images into buttons in an array, that would be useful as well.
    Thanks

    > I am trying to embedd bitmap images (icons) into the exe file of a
    > built LabVIEW application. I tried it, and got them in a "data"
    > folder. I want everything in the .exe file, you know, just like C/C++
    > or just about any other programming language.
    >
    > If anyone has any tips, I would be grateful.
    >
    > I know about embedding the images in the controls, but that is not my
    > goal. I need images as files to be embedded, somehow, into the .exe.
    > The reason is I am using the picture control to read the images, but
    > they are static once they are read. If it is possible for the picture
    > controls to somehow retrieve the images from some other source, that
    > would work also.
    >
    > Otherwise, if someone knows how to dynamically embed bitmap or other
    > images i
    nto buttons in an array, that would be useful as well.
    >
    Actually, many C and C++ programs, like LV itself have folders of data
    that aren't linked into their code. But, if that is what you are
    looking for, one pretty easy way is to load the images into memory and
    place them into a 2D array of data, a string etc. Make an array of
    these and make the value default. At runtime, you can now skip the file
    I/O, or you can write the data to a temporary on launch and read them
    back whenever you like.
    Greg McKaskle

  • Passing strings to a LAbVIEW application from Visual-C++ using ActiveX

    Hello all,
    I have built a LabVIEW application with ActiveX server enabled. I can
    start the application, and can read and set simple control values like
    numerics.
    But now I want to pass (SetControlValue) strings and read (GetControlValue) strings from controls.
    After searching a whole day for examples or HowTos I found nothing. Can
    anyone give me tip where I can find something about that?
    Examples are also appreciated.
    Best regards
    Heinrich Eidloth

    The problem you are running into is that a BSTR is not a normal string (%s in the printf), but a wide character string (i.e., two bytes per character) string with the size stored in it. If the string contains ASCII characters, such as Hello World, then the one of the bytes per character is 0 (for example, 'H' would be 0x48 0x0).
    When printf sees this, it thinks that it is a normal, null terminated string of "H". That is what you are seeing. You might try the %S (capital S) since that tells it the string is a wide character string.
    Also note that BSTR's are part of the COM (Automation) system and so are don't freed with a delete or free() statement. Instead you need to release the memory with a SysFreeString() call.
    If you aren't very familiar with C/C++, then you've taken on an advanced topic on top of a complicated language. If you can, you might want to try using either VB6 or .NET (C# or VB.NET). Those languages handle all of this for you automatically and you don't have to worry about freeing the memory.
    If not, the book I started with to learn COM programming was this one (http://www.amazon.com/gp/product/1572313498/104-3574382-6511132?v=glance&n=283155&n=507846&s=books&v...).
    Brian Tyler
    http://detritus.blogs.com/lycangeek

  • Running labview application on windowsCE or WindowsXPe

    does anyone have experience of running labview application on windowsCE or windows xp embedded system? I would like to build an lv application which plays videos on a CE or XPe system. Any comments are welcome.
    thanks,
    joe

    I use the PDA Module for LabVIEW to run programs on Windows CE and Windows Mobile. You have to use a PC for the development and building of the application, then either use ActiveSync or copy the .exe over to the CE device. There are some limitations in the code and the user interface, but most things work fine.
    I haven't actually tried video yet on CE, perhaps that is something I can play with soon.
    Good luck!
    B-)

  • LabVIEW application as ActiveX server

    Hello all,
    is there a possibility to detect (within the LabVIEW application), if a LabVIEW application (enabled as ActiveX server) is called through ActiveX or called through shortcuts (desktop, program menu, ...).
    The background is, i want to do different things on startup depending on the kind of call.
    Thanks in advance
    Heinrich Eidloth

    Hello Heinrich,
    sorry, but the only thing I can tell you is, that there is no built in
    mechanism in LabVIEW for detecting how the application was called.
    If it is possible, than it would be somehow through Windows (WinAPI or
    COM?). So the question would be, does Windows provide a way to
    determine how an application was called. I hope you can get help from
    Microsoft with this issue.
    If you get a solution, it would be great if you could post it. This really is an interesting question.
    Good luck.
    D. Ackermann
    Applications Engineer
    National Instruments Germany

  • Memory requirement is continiously increased when i am running my application program in an infinite loop,after certain time it shows an error called low virtual memory

    memory requirement is continiously increased when i am running my application program in an infinite loop,after certain time it shows an error called low virtual memory

    What are you doing with your program. Lots of improper programming techniques can cause this - building arrays, concantanating strings, opening but not closing refrences, etc. Need more details or post your VI. Also, have you looked at "LabVIEW Performance and Memory Management"? It's part of the shipping documentation and available from Help>Search the LabVIEW Bookshelf.

  • LabVIEW Application Error: The instruction at address x referenced memory at address y. The memory could not be written.

    When trying to open LabVIEW, I get the following message, "LabVIEW Application Error: The instruction at address x referenced memory at address y. The memory could not be written."  I've disabled the startup services, clean boot or diagnostics startup, but I still get the message.  Any ideas as to why and how I fix it?  It seems to work fine on other machines.

    The standrd next step is to
    Start Control panels >>> add remove programs >>> NI ....
    Select the repair option then stand by to feed the disks.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Is it possible to hide the LabView Data folder through the labview application?

    I really want to get rid of the LabView Data folder in the My Documents Folder that is created when the built labview application is run. Since it does not seem to be possible to remove or relocate it, i was wondering whether it is possible to at least hide it - but I want it to be done automatically, i.e. through the program itself when it is executed.
    Thanks
    Tim, Van

    Hi,
    you cannot delete the "LabVIEW Data" Folder since your application is active!
    It's possible that you change the attribute (hide) for the whole folder before you start the compile process!
    If you want to do this automatically, you should ask microsoft which dll is relevant for this scope!
    regards,
    Thomas Sandrisser
    NI Germany
    http://www.newgistics.com

  • How can I get the measured data of a compiled LabView application via active X?

    I want use data measured by a compiled labview application in a visual basic program by the way of active x. i your knowledge base is only explained how to do this with a notcompiled vi
    or how to call a compiled vi but not how to get the properties.

    A. Rafiq's reply / answer is just exactly what I was looking for as well. I'm using it with VBA for an Excel application.
    Note that the differences between this and the "not compiled" VI is that the application is the compiled application name, versus LabVIEW.
    Additional information:
    Remember that when you build the application, it puts the VI(s) in a wrapper app, which requires the Run-Time Engine.
    In order to access the VI, you have to get a reference to it. Doing this starts the app.
    Now the VI's methods and properties are exposed.
    With the GetControlValue and SetControlValue
    methods of the VI you can access all of the controls on the front panel.
    Remember that the values returned from the GetControlValue method are of type Variant.
    If you find you h
    ave some trouble getting data in or out of your (LabVIEW) ActiveX server app, you can also easily write a VI to access the server.
    Remember that if you want to run these, the ActiveX server (LabVIEW) and the VB client app, on a remote machine you must:
    Install on the target machine the LabVIEW RTE (which you can include with Application Builder.
    Running the server app once on the remote machine before running the client is a way for the server app to register itself (at least in LV 5.1).

  • Stand alone labview application (.exe file) does not run properly

    Hi all,
    I am trying to make a stand alone labview application to run on another computer ( I have never done this before).
    I went through the tools->build application prompts and was able to build an exe file.
    the program is supposed to control a power meter and make power measurements then save them to a text file.
    When I run the exe file, on the same computer I compiled the exe file on, the program generates a text file to save data to but it can not communicate with the power meter.
    There are some sub-VIs and a dll file that are used to communicate with the power meter. Could it be that I am not telling labview to correctly
    include these files when I create an executable?
    What are some common problems that occur when generating stand alone applications that could be causing my issues?
    And does anyone know of any good tutorials on generating stand alone applications in labview other than the NI help files?
    Thanks for your help,
    Solved!
    Go to Solution.

    edCubed wrote:
    Hi Bill, thanks for your suggestions.
    I haven't tried to run this app on another computer yet. I'm just trying to run it on the computer it was developed on.
    The computer I developed it on has all the drivers/resources I need to control the power meter.
    Also, I don't know how to include the VISA runtime with my installer. could you explain how this is done?
    This is the first time IV tried to turn any labview programs into stand alone exe files so I don't anything about how to do it other than what I've seen in youtube videos and help files.
    If you know of any good tutorials that will help me figure this out I would appreciate it.
    Thanks,
    My fault - I didn't read that this was the same computer.  I know the very end of Core 3 studies shows how to build an executable and installer, but even that is very general.  I'm not sure if there exists a tutorial on how to do it.
    As for including the runtimes, when you build an installer, you have to include the runtimes that your executable will need.  It's fairly straightforward.
    Since it won't run on the machine that built it, I'll have to think about it a little bit...
    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.

  • LabVIEW application builder - Deep start menus

    Hi, is it possible using the labVIEW application builder to create start
    menu program groups that are more than one level deep, i.e.
    Start\Programs\My App\Tools

    Just for you to compare I have attached some screenshots of my setup. Maybe you find a difference.
    Attachments:
    App_Builder_Setup.gif ‏152 KB
    App_Builder_Menu_example.gif ‏83 KB

  • How does the Labview based program apply to computer which without Labview

    How does the Labview based program apply to computer which without Labview
    student number:1110340001

    SInce you list your "student number", you are probably using the student edition.
    You cannot build standalone executables with the student edition.
    You need LabVIEW professional. If you only have LabVIEW full, you need to purchase the application builder seperately.
    LabVIEW Champion . Do more with less code and in less time .

  • Are there requirements for deterministic data messaging for distributed LabVIEW applications across an Ethernet/IP network?

    Our company, RTI, just entered the Alliance program at NI recently. We are curious if power users of LabVIEW have requirements for running distributed, networked multiple LabVIEW applications in a real-time, deterministic manner? We are not attempting to make this a sales call, but if we should move forward with development of VI's that would allow distributed LabVIEW applications. We have already scoped out the effort but would desire guidance on VI layout, descriptions and ways to give a "LabVIEW" experience and not a disjointed VI that looks unprofessional. We are not sure if demand exists for this requirement. We would like to talk with
    and investigate what LabVIEW users want. We have attached a brochure on this real-time data messaging technology for your review. Maybe there is no need and we apologize for taking up NI Developer Zone bandwidth and your valuable time. We look forward to your responses.
    Attachments:
    NDDSProductBrief3-022.pdf ‏299 KB

    We are developing applications which have a distributed layout. E. g. we have 2 or more test places which have no user interface and 1 place where all configuration and monitoring and data storage takes place. We use TCP/IP for the inter computer communication. For this purpose we have developed a library which has a similar interface and usage as the queue VIs from LV 6.0.2. We support automatic reconnect on TCP/IP level and an acknowledged transfer so the application programmer can choose to do some temporary storage on the local machine if the server part is not running for sometime. We have not seen any market for that so we do not plan to sell it.
    From a lecture at the NI VIP days in Munich in 2001 personal from Siemens A&D stated to
    get a real time like behaviour over ethernet with TCP/IP you have to take care that the load will not exceed 30% of the bandwidth.
    For more information you can contact me at [email protected]
    Waldemar
    Waldemar
    Using 7.1.1, 8.5.1, 8.6.1, 2009 on XP and RT
    Don't forget to give Kudos to good answers and/or questions

Maybe you are looking for

  • Text truncation issue in custom table

    Hello Experts. We are uploading file from program and updating custom table including two fields where each one is 100 chars. Now when I am trying to upload with my user's id and end user's id then data is uploaded succesfully . But when end user try

  • Appropriate index for a query with 3 ands

    Hi, I have the following table: PAGES BOOK_ID DIMENSION BEGIN_POS END_POS PAGE_TEXT where book_id is 64-bits, dimension is 32-bits, begin_pos is 32-bits, end_pos is 32-bits, and page_text is a blob (UTF-8) My query is: select * from PAGES where BOOK_

  • Problem on DATEDIFF statement

    I'm trying to use a DATEDIFF statement so I only see data from the last 7 days How would I write that if I don't have a time stamp in a table to reference? If I could reference something I know I could do Where DATEDIFF (dd, example.tabletime, getdat

  • Cisco ISE - Not use FQDN in url-redirect parameter

    Hi, I am using Cisco ISE Central Web Authentication for Guest Wireless. Clients are redirected for web authentication to: https://ip:port/guestportal/gateway?sessionId=SessionIdValue&action=cwa as it is specified by the url-redirect parameter in the

  • Questions about DAO pattern

    Hi, I am a junior programmer and I am trying to understand somewhat more about best practices and design patterns. I am looking for more information regarding the DAO pattern, not the easy examples you find everywhere on the internet, but actual impl