Please help me on error -200284 for usb6008 data A/D

Hi,
I am working on the A/D using usb6008, I program in visual c++.  I create a dialog to test the function of sample program: contAcquireNChan.c               in  NI-DAQmx Base.  I just changed the mode to DAQmx_Val_FiniteSamps and each time I just want to get several data. I used a button to start the a/d. The following is the code. The problem is very strange that while I click the start button for the sixth time, this error -200284 will occur when calling this function:
 DAQmxErrChk (DAQmxBaseReadAnalogF64taskHandle,pointsToRead,timeout,DAQmx_Val_GroupByScanNumber,data,2,&pointsRead,NULL));
The discription of this error is:
"Some or all of the samples requested have not yet been acquired.
To wait for the samples to become available use a longer read timeout or read later in your program. To make the samples available sooner, increase the sample rate."
I do not know what happened. And how to solve this problem. Please help me.
The following is the code:
void CBTTest001Dlg:nStart()
   // Task parameters
    int32       error = 0;
    TaskHandle  taskHandle = 0;
    char        errBuff[2048]={'\0'};
    time_t      startTime;
    bool32      done=0;
    // Channel parameters
    char        chan[] = "Dev1/ai0";
    float64     min = -10.0;
    float64     max = 10.0;
    // Timing parameters
    char        clockSource[] = "OnboardClock";
    uInt64      samplesPerChan = 2;
    float64     sampleRate = 2000.0;
    // Data read parameters
    #define     bufferSize (uInt32)1000
    float64     data[bufferSize * 5];
    int32       pointsToRead = bufferSize;
    int32       pointsRead;
    float64     timeout = 10.0;
    int32       totalRead = 0;
 index++;
 if(index==6)
    int a =0;
 m_bWorkFlag = true; 
  double a1= data[0];
  double a2= data[1];
  double a3= data[2];
  double a4= data[3];
  DAQmxErrChk (DAQmxBaseCreateTask("",&taskHandle));
  DAQmxErrChk (DAQmxBaseCreateAIVoltageChan(taskHandle,chan,"",DAQmx_Val_RSE,min,max,DAQmx_Val_Volts,NULL));
  DAQmxErrChk (DAQmxBaseCfgSampClkTiming(taskHandle,clockSource,sampleRate,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,samplesPerChan));
  DAQmxErrChk (DAQmxBaseCfgInputBuffer(taskHandle,2000)); //use a 100,000 sample DMA buffer
  DAQmxErrChk (DAQmxBaseStartTask(taskHandle));
  DAQmxErrChk (DAQmxBaseReadAnalogF64(taskHandle,pointsToRead,timeout,DAQmx_Val_GroupByScanNumber,data,2,&pointsRead,NULL));
 //    printf("\nAcquired %d total samples.\n",totalRead);
  m_fAnalog1 = data[0];
  m_fAnalog2 = data[1];
  m_fAnalog3 = data[2];
  m_fAnalog4 = data[3];
  m_fAnalog5 = data[4];
  UpdateData(false);
  if(taskHandle != 0) {
//   DAQmxBaseStopTask (taskHandle);
   DAQmxBaseClearTask (taskHandle);
 return;
Error:
    if( DAQmxFailed(error) )
        DAQmxBaseGetExtendedErrorInfo(errBuff,2048);
    if( DAQmxFailed(error) )
        printf("DAQmxBase Error: %s\n",errBuff);

Dear Neal,
Thank you so much !!
"DAQmx Base was designed for use on operating systems other than Windows". Maybe that's the reason why I always met problems.  I am using windows now !! The only reason for me to use DAQmx Base is that it comes with the USB6008 device so that I think NI recommend to use it ! I also downloaded DAQmx from NI but I did not tried it (in fact it took me several hours to switch the firmware back to DAQmx Base ). I will try It now and tell you the result.
"You say that you thought you solved the issue but did you not?"
Yes.
" Did you add the stop task function before and that is what you thought solved the issue? "
Yes.
I started from the example and do some modifications. First I met -200284 error and I found it is the caused by wrong number of data to be read. I changed to finite namber data read.
Then I met sixth reading problem, at that time I use a button clicking to read the data.when I read for the sixth time, It will occur (I forgot the phenomena). I added a  stop task function and I thoought I solved the problem. I knew for a finite number data reading, stop function is not needed, but I do not have any other method so I tried it. "sixth reading problem" solved, but When I move the data reading function to ontimer function recently. The program will halt -- take 99% of CPU time after 30 second of reading (sometime several minutes, sometimes several seconds). If I move the start task back to OnInitialUpdate() function and cancel stop function, halt error will not occur but the data I read in not correct. That is the whole thing. The following is the code relative to the data read.
Initialization;
void Ctest2Dlg:nInitialUpdate()
   DAQmxErrChk (DAQmxBaseCreateTask("",&taskHandle));
  DAQmxErrChk (DAQmxBaseCreateAIVoltageChan(taskHandle,chan,"",DAQmx_Val_RSE,min,max,DAQmx_Val_Volts,NULL));
  DAQmxErrChk (DAQmxBaseCfgSampClkTiming(taskHandle,clockSource,sampleRate,DAQmx_Val_Rising,DAQmx_Val_ContSamps ,samplesPerChan));
Data read
void Ctest2Dlg:nTimer(UINT nIDEvent)
  if(taskHandle != 0)
     DAQmxErrChk (DAQmxBaseStartTask(taskHandle));
   DAQmxErrChk (DAQmxBaseReadAnalogF64(taskHandle,pointsToRead,timeout,DAQmx_Val_GroupByScanNumber,data,100,&pointsRead,NULL));
   DAQmxBaseStopTask (taskHandle);

Similar Messages

  • I am currently getting finder error screen saying "Quartz-filter plugin" error, Please report to apple. Can anyone please help me find a resolution for this error?

    I am currently getting finder error screen saying "Quartz-filter plugin" error, Please report to apple. Can anyone please help me find a resolution for this error?

    If it were me I would schedule an appointment at the store where you bought it and meet with the Manager of the store in person. Print this post and bring it with you along with your iMac.
    And change the password on your Apple ID and then see if there are in purchases in your account that you did not make. If there are then someone did get your ID and password. If not someone got your Credit Card information from somewhere and used it.

  • I have a new Ipad and when I try to buy an app it asks for my  questions! I dont remember them so I press the button that send me an email to reset them. Ive sent it various times but it doesnt arrive. please help I need this app for school!!!

    I have a new Ipad and when I try to buy an app it asks for my  questions! I dont remember them so I press the button that send me an email to reset them. Ive sent it various times but it doesnt arrive. please help I need this app for school!!!

    See Kappy's great User Tips.
    See my User Tip for some help: Some Solutions for Resetting Forgotten Security Questions: Apple Support Communities https://discussions.apple.com/docs/DOC-4551
    Rescue email address and how to reset Apple ID security questions
    http://support.apple.com/kb/HT5312
    Send Apple an email request for help at: Apple - Support - iTunes Store - Contact Us http://www.apple.com/emea/support/itunes/contact.html
    Call Apple Support in your country: Customer Service: Contacting Apple for support and service http://support.apple.com/kb/HE57
     Cheers, Tom

  • Why doesn't my iPhone 4 have an 'Internet tethering' options? Is it carrier related or iOs related? Please help me find the solution for this. thanx

    Why doesn't my iPhone 4 have an 'Internet tethering' options? Is it carrier related or iOs related? Please help me find the solution for this. thanx

    Personal Hot spot
    http://support.apple.com/kb/HT3574
    Understanding
    http://support.apple.com/kb/HT4517
    Trouble Shooting
    http://support.apple.com/kb/TS2756

  • I have been able to access a site regularly but in the last few days get a message: "cookies required to access this site." please help, I use this site for work daily:)

    I have been able to access a site regularly but in the last few days get a message: "cookies required to access this site." please help, I use this site for work daily:)

    Goto > Settings > Safari... Enable Cookies > Always
    Good luck!

  • My mac camera does not work ! please help i need my camera for an interview !

    my mac camera does not work ! please help i need my camera for an interview !

    CLICKY CLICK---> http://support.apple.com/kb/HT2090 How to Troubleshoot iSight

  • Can you please help me with validation logic for Events in Table maintenance generator

    Can you please help me with validation logic for Events in Table maintenance generator,i.e if i enter record in 1st internal table then automatically 2nd internal table should be updated.

    Hi Glen Anthony,
        Thanks for replay,
         I used foreign key relationship between those 2 internal tables....
    I used event 05: When creating a new entry. I want to know the custom logic by which my 2nd Internal table gets automatically updated when i update my 1st Internal table
    Thanks Glen.

  • I work on the CompactRIO 9068 that the password is lost for some time. Please help me to reset it, for finish my end of study project. Thank you,

    I work on the CompactRIO 9068 that the password is lost for some time.
    Please  help me to  reset it, for finish my end of study project.
    Thank you,

    but the page of ni support does not work:
    https://sine.ni.com/srm/app/newrequest
    and I have the recovery.cfg file from NI with this steps :
    1.        Copy the recovery.cfg file, found in the zip folder attached at the bottom of the email, to the thumb drive. 
    2.        With the cRIO device powered off, plug in the USB drive to the controller.
    3.        Hold down the reset button while powering on the controller.  Continue holding the reset button until the status light turns on, then release the reset button.
    4.        Wait for the controller to boot.  This should take less than a minute.
    5.        Check that the password has been reset to the default. (you will still be prompted for a password even if the default is blank)
    6.        Reinstall software to the controller. Using the USB reset will leave the system in a state where it is unable to run LVRT
      I have followed the procedure as mentioned 
    Result: the LED "Status" is permanently blinking.
    Would you please provide as with another alternative so that we can fix this issue.

  • Please help to modifiy this query for better performance

    Please help to rewrite this query for better performance. This is taking long time to execute.
    Table t_t_bil_bil_cycle_change contains 1200000 rows and table t_acctnumberTab countains  200000 rows.
    I have created index on ACCOUNT_ID
    Query is shown below
    update rbabu.t_t_bil_bil_cycle_change a
       set account_number =
           ( select distinct b.account_number
             from rbabu.t_acctnumberTab b
             where a.account_id = b.account_id
    Table structure  is shown below
    SQL> DESC t_acctnumberTab;
    Name           Type         Nullable Default Comments
    ACCOUNT_ID     NUMBER(10)                            
    ACCOUNT_NUMBER VARCHAR2(24)
    SQL> DESC t_t_bil_bil_cycle_change;
    Name                    Type         Nullable Default Comments
    ACCOUNT_ID              NUMBER(10)                            
    ACCOUNT_NUMBER          VARCHAR2(24) Y    

    Ishan's solution is good. I would avoid updating rows which already have the right value - it's a waste of time.
    You should have a UNIQUE or PRIMARY KEY constraint on t_acctnumberTab.account_id
    merge rbabu.t_t_bil_bil_cycle_change a
    using
          ( select distinct account_number, account_id
      from  rbabu.t_acctnumberTab
          ) t
    on    ( a.account_id = b.account_id
           and decode(a.account_number, b.account_number, 0, 1) = 1
    when matched then
      update set a.account_number = b.account_number

  • Please help I can't enter for app new pay security

    Please help I can't enter for app security my name Sarah Simpson 

    You are not speaking to Apple here. We are users just like you. Your question is not clear but if you can be more specific, we might be able to help. If English is not your native language, you can try posing in your language and someone will be able to figure it out.

  • Hi!  I cant conect The face time betwen my iPad ,iPod and iPhone, please help me,what i need for this issue?

    Hi!  I cant conect The face time betwen my iPad ,iPod and iPhone, please help me,what i need for this issue?

    What is it doing when you try to facetime? also if you are using the same apple Id/email on each device, it wont work.

  • TS3899 After updating to ISO6, my email sending get extremely slow or dispeard. on the botton line of mail page always indicate "sending # of 9", however I do not know where to check or delete these unsent items. Please help! It has consumed lots of data.

    After updating to ISO6, my email sending get extremely slow or dispeard. on the botton line of mail page always indicate "sending # of 9", however I do not know where to check or delete these unsent items. Please help! It has consumed lots of data.
    I use @me.com and @hotmail.com

    Hi,
    >>A CHAR datatype and VARCHAR2 datatype are stored identically (eg: the word 'WORD' stored in a CHAR(4) and a varchar2(4) consume exactly the same amount of space on disk, both have leading byte counts).
    Ok, but on the other hands:
    SGMS@ORACLE10> create table x (name char(10), name2 varchar2(10));
    Table created.
    SGMS@ORACLE10> insert into  x values ('hello','hello');
    1 row created.
    SGMS@ORACLE10> commit;
    Commit complete.
    SGMS@ORACLE10> select vsize(name),vsize(name2) from x;
    VSIZE(NAME) VSIZE(NAME2)
             10            5
    SGMS@ORACLE10> select dump(name),dump(name2) from x;
    DUMP(NAME)                                         DUMP(NAME2)
    Typ=96 Len=10: 104,101,108,108,111,32,32,32,32,32  Typ=1 Len=5: 104,101,108,108,111Cheers

  • Please help me  one column i have this data col1

    Please help me
    one column i have this data
    col1
    Hi this is <SPAN style="FONT-SIZE: 18pt" data-mce-style="font-size: 18pt;">Rabindra.<SPAN style="FONT-SIZE: 10pt" data-mce-style="font-size: 10pt;">R u <SPAN style="FONT-SIZE: 18pt" data-mce-style="font-size: 18pt;">remember</SPAN> me .</SPAN></SPAN
    dfg sdfgfdsg sfdgsdf gsfdgsdfsd <SPAN style="FONT-SIZE: 18pt" data-mce-style="font-size: 18pt;"><STRONG>Rabindra</STRONG></SPAN
    i need like
    col1
    Hi this is Rabindra.R u remember me.
    dfg sdfgfdsg sfdgsdf gsfdgsdfsd Rabindra

    Hi,
    If str is a string, and you want a version of it without any of the tags (that is, without the '<' or '>' characters, or anything between them), then you can use REGEXP_REPLACE, like this:
    REGEXP_REPLACE ( str
                  , '<[^>]+>'

  • HELP PLEASE...  error message for restore & now i can't update my ipod

    hi... please help. i plugged my ipod into the computer for an update and i got a message that i need to resore my ipod, so i did that and it just kept giving me that message. now my ipod is empty and i can't do anything. i tried another ipod that i have and updated all the software and versions for itunes and that didn't work either. i did get the ac plug message on one of the ipods and plugged it into my car and that worked, but it still won't update on the computer.. it just keeps telling me to restore! i'm freaking out... anyone who has solved this one, please lmk what you did. thanks!

    That seems to cause all sorts of fun that is annoying. Have you ever seen you Ipod with 150GB of capacity? That is another symptom.
    oh indeed ... we occasionally get reports of Terabyte sized ipods from folks with this one.
    another rare symptom (that isn't talked about much in the documentation) is "identity swaps" with other ipods. that's a double drive-letter confusion. an ipod_control folder from one ipod makes its way onto a network drive (as a result of one drive letter confusion). when another ipod is plugged in, a second drive letter confusion means that Windows sees the misplaced ipod_control folder, and itunes reports it's looking at a different ipod from the one that has actually been plugged in ...

  • Socket Closed error please help us finding a fix for the same

    Hi everyone,
    I have a web application deployed on Weblogic 10.3.4.0. In the application there is hyperlink to download a resouce (say an PDF document). Upon clicking the link, IE shows the Open/Save/Cancel dialog box. If the Open/Save/Cancel dialog box is not acted upon by the user within 1 min after it pops up, Weblogic is closing the socket. This causes IE to only download a part of the file say 784 KB or something. Whereas the entire file maybe 1MB in size. Please help in fixing this issue ASAP.
    Thanks in Advance
    java.net.SocketException: Socket closed
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at weblogic.servlet.internal.ChunkOutput.writeChunkTransfer(ChunkOutput.java:525)
    at weblogic.servlet.internal.ChunkOutput.writeChunks(ChunkOutput.java:504)
    at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:382)
    at weblogic.servlet.internal.CharsetChunkOutput.flush(CharsetChunkOutput.java:249)
    at weblogic.servlet.internal.ChunkOutput.checkForFlush(ChunkOutput.java:469)
    at weblogic.servlet.internal.CharsetChunkOutput.implWrite(CharsetChunkOutput.java:396)
    at weblogic.servlet.internal.CharsetChunkOutput.write(CharsetChunkOutput.java:198)
    at weblogic.servlet.internal.ChunkOutputWrapper.write(ChunkOutputWrapper.java:139)
    at weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:169)
    at com.teja.systemi.util.AroundData.copyStream(AroundData.java:311)
    at com.teja.systemi.client.servlet.servant.Newdownloadsingle.producePageData(Newdownloadsingle.java:108)
    at com.teja.systemi.client.servlet.servant.BaseViewController.serve(BaseViewController.java:542)
    at com.teja.systemi.client.servlet.FrontController.doRequest(FrontController.java:226)
    at com.teja.systemi.client.servlet.FrontController.doPost(FrontController.java:128)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Edited by: 910597 on Jan 27, 2012 2:15 AM

    What do you mean by "moo" ?
    Huh? You don't know about the moo? Are you livin' in a barn or sumthin'
    Sorry, corny joke.
    Seriously--if you haven't heard about the moo, then check out the MacBook forums. Nearly every third or fourth post is about the mooing problem.
    My own MacBook moos, but it's not so bad that it makes me upset. I understand, though, that others have it much worse.
    Black Macbook; Mini 1.5GHz (Late 2005); Mini 1.4GHz; PB G4 1GHz; PB Lombard; PB 2400; PMac G3; Blueberry iMac; iPod nano 4GB; and a talking Bill King bobblehead doll--Holy Toledo!

Maybe you are looking for

  • On wake up, Creative Cloud fails to sync assets

    Every morning when I wake up my machine (Mac Pro late 2013), CC will either have an alert icon or no icon. Usually the alert icon is a notification about apps not able to load, and nothing to do with file syncing. (clicking reload on that screen does

  • HP Slate 7 Voice Tab - Audio Quality Issue

    I see drastic change in audio quality in HP Slate 7 Voice Tab after an upgrade to recent Kit Kat update. Songs and other media is not all audible , Volume through external speaker is very very less at maximum volume also.Tried with many song, HD vide

  • How to import a .mdb file to oracle 10g

    Hi friend, I ve a .mdb file i want to import it in oracle 10g how shud i do..please help me.. Sonal...

  • Use automator to set to HiDPI

    I have an iPad 3rd gen and a MacBook Air 13" (mid 2013). I am using the software "Air Display" to connect the iPad as a second screen. So far so good. The thing is, since it's a retina display, it goes by default into that resolution, whereas I would

  • What should i do when i lost my iphone4s?

                  I am so sad that my iphone 4s lost in my way to school to take a PE class in 3.12.2013 . What even hurt me more is it that i was listening to misic at that time and my friend was along with me.I am so regret that i put my phone in my cl