Deterministic loop is delayed when rewriting continuously buffer of the OD

Hi all!

I use the RT for neurofeedback: analyze brain activity and then give hearing feedback from the user in this regard.
My RT goal is a desktop pc and I use the structure of typical loop of deterministic + not deterministic.

What I want is a continuous output pure sound. The amplitude of the signal is calculated in real time and is based on certain characteristics of the brain activity of the user. It should vary smoothly to avoid artifacts of type click.

Since there is no sound screws in the RT module, I use DAQmx writing VI (analog output) with active regeneration. The sample mode is continuous.

Before the first iteration, I generate a sine wave to an appropriate length (a few hundred samples) and amplitude 1. Then, at each iteration, I calculate the new value of the amplitude and multiply the sine wave with a linear ramp so that I get a smooth amplitude modulation. On the same iteration, I write this new piece of data with the writing DAQmx VI.

With this approach my timed loop gets delayed periodically, even thought that the cpu load is less than 20%. Rewriting constantly buffer of the device seems to be the problem.

Is there a smarter way to do what I want? For example: can I write the pure tone only at the beginning and then control the amplitude setting a gain? I saw that there is a property of gain ( http://zone.ni.com/reference/en-XX/help/370469AA-01/daqmxprop/attr118/ ) but I can't seem to find it. I'm using LV 9.

I'll be very grateful for any ideas!

Thank you!


Tags: NI Software

Similar Questions

  • Why my computer does not delay when I try to watch the video again? It's a constant start and stop and buffering?

    I get a lot of golf maaterials and lesson over the internet.  It became a real pain and a problem for me to keep up with instructions.  When I received instruction to internet and start to play the video it winds and winds and play them for a few seconds then start and stop throughout the presentation.  What can I do to fix this problem?

    If several computers are using the internet at the same time, it might slow down the video stream on a computer (laptop or desktop).

    Or your internet connection is simply not enough fast to stream the videos you want to watch. There are several different speeds for DSL, so the speed increase may help.

  • while loop: delay enforcement and continuous updated: VI back to fake out of time?

    Hi all

    I want to control the time of execution of a while loop. I want the user to have the ability to decide how long he wants to run the while loop. The while loop is used to update certain values, then it should run continuously, not only run once and wait (that I could easily using the synchronization functions).

    I used the time up VI as suggested in this post:

    http://forums.NI.com/T5/LabVIEW/how-to-create-a-time-control-for-while-loop/m-p/2530212/highlight/FA...

    and works well, but the while loops are integrated into another loop for and when Goes to the next iteration, the elapsed time Boolean result is set to true and it does not run at all (I think that's the problem).

    Can I return the Boolean result of the elapsed time VI to false, after reaching the target of time? That would solve my problem, I think that...

    I attach some of my VI, although I don't know that it could be useful for you...

    Thanks for your help

    Use the iteration for while loops count and an equal to zero? node.  Then the output of the comparison at the entrance to reset the elapsed time functions.  The idea is that reset you on the first iteration (when I = 0).

  • Where is iTunes (12.4) "continuous buffer size?

    You want to find a lot of examples, even some here on apple.com, for older versions. These explain the options 'size of the streaming buffer' can be found in "iTunes > Preferences [Advanced]". " I don't see this in iTunes 12.4. I am listening to a stream of events, but he continues to stamp and finally _turning ignore. And when I press play again, it reconnects immediately.

    Where is iTunes (12.4) "continuous buffer size?

    11 buffer size settings iTunes.

  • How to exit while loop with delay schedule?

    I have a pretty heavy program that iteratively takes a series of measures from a number of channels using a variety OR-Switch and OR-DMM screws that I assembled as a result of various examples and several help pages. Each channel is sampled once during each iteration with data to be saved in a text file for later analysis, after it is imported into Excel. I added to the screen 'real time' indicators and charts to see what looks like running data.

    Each iteration is performed using a While loop with a delay timer, even if a previous version, I used a timed loop. Measures for the series of channels are collected with a loop For inside the While loop. The loop For includes screws which:

    1 cut the channel and wait as debounce.

    2 Initializes the DMM and passes the configuration information.

    3. wait for a while to make sure that the DMM is set.

    4. measure.

    5. close the DMM.

    6 disconnect all the switches.

    The terms of the election of the channels is ends in 15-20 seconds and I am currently collecting data every two minutes, so he spends "wait" time "collection". Each iteration of the loop For initializes and closes the DMM to avoid the hot switch.

    Other components of the program are configuration setting controls, etc. (in front of the While loop), a "current measurement" indicator and a writing-text inside the loop file operation For, several indicators of the iteration (inside the While loop, but outside the loop For) and a bunch of operations related to the grouping and table that provide graphics of groups of time vs measures.

    I don't know there are more elegant ways to perform many functions that I do and I'm not posting the VI here because I want to concentrate on what I know, it's a big problem with my program (for now!) - I can't figure out how to get out of the While loop. I tried the combinations of Boolean control, its conditions of latch and Stop / continuous if true to nothing does not.

    I want a 'Stop' button that ends the While loop, at the next opportunity, but it is not working properly, I think, because the stop button does not play with good timing, because the program runs either the loop For or the time delay at the beginning of the While loop. 'Next opportunity' can mean 'Immediately', 'at the end of the next iteration of the loop,"or"at the end of the next delay schedule." I think that if I get one of these scenarios to work, I can get an any of them to work!

    Help, please!


  • Variable single process shared w/o (without) FIFO between deterministic loop.

    Hello

    Why we cannot use variable shared unique process without FIFO to communicate between deterministic loop?  In other words, why it is always recommended to use FIFO for communications between the deterministic loops?

    Thank you

    Ajay.

    It is called sharing resources.  When you use a variable shared unique process, only one thread accesses it at a time.  So what is happening is a tent to read, but B is busy writing on it.  So wait, adding a jig.

    With the RT FIFO active, you don't have this problem.  One can read from the FIFO as B adds another element.

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

    Hi all

    I have a problem of severe weather that I don't know how to fix it because I don't know exactly where it comes from.

    I order two RF switches via a data acquisition card (NI USB-6008). One job at the same time can be selected on each switch. Basically, the VI created for this feature (by a colleague) resets all the outputs of acquisition data and active then those desired. It has three entrances, two chain simp0le controls and a cluster table, that contains the list of all the outputs and some practical information to know what is connected (specific to my application).

    I use this VI in a complex application, and I have some problems with the execution time, which increased whenever I said the VI, so I did a test VI (TimeTesting.vi) to determine where the problem came. In this special VI I record the execution time in a csv file to analyze then with excel.

    After several tries, I found that if I run this criterion VI with the while loop, execution on every cycle time increases, but if I remove the while loop and use the funtionnality "Continuous run", the execution time remains the same. In my high level application, I have while loops and events, and so the runtime increases too.

    I someone could explain to me why execution time increases and how can we avoid this? I have attached my VI test and the necessary subVIs, as well as an image of a graph that shows the execution time with a while loop and «run permanently»

    Thanks a lot for your help!

    Your SetReset_DO VI creates a channel whenever it is called.  And that you never delete a task.

    When running continuously, that it's as if it only runs once and LabVIEW has internal mechanisms to close references that will not be used again.  When a VI is used as a Subvi, LV does not know if she will be called again, and lacks these things until the first level VI stops. You have a memory leak.

    Just as you open and close your file outside the loop for, create your channel out of the loop.

    Lynn

  • Multiple choice quiz slides - long delay when you click on the radio button

    Using Captivate 5.5 and slides of quiz of multiple choices, when previewing the project, sometimes there is a delay after clicking on a choice. The delay is sometimes so long that the learner may feel like they are not able to select a radio button option. Does anyone know a way to speed up the appearance of the dot that appears when a learner clicks on a radio button?

    Hi Jay,.

    I would have asked to see the chronology. In a blog I explains the features of the glide of the Question and think that you can't find the answer here:

    Question Question slides

    Short answer: on the timeline, you'll see a suspension point, which is used twice for the slides in question (see the two-step process in blog). Default setting is to have only one break point at 1, 5secs for a default slide duration of 3secs. The actions on the success and after the last attempt (see properties Quiz, accordion Action) are both set to "continue". This means that after the second stage when you expect to proceed immediately to the next slide, the reading head is just to continue until the end of the slide (length by default = 1.5secs). Wondering if you perhaps make longer editing.

    What is possible: drag the point of suspension on the Timeline, close to the end of the chronology of the question slide. Or set the action to 'Go ├a next page' instead of continue.

    Not sure if it will help because I do not see the timeline.

    Lilybiri

  • When you enter a word document my laptop continues to send the document

    Can anyone help - when entering a word document, that my laptop continues to send the document when I start typing. Do not know why. Any help appreciated

    Hello

    I have gift? t know what you mean with mobile continues to send the document , but if you have this problem with office word or other office applications, try to check some forums where you can find the discussion on the similar theme.

    I can't give you a precise answer, but maybe it's specific parameters of the agency or key accidentally on the keyboard and on the incoming interruption way symbol.

  • loop running only when the mouse or keyboard are active

    Hello

    I started a few weeks ago a pretty big VI. Most of the program is included in a large loop. But I feel it's to slow down unnecessarily. So to optimize it, I would like that the VI only works when the mouse or keyboard is acting on it. It would free up the CPU when I do not use it without having to shut it down. I found on the internet how to use the "wait for" to slow down the loop, but in doing so, some parts of the VI that must run in real time also slow down. I think that my idea should be more effective as well for applications in real-time and to free the memory.

    Accordingly, how can I ask the while loop to skip to the next iteration only when you press the mouse button or when a field is filled by the keyboard? Or is there an alternative for the while loop?

    Thank you

    Isaac

    Hello

    You can check this by using the structure of the event and monitor the activities of the mouse and the keyboard.

    I have change a simple VI to show this, please see the attachment.

    In the meantime, you can consult this example available on ni.com

    http://zone.NI.com/DevZone/CDA/EPD/p/ID/3924

    Kind regards

    Lou KwokHow

    AE OR Singapore

  • How can I create a loop with delays in the series?

    Hi all

    So I wrote a Labview program to control both machines. Very simply, one is a source of tension, and the other is a Lock-In amplifier. What I want to do is change the applied voltage, wait a few seconds for the response of GARLIC to settle, then take a number of measures of GARLIC, then those on average and save to file.

    Here is a flowchart of what I mean:

    I did it for the most part, but I'm having a little trouble with the delay. VI file is huge, so I tried to make a simplified architecture that shows the basics of what I do:

    (The string and the constant matrix constants aren't actually what I use, it's just to illustrate, because I don't know how to make a quick easy space reserved for diagrams... is there an easy way?)

    So my assumption here (and it seems that it is happening) is that, for each iteration more outside of the loop, the first thing it does is start the countdown and start the change applied voltage/etc. at the same TIME, right?

    And then he only goes in the loop of measure LIA once she completed both of these tasks, right? (Please correct me if I'm wrong!)

    Then, how would make a delay after the loop of measure LIA? If what I've said so far is correct, then if I put a 'waiting' in the main loop, I don't think that it works (or at least not be very specific) because he would begin as soon as the iteration, would therefore be cash while GARLIC measured, and so do not wait the right amount of time after the loop LIA was finished (if I even put that it is long enough that it was still underway after This loop was completed).

    Am I correct in what I said?

    What is the smart way to do this?

    Thank you!

    You're right about the order data flow, which is usually the fall of most starting LabVIEW developers.

    To add a wait behind the inside loop, ask a node pending within a structure (the simplest being a structure flat sequence) and add some sort of data flow from the output of this loop to the structure of waiting. This will force this structure will not work until the loop ends.

    That being said, there is a better way to do this. Look in the Simple State Machine with LabVIEW 2012 and more recent architecture model.

    Edit: NIquist beat me to it.

  • 20 second delay when connecting to the network of PCs

    We live a 20-second delay when you try to connect through Windows Explorer for some of the XP (SP3 and all updates if it excludes http://support.microsoft.com/kb/899409) PCs on our network.  For example, if I type \\10.10.10.7 in the address bar, it takes 20 seconds for the action to appear.  If I type \\10.10.10.7\Scans (a share on this PC), it goes through instantly.  I checked our Active Directory Windows Server 2003 DNS and forward and reverse zones look good.  I looked at the IP as the PC receive (10.10.10.n, 10.10.11.n, and 10.10.12.n) Windows DHCP server, and there is no correlation.  I tried to use different and checked the share and NTFS permissions user accounts, but this does not seem to matter.  I tried ipconfig, ping, tracert, arp, pathping, netsh diag gui and it all passes.  We have some PC located in work that work and other groups that do not work.  We have some PC related to our field that work and some that don't work.  We have some PC which sometimes gives behind us and sometimes we do not delay, we are certain that we always give delayed, and we never give us the delay.  We are in a high school environment, and the delay is causing many problems.  So if you have ideas on how to isolate the problem that could be appreciated.

    Then the index according to me lies in the instant connection on the one hand, but the 20 delay when you try to connect to the computer to see its actions.

    Thank you

    Mark

    Hello

    The question you have posted will be well suited in the TechNet forum. Click on the link below.

    http://social.technet.Microsoft.com/forums/en-us/categories/

    Thanks and regards.

    Thahaseena M
    Microsoft Answers Support Engineer.
    Visit ourMicrosoft answers feedback Forum and let us know what you think.

  • Remote Desktop, response delayed when typing using the SHIFT key

    I have a laptop running Vista professional that I used to connect (DSL) to a desktop computer using remote desktop (XP) work.  Several months ago, I started noticing a response delayed when typing using the SHIFT key. For example my name, Garth, might get typed Garth, the text could (for example) get typed as 9 example0 and so on. The delay of the effects as well the pressed ALT key and assigns these keys on both sides of the keyboard.
    I did not used to have this problem and wonder if an automatic update to my laptop (vista) could have caused this problem. This problem does not exist when I connect the laptop using office away from my local Starbucks. My other laptop (older) doesn't have this problem at home or on the go.

    Well Garth, it seems that the problem may be with your home network if you have 'no' to this question when connecting to a local Starbucks.

    While you're at home with this laptop and connected to your DSL, it is a problem if you are 'not' connected to the desktop computer?  Or is it a problem regardless of whether you are connected or not connected to the work computer?

  • delay in response time when answering calls so that the screen is active (xperia z5)

    When a click 'reply' during the screen is active, it fails the call as expected. It sometimes takes a few attempts. There is a known issue on Android 5.1.1 (Build number 32.0.A.6.200)

    Developer the activated options. See the option key is enabled. I can see to the touch, but answer the phone software is delayed.

    I ran the following tests:

    Operating time

    The screen locked (idle screen): immidiate response

    Screen in use (youtube): 4 keys (4 seconds) to answer or refuse

    Screen in use (whatsapp): 3 keys (3 seconds) to answer or refuse

    Active Screen (home screen): 1 touch (3 seconds) to answer or refuse

    Links: https://support.sonymobile.com/gb/xperiaz5compact/userguide/Receiving-calls/

    Is there a fix or is there an update to correct the offset.

    Thank you

    @z5_sach

    then its probably a third-party app act up

  • When you try to install the update to upgrade windows 7 pro for windows ' 0 pro update windows seems even after 5-10 min in a loop with no sign of progress.

    * Original Title: windows update

    When you try to install the update to upgrade windows 7 pro for windows ' 0 pro update windows seems even after 5-10 min in a loop with no sign of progress.

    If anyone has any ideas on how it can be fixed please tell me

    Adam

    Please run the Windows Update Troubleshooter:
    http://go.Microsoft.com/?linkid=9830262

    Please provide the exact details of any problem it reports as not fixed.

Maybe you are looking for