Home Seek for Delicate Probe

Hello,
I have a LabVIEW v8.5 program (attached) for traversing an extremely delicate hot-wire anemometer probe towards an aluminium plate surface using a stepper motor which will exit its respective while loop based on either of the two following conditions being met; maximum voltage of current sample being greater than the target voltage (as proximity is reduced towards 0mm the voltage increases and reaches my targeted 'home' value) or the minimum voltage being less than 1V - this is just for safety because if the wire is switched off it will never reach its target voltage and, left unnoticed, would plunge to its demise into the plate.
All I have available to me is software timing (USB 6210 or 6009) so that's what I've used for the pulses along the step line.  Unfortunately though the program slows to a crawl after approximately 500 pulses and I was wondering if there were any suggestions as to how this could be avoided.  I can think of making the code more efficient by moving the (fixed) direction out of the loops or writing the 2nd phase of the for loop concurrently with the sampling but really what I want to get to the bottom of is why it's slowing down in its present form.
Any other suggestions would be appreciated, thanks.
LabVIEW 8.5 User.
Attachments:
Home_V3.vi ‏55 KB

Just glancing at the program, you have some serious arcitectural problems:
With every iteration of the while loop, you are configuring a new task, allocations a 1M buffer, read 100 samples, and stop the task, but never clear it. Similarly with the two digital tasks for every iteration of the inner FOR loop you are killing and recreating tasks. What is the point? That does not make sense. No wonder the code slows down after a while. You are creating a serious memory leak! Look at the memory use with the task manager. It increases linearly with time and you will run out eventually.
Solution: Typically you would create and configure each task once outside the loop and keep it active during the loop and clear it once the while loop stops.
Your also have a lot of duplicate and unecessary code. For example, the inner case structure the cases have identical code except for a boolean array diagram constant. Only the parts that differ belong inside a case structure! In this case you could do a "equal zero", build the result into an array, and feed it to the  DO if line 0 (no case needed! If you would use mode "digital bool 1 line 1 point", you would not even need to build an array).
Your writing off line 1 makes no sense. Since all you write is a FALSE, it makes no difference. Write it once at the start of the program and forget about it for the duration of the code. (If you would actually need line 1, you could create a single task for both lines and cut the code complexity by 50%).
Try to implement these changes and see if things improve.
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • My phone turns off and does not turn on, even i tries holding power button n home button for few min.... its shows nothing. i connect it to the computer n it doesnt show in itunes.  plz repl wats the prblm wid it

    my phone turns off and does not turn on, even i tries holding power button n home button for few min.... its shows nothing. i connect it to the computer n it doesnt show in itunes.  plz reply wats the prblm wid it

    Hi kamalkumar,
    I'm sorry to hear you are having issues with your iPhone. 
    The article below will provide some troubleshooting steps for this issue:
    iPhone: Hardware troubleshooting
    Will not turn on, will not turn on unless connected to power, or unexpected power off
    Verify that the Sleep/Wake button functions. If it does not function, inspect it for signs of damage. If the button is damaged or is not functioning when pressed, seek service.
    Check if a Liquid Contact Indicator (LCI) is activated or there are signs of corrosion. Learn about LCIs and corrosion.
    Connect the iPhone to the iPhone's USB power adapter and let it charge for at least ten minutes.
    After at least 15 minutes, if:
    The home screen appears: The iPhone should be working. Update to the latest version of iOS if necessary. Continue charging it until it is completely charged. Then unplug the phone from power. If it immediately turns off, seek service.
    The low-battery image appears, even after the phone has charged for at least 20 minutes: See "iPhone displays the low-battery image and is unresponsive" symptom in this article.
    Something other than the Home screen or Low Battery image appears, continue with this article for further troubleshooting steps.
    If the iPhone did not turn on, reset it while connected to the iPhone USB power adapter.
    If the display turns on, go to step 4.
    If the display remains black, go to next step.
    Connect the iPhone to a computer and open iTunes. If iTunes recognizes the iPhone and indicates that it is in recovery mode, attempt to restore the iPhone. If the iPhone doesn't appear in iTunes or if you have difficulties in restoring the iPhone, see this article for further assistance.
    If restoring the iPhone resolved the issue, go to step 4. If restoring the iPhone did not solve the issue, seek service.
    I hope this information helps ....
    Have a great day!
    - Judy

  • I'm seeking for a song in itunes. Somebody can help me?

    I'm seeking for a song in itunes. Somebody can help me?
    Name of the song: Wonderful winter day
    I think it was an itunes christmas Hit in 2010 or 2011 or 2012... I can't remember.
    I had been serching this song of a female singer for years but i can't find it.

    ''jayelbe [[#answer-670970|said]]''
    <blockquote>
    Hi FCAtrains,
    Firefox can open SVG graphics straight away - no plugins needed at all. Give it a try!
    It's best not to install plugins which are no longer supported. They can be a threat to your employer's network security.
    Have a go at opening some SVG graphics in Firefox and let us know if ypu need further help. :)
    Jayelbe
    </blockquote>
    Hi jayelbe,
    thanks for your idea but the environment I'm working in is designed to support IE and is optimized for the use of the Adobe feature. By using the IE the SVG graphics can be saved as *.svg in a dedicated folder but not so by using Firefox. The graphic window area shows no content. The file can not be downloaded.
    An additional issue is - may be - that I'm working on my home device with LINUX instead of Windows (where everything works).

  • I opened my iPod Touch up to fix my home button. When i closed it back up it had a white screen. I tried pressing lock and home button for 10 seconds and it worked but while i'm using it it goes white with lines on the screen. Help please

    I opened my iPod Touch up to fix my home button. When i closed it back up it had a white screen. I tried pressing lock and home button for 10 seconds and it worked but while i'm using it it goes white with lines on the screen. Help please. This has been happening for a while and i've tried everything but it doesn't work.

    Try:
    fix for Home button
    iPhone Home Button Not Working or Unresponsive? Try This Fix
    - If you have iOS 5 and later you can turn on Assistive Touch it add the Home and other buttons to the iPods screen. Settings>General>Accessibility>Assistive Touch
    - If not under warranty Apple will exchange your iPod for a refurbished one for:
    Apple - Support - iPod - Repair pricing
    You can do it an an Apple store by:
    Apple Retail Store - Genius Bar
    or sent it in to Apple. See:
    Apple - Support - iPod - Service FAQ
    - There are third-party places like the following that will repair the Home button. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens

  • I want to create home page for my application with short URL

    I want to create home page for my application with short URL
    as when I want user to use my application user must go to URL like this
    http://127.0.0.1:7101/My-Project/faces/app/empModule/allEmployees/viewMyEmployees.jspxI want the user to use short URL , How can I use shorter URL not all this one.
    I want shorter URL for my application not to write full path .
    thanks in advance.
    Edited by: user611775 on Oct 31, 2010 10:21 PM

    Well,
    it's up to you. The first part (Mcit-Project-ViewController-context-root) is the context root which you define in the view controller project. 'faces' is the name the servlet filter reacts on. You can't omit it but shorten it in web.xml. The rest is your directory structure. I'm not sure how to shorten this other as to move the jspx files back into the web root folder.
    By the way an ADF faces app never uses the .jspx at the end of the url. If you specify '.jspx', you only render the page but don't start the work flow.
    Timo

  • TS2972 I have finished home sharing for my macbook air and apple tv, now how to see my macbook air on the TV monitor?

    how to see my macbook air on the TV monitor after I finished home sharing for the system?

    Did you purchase your MacBook Air new?  Do you still have its box?  Locate its serial number and telephone Apple at the number shown at the bottom of this page (1-800-MY-APPLE if you're in the U.S.).  They can help you.

  • How to change the "home" computer for a iPod touch 3G (iOS 4.2.1) and an iPad 2(iOS5)? Music library has been already moved to iTunes on the new computer.

    I have a iPod Touch (3rd gen) that has not upgraded it's OS beyond iOS4.2.1 even if I have tried connecting it into iTiunes I have a iPad2 which has been recently upgraded to iOS5 . Both were connected to a laptop computer that my husband will take with him when he moves to a different city. I will most probably buy a second laptop sometime, but meanwhile I want to tether my iPod touch and iPad 2 to my desktop PC for now. Before I took the plunge, I had a few questions which I am hoping this forum will help me answer
    1. How to switch the Home PC for these devices? I have already transfered my Music library on to my Home PC and then downloaded and reorganised with iTunes. Since I am reorganising the library anyway I don't minding removing all my music from the iTouch and set it up from scratch for the music. However, I removed all musci from theiTouch, changed it to manual mode and connected it to the desktop- It's detecting it fine- but it still is not the home computer for the iTouch- everytime I try to put new music in it- it is deleting everything old- I can't see the same controls as I see from the laptop at all- how to rectify this? To I need to set this up as a new iPod (restore route)?
    on the touch I have very few apps and don't care about them. on the iPad I do have a couple of valuable apps that I want to hold on to- so have n't tinkered with it at all- what is the smoothest way for thsi transition? The iPad doesn't have any music on it at this time, but what to do if I want to transfer some?
    2. Is there a way I can store the organised iTunes info in any way- like I said I might buy a new laptop in a few months but do not want to reorganise my iTunes over agaoin- it' a fairly large collection most of which is n't purchased from the iTunes store.
    3. Why sin't my iTouch 3G upgrading- it's stuck on iOS4.2.1 but iTunes doesn't show any updates- even with chck updates button iTunes show that it is a current version.
    thanks for reading through and any help that I can get to sort this mess out.

    The recent release of iBooks 1.2.1 has corrected the problem of the missing Dutton edition of Winnie-the-Pooh. It may have been there with the previous install of iBooks but it would never display in the bookshelf. After updating iBooks to 1.2.1, the Dutton version (the one included with iBooks) suddenly appeared on the bookshelf. So it was a software glitch after all and not a fix Apple chose to document explicitly in the update.
    Message was edited by: Rick Lang

  • I cannot get to or use my home pc for a while and am staying with a friend for the foreseeable and am using their pc to write this. How do I access my itunes account on their pc. Thanks Karen

    I cannot get to or use my home pc for some time and am staying at a firends and using their pc to write this. I need to access my itunes account and music on their pc. How do I do this. Thanks

    An easy route would be to use the iTunes Match service such that all your Songs are available anywhere over the internet via iCloud.  Once complete you can create an account on your friends PC, download iTunes and sign-in to the iTunes Store with your Apple Id, start iTunes Match and it will provide access to all your Songs.
    Not quite so good, is simply to follow the steps on your friends PC as above, however, instead of iTunes Match simply access the 'purchased' songs area from the iTunes Store home page that will give you access to all your purchases without iTunes Match.
    IMPORTANT:  Apple only like to see a single Apple Id associated with one device - so if your friend already has an active Apple Id account on the PC, it would be wise to use an alternate machine.  Apple has a 90 day lock out associated with switching Apple Ids on a common device.

  • How do i turn on home sharing for my account?

    I am trying to use the apple tv remote app from my phone, but it indicates I must turn on my home sharing for my account, I dont know how to do this.

    Welcome to the Apple Community.
    You enable homesharing with in the remote app itself under settings.

  • Network Home Directories for all users

    Hi,
    I hope someone can shed some light on a possible issue.
    I work for a primary school in the UK.
    I have Tiger server 10.4.10 running as an Open Directory Master. I have a 1TB XRAID attached to this server where the Home Directories are hosted. I have been told that they are now slow at logging in (I am currently unwell at home so have not confirmed this yet).
    It used to be a magic triangle setup but found there were problems with the managed prefs for the clients not being obtained on startup and network logins not working.
    The DNS and DHCP comes from the AD still.
    The OD has been set up to have the same kerberos realm as that of the AD (is this wrong) as the users are in both AD and OD with same username and password.
    The users Home dirs for the OD are hosted as i say on the XRAID which has a striped array of 1TB so the HDD speed shouldn't be a problem.
    The server is now connected to a 1Gb switch as are the clients.
    I have added more ram to the Xserve (now running on 5GB RAM). I have read that an afp server needs a lot of ram to work effectively. Is this enough?
    I have not set up link aggregation yet.
    The total amount of users logging in at one time will be no more than 40 users at once as there are only 40 mac machines in the school.
    I hope you can help as i would like to have something to go back to school with to tackle this if it does turn out to be true.
    Any more info needed just ask.
    TIA

    Hi. Let me restate so I understand it right. You are using an XServe to host network home folders and also using Active Directory for authentication? I work at a primary school also and we have an XServe that has the users home folder on it, but we also connect to an AD server for authentication. We had some speed issue with logging in but as soon as we set up a time server to ensure that both the XServe and AD server had the same time the trouble was fixed. Hope this helps.

  • Shared home folder for OSX and Windows

    Hello,
    I am wondering if it is possible to have a shared home folder for Windows and OSX.
    We have an AD and ODS. Is this possible, if it is, using CIFS?
    Hope hearing from anyone
    Best Regards.

    hallo victor,
    thanks for your answer. unfortunately this does not solve my problem. my sap landscape is more complex.
    there are several sap installations in diverent windows domains and some are on as/400 (and there is another windows domain) all are in different networks and are protected by firewall. furthermore there is a rule (maybe some exceptions are allowed) that there must not be qntc connections over these firewalls.
    with a shared folder between a windows workstation in one network and an as/400 in another network it works fine. but as a mentioned first - there is the problem with the sapservice<sid> userid which is to long for as/400 environment. I think there must be a tricky solution (hope so).
    kind regards
    helmut

  • I have a new computer and I want to make it my home device for I tunes. I have home sharing, and all of the music and files are on the new computer. Now what do I do to make the new computer the home computer for Itunes?

    I have a new computer and I want to make it my home device for I tunes. I have home sharing, and all of the music and files are on the new computer. Now what do I do to make the new computer the home computer for Itunes?

    The computer (windows platform) where I initially began using Itunes has four other computers/devices that are shared with it. All four of the other computers show up in my account, and can be managed. Or I can remove them. But on the new computer that I want to be my base computer (home if you will). The computer I want it to replace, when ITunes is open, has a tool bar, with various functions. All of the other devices are linked to that computer in ITunes, under Home SHaring. The new computer, shows the downloads via Home Sharing, but it does not show/have any tool bar.
    I want to activate the new computer to be the computer via ITunes where all of the devices are linked to it as the base for ITunes. And, I don't know how to make that happen.
    I hope that makes sense.

  • How can I set the default home page for all new users in Firefox 4

    I'm trying to deploy FF 4.0rc1 in a corporate environment but I can't find a way to set the default home page or any other settings for that matter.
    Is there a way to set the default home page for all new users and lock it so that the users can't change home page?
    Best regards
    Jonas

    In Firefox 4 the template folder for new profiles (C:\Program Files\Mozilla Firefox\defaults\profile\
    ) doesn't exist. You can create that \defaults\profile\ folder and place a file user.js in it with the prefs that you want to initialize.
    See:
    *http://www-archive.mozilla.org/catalog/end-user/customizing/briefprefs.html
    You can also use a mozilla.cfg file to set the default value for prefs.<br />
    See: http://kb.mozillazine.org/Locking_preferences
    defaultPref(); // set new default value
    pref(); // set pref, but allow changes
    lockPref(); // lock pref, disallow changes

  • The home button for my ipod touch 4th generation does not respond all the time, What do I do?

    The home button for my ipod touch 4th generation does not respond all the time, What do I do?

    Try:
    http://snapguide.com/guides/calibrate-your-home-button/?utm_expid=69945963-15
    fix for Home button
    iPhone Home Button Not Working or Unresponsive? Try This Fix
    - If you have iOS 5 and later you can turn on Assistive Touch it add the Home and other buttons to the iPods screen. Settings>General>Accessibility>Assistive Touch
    - If not under warranty Apple will exchange your iPod for a refurbished one for:
    Apple - Support - iPod - Repair pricing
    You can do it an an Apple store by:
    Apple Retail Store - Genius Bar
    or sent it in to Apple. See:
    Apple - Support - iPod - Service FAQ
    - There are third-party places like the following that will repair the Home button. Google for more.
    iPhone Repair, Service & Parts: iPod Touch, iPad, MacBook Pro Screens

  • I 'think' my Ipod Touch is in recovery mode and people say to hold the power and home button for 10 sec and i did, but its still not turning back on. Plus its dead and wont charge

    I 'think' my Ipod Touch is in recovery mode and people say to hold the power and home button for 10 sec and i did, but its still not turning back on. Plus its dead and wont charge. PLZ HELP ME!!!!

    - If in recovery mode the screen will have an iTunes logo with an USB plug.
    - Have you tried connecting it to your computer for a n hw and then see if it appears in iTunes. If it does restore the iPod.
    - If screen is blank, try placing he iPod in recovery mode and then restoring. For recovery mode:
    iPhone and iPod touch: Unable to update or restore

Maybe you are looking for