Why does this keep duplicating values?

Hi, I have this sub vi that reads opc values(addresses) from a server across a local network. It uses a data socket read within a for loop to pass these values into an array. The problem i have is every so often it duplicates the same value rather than just reading the exact address in the opc array.
e.g.
123      123
103      103
110      103
121      110
Which may values that i save in a spread sheet out of sequence. Anyone knows whats wrong here?
Stuart
Attachments:
RandD Cell room Software Project.llb ‏415 KB

Your code has a lot of issues.
First do a block diagram cleanup, you have a lot of wires with unnecessary bends and sections of code scattered all over the place.
Why do you have 13? stop buttons.  Then proceed to crash your code by wiring the real Stop button to a Stop LabVIEW stop sign?  That is like hitting the abort button on the toolbar.  Not a good way to stop a program.
I think you are seeing the effects of a race condition caused by the use of local variables.  You are writing to an indicator on one loop and reading from its local variable in another loop.  Depending on where each independent parallel loop is in its execution, you could read duplicate values (i.e., the indicator was not updated in between), or miss a value (indicator updated twice without being read.)  You should be using a producer/consumer architecture with queues to pass data if you want to avoid this problem.
I would suggest spending more time on the forums reading up on race conditions, queues, and the LabVIEW style guide.
Message Edited by Ravens Fan on 01-28-2010 11:24 AM

Similar Messages

  • HT201209 iTunes will not use the redeemed gift cards on my account, I have a $30 credit and when I try to purchase a song it goes right to my credit card on file. Why does this keep happening

    iTunes will not use the redeemed gift cards on my account, I have a $30 credit and when I try to purchase a song it goes right to my credit card on file. Why does this keep happening???

    Any time you've changed anything in your billing, it does this once to very things.

  • HP Photosmart C8180 Printer! WHY does this keep happening every day??

    I have only had this for 3 months and it already has problems.
    It keeps telling me its out of paper when it is not.
    i always have at least 20 sheets in there!
    You can hear the rollers going but it can't pick up the paper and I only use high quality A4 paper in there.
    i then have to pull the tray out and push it back in, and yes i have the paper inserted in there correctly
    also, sometimes when i get this "out of paper" message, i ignore it and just press OK and it works fine 
    why does this keep happening?
    this is disgusting coming from a Quality brand like HP
    think its time to go to BBC Watchdog! 
    A printer is an item meant to print. 
    It is generally helpful if a printer recognizes such out-of-the-ordinary, eccentric, unheard-of media such as...oh, I dunno, 8.5 x 11-inch PAPER?????
    It claims repeatedly to have run out of paper. No paper. No paper. Insert paper into paper tray. Now, granted, the minimalist quality of the paper tray--it holds 20 pages, roughly--might convince you that I had indeed used up all my paper; this is not the case. 18 of the 20 sheets are still there. So I readjust that paper, close the tray. It starts to pull in a piece of paper, and then there is the giant crunchy noise of a paper jam in progress. And forget about “easy access” for removing them, either.
    In the months I have had this printer, I don’t believe it has EVER allowed me to print five pages consecutively without some sort of problem.  To me, this is known as an EPIC FAIL. 
    Message Edited by Waynester on 04-16-2009 04:09 PM

    So how is the printer set up?  Is it wireless or USB?  If USB you will need a cable, purchased seperately.  It is a standard A/B USB cable widely available inexpensively.  (The $1 cables form the dollar store work fine....
    Running the diagnostics at http://www.hp.com/go/tools may help resolve the issue.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • My firefox Freezes randomly! I'll be working on the website for 2, 5 or 15 minutes. Then i'll click in the page to get to the next page, and it will just freeze! I already tried removing the "preloading" feature, so why does this keep happening?

    My firefox Freezes randomly! I'll be working on the website for 15 minutes, (google places, yahoo mail). Then i'll click in the page to get to the next page, and it will just freeze! I already tried removing the "preloading" feature, so why doesn't this keep happening?
    My firefox at home, (version 3) does not have this happen! I'm afraid of upgrading to version 3 because of all these problems. I use FireFox for work so i really need it and I'm wasting crucial time restarting websites and updating my websites/blog/business listings from scratch. not right!
    I also notice it happens a lot to Harley Davidson website.

    freezing at regular intervals:
    :http://blog.bonardo.net/2011/09/30/is-your-firefor-freezing-at-regular-intervals
    : https://addons.mozilla.org/firefox/addon/places-maintenance/
    :<br>Install add-on, run at least the option mentioned in the article, I ran them all. When finished you can uninstall the extension, all without taking taking Firefox down, The extension is one of the new JetPack extensions. (Firefox 8 --Nov 8, 2011-- should not have this particular problem).

  • TS4148 My iphone 4 has been updated to the newest version, but i constantly tells me that there is no SIM card installed. why does this keep happening?

    I have restarted my phone numereous times (because there's nothing else you can do to an iPhone) and every time it turns back on it'll have bars for a little while and then say " No SIM installed"  or it'll go straight to "No SIM".  Why is this happeneing and how can i fix it?

    Sounds like your iPhone was hacked/modified/jailbroken to work
    with wireless carrier other than the one it was purchased from. The
    update has relocked it to the original carrier. Contact the original
    carrier to see if they offer unlocking and if you qualify - only the
    carrier to which the iPhone is locked can unlock it.
    What does it say when you look at Settings=>General=>Carrier?
    Be advised that the previous modifications to change from original carrier
    to your local Carrier may have rendered the software unable to be updated or
    officially unlocked.

  • Why does this keep stopping the iCloud Mail

    Why do I keep getting this message?
    A script on this page may be busy, or it may have stopped responding.
    You can stop the script now, or you can continue to see if the script will complete.
    Script: https://www.icloud.com/applications/mail/1T.111546/en-us/javascript-packed.js:19 8

    Hey There Ingridkoala,
    Did you have an earlier version of GarageBand and are updating to version 10.0.3?  Or did you already have version 10.0.3 and received an invitation to download additional content?  If it is the latter, you should be able to cancel the download of additional content and finish your current project first.
    Expanding GarageBand for Mac (v10.0) content with an in-app purchase - Apple Support
    http://support.apple.com/en-is/HT202873
    If you need the update before you can proceed with your project, I have a few suggestions that may help get this content to download.
    Connect to the internet via a wired ethernet cable instead of Wi-Fi for a faster connection.
    Turn the computer's sleep setting to never so that the download is not interrupted.  
    Disable or turn of any antivirus software if you have it, as these may stop the progress of the download.
    About Energy Saver sleep and idle modes in Mac OS X - Apple Support
    http://support.apple.com/en-is/HT201714
    Have a good weekend!
    - Judy

  • Song appear in iTunes, BUT not on my ipod Touch. Why does this keep happening?

    This is about the 4th time that i've had this issue. My songs/playlists appear in iTunes when I connect my iPod Touch, BUT the songs don't show on my iPod.
    Any suggestion on how to fix this or why it keeps happening?

    There's a special iTunes forum where you'd get a lot of readers who specialize in iTunes issues.

  • Everytime I click on the firefox icon on my desktop it keeps reinstalling Firefox... why does this keep on happening? what did I do wrong?

    I have a yahoo_firefox icon on my desk top. When I click on it to go onto the internet it reinstalls firefox every single time first. What did i do wrong or what am I doing wrong? how can I fix this problem?

    In my opinion this icon what you mentioned is related to Firefox installer file.

  • Why does this keep popping up five tabs at a time: Index of file:///C:/Program Files/Mozilla Firefox/ - please note that I recently updated firefox and tried disabling plug-ins, etc. My virus software is up to date. Thanks.

    The page listed above pops up in a Firefox browser window with five tabs open usually when checking email but sometimes while surfing the net and repeatedly. Some include a 'problem loading page' notice with the following:
    Firefox can't find the server at www.xn---jca9qmb.com.
    or
    Firefox can't find the server at www.xn--dx%if-61a864d.com.
    These are the last two of the five tabs that pop up together.
    This has happened nine times in the past five to ten minutes.
    Since my Norton is up to date and I have recently updated Firefox and plug-ins, I assume this is a software problem however disabling plug-ins and other items has not solved the problem. Any help would be appreciated.

    Hi
    YES it does, HOWEVER in the past Most (not all) Beta auto updates did not trigger Comodo Firewall problem (BUT occasionally did) and I resolved the same way (namely uninstalling and installing a full install.
    I do not know if having Aurora AND BETA both installed causes any conflicts regarding this issue
    I am NOW going to uninstall Maintenance service, Beta and Aurora retaining only my add-on and preferences. I will delete all Comodo rules for them Then I will download an older update of both Beta and Aurora and see what happens
    Will report back in 30 mins

  • Whenever I click on a song in my itunes library an exclamation point appears and I am no longer able to play this song or video why does this keep happening and what can I do to fix it?

    Whenever I click on a song or video in my library and I try to play it, and exclamation point immediately pops up and it tells me that my song or video's origional file cannot be located. It has happened to over 100 of my songs and I would like to know what is happening and what I can do to fix it. Let me know. Thanks!

    The usual explanation for this is that:
    1. You have changed the iTunes preferences so that when importing a song the file is not copied into the iTunes media library - doing so is the default.
    2. You have subsequently moved the original file, which iTunes has been using to play your song, and so of course it's lost contact with it.
    If 1. is not the case, then the files in the iTunes Library (by default, in (user)/Music/iTunes/iTunes Music) may have been moved, deleted or become corrupted. You should check in that library, but don't start moving files in there about. If this is the case you should delete the songs in the iTunes Music list, not in the Finder, and re-import.

  • I keep on losing my tabs and i am getting seriously frustrating as i need them to open each and every time i open firefox 4, i have tabs mix plus. why does this keep on happening? please help as i am a student and i need help with this..

    i have now installed too many tabs 1.3.3 to see if that will fix problem.
    but yes each and every time i use firefox, not googlechrome, or ie or opera but only firefox 4 and having used tabs mix plus before i never had a problem.
    but now with firefox beta and now the full release, the issue is still arising. evrytime i open firefox i close my eyes and wait for it to load... and load... when it does open, i open my eyes and lo and behold my tabs are gone.
    thats it please help guys, i love firefox for many reasons i dont want to use opera.
    regards
    ehtisham

    '''[https://addons.mozilla.org/en-US/firefox/addon/adblock-plus/ Adblock Plus]''' {web link}
    Blocks annoying video ads on YouTube, Facebook ads, banners
    and much more. Adblock Plus blocks all annoying ads, and
    supports websites by not blocking unobtrusive ads by default (configurable).
    Sometimes a problem with Firefox may be a result of malware installed on your computer, that you may not be aware of.
    You can try these free programs to scan for malware, which work with your existing antivirus software:
    * [http://www.microsoft.com/security/scanner/default.aspx Microsoft Safety Scanner]
    * [http://www.malwarebytes.org/products/malwarebytes_free/ MalwareBytes' Anti-Malware]
    * [http://support.kaspersky.com/viruses/disinfection/5350 Anti-Rootkit Utility - TDSSKiller]
    * [http://general-changelog-team.fr/en/downloads/viewdownload/20-outils-de-xplode/2-adwcleaner AdwCleaner] (for more info, see this [http://www.bleepingcomputer.com/download/adwcleaner/ alternate AdwCleaner download page])
    * [http://www.surfright.nl/en/hitmanpro/ Hitman Pro]
    * [http://www.eset.com/us/online-scanner/ ESET Online Scanner]
    [http://windows.microsoft.com/MSE Microsoft Security Essentials] is a good permanent antivirus for Windows 7/Vista/XP if you don't already have one.
    Further information can be found in the [[Troubleshoot Firefox issues caused by malware]] article.
    Did this fix your problems? Please report back to us!

  • Why does this keep giving a parse error when trying to use JavaHelp

    I'm trying to get JavaHelp to integrate into my application, but when I call the code below I get the following error;
    javax.help.HelpSetException: Could not parse
    Got an IOException (null)
    Parsing failed for nullthe error is occuring at the line indicated;
         HelpSet helpSet;
         HelpBroker helpBroker;
         try
         URL url = new URL("file", "", -1, "file://C:/jh1.1.3/demos/hsjar/idehelp.jar");
         ClassLoader loader = new URLClassLoader(new URL[]{url});
         URL helpUrl = null;
         helpUrl = HelpSet.findHelpSet(loader, "IdeHelp.hs");
         helpSet = new HelpSet(loader, helpUrl);    // *** error here ***
         helpBroker = helpSet.createHelpBroker();
         helpBroker.enableHelpKey(rootPane, "top", helpSet);
         CSH.setHelpIDString(menuItem, "Help");
         helpBroker.enableHelpOnButton(menuItem, "Help", helpSet);
         catch (Exception ex)
         ex.printStackTrace();
         }helpURL never seems to take a value, always staying at null. Can anyone see what I'm doing wrong?
    Thanks

    Got it sorted. I had to create a CLASSPATH to the jar and then the hs reference worked fine. :D

  • Why does this keep happeni

    Long ago... like a couple months ago, my player used to start flashing once I turned it off. And sometimes my desktop wouldn't recognize it. I sent it in for a replacement and BAM I was happy. I treated it like gold. Pure gold.
    The other day I go to turn it on and, oh look, it freezes on the Creative logo. So, I perform a clean up and reboot it. Still froze. So I go one step further and format it. Still froze.
    I figure, let me email Customer Support and they are no help at all. Primarily because my initial warranty expired so now i have to pay for help.
    Now, not only does it freeze on the Creative logo, the trademark information is stuck there too, the lights (OLED, I believe) DO NOT turn on, and it is not recognized by my computer.
    Please tell me someone else had this problem and it was magically solved... I really do not want to end up having my mom regret buying me this $200 emotional mp3 player. =/

    Usually that error indicates a drive malfunction; specifically, the drive is spinning down and not responding to bus signals. Some "Eco" or "green" drives are known for this behavior. The following steps may help:
    From the menu bar, select
     ▹ System Preferences ▹ Energy Saver ▹ Power Adapter
    and uncheck the box labeled Put the hard disk(s) to sleep when possible, if it's checked.
    If the drive is connected to a hub, connect it to a built-in port on the computer.
    If a firmware update is available for the drive, apply it.
    Contact the drive manufacturer to see whether there's a firmware setting you can change.
    If you installed vendor software for the drive, uninstall it.
    If none of the above steps resolves the issue, try another drive.

  • I am constantly getting "page is not found." Why does this keep on happening? I have the most recent updates.

    I would estimate that this has started to happen about a month ago. I am getting "page is not found" on a multitude of sites. Some are from Yahoo, some from Facebook, and others are from various sites. It doesn't matter where the site is from- it happens to all of them. It is getting to be so annoying I am almost debating to go back to using Explorer, as much as I dislike that browser as well. Any help with this issue would be greatly appreciated.

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Why does this keep happening?

    I have currently downloaded Skype on my iPad, as I have no laptop which allows me to use it. I also have an iPhone which I have Skype downloaded onto for when I'm on the go. My problem now is that my contacts won't show online. I have the latest version of Skype and also the latest version of iOS. When I used the application yesterday they were showing up fine, but I have logged in today and their pictures won't show it is just a blank picture with a question mark and also some of them are appearing offline when they are online. Certain contacts are online with no picture and their username but not their actual name. I have checked on my phone and it shows they are online, but with no picture and their usernames only. I have tried logging out and logging back in, I have tried going offline and back online, I have uninstalled the app and reinstalled it, I have also deleted them and added them again but nothing has worked. When I message the offline contacts my messages aren't getting through. This has happened twice now and it's really starting to annoy me as I need to keep in contact with them over personal and important matters. Can somebody please fix this? It seems like nobody is bothering to update or fix the bugs on the iPad and iPhone apps lately.

    I thought I was the only one with this problem! With my first iPod it happened everytime it would recieve any sort of small bump or shake. I don't mean a drop, just a small tap. Sometimes it would lose info if I ran up or down the stairs and my (otherwise empty)jacket pocket would shake with it in there. Checked/unchecked all the tabs, reset it, updated it...nothing. The only thing that would work was to delete everything and reload it.
    After looking online and finding no help, finally took it back the the Apple store and after looking at it they just switched it out(with a refurb). Which kinda ****** me off cause basically in the end I basically paid full price for a refurbished ipod.
    Anyways my second ipod isnt as touchy but so far in the three weeks I've had it it's done it twice(the first week I didn't use it cause I was P.O'ed about getting a refurb considered trying to take back).Out of the blue this time, no outside source needed. If/when it happens again I'm just taking it back.
    If any of you iPod guru's out out there know of a (good,permanant)fix please post it! I'd rather not deal with the store.
    Just a note: Don't think I abuse the ipod at all. I'm actually rather anal about it. No drops, not a scratch on it.I probably treat it better than I treat my kids.
    Good luck Justin! You are not alone!!

Maybe you are looking for