How to stop an acquisition continues in producer/consumer


I'm trying to use producer/consumer to control 'Start' and 'Stop' to my continuous data acquisition system. I can start the acquisition process successfully, but I can't stop it botton 'Stop '.

I enclose my simplified VI. Can anyone help to have a look and tell me what is the problem here?

Thank you


As I said before, use a notification utility and manage the expiration time.  I used a select statement with timeout? Optional Boolean.  If a time-out of events, use the previous value.  If we got a notification, use this value.

Tags: NI Software

Similar Questions

  • How to stop the acquisition with a relaxation with the NI PCIe-6323

    Hi all

    I wonder if it is possible to stop data acquisition or pcie-6323 with a trigger pulse the same way that I begin to acquire samples with a finished sample mode trigger pulse.

    Thanks in advance


    The samplesPerChannel that you can show what the sample clock configuration defines the total number of samples for the acquisition of finishes.  In your case, you will read the data previously triggered so permanently in force this setting really only sets the size of the buffer.  If you want to just be large enough to avoid overtaking (although...) If the window you buy is potentially very short, you might want to explicitly configure the size of the buffer to something bigger and maintain the value of samplesPerChannel down so that the reference trigger can be accepted earlier).

    The numberOfSamples you specify when you start the player defines the number of samples for the next call for reading.  If you can read the small windows of streaming data to avoid having a blocking with a large timeout call.  If you do not want to change the time-out period, it is a property of the DAQStream class.

    The "continuous" examples (e.g. this one) should show how you can read back data asynchronous as it is acquired.  Your configuration looks more like a "continuous" example

    Since you want to start and stop using the same line as the trigger, perhaps an alternative to the evolution of the default read pointer would be to set up a central task of analog input with a relaxing break.  The caveat to this is that the break does not stop at the task and as soon as the line goes back to you will begin to acquire the data again - I would say using a meter to separate groups of samples in the buffer zone continued.  If you wish to purchase multiple windows of data in short succession well, then I would go with that instead to avoid having to restart the task (and potentially Miss samples during the restart of the task).

    Best regards

  • How to stop a multilist continue the number after the start of a new section?

    I created a style multilist, but during its use in RoboHelp 9 (also tested in RoboHelp 11), I'm unable to create a new list with this format without the continuous numbering from the previous list.  Numbers to continue even if I try to change to 1.  When I change to 1 (which is already selected under the format bullets and numbering), the number disappears and the style is set to normal.

    The following coding to the list:

    HR-list. Basic1 {}

    x - lvl 2-type: lower-alpha;

    LVL-x-type-4: decimal;

    x lvl-4-format: "& < x > o & c."

    x lvl-5-format: "& < x > o & c."

    x - lvl 6-type: lower-Roman;

    x lvl-6-format: "& < x > o & c."

    x lvl-7 in the format: '< x >.';

    x - lvl 9-type: lower-Roman;

    x lvl-1-pfx-class: rls-1-Basic1;

    3 x-lvl-type: lower-Roman;

    x lvl-3-format: '< x >.';

    x lvl-2-format: '< x >.';

    x lvl-1-format: '< x >.';

    x lvl-5-type: lower-alpha;

    x - lvl 7-type: circle;

    x - lvl 8-type: disc;

    x lvl-8-pfx-class: rls-8-Basic1;

    x lvl-7-pfx-class: rls-7-Basic1;

    x lvl-6-pfx-class: rls-6-Basic1;

    x lvl-5-pfx-class: rls-5-Basic1;

    x lvl-4-pfx-class: rls-4-Basic1;

    x lvl-3-pfx-class: rls-3-Basic1;

    x lvl-2-pfx-class: rls-2-Basic1;

    x lvl-8-format: "< x >";

    x lvl-9-pfx-class: rls-9-Basic1;

    x lvl-1-p-tag: P;

    x lvl-2-margin: 20px;

    x lvl-2-p-tag: P;

    x lvl-3-margin: 40px;

    x lvl-3-p-tag: P;

    x lvl-4-margin: 60px banner;

    x lvl-4-p-tag: P;

    x lvl-5-margin: 80px;

    x lvl-5-p-tag: P;

    x lvl-6-margin: 100px;

    x lvl-6-p-tag: P;

    x lvl-7-margin: 120px;

    x lvl-7-p-tag: P;

    x lvl-8-margin: 140px;

    x lvl 8-p-tag: P;

    x level-count: 9;

    x lvl-9-margin: 160px;

    x lvl-9-p-tag: P;


    span. RLS-1-Basic1 {}

    do-family: Verdana;

    do-size: 10pt;


    span. RLS-2-Basic1 {}

    do-family: Verdana;

    do-size: 10pt;


    span. RLS-3-Basic1 {}

    do-family: Verdana;

    do-size: 10pt;


    span. RLS-8-Basic1 {}

    do-family: Verdana;

    do-size: 10pt;


    span. RLS-7-Basic1 {}

    do-family: Verdana;

    do-size: 10pt;


    span. RLS-6-Basic1 {}

    do-family: Verdana;

    do-size: 10pt;


    span. RLS-5-Basic1 {}

    do-family: Verdana;

    do-size: 10pt;


    span. RLS-4-Basic1 {}

    do-family: Verdana;

    do-size: 10pt;


    span. RLS-3-Basic1 {}

    do-family: Verdana;

    do-size: 10pt;


    span. RLS-2-Basic1 {}

    do-family: Verdana;

    do-size: 10pt;


    span. RLS-9-Basic1 {}

    do-family: Verdana;

    do-size: 10pt;


    It worked.  I try to change the numbering in the bullets and numbering.  Thank you.

  • Foxfire runs when "Pac Man" plays continuously. How to stop it?

    It started this morning for the first time. He plays when Foxfire is activated, not with IExplorer. Foxfire runs when "Pac Man" plays continuously. How to stop it?

    This has happened

    Each time Firefox opened


    User Agent

    Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; GTB6.4; .NET CLR 1.0.3705; .NET CLR 1.1.4322;. Media Center PC 4.0; .NET CLR 2.0.50727; WWTClient2 .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

    Removal of CoolPreviews 3.1 seems to have solved my problem.

  • Producer-consumer mode, PDM and Acquisition journal continues

    I created a VI based on events to control the parameters of data acquisition. I created a queue of producer-consumer in TDMS file in the loop of the consumer.

    Question 1: Why should I get DAQmx TASK through each defined event? If I don't, I get error task DAQmx.

    Question 2: I need the QUEUE of each event? If I don't I get error in the file close TDMS (consumer loop)

    Question 3: When I look at the data file, I get manily in the near TDMS file loop of consumer-related. Since there is no element in the QUEUE why should - I get this error.

    Please advice.

    Thank you

    This is certainly not how I would like to start to create a Soft Front Panel for a task to HAVE.  Leave to file logging asside for now (appearing, it is actually very easy to add later.)

    As food for thought - and because that create a FPS really involves a slightly different thought where you started I whip a 'start' of a FPS.  It also shows how to create a simple API around a 'resource Module.   (Just a natural extension of a "motor action - if you haven read the nugget of community is always a good read.")

    What I compressed is not complete - but you should get an idea of what to expand and where.  You could even have there more faster here than when you are now.

    An approach like that can really help when you go to unwind the problems as you mentioned in your code when you are unable to move around the information that the GUI can't really do use anyway and not IS NOT NECESSARY at this level.  the guys from 'Computer Science' will use terms such as 'Hide data', "Functional Abstraction" and "Encapsulation".

    The capture below is meant to tease the project so that others can get the idea of code - (sorry no LAVA TDC today! )

  • If I do the free trial of 30 days for photoshop how to stop use it so I don't is not charged after 30 days? It will just fade away? or if I continue to use it I will be in charge?

    If I use the free 30-day trial for photoshop I get charged if I continue to use the application after 30 days? Or how to stop using it after 30 days

    There is no charge and no financial information that must be given to your 30-day trial.  your software will stop working after 30 days so keep using it beyond this period will require payment.

  • How to stop the log in page and continue straight on the desktop at boot?

    Original title: desktop

    How to stop the newspaper in stright page and go to the desktop page when starting

    Hi Ms.HarleyChic,

    Windows operating system you are using?

    If you use Windows 7, try the steps in the following article and check if this can help:

    Enable or disable a secure connection (CTRL + ALT + DELETE)

  • acquisition and recording of analog data with producer consumer model

    Someone on this forum, in a separate last week discussion, suggested that I use the producer model consumer data acq.  My ultimate goal is to acquire analog channels 1-4 continuous data, display graphical band style and save the data on the boot disk when the user presses the 'Start Saving' button (and will continue to display recorder cards).  Economy will stop when the user presses the button "Stop Saving" but strip map will continue to operate.

    My attempt to use the producer-consumer model is attached (LV 8.5 only).  It does not work.  I have not tried to implement for recording user controls - just trying to make simple continuous display and save (1 channel) at this stage, using this model.  VI runs, but the graphic Strip is never updated with the actual data, and the data file that is saved has zero byte inside.

    Thank you.


    Looked at your code, and you are right.  It won't work.

    Take a look at this example:

    The VI of the acquisition must be inserted in the loop of the producer.  In addition, you must tell him how many samples for (otherwise, it will get 0).

  • First try the producer consumer Architecture: continuous play and dynamically update settings.


    I am currently working with two instruments; an Agilent E3646A and a NI 6212 BNC. My goal is to have the 6212 continuously take measures according to predefined parameters while the E3646A parameters can be continuously updated. This combination simple instrument aims to help me learn the manual architecture; continuous measurement, output dynamic controls and instruments more will be added in the future.

    I've already posted on a similar, but more complicated configuration ( and was advised to try the producer consumer Architecture.) I found the documentation on the website (,, searched the forums and built my own VI. While my first attempt at a producer consumer Architecture has solved some of the problems I had when I posted on the subject, however, new questions have been raised regarding the reading and adoption of the VI.

    I am currently able to run the VI and update the settings on the device. Previously, I'd get a freeze while the instrument has been updated and could not switch settings until it was done. This has been resolved, although that reading updates only when a parameter has been updated, although it is outside the structure of the event. In addition, the Stop button does not in any context. I also got occasional mistakes on the part of Deqeue, but the major part of the sentence is error-200279 'A tried to read samples that are no longer available' to DAQmx Read. I realize that there is a problem in my loop of producer but have not been able to find a way to solve it.

    This is my first attempt at a producer consumer Architecture and already I can see that it is a powerful tool. I read as much as I could and looked at examples, but should have some problems at the beginning. Would be very grateful of any advice so I can take full advantage of the architecture.

    Hope to hear from you,

    Yusif Nurizade

    You're going to overflow this buffer, unless the events are generated faster than "sample rate/number of samples.   Period.  Nothing could be simpler.

    You don't need a local to stop your curls.

    Try something like this attachment.  I simply moved the structure of the event in its own loop dedicated since it had nothing to do with acquiring data at all.

    Data acquisition loop stops very well when you destroy the task and destrying the stops of power queue (sending the default values of the queue for the power control) for EXAMPLE, to ADD a group of setting 'Safe shutdown' to a 'package' and it wire to the Center terminal (Prototype).

  • Acquisition continues two sensors LVDT

    I'm trying to build a program to monitor the two LVDT sensors inside a table of machining to measure vibrations. I wish I could acquire as close as possible continuous. I'm looking for small delays because the plan is to have a feedback mechanism later and this would require very fast reaction.

    I have some experience with labview but am quite new to the use of the structures of the queue. I have done wrong data in a type that I can work with. How can remove my waveform data and use it to perform calculations on the frequency and amplitude?

    And by the way, I implement the queue correctly? or does anyone have recommendations to my disposal vi and architecture?

    Thank you very much for your help.

    I'm using labview 8, but I have access on other computers to labview 9.

    -Arthur J.

    In the original VI you posted you do not do anything with the data in the queue.  You preview the queue and then nothing connect to the wire.

    1. use Dequeue.  This removes the oldest element from the queue and makes it available.  Overview examines the data without deleting the queue.

    2 do something with the data.  I looks like you can split the four-channel LVDT and places the data in the shift registers.  Do you need to initialize the shift registers or do you want that perform the data from the old stored and used in the next series?  It is usually best to initialize arrays to the maximum size that you want, and then use replace element of array located inside the loop.  This avoids the reallocation of memory.

    3. review the appropriate data structure.  You start by buying a table of waveforms.  After the filter, you have dynamic data.  You use in the loop of another tables 1 d of doubles.  If you haven't since the waveforms calendar information, try to get data from the reading of data acquisition in a table of double and stay with this type of data overall.

    4. consider to put the filter in the lower loop.  Usually a producer/consumer that architecture acquired only data in the loop producer and all analyses in the loop of the consumer.

    5. as someone pointed out before you need not the structure of the sequence.  Data flow will take care of that.  You must connect the terminal nodes Visible property error loops below to apply the desired sequence.  Use a control with a blank label is OK, but if you have two of them how do you know which is set Visible?  It is better to give each control and seeing a unique label.  If you don't want the user to see the label, check the invisible label or use a legend or both.


  • How to stop the album in music to repeat on the iPhone 6

    6, 64 GB, iOS 10.0.1, updated iPhone apps

    I like listening to an album all to fall asleep. With an old iPod and a SoundDock, the album stops playing after it's over. With my iPhone 6, the album - or perhaps an individual song - continues to play all night when I'm using EarPods or just have the phone close to home. How to stop repeating? Do I have to click on each track and make sure that the symbol of repetition is turned off, or there at - it a way to stop the whole album to repeat?

    Off tell Siri 'Repeat '.


  • "How to stop this message"do you want to install the plugin required to view media on this page.

    How to stop this message "do you want to install the plugin required to view media on this page.

    I don't need the plugin to play the video ok

    If it comes from the Flash plugin you can switch pref plugins.notifyMissingFlash false on the topic: config page.

    You can open the topic: config page via the bar of address and you can accept the warning and click "I'll be careful" to continue.


    By learning about the same product originating from different sites, say, I decide on a site before all others have finished downloading of their information. However, to make sure that I don't do not cancel / lose all sites under consideration, I wish to stop them download while I am looking at the chosen location. If the siting proved unacceptable, I can simply continue with downloads on other sites by clicking on "Reload" in each tab now, this is not possible, as I kill each tab, which means I lose this option.
    Help, please. Where am I missing it? (I just chose Mozilla and cancelled Google Chrome - I don't know you guys can help).
    Sincere greetings,

    If the URL in the address bar and then click on the address bar and press the Enter key or click the Go button should (re) charge this URL if a normal charging is not possible.

    How to stop other sites?

  • How to stop a site tabs does not happen at the start of Firefox?

    How to stop a site tabs does not happen at the start of Firefox?
    I inadvertently allowed Firefox to save tabs settings when I quit Firefox. Now, every time I start Firefox the tabs site continues to return. How can I cancel this site tabs to open when I run Firefox?


    • Tools > Options > general > startup: 'When Firefox starts': 'Show my home page' or 'display a blank page '.
    • Press F10, or press the Alt key to bring up the 'Menu Bar' temporarily if the menu bar is hidden.
    • Use "Firefox > Options" instead of "tools > Options" If the menu bar is hidden.
  • How to stop up to generate a waveform of the entire cycle when click on the stop button

    Dear engineer OR,.

    I have generated three AO signals to control my scanner and data acquisition. Two ramp signals is to control the galvanometric scanner (x and y). A TTL signal is to trigger the acquisition of data. Whenever I click on stop, the ramp stops every time that it is when the button is clicked, what causes a voltage jump when will resume the program again because the ramp will start in the place original (this jump of fast voltage can damage the galvanometric scanner). Could you please give me some suggestions on how to stop after only a waveform of cycle whol's over? The VI I used is attached. The FLIM is the main vi include Subvi Galvo

    Thank you very much!!

    Hello, dgql!

    From a point of view purely programming, there are a few ways you could implement this.

    (1) create a conditional stay:

    You can add features to the code such that, once you reach the stop button, the code checks the value of your signal before you actually stop the VI. In pseudo-code: "If the signal is > 0 and less than a certain value, stop." Otherwise, keep the control of signal until the value lies in this range. »

    (2) to reset the signal from the ramp at each start of your VI. This may or may not work with your application, depending on whether you must have the previous value of the ramp carried over.

    Let me know if these are of no help!

Maybe you are looking for