concurrent tasks HAVE, AO, c, CI


I try to control a, AO, CI card SMU-6358 simultaneously and for that I built the VI attached. If I run the VI, it does the job without any problem, but if I connect the appliance on the pin of the IC [at the door of for example ctr0] to measure the frequency of the signal, less than a second, I get the error message "tried to play back samples that are no longer available" [image attached]. Can someone please advise me what I am doing wrong.

Thank you.

Hi Kriváň,

The problem is that you have two tasks of entry in the same thread who buy data at different speeds.

The task of IT is clocked at all that note you the value.  It crashes the loop so that the desired number of samples were acquired.

The task of the CI is configured for 'Implied' timing, which means it will snap into place in a sample for each period of your input signal.  If the input signal is too fast then the loop (whose rate is regulated by the task to HAVE it) will not be able to follow.

In almost all cases, if you have two tasks, acquisition of data in the same loop that they must be synchronized to ensure that a single task acquires data more quickly than the other.

Do you need to acquire a sample of counter for each period of your input signal?  Depending on the frequency of the input signal, you might want to review the sample clocked frequency measurement method that is supported on your table for the X series.  The easiest way to get the program to work would however be to run tasks in parallel, or if you do not need to set buffer samples of your task of frequency, you could simply remove the schedule for the task of counter altogether.

Best regards

Tags: NI Software

Similar Questions

  • javafx.concurrent.Task? Docs? Examples? Support recall GUI?

    I want to do something simple:

    Thread of GUI-> blow of background task that runs in the background thread.
    Background full-> reminder of triggers in the GUI thread

    The new beta, b36, a javafx.concurrent.Task, which should support this. I can't find any documentation or the sample code on it, and I cannot infer from the API signature how to achieve this.

    I posted this same question on the article of Richard Blair about this, but no one answered and article itself has excerpts of stale code and does not also address the callback number.

    With the help of Richard previous documentation and NetBeans I could do a simple service + the task of loading a file in the background:

        private void openFileAsync(final File file) {
            final PlotRepLoaderService repLoaderService = new PlotRepLoaderService(file);
            repLoaderService.stateProperty().addListener(new ChangeListener() {
                 * {@inheritDoc}
                public void changed(ObservableValue observable, State oldValue, State newValue) {
                    if (newValue == State.SUCCEEDED) {
                        // Setup display.
                        Rep plotRep = repLoaderService.getValue();
                        PlotRepPane plotRepPane = new PlotRepPane(plotRep);
     * Service which loads plot.rep file asynchronously.
     * @author Fabrice Bouyé ([email protected])
    public class PlotRepLoaderService extends Service {
        private File file;
        public PlotRepLoaderService(File file) {
            this.file = file;
         * {@inheritDoc}
        protected Task createTask() {
            return new Task() {
                 * {@inheritDoc}
                protected Rep call() throws Exception {
                    System.out.printf("Reading file \"%s\"", file.getAbsolutePath()).println();
                    Rep plotRep =;
                    return plotRep;
                 * {@inheritDoc}
                protected void done() {

    Initially, I tried to listen to change in the workDoneProperty, but discovered that he is never called, so I guess that miss me about the workings in my work (I'll find out when the documents & samples are displayed) or maybe it's a bug:

            repLoaderService.workDoneProperty().addListener(new ChangeListener() {
                 * {@inheritDoc}
                public void changed(ObservableValue observable, Number oldValue, Number newValue) {
                    System.out.printf("workDone %f -> %f", oldValue, newValue);
  • Calendar and tasks have disappeared from Thunderbird.

    Have you tried to reinstall & update Thunderbird who worked the last time that this product when you use Windows 7 Pro. (now using Windows 10 Pro.) Restarted and stop / restarted the PC nothing works.
    Calendar is listed in my training under Mozilla Thunderbird program file.
    Windows updated yesterday and completed the beginning until today that may or may not be relevant.
    Email Thunderbird works as it always did.

    Open the Thunderbird file listed under the "calendar" Watch programs

    Don't know what you're talking about. Maybe you can provide a screenshot?
    In any case the calendar is in your Thunderbird profile folder, not in the program folder.

    Lightning is not installed because I don't want.

    Interesting. Lightning * is * the Thunderbird calendar extension.

    If you want the calendar then you need to install Lightning, whether you like it or not. You can get it from AMO.

    In case you have some problems to install it:

  • How to manage 4 sampling tasks HAVE?


    I use the NI6250 and I want to taste 4 analog inputs.

    I want to use the maximum sampling frequency of the card

    I just need to taste "simultaneously" 2 channels at the same time.

    I don't want to use the capacity 500 Mhz/ch.

    I don't want to create/delete tasks every time, but rather he implemented at the beginning of my test and then switch from one task to another.  (each task being 2 channels sampling)

    Can you show me how do?

    Thank you


    Hi RK,.

    You don't need to delete and re-create the task each time, you can keep the same handles and switch between them.  You just use the job functions of stop and start to make sure that only 1 task is running at the same time.  I tested this by creating three tasks, setting different combinations of channels on each, on each, different sampling rates and then using these same task 3 handles in a loop with just a Start Task, Read and try to stop.  I think you should be able to do exactly what you describe.

    Morgan S

    Technical sales engineer

    National Instruments

  • Problem of unique concurrent task of recovering data


    I'm having a problem where my VDR unit seems to run only one backup at a time task. It works fine when it is deployed at the start (8 tasks without problem), but at some point, he returned to the only task. I also set tasks max 8 (even tried 4) via the datarecovery.ini nothing works.

    Someone at - it ideas? I hate having to redeploy this device yet and still the problem persists to jump to the top.

    There are a few articles on this problem in this forum. So up to 4 CPU there seems to be no problem, 4 GB may also work, it is a problem, but as much as I know, change default values is not supported. You can also watch it here:


  • Problem of multithreading with Mac system task class

    I have a class that extends the thread

    public class Convert extends Task

    Inside the class, I have a need to interrogate a file every 5 seconds to see if the new file has been added to it or not.

    So that's what I did, is that I did a while loop inside of which I kept the logic and I did the sleep of thread for 5 seconds.

        protected Object call() throws Exception {
            // TODO Auto-generated method stub
                      //my logic to query the folder
                  catch (Exception e) {
              return null;

    I call this thread via an ExecutorService

    ExecutorService exec = Executors.newCachedThreadPool(new ThreadFactory() {
            public Thread newThread(Runnable r) {
                Thread thread = new Thread(r);
                return thread;

    and then

    exec.execute(convert123); //where convert123 is an reference of Convert class

    This exec.execute is called on the press of a button.

    Now, the problem is that it seems to work fine on my windows machine, but blocks the scene just when clicking the same button on a MAC system. (It works for 1 or 2 out of 10 times, IE 8 times out of 10 times, the scene just gets hanged and unresponsive)

    I have never created a thread running forever, so there might be a problem with my design, but I have no idea about it.

    I don't see anything inherently wrong with that. You get all exceptions?

    Note that there is an built-in API (not very high level) to watch directories for changes. You still need the wire without end (that you can implement a task if you want to cancel easily), but it should make your code easier (no need to survey and waiting for a fixed amount of time, at least on operating with os level file systems I look).

    The following example can run several tasks ending not quite happily on my Mac.

    import java.util.concurrent.ExecutorService;
    import java.util.concurrent.Executors;
    import java.util.concurrent.ThreadFactory;
    import javafx.application.Application;
    import javafx.application.Platform;
    import javafx.beans.binding.Bindings;
    import javafx.concurrent.Task;
    import javafx.concurrent.WorkerStateEvent;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.geometry.Pos;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.Label;
    import javafx.scene.control.ScrollPane;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.BorderPane;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    public class NonTerminatingTaskTest extends Application {
        private static class CounterTask extends Task {
            private final IntegerProperty counter;
            private CounterTask(IntegerProperty counter) {
                this.counter = counter;
            public Void call() {
                while (!isCancelled()) {
                    try {
                        Platform.runLater(new Runnable() {
                            public void run() {
                                counter.set(counter.get() + 1);
                    } catch (InterruptedException exc) {
                        // allow to cancel
                return null;
        public void start(Stage primaryStage) {
            final ExecutorService exec = Executors.newCachedThreadPool(new ThreadFactory() {
                public Thread newThread(Runnable r) {
                    Thread thread = new Thread(r);
                    return thread;
            final BorderPane root = new BorderPane();
            final VBox counterContainer = new VBox(5);
            counterContainer.setPadding(new Insets(10));
            final ScrollPane scroller = new ScrollPane();
            final Button startCounterButton = new Button("Start new counter");
            startCounterButton.setOnAction(new EventHandler() {
                public void handle(ActionEvent event) {
                    final Label label = new Label();
                    final IntegerProperty counter = new SimpleIntegerProperty();
                    label.textProperty().bind(Bindings.format("Count: %s", counter));
                    final Task counterTask = new CounterTask(counter);
                    counterTask.setOnCancelled(new EventHandler() {
                        public void handle(WorkerStateEvent event) {
                    label.setOnMouseClicked(new EventHandler() {
                        public void handle(MouseEvent event) {
            Scene scene = new Scene(root, 200, 450);
        public static void main(String[] args) {
  • Maximum simultaneous tasks available under Linux.

    I used the converter for a few weeks now.  I would like to be able to set up a queue of tasks to have the converter to start now.  However, I'm unable to change the maximum number of virtual guests on a linux vmware converter standalone installation.

    When the demon of converter is linux on a machine, I connect via another machine with the customer installed linux or a windows with the client box is installed.  When I select the Administration, simultaneous tasks Maximum is not available.  The same result occurs when I connect from the client linux for itself (localhost).  However when I connect to the converter of windows server, the "Maximum simultaneous tasks" option is available.

    Does anyone know how to set this option for vmware converter for linux server?  I tried editing /etc/vmware-converter/converter-agent.xml and /etc/vmware-converter/converter-server.xml and replace the parameter of vmacore - & gt; threadPool - & gt; TaskMax 40-to-1.  The result being that the client could not connect or demon is deceased early solange, respectively.

    Go to a command line, and then run the following as root.  Root is the only one who has permissions to modify the file that contains the number of concurrent tasks.


    You can then change the number of concurrent tasks.

    Kind regards


    VMware vExpert 2009

    NOTE: If your question or problem has been resolved, please mark this thread as answered and awarded points accordingly.

  • After you restore an image of my system drive, my tasks and events disappeared. Help!

    I've restored a backup image on my C: drive. Everything looks good except all my events and tasks have disappeared from the calendar!
    I understand that this data is included in my profile, but how do I get my events and tasks and put back them in the calendar? Are the import and export of functions expected to be used to provide backups of my events and tasks? Shouldn't they already appear in the calendar after the restoration of a system disk?

    After a lot of messing around, I think I solved this problem.

    The problem occurs because of an incompatibility between certain values in prefs.js vs values in the data table cal_events.

    I copied backup prefs.js (containing the 'calendar') related lines in the current prefs.js and now everything looks OK, I can see my tasks and events in the calendar.

    The lines looked like this:
    user_pref ("calendar.list.sortOrder", "75f0f98f-9fdf-4bca-9e48-656ff2e1457d 012fd0d9-bcf1-43b1-a98d-6b0117a3f779 511ca361-a646-4f94-880b-526a0a5cdba1");

    These long numbers must correspond to the values of the column. cal_id apparently if they do not match, they do not appear in the calendar.

    Mine does not, so I corrected the values in the prefs.js file and everything seems to go fine now.

    I still need to find the cause of the incompatibility, I think it was something in the way that I restored the disk then run MozBackup to restore my backup Thunderbird.

    Hope this helps others with this problem.

    Many thanks to Gnospen and Matt for their help!

  • After upgrade 12/18, calendar and tasks list disappeard...

    Last updated 18/12/14 and the list calendar and tasks have disappeared... Help! Number of items (b ' Day etc.) this is the only place...

    This is what happens when you improve Thunderbird and do not upgrade the lighting. Since you give everything, but what version of Thunderbird, you use the best I can offer is to go to this link and download the correct version of the lightning for Thunderbird that you run and install. All your events will come when you get corresponding version.

    Never skip upgrade Add ons during the upgrade to Thunderbird.

  • USB-6212: software problem timed task of analog input

    Hi all

    I have unexpected behavior using a USB-6212.

    The code example shows that when I run in sequence two analog DAQmx to task, material entry first a timed, the second software timed, it happens that the first readings of data are all wrong and have the same value for all channels.

    The labour code is the following:

       GetCtrlVal(panelHandle, PANEL_HW, &Switch); 
        if (Switch) {
    // First Task: read 10 rows of values with hardware timing
            DAQmxCreateTask("", &htAI);
            DAQmxCreateAIVoltageChan (htAI, MX_DEV_AI, "", DAQmx_Val_NRSE, -10.0, 10.0, DAQmx_Val_Volts, "");
            DAQmxCfgSampClkTiming(htAI,"", SAMPLE_RATE, DAQmx_Val_Rising, DAQmx_Val_ContSamps, 1000);
            DAQmxRegisterEveryNSamplesEvent (htAI, DAQmx_Val_Acquired_Into_Buffer, SAMPLE_RATE, 0, RefreshCB, NULL);
    // Second Task:read 10 rows of values with software timing
        DAQmxCreateTask("", &htAI);
            DAQmxCreateAIVoltageChan(htAI, MX_DEV_AI, "", DAQmx_Val_NRSE, -10.0, 10.0, DAQmx_Val_Volts, "");
        for (i=1; i<=10; i++) {
            DAQmxReadAnalogF64(htAI, 1.0, 10.0, DAQmx_Val_GroupByChannel, AcqVoltRow, HW_AI_CHANNELS, &read, 0);
            SetTableCellRangeVals (panelHandle,PANEL_SOFT, MakeRect(i, 1, 1, HW_AI_CHANNELS), AcqVoltRow, VAL_ROW_MAJOR);

    A picture is worth a thousand words: analog inputs have been connected to a network of resistance have known values.

    The upper table contains timed material acquisitions, the lower the software timed readings... as you can see it the first line is the set of values of 0.13, totally wrong

    If the task of timed acquisition of software runs without the earlier (in my demo, that this can be achieved by the switch at the top right), the readings are correct!

    Y at - it something I am doing wrong?

    I also tried to run the program on USB-6009, but it seems to work properly.

    [LabWindows/CVI 2010 SP1 - driver OR-DAQmx 9.4 - Windows 7 x 64]

    This problem was corrected by NOR-DAQmx 9.5

    324044 NOR USB-621 x task HAVE request returns incorrect data after erasing a task HAVE stamped

  • Output 5V digital while gaining some HAVE

    Hello fans of LV,.

    I am confronted with (what I thought would be) a trivial task:

    I'm certain analog signals on a 6351 OR USB using DAQmx.  And I want to trigger an external device simultaneously.  So I want to start my task of AI, a digital to go HIGH output pin.  And when it stops, I want the PIN to go DOWNSTAIRS.

    I think actually that NEITHER provided an '' integrated '' signal for this... something I could easily move to one of the PFI PIN.  As a "HAVE busy signal."  But it does not appear that this exists.

    So instead, I thought I could do a task "HAVE simultaneous and DO."  It works well, except that the PIN HIGH when rest end tasks.

    Any ideas on how I can fix this?

    josborne wrote:

    Hmmm.  I don't think that the sample clock won't work because it is a pulse train.  It goes UP and DOWN for each point of the data acquired.  Actually, I want the signal stay high during the acquisition of all.

    I think you're right about using a PIN.  But I am confused how to implement in LabVIEW.

    I think I misunderstood what you mean by an acquisition, then.  I thought you meant just a single point.  Are say you that you will acquire a fixed number of samples and you need relaxation to remain high until there finishes the entire points series?

    As I said, I'm not an expert in routing of the signal, so there is probably a more efficient way to do this, but the simplest, you could take a signal from a digital output pin and split with one end going to the external device and the other end to the input trigger to HAVE it (probably that in software, but I don't know if you can split the signal in this case).  Configure separate tasks and the AI, no need to synchronize them.  When you start to DO it, the AI will trigger.  Then you just need to somehow disable DO when HAVE complete - but went too urgent?  If you do not need a precise timing for this purpose then just wait for the AI to finish, then turns off the DO.

  • Task Scheduler task shows as completed successfully, but nothing happened

    I have some .bat files I created added to my task scheduler on our server at the fire every day from 05:00.  Tasks run a series of SQL commands and a find and replace the application third for updating a MySQL database that we use for a web application.  SQL event on demand are not an option for us.

    When I run the task manually it works fine (I'm an administrator has full permissions), either by double-clicking the .bat file, either by selecting the task in the Task Scheduler task by clicking on 'run '.

    Tasks have been reportedly shot every day for more than a week and all history journals say the operation completed successfully, but when I check the MySQL database, that nothing has actually happened.

    To add to the confusion, what is happening on 2 3 .bat files that I wrote.  One works perfectly, not.

    I have the defined task to "Run if the user is logged in or not", and "Run with the highest privileges" and our server, Windows 2012 R2.

    My apologies if I'm missing something obvious, I am a JavaScript/PHP web developer, who was lifted in the server environment and, although most of this is logical on a base level for me, a lot of nuances are lost.

    Thanks in advance for any help.


    Please post your request in the forum for better support.


    Thank you.

  • Multi-channel acquisition - simultaneous Acquisition of sampling 1 &amp; 2-channel single sample in a task

    I am able to get a multichannel simultaneous sampling on my acquisition of data (USB-6363) without problem. But what I want to do is make multi-channel acquisition in a single task where sampling requirements are different for each channel. For example, I want I want to acquire a total of 1000 samples on 3 channels in a single task with DAQmx as follows the characteristics of sample:

    • AI0: Analog Wfm 1Chan NSamp (998 samples)
    • AI1 + ai2: 1 d analog NChan DBL 1Samp (1 + 1 sample/channel)

    I know I could do just a regular multiple sampling multi-channel acquisition through all three channels then average down from channels 1 + 2, but I don't have that several samples to spare. AI0 is a bandwidth hog in my application and consumes all the samples of data acquisition (2. MECH / s), but I can save a few samples to make analog measurements further (for example, temperature, pressure).

    Ai0 takes place also permanently so additional analog measures on ai1 + ai2 need to be included in the same task.

    I don't know how to go on this matter or if it is still possible. Any ideas or thoughts would be greatly appreciated.

    Currently I use a second DAQ to read these additional channels at a lower rate but I need to pass a single data acquisition.

    How should continuous ai0 really be?  You of course can enjoy on ai0, and one of the other entries at the same time, then there would be some gap in your data.  In addition, if you want to go to the full 2 MHz, you may sample ai1 ai2 twice in order to allow entry to set (the maximum specified multi-channel rate is only 1 MHz due to compaction of the constraints on the MUX I believe).

    DAQmx sort of you lets set something up like that, if you "cheat" it by configuring each sample as a single channel in your task (see an example similar here).  If your 998 + 1 + 1 (or 996 + 2 + 2) becomes a task of channel 1000 (takes a bit more memory, but should still be feasible).

    I would consider a 2nd DAQ card a better option if ai0 really needs to be continuous.  You can go with a (9174 or 9178) cDAQ chassis a 9223 (only 1 MHz if) for quick entry and your choice of module for the slower entries.  On the cDAQ chassis a module can run a separate task of AI from other modules (up to 3 tasks HAVE by chassis) at different speeds.

    Best regards

  • Strange problems with scheduled tasks

    Hello Microsoft community.

    I have a domain with many servers (windows Server 2003), and there is a database of oracle on one of them. I usually use a batch file to back up the oracle database, and I'm sure that this lot works perfectly.
    So I logged on the server that contains the oracle database and create a new weekly scheduled task to back up my database, and the timing worked well in the first day.
    The next day, I logged on the server to make sure that the backup works, but I found a sentence (cannot start) under the status column and (0x1) under the column last result.
    I tried to delete the task and create it again, but nothing has changed.
    I used both domain administrator account and the Local Administrator account, but nothing has changed.
    I tried to check the task when I connect and disconnect, but nothing has changed.

    The accounts that I used to create the task have the full control permissions on the source folder that contains the batch files so the destination folder that contains the backup files.
    The Task Scheduler service is set to automatic type and its status is started.
    Whenever I double click the backup batch file works fine, but the task still does that for a time.

    What should I do?

    Kind regards.


    Windows server 2003 issues are managed by the Technet forums.

  • Can we prevent the popup Scheduler task Service at the start of the system for a scheduled task to run periodically?

    When I have any task scheduled to run periodically (for example, daily, weekly), the Task Scheduler Service dialog box always appears on the logon screen if the computer was turned off at the time of day the task should run. From my experiences, it seems as the process that determines a spot missed his scheduled time does not consider that the PC is turned off. There seems to be no way to prevent this. Even when a task is scheduled to run at the system startup and periodically, the dialog box appears when the login screen appears.

    This analysis is correct?

    I have three tasks in Task Scheduler. I didn't know anything about the task scheduler until I started having the popup. The first time I looked at Task Scheduler these three tasks have been implemented as follows.

    Adobe Flash Player Updater - Annex: every 1 hour (s) 03:05 for 24 hour (s) on every day...

    GoogleUpdateTaskMachineCore - Annex: Run when the user login

    GoogleUpdateTaskMachineUA - Annex: every 1 hour (s) 20:51 24 hour (s) on every day...

    I have no idea how or when it has been implemented in this way, but I only started to receive this dialog box by the end of 2011. Would it have happened during an Adobe Flash Player update or update of Google?

    I changed the calendar. I've now set up three tasks to run at startup of the system. The popup appears now. Is there a reason why I have to trigger these tasks once per hour?


    You don't need these tasks scheduled at all.

    You can go to each site and look for updates when you want.

    If you have installed google something he will continue to try to catch up, and if you have installed adobe you can disable automatic updating.

Maybe you are looking for

  • Application Builder: the Application closes after the Launcher

    I'm launching my application executable that was built with the Application Builder. I use framework actor and have a which is defined as the start VI and launched the actor parent. When I run the executable, I can see the front Launcher.

  • Firewall access denied error 5!

    I have a windows vista with service pack 1 System. The firewall does not work. I get the error 5: access is denied. I noticed when I tried to set up an ad hoc network using my laptop into a wifi hotspot. I got the error that ICS might be implemented.

  • When are we going to get the update JB here in Cyprus?

    When are we going to get the update JB here in Cyprus?

  • Beep codes

    Dell Web site provide a list of beep codes?

  • Canon laser shot lbp-1210 driver for winodows 7

    I need driver of canon laser shot lbp-1210 for winodows 7I have search everywhere on the net, but did not find please some 1 give me vry thnkfull for sayI try to find in google and canon site but still can't find driver for windows 7