Its working just fine but does it look good? Take a look and give me your advice!

I got to say that this is my first finnished labview program, and  it's working fine, almost no problems. But i'm not that shure about
this huge while loop with all its instructions. Normaly a while loop takes 1 ms to iterate once, but this loop takes more than one ms,
I'm using another subVI to catch data up to 5 ms. / sample as output from measurement device to  the while loop in this Sub vi, and then from this sub VI i'm initializing the data value read from the Measurement device, to a global variable that i read in this huge while loop.  I belive that the subVI while loop iterates several times before the huge loop iterates once. Meaby thats why my graphs for the data are plotting more than one data at a time.
Take a look and give your advice, it seems that all the measurements are well. And I don't really got problems with the program when running, exept from small delays when I switch the sample rates.
Regards
Zamzam 
HFZ
Attachments:
WhileLoop.JPG ‏354 KB

I agree with Titou.
Wow!  That's an eye-full. 
There are some functions like setting audio On / Off that may not need to be in there.  Or do they?  You'd have to describe what the loop is supposed to do.  Same comment for the indicator display settings on property nodes.  Do you intend to turn them on/off a number of times during an iteration of the loop?
You should "divide & conquer".  By that I mean, use sub-vi's that are function specific.  As mentionned by Titou, you should have a look at the development guidelines.   Basically, now that you have a working loop, you can improve it by creating some sub-vi's, revisit some items that may  not need to be in the loop.  As a matter of fact, you could create some control & indicators and maybe transform the loop into a sub-vi as well. 
There are many Case Statements that you could convert to sub-vi's and that way, you could eliminate the global variables by using indicators and wiring directly to them.
However, I would have to say that the value for "Write Flow Data" might become unpredictable due to race conditions.  Revisit how the value(s) are set for that one.
But it does look like you had some fun doing this one.  Which is the most important thing.  To have fun implementing solutions with LV.
Happy wiring!
JLV

Similar Messages

  • My wireless earbuds work just fine, but some third-party apps play audio only through the iPod speaker even though the buds are properly connected.

    My wireless earbuds work just fine, but some third-party apps play audio only through the iPod and iPhone speaker even though the buds are properly connected. Does anyone know why and is there a solution?

    Assuming you are using Bluetooth headphones, do the apps have the option to use Bluetooth?
    The app should have an option to select the speaker (or wired earphones) or the Bluetooth headphones.
    You can also try:
    iOS: Troubleshooting applications purchased from the App Store
    Contact the developer/go to their support site if only one app.
    Restore from backup. See:
    iOS: How to back up              
    Restore to factory settings/new iPod

  • Hi, I m using an iPhone 4 and my yahoo push email was working just fine but for the last few days I am experiencing some problem that is the emails are not getting pushed , I have to manually fetch the mails. So what could be the reason for this....

    Hi, I m using an iPhone 4 and my yahoo push email was working just fine but for the last few days I am experiencing some problem that is the emails are not getting pushed , I have to manually fetch the mails. So what could be the reason for this.....I have set the email setting to "push" mode. Moreover I can't edit the mail server address ....current it's on Yahoo SMTP server

    Will it get rectified and restored...if so after how long. What could be the reason for such outage kindly share,  as I am facing real problem because of this...

  • I have reinstalled Acrobat Pro 9 following a hard drive re format. It opens just fine but does not recognize my serial number. My computer is running Windows 7 64 bit

    I have reinstalled Acrobat Pro 9 following a hard drive re format. It opens just fine but does not recognize my serial number. My computer is running Windows 7 64 bit

    Hi 12msonti,
    Please try the following:
    Delete the Adobe PCD folder and caps.db file:
    Windows:  \Program Files\Common Files\Adobe\Adobe PCD
                        \Program Files\Common Files\Adobe\caps\caps.db
    Launch Acrobat and enter the serial number and check.
    Regards,
    Rave

  • HT5012 I had my iPad replaced this past Thursday and it is working just fine but my Bluetooth keyboard is not now working.  I need to know what I need to do to get it to work.  Thanks, Joyce Lenzo

    I had.my iPad replace this past Thursday at the Apple store under warranty and it is working just fine but the Bluetooth separate keyboard is not working.  Thanks, Joyce Lenzo

    Maybe:
    Wireless input devices: Bluetooth frequently asked questions

  • Hi my ipod was working perfectly fine but i turned it on the net day and i was stuck in recovery mode ans my computer  keeps on saying one of the usb devies attached to this computer has malfunctioned and window dose not recognize

    hi my ipod was working perfectly fine but i turned it on the net day and i was stuck in recovery mode ans my computer  keeps on saying one of the usb devies attached to this computer has malfunctioned and window dose not recognize

    https://discussions.apple.com/message/23791369#23791369
    https://discussions.apple.com/thread/5325044?tstart=0
    more
    https://www.google.dk/search?q=restore+iphone+error+29&oq=restore+iphone+error+2 9&aqs=chrome..69i57j0l5.4603j0j7&sourceid=chrome&espv=210&es_sm=93&ie=UTF-8

  • HT201359 I purchased a audio book to listen to on my commute to work. It only works over wifi, that does me no good in the car and the book is hours long for audio. That will eat up my data. How can I get a refund?

    I purchased a audio book to listen to on my commute to work. It only works over wifi, that does me no good in the car and the book is hours long for audio. That will eat up my data. How can I get a refund?

    How are you trying to listen to it ? You shouldn't need to be online to listen to it, I don't for any of mine. If you've downloaded it directly on your iPad (or synced it from your computer) then it should be in the Music app (you will get an Audiobooks option under the More button in the Music app when you have audiobooks on it) - is that where you are trying to listen to it ?

  • Firefox closed and now it says that I get a connection error. IE and AOL work just fine but I use my Firefox won't connect

    I use Firefox for going online all the time. Now, suddenly, when I try to connect it says the server can't be found. Internet Explorer and AOL are working just fine. However, I don't want to use them.

    How do you fix this?

  • My modem works just fine, but my airport extreme refuses to connect to the internet.  I even reset it more than once, changed the DNS servers and still nothing.  Help

    Ok so recently we were having problems with our phone.  We had to disconnect our modem in order to fix the phone lines and when that happened, our airpot extreme disconnected itself from the internet.  No matter what I did i could not get it to connect back.  I would power down the modem, I would reset the AE and nothing would happen.
    I tried changing the DNS server and nothing happened.  I always get the same messages in the airport utility app: No internet connection and no DNS server
    Nothing I seem to do works.  I do know for a fact though, that the problem is not the modem.  I have connected it through ethernet to other devices and the internet has worked just fine. 
    Please please please if anybody sees this help me out!!

    Since you feel good about having internet access up to your Airport, I would suggest as a next step checking your Airport's status light to see if it is giving any clues as to what may be going on. Below is some info on what the light can indicate
    AirPort Express Status light sequences and what they indicate.
    No light (Off) - AirPort Express is unplugged
    Solid green - AirPort Express is on and working properly.
    Flashing amber - AirPort Express is not set up or cannot establish a connection to the network or
    the Internet. Use AirPort Utility to find out the cause. See “If Your AirPort Express
    Status Light Flashes Amber” on page 20.
    Solid amber - AirPort Express is starting up.
    Flashing amber and green - There may be a problem starting up. AirPort Express will restart

  • IPad not loading all the way,esp.on FB ,on wireless,it's working just fine but this

    I 'm having a problem trying to load all my pages on Facebook,......iPad loads maybe one full screen here and then won't go any further. Even the loading circle ....lefthand top.....won't go round? I'm getting my emails in just fine ,it's just a few sites .......news.com.au loads okay and I can 'turn'over to the next screen etc but the  minute I get on Facebook, this darned  pad has a 'brain lock!'
    My big PC is working okay ,can get everywhere on Facebook but not my iPad?
    Wireless is connected too so what can be wrong? Only had this for 8 months ,not an old pad by any means. It's been like this for about 24 hours now .when I hit a page link ,it just sits and looks at me:) No loading circle or anything!
    Appreciate some suggestions,please?
    I live in West Oz.
    Louise

    By the way,I use Safari to surf internet.
    Louise

  • P45 Platinum - Vista works just fine, but unable to get into BIOS

    This is my first build, so I'm still learning a lot. Be kind!
    I'm using the P45 Platinum with an Intel Core 2 Duo 3.0ghz Wolfdale cpu, 2 2gb sticks 1066mhz G-Skill ram, a Corsair 750w PSU, EVGA Nvidia 8800GTS video card, a 74gb WD Raptor HDD and a 250gb WD Caviar HDD (both SATA). I'm currently running 32bit Vista until 64bit has more support.
    I have never been able to access the BIOS - before Vista was installed the splash screen was too fast so I kept missing my oppurtunity to enter BIOS, so I went ahead and put in the Vista install DVD. It installed just fine - it doesn't see my second HDD, but I expected that due to it being SATA.
    I want to enter the BIOS to disable the audio so I can download the new Realtek audio drivers (I have no sound, even after installing the driver off the CD), but when I start up the computer and hit DEL (when prompted), it takes me to the Windows Boot Manager. Several times I have repeated the process and every time it takes me to the boot manager instead of the BIOS. The BIOS is obviously working, I just can't access it.
    Any help is appreciated.

    Quote
    I have never been able to access the BIOS - before Vista was installed the splash screen was too fast so I kept missing my oppurtunity to enter BIOS
    Simply keep hitting  >DEL< as soon as the Splash screen appears.  If that doesn't help, clear CMOS with main A/C power cable removed from PSU.  Upon restart the system should hold with a CMOS Checksum error and give you the chance to hit F1 to enter BIOS Setup.  Now you can load "Optimized Defaults" and disable the BOOT LOGO.

  • Battery works perfectly fine but does not charge!! (HP Probook 4530s)

    Hi
    This has been happening for the past couple of days or so. My laptop works perfectly fine on the battery but when I plug in the charger, it says "Plugged in, charging" but the battery does NOT get charged. I ran HP Battery Check and got the following results in the charging and discharging situations:
    I will be very thankful for any help you can offer!

    Thank you for the reply Kalt. I have some questions:
    1. How do I perform a hard reset of the BIOS on this laptop?
    2. The battery does not even charge when the laptop is switched off. Which makes me think that it might not be a BIOS issue because when the laptop is off, the battery should charge on A/C power right?
    3. The battery charging LED does turn "orange" which means it is charging... but the battery doesn't get charged. Furthermore, until 2 days ago the battery was still lasting at least 2-3 hours on a full charge. Do you think that the issue is not with the battery but maybe the charging circuit in the motherboard has malfunctioned?
    I appreciate your help

  • My iPod was working just fine but all of a sudden it won't connect to iTunes?

    I've done everything I can think of! I system restored my computer, I reinstalled iTunes and even repaired it like two times, I've even installed an older version of iTunes. In the older version of iTunes it at least registers that I've connected my iPod to it... except it says "songs cannot be added to the iPod "%1$S" because all of its space has been reserved for data." And something about a FireWire and "You must connect using FireWire to restore the iPod ~^FILENAME"."
    I've even ran multiple diagnostics scans through iTunes on the connectivity issue and this is what I've gotten each time:
    Microsoft Windows 8 x64 Home Premium Edition (Build 9200)
    Hewlett-Packard HP 2000 Notebook PC
    iTunes 11.1.5.5
    QuickTime 7.7.4
    FairPlay 2.5.16
    Apple Application Support 3.0.1
    iPod Updater Library 11.1f5
    CD Driver 2.2.3.0
    CD Driver DLL 2.1.3.1
    Apple Mobile Device 7.1.1.3
    Apple Mobile Device Driver 1.64.0.0
    Bonjour 3.0.0.10 (333.10)
    Gracenote SDK 1.9.6.502
    Gracenote MusicID 1.9.6.115
    Gracenote Submit 1.9.6.143
    Gracenote DSP 1.9.6.45
    iTunes Serial Number 0080BBF80BE3----
    Current user is not an administrator.
    The current local date and time is 2014-04-22 16:40:52.
    iTunes is not running in safe mode.
    WebKit accelerated compositing is enabled.
    HDCP is supported.
    Core Media is supported.
    **** External Plug-ins Information ****
    No external plug-ins installed.
    **** Device Connectivity Tests ****
    iPodService 11.1.5.5 (x64) is currently running.
    iTunesHelper is currently not running.
    Apple Mobile Device service 3.3.0.0 is currently running.
    No Universal Serial Bus Controller found.
    No FireWire (IEEE 1394) Host Controller found.
    Most Recent Devices Not Currently Connected:
    iPod touch (4th generation) running firmware version 6.1.6
    Serial Number:          -----
    iPad (4th Generation) (Wi-Fi) running firmware version 7.1
    Serial Number: ----
    Can anyone help me out? I'm so frustrated with my iPod.
    To make it even better, my iPad won't even connect either.
    However my friend has the same computer and it will connect to hers just fine. (The iPad will at least)
    Thank you in advance for any and all help you can give me. ;~;

    See
    iOS: Device not recognized in iTunes for Windows
    - I would start with
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or              
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    However, after your remove the Apple software components also remove the iCloud Control Panel via Windows Programs and Features app in the Window Control Panel. Then reinstall all the Apple software components
    - Then do the other actions of:
    iOS: Device not recognized in iTunes for Windows
    paying special attention to item #5
    - New cable and different USB port
    - Run this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    Also see:
    iPod not recognised by windows iTunes
    Troubleshooting issues with iTunes for Windows updates
    - Try on another computer to help determine if computer or iPod problem

  • Why won't any of my search engines work? Typing a web address in works just fine but when searching through google, yahoo, bing, etc. it freezes up.

    When trying to use a search engine, it is constantly "thinking" and eventually times out. All search engine's are doing the same thing.

    Perform the suggestions mentioned in the following articles:
    * [https://support.mozilla.com/en-US/kb/Template:clearCookiesCache/ Clear Cookies & Cache]
    * [[How to clear the cache#w_clear-the-cache|Clear the Network Cache]]
    * [[Troubleshooting extensions and themes]]
    Check and tell if its working.

  • I did a Sony Vaio Care maintenance and now Explorer works find, Firefox won't open Gmail except in HTML and won't display features on Facebook or parts of webpages. Java is on. Flahs is OK. Explorer works just fine but Firefox will not.

    Gmail will not open except in HTML
    My homepage ButchNews.com will not display google ads, nor content from some widgets.
    Facebook messages will not open.
    But everything works fine in Explorer... except I hate Explorer.

    I was having this problem too and found an easy fix from another thread. Finally have my firefox back up and running!! See below:
    "Easy to fix. Clear your browser cache (Tools > Clear Recent History > select Cache, click Clear Now).
    That fixed it for me. I have to do it every time I run Vaio Care."

Maybe you are looking for