Help with program flow and timing a loop please

I'm working on an application that will display vibration data on several tabs.  1 tab displays the time waveform, another a running RMS value, another an FFT etc.
On another tab I want the user to have the option of streaming the data to disk for 'x' number of seconds.
I created a sub-vi with a flat sequence structure.
The first frame open/creates a file.  The second frame gets the current time in seconds and adds 'x' seconds to it.  The third frame  contains a while loop with a "Get Current Time in Seconds" and a  "Write to Binary File" which executes while the current time is less than the "previous current time plus 'x'".
This sub-vi is in a while loop that is called when a "capture data" button is pressed.
My problem is that the rest of the program (waveform, RMS, FFT displays) stops executing when the while loop / sub-vi is executing.
This can be seen via the "TEST" indicator that doesn't update.
When the program flow goes back to the rest of the program I get an error 'cause the buffer has over-flown (ed)
I'm really new at this so any help is greatly appreciated.
I've attached images of the main vi (Project3.pdf) and the sub-vi containing the Flat Sequence (WriteToDisk.pdf)
I can attach the actual vis if it helps.
Thanks,
Erik
Attachments:
Project3.pdf ‏189 KB
WriteToDisk.pdf ‏85 KB

The behavior you're seeing is by design. There are two solutions to your problem:
Place the write to file in a separate loop that runs in parallel to your main loop. Thus, your "Project3" VI would have two loops. One is the data acquisition, the other is the streaming to file. You should not create data dependencies between the loops that would cause one loop to wait until the other is done. You want both running in parallel. You can stop both loops with the same stop button. With this method you can use local variables to get the Time Waveform data as you're doing now.
Launch the stream to file VI dynamically. This basically uses the VI Server to start a subVI and then immediately return to the caller. The subVI is then running on its own. There are examples that ship with LabVIEW that show you how to do this. You would have to have the subVI monitor something to determine if it should stop should the main program stop.
The first option would be the easiest to implement in your case. The second is more complex, but leaves you with one loop.

Similar Messages

  • Help with my ipod and USB!! PLEASE!!

    I have recently had to re-install a new ( genuine ) copy of Windows XP, and now my ipod is not being recognised by my USB ports, it states that no drivers have been installed, I have re-installed my installation disc and itunes 3 times now but still no luck!!
    I have also tested ALL of my USB ports with other devices and they work fine!
    Someone help me please!!
    Lee.

    Check these out:
    iPod Does Not Appear in My Computer
    iPod Appears in Windows but not in iTunes
    I hope this helps, post back!

  • Help with loggin in and out of internet please

    I have the 9360 and  use the internet and have set up my email account fine but for one annoying issue:
    The problem I have is that each and every time I move away from my home wifi, the device needs me to log into BTFon to use the internet away from home.
    At my parents' house they have wifi and I have put in their network key many times, yet the blcakberry doesnt even look for it it simply asks me to log into ruddy BTFon!!!
    When I am out and about, instead of it using Vodafone, it forces me to find a BT Hotspot and its' driving me MAD!!!!!!!
    When I return home, I actually  have to tell it to use my wifi as it still thinks I am logged into BTFon.
    I know its' my dull brain but can someone please point out which obvious things I've failed to do!?
    Thanks in advance

    Does the iOS device connect OK to other networks? If so that indicates a problem with your netwok
    Do other devices now connect OK?
    Did the iOS device connect OK before?
    Try the following to rule out a software problem:                 
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Power off and then back on your router
    .- Reset network settings: Settings>General>Reset>Reset Network Settings
    - iOS: Troubleshooting Wi-Fi networks and connections
    - iOS: Recommended settings for Wi-Fi routers and access points
    - Restore from backup. See:
    iOS: How to back up
    - Restore to factory settings/new iOS device.
    If still problem make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar

  • Need help with BCCode A and resulting unwarned restarts please.

    Problem Event Name:
    BlueScreen
      OS Version: 6.1.7601.2.1.0.256.1
      Locale ID: 1033
    BCCode: a
      BCP1: 0000000000000000
      BCP2: 0000000000000002
      BCP3: 0000000000000000
      BCP4: FFFFF800035F3477
      OS Version: 6_1_7601
      Service Pack: 1_0
      Product: 256_1
    I have already done a chkdsk and chkntfs. No issues were found during either of these processes.
    The OS will restart randomly, varying from just after entering the desktop environment to 15 minutes later. 
    Does anyone have any insight on how to fix this without doing a fresh install?

    PK
    BCC "A" is generally a driver problem read about it here  If you can boot the machine (even in safe mode)...
    We do need the actual log file (called a DMP file) as they contain the only record of the sequence of events leading up to the crash, what drivers were loaded, and what was responsible.  
    We prefer at least 2 DMP files to spot trends and confirm the cause.
    Please follow our instructions for finding and uploading the files we need to help you fix your computer. They can be found here
    If you have any questions about the procedure please ask
    If you are using Blue screen view, who crashed, or a similar application, don't.  They are wrong at least as often as they are correct
    Wanikiya and Dyami--Team Zigzag

  • Search help with programming

    Hai,
    Can any one give example for search help with Programming?
    I hope we can create search help with help of coding.
    With Regards,Jaheer.

    yes u can create search help by using match code in programs
    for eq
    go with abap editor se 38
    provide the name of program
    parameters : vendor like lfa1-lifnr matchcode object yzob.
    double click on yzob
    provide description for search help
    provide selection method
    provide search help parameter
    enable check box for import and export
    provide lpos
               spos
    save check activate
    press f4 for check and import values i.e it will display a records list available in database table
    rewards points please

  • Need help with Blog, Wiki and Gallery

    Hi Team,
    Need help with Blog, Wiki and Gallery startup. I have newly started visiting forums and quite interested to contribute towards these areas also.
    Please help.
    Thanks,
    Santosh Singh
    Santosh Singh

    Hello Santhosh,
    Blog is for Microsoft employees only. However, you can contribute towards WIKI and GALLERY using the below links.
    http://social.technet.microsoft.com/wiki/
    http://gallery.technet.microsoft.com/

  • What's the phone number I should call for help with my iPhone and ihome dock?

    What's the phone number I should call for help with my iPhone and ihome dock?

    http://www.ihomeaudio.com/support/

  • I switched to Apple Mail in the last two months.  When I attempt to print an email message, I get a blank piece of paper.  When I attempt to use the print options suggested in "Mail Help", the program crashes and has to be reopened.  Any ideas?

    I switched to Apple Mail in the last two months.  When I attempt to print an email message, I get a blank piece of paper.  When I attempt to use the print options suggested in "Mail Help", the program crashes and has to be reopened.  Any ideas?

    Which version of Mail are you using as well as which Snow Leopard version you are using? 

  • Help with photoshop quitting and AMD graphics

    help with photoshop quitting and AMD graphics
    im not a techy, but it appears i have to do someting with my amd graphics card - this might be why my software is crashing - ive no idea what to do though

    Hi Chris
    I have tried to go on the website, then i tried to download the automatic detect because i wasnt sure which driver i had or needed - but it has just downloaded a load of game software - which i dont want ( i dont think)
    i have find out my laptop has a amd radeon HD 8750M card, but i dont know what im doing! i would hate to mess my computer up as i am in thailand with no one to help me!
    its frustrating as i am paying for CC but cant use it!

  • I was gifted a app store 50$ gift card but it wont let me use it because I'm in the UK store. I can't change my location because of the credit card associated with the account and my phone number please help

    I can't change my location because of the credit card associated with the account and my phone number please help

    Gift cards are country specific.
    They can only be used inside the borders of the country of issue.

  • Need help with premiere pro cs6 having performance issues please help

    need help with premiere pro cs6 having performance issues please help

    Welcome to the forum.
    First thing that I would do would be to look at this Adobe KB Article to see if it helps.
    Next, I would try the tips in this ARTICLE.
    If that does not help, a Repair Install would definitely be in order.
    Good luck,
    Hunt

  • Hi there, I live in Canada and my parents live in India/Punjab...If I buy them an Ipad2 (from Canada) would we be able to facetime eachother when they are on a wifi in india with their Ipad2 and my iphone4?  Please advise about facetime in India :)

    Hi there, I live in Canada and my parents live in India/Punjab...If I buy them an Ipad2 (from Canada), would we be able to facetime eachother when they are on a wifi in india with their Ipad2 and my iphone4?  Please advise about facetime in India

    difinka wrote:
    Any1 out there have any suggestions for some1 who shares a Verizon account with a control freak future-ex  ...
    So I am stuck without a phone and I feel really vulnerable without it!
    I agree with jim, there's no need for all the details.  If the "future ex" is paying the bill, and his name is on the account, then legally, he calls the shots.  If you can't live with the terms, then give him back your phone and your son's, let him decide what to do with those lines.  And do as jim suggested - go get a basic prepaid phone that will keep you connected for minimal (affordable) cost.

  • Help with program! (Beginner)

    Here is what I'm trying to do:
    lo : Smallest. Write a program that allows a user to enter a series of positive integers with a -99 to signal the end of the series. The program should then display the smallest of the numbers in the series. Do not use a bogus value for the smallest to begin the program. Use the first value in the data list (if any) to initialize your smallest. This program must have only one programmer-defined method other than main which outputs user directions to the console about how the program works (and that -99 is to be used to end the input). Note that an empty list is possible and should not confuse your program! After displaying directions to the console, use GUI for the remaining input and output. Try out your program on the following lists:
    10, 3, 8, 2, -99 (lo = 2)
    -99 (ouput should be: "no numbers, no lo")
    4, 6, 1, 106, 22, -99 (lo = 1)
    So far, I've established that...
    loop, probably do/while
    get input from user, input
    if input != "-99",
    set list[i] (array) = input
    if input == "-99"
    set list[i] = input (makes it easy to terminate your loop through the array and to tell if it is otherwise emtpy)
    sort through array, comparing two elements of the array, keep lowest and compare to next available, till -99 found
    print as necessary
    - This is what my friend has told me so far, but I'm not sure what he means by 'set list[i] (array) = unput.
    Please help! Either respond here or my screen name (AIM) is Bionix12

    Here's what I've got so far:
    import javax.swing.JOptionPane;
    public class IO {
         public static void main(String[]args){
              String dataString =
              JOptionPane.showInputDialog(null,
              "Enter an int value",
              "IO",
              JOptionPane.QUESTION_MESSAGE);
              int data = Integer.parseInt(dataString);
              int min = data;          
              do {
                   dataString = JOptionPane.showInputDialog(null,
                   "Enter an int value: \n (the program exits if the input is -99)",
                   "IO",
                   JOptionPane.QUESTION_MESSAGE);
                   data = Integer.parseInt(dataString);
                        if (data != -99 && data > min){
                        min = data
              while (number != -99) {
                   JOptionPane.showMessageDialog(null,
                   "The min value is " + data,
                   "IO",
                   JOptionPane.INFORMATION_MESSAGE);
    }

  • Help with this vi and top level vi's

    Hi, need a bit of help with this vi below. It consists of field point inputs. And also consists of 2 while loops, the first while loop basically displays the raw data, the second loop eventually will display processed data, but this will only take place when told to start by the push button connected to the case loop. the problem is that when i start the second loop and then go to stop it it keeps on running even when the case loop is false, any help greatly appreciated(also had help with a labview engineer, but could not solve it).
    The other way about going around this is to separate the 2 loops into separate vis. Is it possible to use the first loop as the top level vi and if i press a button on the toplevel front
    panel vi, the front panel of the second loop program pops up. Any info on this greatly appreciated.
    Thanks Stuart
    Attachments:
    basicscat1configxy1.41_changed.vi ‏207 KB
    XY_Chart_Buffer.vi ‏54 KB

    I have created another update to your example showing how you can have the xy graph popup in another window. This time it is in a library as there are now 2 VIs. Again i cant test it as i dont have Fieldpoint, but *crosses fingers* it should work. Basically i have moved the inner while loop into it's own VI, linked it to the controls feeding it, and placed it into the main case structure. This subVI has also had it's properties changed so that it opens when called and closes afterwards, so you do not need to open it manually when you start.
    As to what i use for my interface, i guess you mean interface with instruments?...Well i use drivers. And if i dont have drivers, i write them. To be honest, i dont really know what Fieldpoint does, so mayb
    e you can enlighten me there..
    Good luck with the PhD Chemists..working in a university myself i have an idea what it must be like for you!
    Kim
    Attachments:
    Basicscat1configxy1.41.llb ‏133 KB

  • Need help with Airport Extreme and my new Verizon Fios Internet connection

    I just got the Fios install, and the tech and I couldn't figure out how to use my Airport Extreme as my wireless connection. I'm not real tech savvy (and I've only been a Mac guy for about 18 months). My current arrangement is the basic Verizon setup with the Airport out of the loop. How can I go about moving from here back to using my Airport Extreme? I need the range! Thanks in advance for your help.

    Have you tried resetting and reconfiguring the AirPort Extreme base station (AEBS)?
    Are you using OS 10.5 or OS 10.4 or earlier?
    Are you using the round 802.11b/g AEBS or the square 802.11b/g/n AEBS?
    If you are using OS10.5 OR the square 802.11b/g/n AEBS you should refer to "Designing AirPort Networks Using AirPort Utility" (direct PDF link).
    Otherwise you should refer to "Designing AirPort Extreme Networks" (direct PDF link).

Maybe you are looking for

  • Delta Process different for different fields in purchasing (2LIS_02*)

    Hi,   My second question for the day and its something that has been bothering me for some time now.  We use some of the PUR extractors to get PO information such as SCL line, ITEM, goods receipts etc. For the past few days I have noticing that some

  • Word and oracle reports

    I want to print a report along with a word document embedded in that. When i print the report and the embedded word document i am getting the print of oralce report and only one page of word document, rest part of the word document is not getting pri

  • Use of HP All-in-one C6280

    Hey @all I have a MacBook Air and I want to use my HP All-in-one C6280. I downloaded a software from the HP homepage, but It doesn't work. If someone have a software please help me. Thanks!! Stefanie

  • Insert hyperlinks in Forms 10g R2

    Hi to all, is it possible to implement weblinks on a canvas in Forms 10g R2 ? I searched for that in many forums and at Metalink but failed. Any help is appreciated. Regards Markus

  • Basic Database Queries

    Q .what is difference between database and database warehouse? Q. what is difference between postgres and postgres sql? Q. What are other databases and query language available ? Q. what is difference between sql, postgres sql, oracle, postgres, Mysq