How to clear the output buffer, possibly resize and burn again, before you begin the task of output

I use PyDAQmx with a USB-6363, but I think the question is generic to DAQmx.

I have an output buffer that I want to be able to (re) write to without starting the task output.

More specifically, I have a graphical interface and a few sliders, the user can move.  Whenever the slider changes, a new set of values is loaded into the buffer output through DAQmxWriteAnalogF64.  After you set the value, the user can click on a button and start the task output.

In some cases the change in cursor does not require a change in buffer size, only a change in the data.  In this case, I get the compalint following DAQmx as they tried writing:

The generation is not yet started, and not enough space is available in the buffer.

Set a larger buffer, or start the generation before writing data more than content in the buffer.
Property: DAQmx_Write_RelativeTo
Value: DAQmx_Val_CurrWritePos
Property: DAQmx_Write_Offset
Corresponding value: 0
Property: DAQmx_Buf_Output_BufSize
Corresponding value: 92

In other cases the change in cursor requires both change in the size of the buffer and data modification.  In this case, I get the following, but only after that do a few times each time increase the size of the writing.

DAQmx writing failed because a previous writing DAQmx configured automatically the size of output buffer. The size of the buffer is equal the number of samples written by channel, so no additional data can be written before the original task.

Start the generation of before the second writing DAQmx or set true in all instances of writing DAQmx Auto Start. To gradually write to the buffer before starting the task, call DAQmx Configure an output buffer before the first writing DAQmx.
Task name: _unnamedTask<0>

State code:-200547
function DAQmxWriteAnalogF64

I tried to configure the output via DAQmxCfgOutputBuffer buffer (in some cases, by setting it to zero or a samples, then save again, in an attempt to clear it) but that doesn't seem to do the trick.

Of course, I can work around the problem by loading data only when the user clicks the end button, but not what I'm asking here.

Is it possible to "remake" the writing of output before you begin the task?

Thank you

Michael

Today I have no material practical to validate, but try unreserving task before writing the new buffer:

DAQmxTaskControl (taskHandle, DAQmx_Val_Task_Unreserve);

With a simulated device, he made the error go away in case the buffer is the same size.  You will need to validate if the data are in fact correct, but I think it should be (unreserving I would say reset the write pointer so the old buffer are replaced with the new data).

I always get errors when you try to change the size of buffer if (on my 6351 simulated).  I posted some similar mistakes about the reconfiguration of the tasks here, I guess it is possible that this issue has also been set at 9.8 (I always use 9.7.5 on this computer).  If the behavior is still present in the new driver, and also appears on real hardware (not just simulated), then it seems that this is a bug of DAQmx someone at OR should be considered.

I wrote a simple LabVIEW VI that captures the error in order to help people to NOT reproduce it:

The best solution at the moment would be likely to re-create the task if you need to change the size of the buffer (or avoid writing data until you are sure what will be the size of buffer).

Best regards

Tags: NI Hardware

Similar Questions

  • How to clear the hard drive on my old iMac of 2008?

    I have a 2008 iMac I want to recycle. How to clear the hard drive?

    (What is PPC?)

    PPC stands for Power PC. Is the name used to refer to the old Macs that uses a Motorola processor instead of Intel chips used today. To clear your old Mac follow the advice in this document from Apple... What to do before you sell or give away your Mac - Apple Support

  • How to clear the cache of firefox

    How to clear the cache of firefox

    Settings-Advanced below 'Network' and clear here

    https://support.Mozilla.org/ru/KB/Kak-ochistit-KESH-Firefox?redirectlocale=ru & redirectslug = Kak-ochistit-Kesh

  • How to clear the history?

    How to clear the history?

    https://support.Mozilla.org/en-us/KB/how-do-i-clear-private-data-Firefox-Android

  • Portege Z930 - how to clear the memory of the fingerprint sensor?

    Hello

    Tell me how to clear the memory of the fingerprint sensor?
    Reinstall the operating system and now I can not add your impressions.

    They have their No....

    > Reinstall the operating system and now I can not add your impressions.
    Stand by. You have reinstalled OS using original recovery image?

  • Re: How to clear the model of Toshiba satellite PS271L - 6K 906 CMOS PASSWORD?

    In: Toshiba

    How to clear the model Toshiba Satellite PS271L - 6K 906 CMOS PASSWORD?
    Please respond to my E-mail [email protected]
    Thank you

    To: King

    http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?MessageID=127837
    Read this thread very carefully!

  • How to clear the cache in 9.0.3

    Techno-bouffon here, in conflict on how to clear the cache in 9.0.3 (OS X 10.11.3 El Capitan). Some recommend to delete entire cache folder. Others say just clear com.apple.Safari, which I did. So... what happens if I delete the contents of the entire folder Caches? (I have nothing special set up on this computer.)

    Open Safari Preferences--> advanced.  Downstairs, make sure that ' see her develop menu in the menu bar "is checked.  Then go up to develop-> empty Caches.

  • How to clear the cmos on satellite p20 552 settings?

    How to clear the cmos on satellite p20 552 settings?

    Hello

    I guess you want to remove the BIOS password. Am I wrong?

  • How to clear the print queue on a printer hp x 6420

    How to clear the print queue on printer HP 4620?

    Hello

    From the desktop, hold down the Windows key and press R.  In the run window, type services.msc and press to enter.  Scroll down to the print spooler service, right click and select Properties, then click the Stop button.  Now search for C:\Windows\System32\Spool\PRINTERS, then delete the work inside this folder - you may need to click a command prompt to get the authority to open the PRINTERS folder.

    Restart the computer and you should find that the documents have been deleted.

    Kind regards

    DP - K

  • can someone tell me please how to clear the cache of adobe flash

    Hi can someone please tell me how to clear the cache of adobe flash? Please, I beg you. Thank you.  Tom.   for windows xp.

    Just click on clear all Web sites, and that's all!
    I hope this helps!
  • to start xp how to clear the programs that run startup

    has run the cleaning directory program who reported that 39 (YES 39) programs running at startup - how to clear these rogue programs to run until needed?

    You can program the starting by, go in run, type: MSCONFIG in msconfig, change startup programs.

    Or, select run, type: services.msc services.msc in msc, scroll through programs, look for one to edit, R.click on

    it, change, change start 'manual' or 'disable', once at the exit.

  • How to clear the table dhcp clients

    Does anyone know how to clear the Table of Clients DHCP?

    I have a WRV54G.

    Concerning

    I understand this is a very old post, but since I found it when I was looking for the same answer in 2009, I thought go ahead and give my $.02 worth.

    I have a different router, so it may not be present in your.

    I use a version of the firmware WRT54GLwith 4.30.7 and finally found on the status under "Local network" page a link to the DHCP table. You can click on that and delete existing IP addresses.

  • How to clear the administrative events - Event Viewer log

    Hello:

    Anyone know how to clear the administrative events log listed under custom in the event viewer views?

    All the logs listed in Windows logs do not have options to clear, but the back above.

    Thank you

    ColTom2

    Hey Colonel,

    It is because this isn't 'really' a newspaper, in itself.
    This is a Search of the newspaper (and there is MUCH more that most people know), filtered to show all events in administrative type.
    The source column shows you which newspaper it came from originally.

    To get rid of them, you will need to erase all records.

    If you want to get an idea:
    Go down to the Applications and Services logs, and expand.
    Microsoft, expand it.
    Then Windows.

    Nice list?
    You need to open and delete all. To really delete it.
    VP Tech Services

  • It will not play a video cd due to 'insufficient memory' I closed the programs on the taskbar - did not help! What can I do... or how to clear the memory?

    I am running Win 7 on my emachine, and this is the first time, he will not play a video cd due to 'insufficient memory' I closed the programs on the taskbar - did not help!  What can I do... or how to clear the memory?  anyone?

    Hi Ernie,.

    First, you use any type of applications to run your videos?

    Also check links theses below, you may find them useful. (Click on it)

    How to prevent out of memory problems

    A guide to increase the speed of your computer

    I hope this helps.

  • How to clear the account display battery when I get out of the application

    Hello

    I use the screen push method to call another screen in my application...

    When you use this method after awhile my request become slow bacuase stack display (several frames in the queue).

    If suppose that at some point if I check using the method of counting to screen it shows 36 screens are queued,

    so I would like to know how to clear the number of queue display stack when I get out of the application

    I agree with arkadyz here.  It may be something other than just a bunch of screens on the stack.

    If after reviewing your design, you still need to pop all the screens, here's a snippet of code that will do just that:

    public void popAll() {
            UiApplication ui = UiApplication.getUiApplication();
        int screenCount = ui.getScreenCount();
        for (int i = 0; i < screenCount; i++) {
            Screen activeScreen = ui.getActiveScreen();
            ui.popScreen(activeScreen);
        }
    }
    

    But if you are out of the app, there is no need to do so either.

Maybe you are looking for