Why the execution time increases with a while loop, but not with "Run continuously" ?

Hi all,
I have a serious time problem that I don't know how to solve because I don't know exactly where it comes from.
I command two RF switches via a DAQ card (NI USB-6008). Only one position at the same time can be selected on each switch. Basically, the VI created for this functionnality (by a co-worker) resets all the DAQ outputs, and then activates the desired ones. It has three inputs, two simp0le string controls, and an array of cluster, which contains the list of all the outputs and some informations to know what is connected (specific to my application).
I use this VI in a complex application, and I get some problems with the execution time, which increased each time I callled the VI, so I made a test VI (TimeTesting.vi) to figure out where the problem came from. In this special VI I record the execution time in a csv file to analyse then with excel.
After several tests, I found that if I run this test VI with the while loop, the execution time increases at each cycle, but if I remove the while loop and use the "Run continuously" funtionnality, the execution time remains the same. In my top level application I have while loops and events, and so the execution time increases too.
Could someone explain me why the execution time increases, and how can I avoid that? I attached my test VI and the necessary subVIs, as well as a picture of a graph which shows the execution time with a while loop and with the "run continuously".
Thanks a lot for your help!
Solved!
Go to Solution.
Attachments:
TimeTesting.zip ‏70 KB
Graph.PNG ‏20 KB

jul7290 wrote:
Thank you very much for your help! I added the "Clear task" vi and now it works properly.
If you are still using the RUn Continuously you should stop. That is meant strictly for debugging. In fact, I can't even tell you the last time I ever used it. If you want your code to repeat you should use loops and control the behavior of the code.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot

Similar Messages

  • Windows XP - ok with 4.6.21 but not with 4.7.25 (getting_started example)

    I'm new to this.
    I have installled BD 4.7.25 and 4.6.21 from the msi onto my Windows XP (SP3) m/c
    When I compile the simple examples 'getting_started_examples' they
    work with 4.6.21 but not with 4.7.25
    The error happens in 4.7.25 when the dbp->open() is called:
    /* Now open the database */
    ret = dbp->open(dbp, /* Pointer to the database */
              NULL, /* Txn pointer */
              file_name, /* File name */
              NULL, /* Logical db name */
              DB_BTREE, /* Database type (using btree) */
              open_flags, /* Open flags */
              0); /* File mode. Using defaults */
    The error message is:
    illegal flag specified to DB_ENV->set_encrypt
    Any suggestions why this is happening?
    I am using lcc-win32 as the C compiler.
    Regards
    David

    Hi,
    You need to make sure you are using the dll of db4.7 rather than db4.6. Rebuild db4.7 dll and the example program, and make sure the db4.7 dll is used rather than that of db4.6.

  • I keep getting kicked off of my wifi with my MacBook Pro but not with my IPAD?

    I keep getting kicked off of my wifi with my MacBook Pro but not with my IPAD, what do I do?

    Hi, mmayers.
    Sometimes a simple power cycle of the router can correct the issue that you are experiencing.  However, the issue could be a little more complex.  Wi-Fi routers need adjustments to settings periodically for optimized performance with the constant progression of wireless device technology.  Below, I have included two articles.  The first article will cover basic Wi-Fi troubleshooting.  The second article covers the recommended settings for current Wi-Fi access points.
    Wi-Fi: How to troubleshoot Wi-Fi connectivity
    http://support.apple.com/kb/HT4628
    iOS and OS X: Recommended settings for Wi-Fi routers and access points
    http://support.apple.com/kb/ht4199
    Cheers,
    Jason H.

  • Use the LabView time delay in a while loop instead of using the instrument inherent time loop.

    I have a zes lmg500 that I use. It has the option of continues measuring data, with a user control cycle loop (still using a while loop but the delay is coming from the instrument). The problem is that the loop time is not constant. Can I use a very short time (100ms) as the instrument cycle time but use a longer time delay in the while loop that collect the data?
    I know many instrument offer the same abilities, so the question is relevant to all of them.
    Thanks for any help
    Solved!
    Go to Solution.

    Does that measurement VI have built-in wait functionality and a timeout?
    If not, then you are simply polling the VI at 1 kHz, but I suspect that this is not the case or your Waveform Chart probably wouldn't look as you expect (getting 0's put in everytime measurement data is not available).
    I expect that if you have the instrument set up to send data at a fixed time interval (i.e. 100 ms), all the data that it is sending you will end up residing in your serial buffer (or the instrument driver will have taken it out and put it in another internal buffer), so if you come back to read it 1 sec later, then you will have 10 data points to go through.  Whether you can read them all at once with the read VI or have to call it a whole bunch of times until empty I can't say.
    What is your objective?

  • I am using the "Menu Selection With Events.vi" example alongside other while loops, When I select exit from the new menu it stops the other while loops but not the menu/event while loop

    The event driven menu example works fine and I've integrated it into my application. I have built in simple local vars to link menu selections to existing GUI buttons. The problem is that I cannot get the File-Exit menu option to switch off/terminate the application. The [1] "Stop": Value Change panel of the event structure simply switches off the other while loops but leaves the event while loop running. Add a while loop to the axample using a local var from the event while loop to terminate 2nd while loop to get the effect.
    Help appreciated, Chris

    Attached you will find a modified version of your VI.
    I documented what I did on the block diagram.You were right on you just needed to add a variable with a true wired to it.
    Have fun with it.
    Joe
    Joe.
    "NOTHING IS EVER EASY"
    Attachments:
    Menu_Selection_with_Events_%26_while_loop[1].vi ‏76 KB

  • I can use iMessage with all iPhone uses except for ONE person.  That person can use iMessage with all other users, but not with ME.  What's the problem???

    I can use iMessage with all other iPhone users that I communicate with, except for ONE person.  When I send to that person, it always goes through as a text message.  This person can use iMessage with pther people, but when they send me a message, it always goes as a text.  Why can we both communicate with other people using iMessage, but not with one another?

    Hi Russell,
    1) If you have OD set up and "editor" has UID 1111, then when they log in to any machine that's bound to OD as editor, they will get UID 1111. Therefore, there won't be any of these permission errors. This is typically the recommended approach.
    2) I assume you mean "You'd prefer to not using open directory?" Whatever the case, OD isn't mandatory with Xsan -- it's just that with multiple user accounts, managing them centrally tends to be easier. For 3 or 4 accounts and 3 or 4 machines maybe it's no big deal. If you go larger, it could get a lot more complicated. That said, if you set it up such that each machine has the exact same set of users (as you said, Mary = UID 502, Fred = UID 503, William = UID 504), then you can do what you want. Mary can log in from multiple machines at the same time, and in general you won't have permissions problems. Of course, if you try and read and write the same file from multiple workstations at the same time, you will get file locking issues, which will prohibit somebody from successfully writing the file.
    File locking issues are different from general permissions errors. The former basically says "hey, someone else is editing this file. Therefore I won't let you edit it right now... you can read it if you want though." Permissions means somebody saves it, and Xsan thinks you saved it and own the file, when you really don't.
    Quad-Core PMG5, 4 GB RAM, 7800 GT, 1 TB disk.   Mac OS X (10.4.4)  

  • How do I transfer photos/videos from my Iphone 5 to my Macbook Air. I can do so with my Iphone 4s but not with my Iphone 5

    How do I transfer photos/videos from my Iphone 5 to my Macbook Air. I can do so using my Iphone 4s but not with my Iphone 5

    See this User Hint: https://discussions.apple.com/docs/DOC-3141

  • Cfheader works with firefox or opera, but not with IE. why?

    Good morning at all.
    i have a problem with Internet Explorer and the download of a
    excel file created by filling a table with the result of a query.
    how it work?
    click button => call create_excel.cfm =>
    <cfheader name="Content-Disposition" value="attachment;
    filename=#dbtest#.xls">
    <cfcontent type="application/vnd.ms-excel" reset="yes"
    >
    <cfoutput>
    <cfloop query_with_data>
    <....
    table ...
    </cfloop>
    <cfoutput>
    with firefox or opera, all version, when i click the button
    witch call the page that create the excel file, i obtain the excel
    file correctly.
    If i use Internet Explorer,
    the first click on the button says : (Italian to english
    translation)
    Impossible to download create_excel.cfm the I DO NOTHING and
    the second time that i click on the SAME BUTTON i obtain the
    correct xls file!
    i'm not able to solve =(
    any idea?
    thanks
    bye!

    Hi Gary,
    It's probably just because the border widths you are specifying are too small (or WebKit is interpreting picas differently to Firefox/IE - I say WebKit as the same problem is visible in Google Chrome and that uses WebKit like Safari as well).
    Try setting using this instead:
    .borders {
    font-family: Verdana;
    font-size: 10px;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    color: #cccccc;
    text-decoration: none;
    border: 1px solid #888888;
    That seems to do the trick for Firefox and Chrome on this Linux machine I'm using at the moment.

  • USB Charger Works With BF's iTouch But Not With Mine?!

    Hello! My apologies for this being a bit long even though the problem is pretty straight-forward:
    Both my boyfriend and myself have the iPod Touch 4 G. I bought mine a few months ago and bought his for a Valentine's Day present for him on Feb 14th of this year. So about a week and a half ago or so. So, the problem is with charging them. I have a Powerline dual usb wall/car charger that's been working fine for about three years. It will charge my tablet PC and it will also charge my boyfriend's iTouch. It will not, however, charge my iTouch. I can charge my iTouch through the computer or through our wifi router's usb port but as soon as I plug it into our wall charger: zip. If I plug it into the wall charger while the iTouch is turned completely off the iTouch will boot up instantly after being connected to the wall charger but it won't charge at all. Anyone have any suggestions?
    Maybe I will just have to get a new wall charger for my iTouch. I really need one as I am going to be staying with my grandmother for the month of March and she has no computer or anything for me to charge my devices on other than the wall socket. It's just odd that my wall charger will charge my boyfriend's iTouch and mine will boot up when connected to it, but it won't charge it at all. Thank you for reading this and hopefully providing me with a workable solution. Oh, yeah, forgot to mention; I reset and restored my iTouch and tried it again. No luck. At least it's charging via other means; computer/wifi router, but I'd like to find out why the wall charger is only charging one of our iTouches.
    I have tried resetting the device and I have also tried restoring it to factory settings and starting from scratch. I have tried other usb iPod usb cord/plugs, (we have three; one's mine, one's for my boyfriend's iTouch and one's left over from an upgraded iPod), and I have tried plugging the charger into different wall sockets. Like I said; it will charge the boyfriend's iPod fine and my iPod will boot up from complete shut down when plugged into the wall charger but it won't start charging.
    Thanks!
    ~Ami E. Bowen

    I am replying to my own question because this is how it was solved, for me at least. Since I was still within my 1-year warrenty I simply took my iPod Touch down to our local Apple Retail store and they traded me the faulty one for a brand new one. I went home, plugged it in to all the chargers one by one and every one works fine with the new one. So, if you have this problem, too, and are within your warrenty, I'd suggest going to your local Apple Retail Center and trading the old/faulty iPod for a new/better one.
    ~Ami E. Bowen

  • 4s Hotspot tethering only works with USB and BT but not with wifi

    Hi,
    XP sp3 - iPhone 4s with ios 5.0.1 - on Three one plan
    Tethering with wifi works to a friends Samsung phone, wifi on the pc confirmed working with the apple store wifi, tethering with USB and BT works with good connection speeds on my laptop but when i try to tether with wifi it connects to the laptop at 54mbps and all appears well, even claims to have received a small amount of data packets, but no data comes to any browser. The iPhone reports 1 connection to the hotspot and stays connected with a non-pulsing blue bar after the first minute.
    In the PC i have tried this http://windows.microsoft.com/en-US/windows7/Change-the-order-of-network-protocol -bindings
    I've deleted my firewall (zone alarm) completely and turned off windows firewall to go naked surfing for a second even though they don't cause a problem with USB tethering, makes no difference
    I've deleted the network connection numerous times
    "repaired" connection
    dissabled and enabled the wifi
    turned off the wireless with a hardware switch and on again
    disabled bluetooth
    rebooted many times
    reinstalled itunes (latest)
    loads more things i can't remember
    This is causing me a nightmare. I've been through everything i can find online, been to the Apple store genius bar (genius appeared to have sub zero knowledge / interest as it involved a MS machine), been to a Three shop (legally not allowed to touch my PC apparently) and been to a Sony shop (laptop make, not their fault if my iphone doesn't work). All very frustrating.
    Please help if you can! Any suggestion will be tried unless it involves sledge hammers or lakes, and only then for a few more days at most.

    Turned off bluetooth on phone, turned off hotspot and on again, phone asked if i wanted to turn on bluetooth or go with USB and wifi only, said usb/wifi only. Still nothing. Rebooted PC and iphone. Turned on hotspot, pc seemlessly connects to network, still no data comes.
    One odd thing is zone alarm asks me to "select a security zone for the wireless network at ip address: *******.0" every time and doesn't seem to remember the setting over sessions. When i get the status of the connection the ip address is *****.2 and default gateway is same ********.1 Not sure if that's anything.
    Also getting a javascript error about an undefinded component (trustcheckermozilla) since i updated zonealarm but as i said even completely uninstalling zonealarm made no difference. I'll update firefox as well but tried with IE and still no data.

  • Will work fine with USB 1.1 but not with USB 2.0? Help!

    Hi, I have installed my ipod on windows XP PC and it works fine with my USB 1.1 ports, however when i try to use my usb 2.0 ports all i get is
    (a) the noise suggesting someting has been plugged in
    (b) in device manager it says USB mass storage device wiht a yellow exclamation mark beside it. (it is enabled by the way)
    (c) on the ipod screen it says 'ok to disconnect'
    please i can't cope with usb 1 transfer rates and i dont have any spare slots to fit a firewire card before someone suggests it.
    thanks in advance!

    Did you add the USB 2.0 devices after installing iTunes and the iPod? If so uninstall and reinstall. If you are in a position to disable the USB 1.1 device (just while you reinstall) that might be worth trying.

  • How to open .snp files with Microsoft Office 2007 installed? It works with MS Office 2003 but not with MS Office 2007!

    I have MS Office Pro Plus 2007 installed on my computer. I also have MS Office 2003 installed on another computer. Snapshot viewer is installed on both. My work snapshot files works with MS Office Access 2003 but not recognized by MS Office Access 2007. It would not allow me to save them either! Is it a problem with FireFox (3.6.8)? However, I do not have problem opening them up using IE7/8 on both computers. Any ideas? Thanks.

    Are you clicking a download link from an email message on an OWA or webmail site? Do you get the open/save dialog for the .snp files? In that case, you should be able to associate them with the Snapshot viewer. If Firefox does not remember this and you have to do it each time, it usually indicates that the server is not sending a specific content type, just the generic "this is some binary content" content type.

  • Class loading works with jre1.3.1 but not with jre1.4.0

    Hello,
    My JWS application use the following line to create an XMLReader:
    XMLReader rdr = XMLReaderFactory.createXMLReader( "org.apache.xerces.parsers.SAXParser" );
    Everything works fine with jre1.3.1, but with jre1.4.0 or jre1.4.1 I experience a very strange behaviour:
    1) When my application is downloaded and executed for the first time, everthing works fine.
    2) When I quit the application and I launch it again, an Exception is thrown (the system in unable to load the Class org.apache.xerces.parsers.SAXParser).
    3) If I tell JWS to show the console, everthing works fine again. If I tell JWS not to show the console, the Class can't be loaded anymore.
    Any idea ?

    Hi.
    I have also been experiencing problems in using Java Web Start for my application. When i tried certain functions of my application like saving and updating, I will faced this problem:
    javax.xml.soap.SOAPException: Unable to create SOAP connection factory: Provider com.sun.xml.messaging.saaj.client.p2p.HttpSOAPConnectionFactory not found
    In the previous email in the forum, it was said that this problem was overcame, but I do not really know to how apply the solution given below:
    /* The following code is not used for now because
    * the code in createXMLReader() which dynamically          
    * allocates the class does not work the with          
    * Web Start class loader.          
    * This can be used again once Sun starts shipping          
    * Xerces 2.x with the JRE. They have already changed          
    * the XML development pack to use Xerces 2.x instead          
    * of Crimson, but as of 1.4.1, they are not updating          
    * the JRE distribution.           
    //String className = System.getProperty("org.xml.sax.parser");     
    //if (className == null) className = "org.apache.xerces.parsers.SAXParser";          
    //try {          
    //     tParser = XMLReaderFactory.createXMLReader(className);          
    //} catch (SAXException e) {          
    //     tParser = XMLReaderFactory.createXMLReader();          
    XMLReader tParser = new org.apache.xerces.parsers.SAXParser()
    Can anyone enlighten me on how to overcome the SOAP Factory problem? Thank you.

  • HT204406 iTunes Match worked with 11.0.1, but not with 11.0.2

    Just as the title states, Match is not working with 11.0.2. It was however working with the 11.0.1 version of iTunes. It ried turning Match off and on as the help suggested, but now Match won't turn back on at all.

    You're using the ProPhoto RGB color space for your documents, right?
    There's a known bug (Adobe would like to call it "inaccuracy") in the color-management logic in Photoshop when said logic is run in the GPU, which is the case with Normal and Advanced GPU modes.  As far as I have seen, it appears only with the ProPhoto RGB document color profile.
    I reported this back in the time of Photoshop CS5.  They have not yet seen fit to fix it.
    http://forums.adobe.com/message/3472800
    http://forums.adobe.com/message/4646490
    Your possible workarounds include:
    Switching the Graphics Processor Advanced Mode to Basic, which moves the color-management logic to the CPU from the GPU.  That produces a more accurate result.
    Using a color profile other than ProPhoto RGB for your black and white work.
    -Noel

  • Left most usb port works with usb 3 devices but not with usb 2 devices

    Can someone enlighten me on this issue? I have a MBP mid 12 that seems to have issues with usb 2 devices such iPods, HHDs, etc. The same port works fine with usb 3 devices. I have tried several solutions but not avail such as resetting the SMC, PROM, disconnecting the battery and reinstalling OS X from scratch. Is there anything Im missing? I still don't believe is a hardware issue but something wrong in the firmware...

    Can someone enlighten me on this issue? I have a MBP mid 12 that seems to have issues with usb 2 devices such iPods, HHDs, etc. The same port works fine with usb 3 devices. I have tried several solutions but not avail such as resetting the SMC, PROM, disconnecting the battery and reinstalling OS X from scratch. Is there anything Im missing? I still don't believe is a hardware issue but something wrong in the firmware...

Maybe you are looking for

  • IPod Classic wiped itself & is no longer recognised in iTunes

    iPod Classic, 80GB, from Dec 2007. Plugged iPod in to laptop as normal (Acer Aspire 7730ZG, using WIN7 Ultimate at the time) & tried to add an album. Process froze & iPod would not update. It would not respond within iTunes, so I manually ejected via

  • CCS and IC WebClient interaction

    I can login into IC WebClient and CCS successfully, but when i check the Agent status in CCS, it give me msg 'Currently no agents are logged on to CCS '. So i can't simulate telephony. Does anybody know what's the reason and which additional settings

  • Accessing CSS stylesheet in jdev(JSP)

    Hi, I am new to web development and jdeveloper. I have a style sheet (CSS) and I am trying to use it in my JDEV(JSP) project. I have a dir called test1-->project1 under project1 i have one more directory called public_html and my jsp is in this direc

  • How to export audio from PPro CS6/CC to AJA KiPro?

    Hello everyone. First off, let me state up front that I know all of the specs when creating a ProRes file that will playback on a KiPro.  Our shop just switched from FCP 7 to Adobe PPro, and the exports are not working, BUT I believe it's only becaus

  • In LMS , I can not lunch Application [Topology Service ]

    Dear Expert                   In LMS , I can not lunch Topology Service that there're alert "Unable to lunch Application ". Maybe it's problem in Java but I've already re-install JAVA and ,Cash file and restart Server also. but still can not work so