[ETA: posted in the wrong forum, sorry! will transfer in the relevant forum] playback of samples: atomicity of critical section?

Hi all

I have the following situation:
-a single thread (T1) is constantly reading from a USB NI 9229 module samples into a local buffer and copying a table a (44100 Hz)
-another thread (T2) is waiting for an order and then copy a lot of A 44100 samples to a local array variable and make a calculation with them
-array A is protected in a critical section (T1 and T2 enter the critical section when you work with A directly and then leave)

How "atomic" is the device samples in my array A reading? That is, it is guaranteed that the protection of the critical section in a way that at the time T2 accesses A, T1 has finished writing 44100 samples in there?
Or should I register with DAQmxRegisterEveryNSamplesEvent() a reminder that 1) reads 44100 samples, 2) warns T2 that the batch is complete and available?

Thank you in advance!

As I understand the situation, the answer should be "Yes": the table is protected until you exit the critical section.

But may I suggest an alternative, perhaps simpler approach?

If you configure a thread safe queue 44100 elements that ignores old items, with T1 that fills on top, T2 can freely read the queue without disturbing T1, seen available the most recent series of data in any time.

Tags: NI Software

Similar Questions

  • Edit a post on the forum... How?

    I posted a question on the wrong forum. I did not discover this until 2 days later.

    How can I get into my post and assign it to a new forum?

    Only a moderator can move to a post in another forum. So if you don't get an answer in a day or two, just re-post in the right forum.

    Otherwise, to change the content of your messages, log on to the forum and move your mouse pointer to the right of the blue box where it says sent by... Black arrowhead should appear. Hover over the arrow until the menu goes down with Edit option.

    BTW: Do not click this arrow in the blue box. Who will just take back you to the top of the page you are on, instead of the menu.

  • How can I change one of my own posts on the community forum?

    I made a post on the forum, but the formatting has made it very difficult to read. I can't find any way to change one of my own posts?

    Chrome worked OK so not sure what's wrong with IE.

    Thank you

  • Problems with the picture quality when viewing under 100%. First post on the forum.

    Hello everyone. I'm sorry, we have the GET acquainted with this way, but I'm having some problems and this is one of my recent options to get the help.   Let me explain the problem.    Consultation of a file of less than 100% zoom, everything seems jagged as anti aliasing is missing.  Once I'm at 100% zoom, everything seems as it should. The saved file (for example jpeg format) is correct. I can zoom out and seems to be always faithful to the image. The problem is related to photoshop. I installed my latest GPU drivers twice just to be sure, and it was not that.   This problem started last night and I'm not sure how to solve.  If I work on images low resolution, it is not a problem as bad because I will be working on 100% zoom, but I work on images high resolution / paintings. Somewhere around 8000 x 5000 pixels so, work 100% is not that feasible. I have attached an image that illustrates this problem. The right one is zoomed in by the version and the left is the zoom in version.  Yes, the noise is touched by it, evil, but this started last night. until then, everything seemed fine even with the noise or the sharpness of the world output. I can't imagine what I could have done to trigger it.

    test.jpgThat said, I'm at the mercy of more sophisticated here people. I hope I have posted this question in the right section. It's my first post here so I'm sorry if I missed something.   Looking forward to your answers.

    This is a simplistic view, I feel may help you to understand the reality.

    The only time that you look at your image pixels in Photoshop is when you have zoomed in to 100%, it has your look at the pixels of the image in Photoshop for your image at the resolution of your display.

    At any zoom level, looking for an image on a scale that has more or less of pixels that your real picture that too, these are displayed in your display resolution.

    Scaling done by Photoshop is made to display your image is made for good performance, not the best image quality fast interpolation.   That's why at certain levels of zoom image quality seems poorer than at other levels of zoom.

    High resolution screen now have add a new problem.   User interfaces have been designed for screens with resolutions around 100 PPI elements like text, icon and other things like checkboxes, buttons etc. were created size so it would be usable it are more or less fixed 100 dpi.   While Photoshop is designed to scale to your images in order to work well on it is has not been designed with a scalable user interface.  Photoshop can't change its UI regardless of its display high resolution will display image for you.  Display Image in Photoshop has the same resolution as the rest of the User Interface of Photoshop.  Just as there is only one resolution in all layers in a document. CC 2014 2xUI changes.  PS IU is proportional to the image of the area is to the actual resolution of the poster of resolution 1/2.

    Photoshop CC 2014 2 x UI balance all Photoshop User Interface, including the image shown at 200% which is 1/2 the resolution of your screen you cut effectively display pixel count to 1/4 of the number of actual pixels.   Your new running on a low resolution screen.     If your screen has a native resolution 200 PPI you run it at 100 ppi if your display has a 300 PPI resolution you run at 150ppi.    Which goes against the reason for high resolution.  Who would you be able to edit your images to a print resolution.  Adobe cc2x UI will scale the user interface, but not the window image soa inage is 216ppi on the Surface Pro 3 user interface is great and dpoes do not match. screen

    To be able to edit your images to a print resolution you need to display the a a print resolution and you need and demand her can scale its image and its independent user interface display.

    Currently there is no OS interface to have several areas of resolutions on a screen and applications such as Photoshop does not scale UI and Image independently.  OS and Photoshop fits what is displayed.  Executable of Adobe Photoshop is coded in a way that it say Microsoft Windows OS it will load display scaling so that he can use the native resolution of your poster.  Currently only Photoshop CC 2014 offer you with the possibility to run you view at half the resolution.

    Windows fits view you lots of resolution and as several presets.  as 100%, 125%, 150% and 200% half of resolution Adobe.    You can make a Windows registry and add an external manifest Photoshop file of the Microsoft Windows tell to handle display scale.  I have a machine to windows Microsoft Surface Pro 3 Mr. its LCD screen has a resolution of 216PPI.  Windows 8.1 had 4 preset for the scale of its LCD screen.

    Surface Pro 3 screen LCD IPS 12 "display the 9.984603532054124 3:2 aspect ratio" Wide, 6.656402354702749 "high 216.3330765278394 PPI

    Scaling of display predefined Microsoft

    100% 216 2160 x 1440 DPI

    125% 173 1728 x 1152 PPI

    150% 1440 x 960 144 PPI SP3 to the position

    200% 1080 x 720 PPI, 108

    User most these days above 1024 x 768 or better poster and Web pages are often created for pages in 800 x 600 pixels. In order to give a better grip on the resolution and scaling that I change a 800 x 600 document with px grid 25 x 25 on my Surface pro 3

    scale 4 Windows presets and captured using the 2160 x 1140 to bracts screens only to the 100% preset the image window has a 216ppi also note x 2 @ Photoshop UI UI doe does not not on-screen

    Adobe Photoshop CC 2014 2xUI scales the user interface for a display resolution 1/2 but is not suited to the actual screen resolution Image area uses. Information system support Photoshop displays the screen i 1/2 resilution 1080 x 720 but scalet imase to the actual resolution 2160 x 1440. However, the image window is the 216ppi the 108ppi of the UI via the scaling

  • Is this the wrong Forum? (conversion q.)

    Hi, I posted a question
    here yesterday asking about how to convert a Flash movie in a YouTube ready (.avi, .mpg, .mov, .wmp) format and do not have all the answers. I'm brand new to both Flash and this Web site, and so I don't know how it works. It could be that just, I didn't wait long enough for a reply, but I have no way of knowing if this is the case. Someone would be able to tell me if I did not get all the answers because
    (a) I did not write my post properly
    (b) my problem is very difficult and nobody knows the answer
    (c) I write in the wrong forum
    (d) none of the above?

    If I write on the wrong forum (lots of messages I have read here seems to be related to issues of actionscript, and mine is certainly more graphic and made related), I would like to know where is the appropriate place to ask for help.

    Any response would be greatly appreciated!

    Gillian

    You could try Sothink SWF to Video converter. Flash is often not very good on the conversion of a Flash project in video format. Maybe they fixed in CS4, but output to MOV or AVI format can sometimes be buggy and inconsistent.

    I much prefer to use the program I mentioned. Exit a SWF file, then the SWF file to the video program does a very good job output to AVI, MPEG and a few other formats. You can download a trial version for 30 days here:

    SWF to Video Converter

  • website valid W3C, initially no error reported by the developer toolbar. But by right clicking (giving the menu validation), the toolbar reports two errors: width and height. Despite the fact that each page is posted! The forum for the toolbar, this i

    website valid W3C, initially no error reported by the developer toolbar. But by right clicking (giving the menu validation), the toolbar reports two errors: width and height. Despite the fact that each page is posted! The forum for the toolbar, it's supposed to be a browser error. So, how can it be fixed? I use FF 3.6.6

    This has happened

    Each time Firefox opened

    is after upgrade to 3.5?

    http://chrispederick.com/forums/viewtopic.php?PID=8239#p8239

    You create a new profile and install only the extension Web Developer, as recommended Chris?

  • Tried to post in the forum Adobe Stock and says I'm not allowed?

    Why can't I post a question?

    It was my post in the Forum of Stock from Adobe, I bought this image, but after the download, this is only 1.238 "x 698" WAY to SMALL 97809335.ai

    Hi Mary,

    I apologize for the inconvenience. I'll add a credit to your account so that you can use the license.

    Thank you Brad for confirm.

    Kind regards

    Sheena

  • How can I post in the forum of vCenter?

    In the forum of vCenter

    http://communities.VMware.com/community/VMTN/Server/vCenter?view=discussions & start = 0

    When I click on [start a Discussion], then I took to

    http://communities.VMware.com/post! input.jspa? containerType = 14 & container = 2423

    who says

    You are not allowed to post in this forum.

    It seems that you are not allowed to view what you requested. You can contact your administrator if you think that it is a mistake.

    I am able to post in the forum of the workstation, then why not in vCenter forum?

    How can I "contact my administrator?

    -This forum?

    -Contact us | Site Feedback?

    -Contact us | Customer support?

    -Help | Supported assistance | Send a request for assistance online?

    -Feedback?

    -Comments | Contact us?

    -Support & downloads | Contact technical support?

    Why is "contact your administrator" not a link?

    I believe this particular forum is a top-level container.  You must select one of the sub-communities (on the right side of the page) to go in and actually publish.

  • How publish data from the table with some data loss all post in the forum

    I wonder how people are displayed the data in the table or the result of a query with losing them its format from Sqlplus display when they post in the forums of Oracle. I searched on the basis of knowledge of DB but I see no article about it. can you please help me or direct me to this link, I tried different options using code and other tags but nothing has worked, thank you for your help. Thank you.

    Edited by: Ariean October 3, 2011 12:34

    You can click on the link to the FAQ at the top right: http://wikis.sun.com/display/Forums/Forums+FAQ.

  • How can I change the tags on my post on the support forum?

    My recent post ('start failure after firefox 12.0...') has been marked as a post on Firefox 3.6, but it was a post about a problem with Firefox 12.0. My problem is that Firefox 12.0 would not start once it has been installed. I had to re - install Firefox 3.6 to write the post. Now, the message is marked as a pole of Firefox 3.6. The same problem occurred last month when updating Firefox 11. I would like to remove the current tags and replace them with Firefox 12.0.

    How can I change the tags on my post?

    Added: this post has the same problem.

    I removed the tags in Firefox 3.6 and added the tag Firefox 12.0 to that thread instead.

  • Cannot make a post about the dynamic size

    Hey everybody,

    I am not able to make a post in the forum about a problem which concerns dynamicsize in graphics.

    I'm not even sure that I will be able to make this post.

    Can someone help me with this issue?

    I can stick the issue here if necessary.

    The error that is presented is: "because of Spam, this content is blocked.

    Kind regards

    Frederico.

    FredericoSB wrote:

    The error that is presented is: "because of Spam, this content is blocked.

    What you are trying to view includes the words that are on the list of the words used by spammers.

    "For example, if your test includes some specific city names, disinfect then to become 'Ville1' city2 ' etc.

    Spammers have historically used what some might think otherwise as harmless words (S H O E or H A N D B A G M U M B A I), but they used them with such frequency that the administrators of the site have added these words to the prohibited list.

    As you can appreciate, this list is private.

    (Why make it public for spammers to see?)

    Even the community moderators don't know what is on the list of words.

    You will understand by trial and error in a manual way.

  • a film to return to the poster after the end of the force?

    Hello

    is it possible to force a movie to return to the fram poster after its finished playing?

    I could have placed this question in the wrong place, but I'm asking specifically for interactive PDF files.

    I ask because I created a poster with a "play" button frame, and the video is of a person speaking. I could of course be the last image of the film contains a button "play" as well, but I was wondering if there was something that might make indesign back to the poster, without interfering with the film to simulate the effect of edition.

    Thanks in advance,

    just realized that I write in the wrong forum. My question is specific to .mov movies and interactive PDF files. So I write in this forum. My apologies for the confusion.

  • Question of relative/absolute link in F4V file to post on the Web

    Hello, I am new to Flash, but am familiar with HTML, Photoshop and Illustrator.  I work in Flash CS4.  I have successfully run a .wmv file through the Media Encoder, converted into a file f4v, imported into Flash and published with a skin in a folder on my hard drive.

    I'm learning it on my own (no one else in my State Agency knows Flash - we just start posting videos on the Internet, and it is the test case).

    I get the following four files in a folder on my hard drive (I put in brackets what I think the files do, please correct if I am wrong):

    Oil.F4V (movie file)

    Test.html (the html page in which the swf file is embedded to play the movie)

    Test.swf (the SWF that is embedded in the html page)

    SkinUnderPlayStopSeekMuteVol.swf (linked from the Test.swf file skin file?)

    My question is: as a long time that these four files reside in the original case, the html page displays the film perfectly.  As soon as I rename the folder, nothing works.  It seems to be a question of restoring a relative/absolute link among the files?

    I want to put these on my site online to test, but courses that do not work, but either.

    I apologize in advance if an answer is already posted on the forum, I searched but did not find one that addressed this particular issue.

    Thank you all in advance for any help you can offer!

    If everything is in the same folder, just delete the path in the properties panel and use only oil.f4v

  • Intrepid Beta testers needed. Discover the flow of information to the poster to the left of the text.

    Intrepid Beta testers needed. Discover the information flow of the poster to the left of the text box.

    Adjust the format and presentation of the ASC Web Pages

    You can see a screenshot of the discussion How can I find my own posts?  That's what your experience of the CSA will be after you apply the style of the user.  I made the changes to move the user information. I have built on the work of Hiroto, and. turingtest2.

    R

    Today is 24June

    Most recent PasteBin is dated 22June - what to test?

    EDITadded

    Why not just post the link to PasteBin here?

  • When you open a new session and after a decline in all the video files in the content area (the sound and the video is very good). After you have chosen a selection of clip the first clip that I post on the time line is equipped with sound. then the next

    When you open a new session and after a decline in all the video files in the content area (the sound and the video is very good). After choosing a selection of clip, the first clip that I post on the time line is equipped with sound. then the next clip, I chose (not dose issue)
    will have no sound. (but in the contact box everything its fine) Why is this?

    Why is this?

    Because you forgot to patch source audio track.

Maybe you are looking for

  • How to choose which language version of Windows to use?

    In Finland Toshiba Satellite L670-128 comes with pre-installed Windows 7 Home Premium and the user must be able to choose between versions of Windows in English, Swedish, Finnish, Norwegian and Danish. However, when I started the computer for the fir

  • Front Panel does not (exactly 2 even while in flat sequence loop)? LabVIEW BUG?

    Hello world I have two while loop with exactly the same code and a user in each loop event structure, They both make the same thing which is too run until IMAQ image control (one line) click on a recording. I used a flat sequence to manage the order

  • Mail only handed to me with read receipt requested.

    Messages sent from a particular recipient are not distributed in my Live Mail Inbox, unless they request a read receipt. No idea why? I can return to the sender without problem. When they replicate another cc recipients would receive the response. Th

  • HP deskjet 1000 j110a

    To save on the cost of printing, I intend to print some documents colored in black only. Is there a way to do it without going through the basket color that is installed? I have Win xp sp3 os.

  • Nik software is not displayed in Lightroom 6.5

    Like many, I downloaded this for the first time yesterday. I installed it and it works very well in Photoshop, but it does not show in Lightroom 6.5. Is there something I need to do to make it work with Lightroom?