Running a loop without waiting on all readings

Hello,
I have been struggling to create a vi that does exactly what I want.  I want to take multiple measurements from multiple sources at the same time with a time stamp.  I have been getting all of the measurements accurately.  My problem is that I need a very high sample rate for my data, and the instrument connected to my VISA serial read only samples at a rate of one measurement per 1.6 seconds.  This is acceptable for this measurement, but my other measurements need to have hundreds of readings per second.  However, it appears that my loop will only iterate once every 1.6 seconds, which I assume means that it is waiting for the next reading from my VISA device.  Is there a way to tell Labview to check for a reading or obtain a new reading only when one is available, instead of holding all of the other readings to a 1.6 second sample rate?
The vi I am working with is attached.  I originally used a WHILE loop but in an effort to speed up the iterations I switched to a TIMED loop.  This did not help.  I need all of the measurements to be sampled as fast as possible.
Thanks
Attachments:
ScratchVIc.vi ‏175 KB

Separate your code and use multiple loops. There is nothing wrong about using multiple loops. You want to avoid splitting your DAQ collection across multiple loops. But separating other types of processing is how you can improve performance. Have one loop do nothing but collect the data. This loop would post that data to a queue for further processing. You could also separate logging the data into it's own loop too. Again, data to be logged would be posted to a queue for processing. Writing data to a file in the same loop as you are collecting the data will decrease your performance. File access is slow.
Also, learn how to use data flow and avoid all of the stacked sequence structures. Most of the stuff in teh sequence structures already has data flow which will control the execution order. Deep stacked sequences are difficult to maintain and modify. You should also take some time to learn about state machines.
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

  • Dynamic start of subvi without waiting for end of subvi

    How can I load and run a SubVI without waiting in the MainVI for the end of execution of the SubVI.
    Im running LabVIEW Prof. Dev. System 6.1 on WindowsNT4.0

    Use the Open VI Reference to specify the VI and then an invoke node. The method you want is Run VI and you can optionally Wait Until Done.

  • Wait time in while loop: wait before all other code in the loop runs

    My vi is attached. 
    In the 'Check for Equilib' case, there is a while loop that takes data from a pressure gauge and compares it against data taken equilibTime seconds previous.  equilibTime is hooked up to a wait(ms) function inside the while loop.  Currently it appears that the code in the loop runs, and then the loop waits so many seconds before the next iteration.  I would like to reverse this process, i.e. in each iteration, the loop will wait so many seconds and then run the rest of the code in the loop.  I want to do this because I don't want there to be any delay between then time the 'check for equilib' code finishes and the start of the 'add shot' case.
    Can anybody suggest an elegant way of implementing this?
    Thank you
    Attachments:
    Take Isotherm.vi ‏294 KB

    No.  Use Flat sequences they are far preferable to stacked sequences.  Functionally they are the same.  But a flat sequence is easier to read, doesn't hide code, and you don't have to worry about backwards wiring caused by sequence locals in stacked sequence.
    Note, you have two oddities in your lower while loop.
    1.  Write a value to an indicator's terminal node and to a local variable of the same indicator is pointless.  They do the same thing.
    2.  Reading from a local variable of an indicator and writing to its terminal node is just as pointless, as you aren't doing anything.
    In your middle loop "Add shot" case, you have the local variable of DC estimate righting to a right hand side shift register, but you never use the left hand shift register.  So you are saving that value for future loop iterations, but never use it.

  • I currently have one input but need to run two loops. I cannot get the two while loops to run so that they both pick up the same data, they are both picking up alternate samples. How can I get them to both pick up all of the values?

    The system I am trying to create calculates a number of values based on an input. I need to make the calculations and display the values for an entire production run and for each hour. The only way I know to do this is to create two while loops, one looking at all the values that are received and one looking only at the values for hour long periods.
    Any help would be great.
    Thanks
    RossH

    Why do you think that you have to have two loops to accomplish this task? Why not use one loop and accumulate the same data into two data sets based on the two sets of criteria?

  • How can I download a transfer without waiting for it be all transferred?

    How can I download a transfer without waiting for it be all transferred? Thanks.

    Thanks, that now makes sense. Once an item enters the download queue, the user cannot remove it. Either let it complete the download (easiest) or contact the iTunes Store customer support department through the Contact page (select the category and subcategory closest to the issue you're reporting and you'll find either an "Express Lane" button - just follow the instructions to get to the contact form - or an "Email Us" button) and ask them if they'll remove the item(s) from your queue for you.
    Regards.

  • Run for loop inside event node

    Hi all, 
              We want to run for loop inside event node with 50ms delay. But when i am doing it the Labview is crashing. Please let me know if somebody did this.
    Thanks in advance,
    Regards,
    Harish. G
    Thanks & Regards,
    Harish. G.

    harishg92 wrote:
    Hi all, 
              We want to run for loop inside event node with 50ms delay. But when i am doing it the Labview is crashing. Please let me know if somebody did this.
    Thanks in advance,
    Regards,
    Harish. G
    You're implementing a For loop inside an event structure? (I don't know of any event "node" in which you can run a For loop)
    If so, that's a bad idea because LabVIEW won't be able to process any events while waiting for your For loop to get done, which might be why its crashing.
    There are tricks to accomplishing what you're trying to do without putting any for loops inside event structure. See what I have  attached and if it helps. "N" is number of times you run your For loop, timeout is whatever delay you want in each loop. This can be done in many ways without adding delays in events, another way could be to fire a separate subVI using Asynchronous call (without waiting for the VI to finish) during those delays, just make sure that such subVI finishes processing within your allocated time (that's how I'd ideally implement things). That method is better because you're doing minimal work inside events structure while using wait period wisely in a separate/parallel process.
    I hope that I understood you correctly and did not go off on a tangent.
    -BTC
    New Controls & Indicators made using vector graphics & animations? Click below for Pebbles UI
    Attachments:
    ForLoop inside Event Structure.vi ‏11 KB

  • I have a mac os 10.5.8, i want to upgrade to mac os snow leopard, can i keep all my files (documents, music on itunes) without backing up all the files first on a external device prior to the upgrade?

    I have a mac os 10.5.8, i want to upgrade to mac os snow leopard, can i keep all my files (documents, music on itunes) without backing up all the files first on a external device prior to the upgrade?

    I strongly advise against upgrading the OS without first making a backup. Were something to go wrong you would lose all your files without the backup. See:
    How to Install OS X Updates Successfully
    A. Repair the Hard Drive and Permissions:
    Boot from your current OS X Installer disc. After the installer loads select your language and click on the Continue button. Then select Disk Utility from the Utilities menu. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer. Now restart normally. 
    If DU reports errors it cannot fix, then you will need Disk Warrior (4.0 for Tiger) and/or TechTool Pro (4.5.2 for Tiger) to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    B. Make a Bootable Backup Using Restore Option of Disk Utility:
    Open Disk Utility from the Utilities folder.
    Select the destination volume from the left side list.
    Click on the Restore tab in the DU main window.
    Check the box labeled Erase destination.
    Select the destination volume from the left side list and drag it to the Destination entry field.
    Select the source volume from the left side list and drag it to the Source entry field.
    Double-check you got it right, then click on the Restore button.
    Destination means the external backup drive. Source means the internal startup drive.
    C. Important: Please read before installing:
    If you have a FireWire hard drive connected, disconnect it before installing the update unless you will boot from this drive and install the update on it. Reconnect it and turn it back on after installation is complete and you've restarted.
    You may experience unexpected results if you have installed third-party system software modifications, or if you have modified the operating system through other means. (This does not apply to normal application software installation.)
    The installation process should not be interrupted. If a power outage or other interruption occurs during installation, use the standalone installer (see below) from Apple Downloads to update.  While the installation is in progress do not use the computer.
    D. To upgrade:
    Purchase the Snow Leopard Retail DVD.
    Boot From The OS X Installer Disc:
    Insert OS X Installer Disc into the optical drive.
    Restart the computer.
    Immediately after the chime press and hold down the "C" key.
    Release the key when the spinning gear below the dark gray Apple logo appears.
    Wait for installer to finish loading.
    E. If updating:
    Download and install update(s) 
    Use Software Update, or
    Download standalone updater(s).

  • PL/SQL Loop without stopping

    Hi, I have a list of procedure name in PROCLIST table. I am planning to fetch it and interate using loop. Inside loop I have to execute the same name procedure.
    Problem : The procedure I have to execute without stopping means in the 1st iteration execute 1st procedure, before completion of the 1st procedure it should iterate for next and execute the 2nd procedure. so my task is to execute this all the procedures parallely. Any type of help is appreciated.

    Hi,
    Thanks for reply. I have tried with the same package. but my all the procedure's name in table which I am fetching using cursor loop.
    My task is to fetch procedure name from the loop and executed it but the loop shouldn't wait for the 1st procedure to complete. Without waiting for 1st procedure to complete, it should interate for the next & fetch the 2nd procedure's name and execute 2nd procedure parallely.

  • URGENT:HOW TO COMBINE CLUSTER AND TRANSPARENT TABLE..WITHOUT USING FOR ALL

    how can we join bkpf and bseg without using FOR ALL ENTRIES.HOW DO I COMBINE THE 2 TABLES SO THAT I GET BETTER PERFORMANCE.
    START-OF-SELECTION.
    SELECT bukrs belnr gjahr budat FROM bkpf INTO TABLE i_bkpf
    WHERE bukrs = p_bukrs AND "COMPANY CODE
    gjahr = p_gjahr AND "FISCAL YEAR
    budat IN s_budat. "POSTING DATE IN DOC
    IF sy-subrc = 0.
    SELECT bukrs belnr gjahr hkont shkzg dmbtr FROM bseg INTO TABLE
    i_bseg FOR ALL ENTRIES IN i_bkpf
    WHERE bukrs = i_bkpf-bukrs AND "COMPANY CODE
    belnr = i_bkpf-belnr AND "A/CING DOC NO
    gjahr = i_bkpf-gjahr AND "FISCAL YEAR
    hkont = p_hkont. "General Ledger Account"
    IF sy-subrc = 0.
    SELECT bukrs belnr gjahr hkont shkzg dmbtr FROM bseg INTO TABLE
    i_bseg1 FOR ALL ENTRIES IN i_bseg
    WHERE bukrs = i_bseg-bukrs AND "COMPANY CODE
    belnr = i_bseg-belnr AND "A/CING DOC NO
    gjahr = i_bseg-gjahr. "FISCAL YEAR
    ENDIF.
    ENDIF.
    IF NOT i_bseg1[] IS INITIAL.
    LOOP AT i_bseg1.
    IF i_bseg1-hkont = p_hkont AND i_bseg1-shkzg = 'S'.
    v_sumgl = v_sumgl + i_bseg1-dmbtr.
    ELSEIF i_bseg1-hkont = p_hkont AND i_bseg1-shkzg = 'H'.
    v_sumgl = v_sumgl - i_bseg1-dmbtr.
    ELSEIF i_bseg1-hkont NE p_hkont .
    IF i_bseg1-shkzg = 'H'.
    i_bseg1-dmbtr = - i_bseg1-dmbtr.
    ENDIF.
    i_alv-hkont = i_bseg1-hkont.
    i_alv-dmbtr = i_bseg1-dmbtr.
    APPEND i_alv.
    v_sumoffset = v_sumoffset + i_bseg1-dmbtr.
    ENDIF.
    ENDLOOP.
    regards
    Essam.([email protected])

    Hi Friend,
      I see your code.. there is no other way than using for all entries for your situation.. how ever i saw ur code and a small recommandation in the change of code.
    SELECT bukrs belnr gjahr budat FROM bkpf INTO TABLE i_bkpf
    WHERE bukrs = p_bukrs AND "COMPANY CODE
    gjahr = p_gjahr AND "FISCAL YEAR
    budat IN s_budat. "POSTING DATE IN DOC
    IF sy-subrc = 0.
    if not p_hkont is initial.
    SELECT bukrs belnr gjahr hkont shkzg dmbtr FROM bseg INTO TABLE
    i_bseg1 FOR ALL ENTRIES IN i_bkpf
    WHERE bukrs = i_bseg-bukrs AND "COMPANY CODE
    belnr = i_bseg-belnr AND "A/CING DOC NO
    gjahr = i_bseg-gjahr. "FISCAL YEAR
    ENDIF.
    i_bseg[] = i_bseg[]1.
    delete i_bseg where hkont ne p_hkont.
    else.
      Your existing logic...
    endif.
    In this way you can avoide writing two selects on bseg..
    Thanks
    Mahesh

  • I have a new iMac, and successfully transferred all the music. But I still can't get my iPod to download from iTunes without it losing all of the songs, photos, or tones.

    I have transferred all of the songs from the old iMac we own to a new one we just bought. I have already had one problem with the music as in some songs wouldn't play without me using sharing. So I took and old computer off the sharing network and all is well there. But my iPod Touch will not download any music, tones, or pictures without me taking all of the previous items on my iPod Touch. Anyone have any clue what I should do?

    Since I am impatient and can't wait for 90 minutes for an answer, I have decided to lose everything on my iPod and try to remember all the songs I had on them. But if anyone can help me prevent this in the future, that woud be great!

  • I do not want to save every file I download. just want to open a file and move on. I do not see an option to just open or run the download without saving.

    Please give an option to just open and run a download without saving.
    I have a bunch of the things saved in the download folder that I have no clue what all of it is. Please I do not want to save everything I download, I would like to just open a file move on.
    Thank you.

    sorry but there is no option like this.
    but if you like you can delete them manually
    for these :
    1.open downloads from menu button on right or by simply pressing (Ctrl +J )
    2.Then select the downloaded file you want to delete by a single click on it.
    3. You will find a folder type icon on right side of that , in which you should click.
    4. Then it will open folder where the selected file saved.
    5. Then you can delete that file .
    OK done

  • Running a page without showing

    All,
    is it possible to run a page in the background without showing that page in apex 4.2? i want to run a page process but not to show that page?
    thanks.

    3. Re: running a page without showing
    scott
    yeah kind of...thanks

  • How to run a Plugin, without opening Adobe indesign

    Hi,
    Does anyone know how to run a plugin as a service or something like that...
    What i want to do is,
        I have written a plugin that can read texts from indd files & save them as .txt files.
    now i want to put indd files in to a folder & once a new file comes to the folder, read that new file automatically  and save as txt.
    for that I want to run the plugin, without opening the indd file.
    I hope CS6 SDK support to do that.
    Please let me know if anyone has any idea...
    Thanks.

    Hi Menan,
    Thank you very much for your reply...
    I'll explain you what my requirement is,
    My final goal is to run the Indesign application(including my plugin) in a server &  put all indd files in to a location(ex.folder) &
    once an indd file comes to that folder it'll be automatically read by Indesign application & save the extracted data in a separate location(ex.another folder) as tex files. then human interaction is not needed...
    My precsent problem is,
           Can I read an indd file, without opening indd file in Indesign application (may be giving a path to a indd files included folder or some way like that).
    Currently,
      first i open the Indesign Application -> Open the indd file(intended to be read) -> Run my plugin.
    Now I Get the document with,
    IDocument* document = Utils<ILayoutUIUtils>()->GetFrontDocument();
    But what I want is,
    while the Indesign application is running on a PC, if an indd file comes to a given location(folder) it to be read automaticaly without opening my pluging.
    To do that My idea is,
      * Any time when the Indesign apllication is opend my plugin should automatically start running,
    * once a new file comes to a given location(folder) plugin shoud be automatically triggered & read the file.
    Please help me with your ideas..
    Thanks.

  • Run a Form without Browser

    Hi,
    can i run a form without a webbrowser? (what i want is, to run the form as an windows application)
    maybe i can convert my forms-application into a java-class and run it with javaw.exe?

    I am sure it is not supported by Oracle, but you can use Java WebStart 1.2 with Forms (web.showdocument will not work).
    Here the jnlp-File:
    <jnlp spec="1.0+" href="http://yourhost:yourport/forms.jnlp" codebase="http://yourhost:yourport/forms90/java/">
    <information>
    <title>Test</title>
    <vendor>Test</vendor>
    <description>Test</description>
    <description kind="one-line">Test</description>
    <description kind="tooltip">Test</description>
    <description kind="short">Test</description>
    </information>
    <security>
    <all-permissions />
    </security>
    <resources>
    <j2se version="1.3+" />
    <jar href="f90all.jar" size="" main="true" />
    </resources>
    <applet-desc main-class="oracle.forms.engine.Main" name="Forms" width="640" height="480">
    <param name="separateFrame" value="false" />
    <param name="lookAndFeel" value="oracle" />
    <param name="colorScheme" value="blue" />
    <param name="serverHost" value="" />
    <param name="serverPort" value="" />
    <param name="serverURL" value="/forms90/l90servlet?ifcfs=/forms90/f90servlet?config=yourconfig" />
    <param name="serverApp" value="default" />
    <param name="logo" value="." />
    <param name="serverArgs" value="module=your.fmx usesdi=no userid= sso_userid= debug=no buffer_records=no debug_messages=no array=no query_only=no quiet=yes render=no host= port= record= tracegroup= log= term=" />
    <param name="background" value="." />
    </applet-desc>
    </jnlp>
    regards
    Charly

  • Help! Run AIR Applications without Adobe AIR.

    Hello, I wanted to ask that is there any way to run AIR applications without having Adobe AIR in the computer. It's really annoying when you have to give someone your application to use and then the person needs Adobe AIR to run it. Any suggestions?

    Where to start...
    AIR is a lot like Java in the sense that it requires a run-time engine to be installed. This engine has all "things" required to for the application to run. In a similar way, applications such as 3DMax or Word require that the operating system be present for them to run. Those programs are written using API calls that are present within the target operating system. Likewise, AIR and Java apps are written using API calls that are present within their run-time. To bring it full circle, AIR is an application written in C, that uses APIs for the target operating system. So, when you perform certain functions within AIR, it then knows how to execute needed operating system functions (as needed). AIR also provides a lot of higher level functionality and management that make your life as a programmer a lot simpler.
    Looking at iOS or Android, we have the same thing happening. Some developers are writing apps using Objective-C (iOS) or Java (Android) that are using APIs specific to those operating systems. This is the same as writing your app in C like 3DMax.

Maybe you are looking for

  • Purchase Tax - Field BSEG- WMWST not getting filled on Invoice documents

    Hi, I am posting a Invoice document using FB60. Along with other details, I enter Tax code and check the Calculate Tax check box and SAP calculates & generated extra line for Tax amount. Document is posted successfully. Howver this purchase tax calcu

  • Font is shown very small when using IE Tab and Windows Display is selected to show larger fonts

    I'm on Windows 7 - 64 bit and I set my Windows display to show larger fonts (from Control Panel, Display, then choose Larger Fonts). Now all pages show bigger fonts, except when I use IE Tab. I use IE Tab so that I can open my Microsoft Dynamics CRM

  • HRForms/SmartForms: Multiple employees per page ?

    Hello everyone, I have been requested to make a custom time reporting sheet for a TM implementation. The project blueprint specifically states that I should use HR Forms in conjunction with Smart Forms. I have never used these technologies before. Th

  • Live monitoring stopped working

    Do you know if the installation of a third party recording/monitoring product (CallCopy) interferes with Desktop Supervisor abitly to monitor/record calls.Version 8.5.2 Thanks in advance, -KG

  • Email flooding

    Some one please help! My email box has been flooded with thousands of postings from Apple support communities. Ticking "no"s  in all the email notifications preference does not stop the onslaught too. I am going bonkers having to delete thousands of