Consumer/producer fast AI and AO.

I made a routine for fast DAQmx (PXIe-6124) acquisition in two while loop (consumer and producer).
Currently it can be run by pushing run-button. 
But, I would like to one more while loop (totally 3) for user-friendly interface and integrating sub-program using event structure.
Among troubles I thought, these three loops can affect the acquisition speed of DAQmx.
For example, if I send a "Acquire" signal to producer and consumer of DAQmx from event loop,
this mean I also have to send "Stop" command.
This requires more functions in every real-time acquisition iteration.
-conditional state loop and cluster bundle of 2D(500*500 DBL array) and variant of command enum or data to control consumer loop in producer of DAQmx.
-conditional state loop for next step and cluster unbundle of data in consumer loop.
My question is...
Are there some special or rule-of-thumb techniques for continuous, fast and large data DAQmx acquisition in producer and consumer using three while loops?
Instead of this, do I had better use call-by-reference under other main program?
labmaster.
*)I am sorry I can't post my code because of modifying and hidden subVIs. 

You will need some logic in your producer loop to execute the stop command sent by the first while loop but won't need one for the consumer loop since it can stop on error when the producer loop is stopped and the queue you are reading from is destroyed.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies

Similar Messages

  • I have an ipod nano 5th generation. the problem with it's that it doesn't show in itunes when connected to the laptop and it switches on on its own and songs start playing the battery gets consumed too fast after full charge. what is the actual problem?

    i have an ipod nano 5th generation. the problem with it's that it doesn't show in itunes when connected to the laptop and it switches on on its own and songs start playing the battery gets consumed too fast after full charge. what is the actual problem?

    What have you tried so far in terms of troubleshooting this issue?  Are you plugging the iPod into a high powered USB 2.0 port on the back of your PC? Have you tried a different USB cable?
    What happens if you try to reset the device with it still connected to the PC?
    How to reset iPod
    Has this iPod ever worked on this PC or is this the first time you have time you have tried connecting it?
    Have you carefully worked through each and every single suggestion in this Apple support document?
    iPod not recognized in 'My Computer' and in iTunes for Windows
    B-rock

  • Producer consummer loop and timing loop

    Hi,
    I have to acquire 32 signals and record each signals. I would like to acquire my signals at a sample rate of 100kHz. But I tried with a different sample read and I have always an error of overwritten.
    In my producer loop I read and display all signals and in my consumer loop I record and resample my signal.
    But I thought It was maybe I haven t a timing loop in my producer and consumer loop and it slow my read in the buffer.
    So do you think my error due to I haven t timing loop? And if it s yes, where do I put my timing ? in the consumer or in the producer loop.
    Thank you very much for your response
    Romaric GIBERT

    Why did you start a new message thread?
    You were already being helped here.

  • Is it a proper way to use queue for consumer/producer model?

    Hi all,
      I am following the example of consumer/producer model to use the queue to synchronize the following process: The producer is a loop to produce N numbers, I will put every generated number into an array and after every 5 numbers generated, I put the array into the queue and pass it to the consumer. I have to wait the consumer use up the data and it will then remove the element from queue so the producer will get a chance to produce another 5 numbers. Since I set the maximum size of the queue to be ONE, I expect the producer and consumer take turns to produce / consume all five numbers and pass the chance to the other. Here is my code
    when the case box is false, the code will be
    For the first 5 numbers, the produce will generate every thing right and put that into the array, and it will pass the array to the quere so the consumer will get a chance to loop over the array. I except the procude's loop will continue only when the queue is available (i.e. all elements are removed), but it seems that once the consumer start the loop the produce 's loop will continue (so the indicator x+1 and x+2 will show numbers changed). But it is not what I want, I know there must be something wrong but I can't tell what is it.
    Solved!
    Go to Solution.

    dragondriver wrote:
    As you said in 1, the sequency structure enforcing the execution order, that's why I put it there, in this example, to put the issue simple, I replace the complete code with number increase, in the real case, the first +1 and +2 must be executed in that order.
    Mikeporter mentioned:
    1. Get rid of all the sequence structures. None of them are doing anything but enforcing an execution order that would be the same without them.
    So even if you remove the sequence structure, there will be a fixed & defined execution order and that is because LabVIEW follows DATA FLOW MODEL.
    Data Flow Model (specifically in context of LabVIEW): A block diagram node executes when it receives all required inputs. When a node executes, it produces output data and passes the data to the next node in the dataflow path. The movement of data through the nodes determines the execution order of the VIs and functions on the block diagram (Click here for reference).
    Now in your code, just removing the sequence structure will not make sure that the execution order will gonna remain same but you need to do few very small modifications (like pass the error wire through For loop, before it goes to 'Dequeue Element' node).
    Coming to the main topic: is it a proper way to use queue for consumer/producer model?
    The model you're using (and calling it as consumer/producer model) is way too deviated from the original consumer/producer model model.
    dragondriver wrote:
    For the second one, yes, it is my fault to remove that while. I actually start from the example of Producer/Consumer design pattern template, but I didn't pay attention to the while loop in the consumer part.
    While loops (both Producer & Consumer) are the essential part of this architecture and can't be removed. You may want to start your code again using standard template.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.

  • The battery is consumed too fast

    Problems with the battery, is consumed too fast since version 6.1.3 update. How I can fix

    The location of the phone is working in the background, so the phone being standby, the battery is drained and heated terribly
    Fix:
    Disable the location in the app's in which it has been used the last 24 hours, also on the same screen, at the option system services, disable also the location.
    Now, with 12 hours of standby and 3 hours of use, I have 70% battery!!!!.
    I pass another link with other solutions, I hope they serve:
    http://bkbeachlabs.com/blog/ios-6-1-2-battery-issue-solved/
    P.D. excuse my English

  • Hi...lags animations in games and messages and album pic..when disable assistive touch,it's true and fix..please release update to fix this in ios 7.1..i need assistive touch and fast game and animation booth!!

    Hi...lags animations in games and messages and album pic..when disable assistive touch,it's true and fix..please release update to fix this in ios 7.1..i need assistive touch and fast game and animation booth!!

    No Apple here, user to user forum.
    I will not be releasing any version of iOS ever.

  • How do you run to Drives on the same screen. I installed a ssd and a hhd to my mac but i can only view the content of the drive only if i boot of that drive. Im try to have my ssd for fast boots and hhd for my music,movies etc. Please help.

    I installed a samsung 840 pro SSD to my primary slot and relocated my 1.5 TB HDD to a data double where my optical drive was. I transfered my apps and Mac OS X to my SSD for fast boots and all my itunes movies, music, Iphoto etc to my HDD. I rebooted off my SSD then seen all the data on my HHD itunes movies, music, iphotos etc i cannot view on my SSD. So my question is how do you view all the content on both the ssd and hdd on the same screen with having to boot off one or the other?

    No, what I'm saying is that once you boot into OSX, you should be able to see both drives listed.  If you don't then either OSX is hiding the other drive because it sees it as a boot drive and is trying to protect the contents from novice users or there's another problem.  If it's the first thing (i.e. it's a protection thing), then your only option would be to boot into the old drive, copy off all your personal data to an external backup drive, then reboot into the SSD and go into Disk Utilities and wipe/reformat the second drive so that you can see it as a regular secondary drive.  Then when you see it as that, you can copy your data back to it.
    Be carefull poking around in Disk Utility as you can easily lose your data.  It's possible the Mac just isn't mounting that second drive because it sees it as another boot drive.  Whatever you do, don't accidentally erase it without getting a copy of your data off of it because you obviously don't have that on your SSD now.

  • Mdnsresponder will not quit.  Consumes above 100% CPU and kills my battery.  Also causes my fan to run constantly and my computer to get extremely hot.  Force quitting doesn't work.  It just comes back.

    The mdnsresponder will not quit.  Consumes above 100% CPU and kills my battery.  Also causes my fan to run constantly and my computer to get extremely hot.  Force quitting doesn't work.  It just comes back.   I posted about this earlier and never got an answer.  Somebody, please help. 
    Thanks.

    mDNSResponder is a background process that runs all the time. If you kill it, it's relaunched automatically.
    Please launch the Console application and select "system.log" from the file list. Enter "mDNSResponder" (without the quotes) in the search field. Post a sample of the log messages in the Console window -- only one example of each repeated message, please.

  • When I reboot my iMac I'll get hard disk selection instead of fast login and I am not using boot camp! Any help is greatly appriciated!

    When I reboot my iMac I'll get hard disk selection instead of fast login and I am not using boot camp! Any help is greatly appriciated!

    Have you selected which disk you want to boot from? In System Preferences, click startup disk and choose the drive you want as your default boot drive.

  • Using avid m-audio fast track and avid m-audio fast track solo together

    I Wanted to use avid m-audio fast track and avid m-audio fast track solo together so that I can get 4 inputs
    i I tried to select it, but could enable any one only. How can I use them together??

    You can use only one device at a time I Logic. However, in the Audio MIDI Setup utility (Applications>Utilities) you can create an aggregate device, which effectively combines multiple devices into one "virtual" device, which you can then choose in Logics' coreaudio device setup.
    How to combine multiple audio interfaces by creating an aggregate device

  • Can FFmpeg produce f4f, f4x and f4m files instead of Adobe's File Packager for HTTP Dynamic Streaming?

    I need a command tool to produce f4f , f4x and f4x files. And I know Adobe's File Packager. But I'd like to use FFmpeg(Because it's opensource) to produce those files. I am not sure whether FFmpeg can produce f4f , f4x and f4x files for HTTP Dynamic Streaming or not. My goal is to achieve HTTP Dynamic Streaming in Linux with opensource tool instead of Adobe Flash Media Server.

    Isn't the packager part of Flash Media Server?
    http://help.adobe.com/en_US/HTTPStreaming/1.0/Using/WS9463dbe8dbe45c4c-c126f3b1260533756d- 7ffc.html#WSaeac10ab694095a12a9a3a7d12823cda643-7fff
    HTTP live media streaming software | Adobe Media Server 5 Professional
    Adobe Media Server Help | Install Adobe Media Server

  • My macbook pro 2006 fan goes high and then makes a fast beep and shuts down it been happening since i updated

    my macbook pro 2006 fan goes high and then makes a fast beep and shuts down it been happening since i updated it should i update to lion?

    No, this problem should be solved.
    The MBP shuts down when too hot, to protect itself. First see if it is a process running astray: start Activity Monitor (in Applications/Utilities) choose <all processes> and click the %CPU column: are there processes that are using more than 50% cpu power? If yes click it and quit it, and tell us which one.

  • I am planning on buying an iPad 4 16GB, So I wanted to ask that after taking out the storage consumed by the system and system apps, How much storage will I be left with?

    I am planning on buying an iPad 4 16GB, So I wanted to ask that after taking out the storage consumed by the system and system apps, How much storage will I be left with?

    16GB vs 32GB vs 64GB: Which new iPad storage capacity should you get?
    http://www.imore.com/2012/03/08/16gb-32gb-64gb-ipad-capacity/
    How much content will fit on my iPod or iPhone?
    http://support.apple.com/kb/HT1867
     Cheers, Tom

  • Subtitle buttons - fast-forward and rewinding issue

    I am new to DVD Studio Pro 4 and I have project that uses a subtitle button over a video track to provide users with the ability to go "back" to the previous menu - the menu in which they selected the track.
    There is a problem using this method however, when fast-forward or rewind is pressed, then the track starts to play again, the back button is now hosed. My thought is that this is because of the chapter markers not being refreshed in the middle of a subtitle, only at the begining and end like bookends.
    Is there a way around this? If not, are there any buggy issues with locking down the user controls for fast-forward and rewind? Any help would be much appreciated...
    -charlie

    You can lock out the User Ops for Fast Forward Rewind or whatever you want. Probably a good idea if you are using the track as a menu effectively.
    If however the track is amovie and you want them to go back to the menu where they selected it you can target the menu for any track to go back to a specific menu. Click on the track and check out the Inspector near the bottom where it syas Remote Control. Target the menu you want people to go to back to when they press Menu on their Remote
    Steve Kirkham

  • HT1451 I have a lap top that is not very fast now and quite useless but has over 11000 songs on my I tunes account.now I have a new I pad.how do I put all the old music from the laptop onto my iPad?

    I have a lap top that is not very fast now and quite useless but has over 11000 songs on my I tunes account.now I have a new I pad.how do I put all the old music from the laptop onto my iPad?

    Follow the instructions here or here.
    (82114)

Maybe you are looking for

  • F4 for Editable field in ALV, display Name but capture ID

    Hi Friends, I have a ALV for which i have defined a Structure, which is passed to Fieldcatlog. I have defined a Search help - ZUSER_NAME which has following fields to display. USERID - USR02-BNAME FNAME LNAME FULLNAME So my structure for fieldcatalog

  • Is there a way to hide the launcher in Win95?

    Hello forte-users, i am wondering if there is a solution to hide the launcher in the task-line of Win95 without additional tools. I need a way to start the launcher as system-service or in a manner that the process is not shown in the Win95 task-line

  • Exporting Photo Taken from Contacts

    I created a new contact and took a photo from within the contacts app. It didn't show up in the iPhone camera roll. How can I export this photo to iphoto?

  • How do you schedule an appointment

    I have an Ipod touch 4th generation that stopped working right under a crack in the screen and i was wondering if I could get it replaced.

  • Getting " Application doesn't exist " in HFM workspace

    Hi , When I am trying to open a application in my HFM workspace i am getting below error " Specified Application doesn't exist" Code : - 2147220954 Actor : General security Error. I am able to open  other applications in HFM workspace  without any er