Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

I get -10810 error when performing MeasurePeriodInBuffer (ND_BUFFERED_PERIOD_MSR)

I would suggest taking a look at the STCsingleBufPeriodMeasure.C example.  This example is located at the following address.
C:\Program Files\National Instruments\NI-DAQ\Examples\VisualC\Ctr
Rod T.
0 Kudos
Message 11 of 17
(2,414 Views)
Hello cristi,

Excuse my hasty reply, I see that Matt Anderson had already pointed you to this example.  This example is still a good reference as to the execution order of the commands to use.  As David mentioned in a previous post, in order to reset the counter you need to stop and restart the task.  This means that you would need to reconfigure the task every time.  The sequence that you referred to: 

  • GPCTR_Set_Application
  • GPCTR_Change_Parameter
  • GPCTR_Config_Buffer
  • GPCTR_Control

    This needs to be executed on every iteration of your loop.  Let me know if this is unclear.
  • Rod T.
    0 Kudos
    Message 12 of 17
    (2,389 Views)
    Hello
     
    Thanks a lot for your quickly response.
     
    This was my understanding, also but I want to be sure that this is the correct way for acces in a loop.
     
    The application performed in this way the configuration, but after some itterations(50000-60000 steps) the application crashed due to this error:
    "-10810 internalDriverError An unexpected error occurred inside the driver when performing this given operation "
     
    I run the application in debug mode and the application crahes here with the nStatus = -10810:
     
    nStatus = GPCTR_Config_Buffer(m_nDeviceNumber, m_nCounterNumber, 0, ulBufferSize, pulBuffer);
     //check for errors
     if(nStatus < 0)
     {
      m_ErrHnd.ErrorHandler(nStatus,"CCounter::MeasurePeriodInBuffer - GPCTR_Config_Buffer");
      return (nStatus);
     }

    I don't have the code of the GPCTR_Config_Buffer(because this function is from the driver) and if I do not have more information about this error(-10810) I can not find the problem.
     
    I am looking forward for your response.
     
    Regards,
    cristi
    0 Kudos
    Message 13 of 17
    (2,343 Views)
    Before I make any more suggestions, I would strongly recommend switching to DAQmx.  This application is very easy to do in DAQmx, and there are countless advantages to using DAQmx over Traditional Daq.  We provide this driver for free here.  Note that you can have both drivers installed on your computer at the same time.  You can even use the card with some old programs that use Traditional Daq as long as you reset the card for the driver you want to use. 

    According to this post, this error could be caused by a bad install of Traditional Daq.  You can install the latest version of the driver here.
    Rod T.
    0 Kudos
    Message 14 of 17
    (2,322 Views)

    I use the last version of driver. (version 7.4.4f7)

    It is clear for me the advantage of the DAQmx over Traditional and probably this will be the solution of our problem.

    As it was mention by my colleague the application is more complex (use 3 NI boards: 6602, 6534, 6035) and whole application was build up considering Traditional driver. So the effort to port the whole application on DAQmx have be taken into account.

    The strange thing about this error is that only on some computers the error appears. I monitor the CPU load and memory and the application does not have memory leak.There are computers on which the application runs well for billions of steps but on some computers the application crashed. One of the difference between them is that the WindowsXP and language is on German(on the crashed computers). I reinstall the last version of Traditional but no results.
    I will try to clean up the operating system and install everything on English and repeat the test.
    So in this condition maybe you understand me why  I don't want to spend other effort to port the whole application on DAQmx. The application satisfy our needs with Traditional driver, except this error (-10810).

    I noticed an other issue. The error dissapears in 2 ways:
    1. Restart the application
    2. Let the application open, Go To -> Measurement & Automation(icon desktop) ->Device and interfaces-> NI6602. After I performed some tests on this board the error dissapear and every thing works well for some steps (e.g. 50.000) until the error will occur again.(without to stop the application).


    One more time many thanks for your help and promptitude.
     


    0 Kudos
    Message 15 of 17
    (2,301 Views)
    Sounds good, please post back if you still have issues after cleaning up the OS and installing the software in English.  Of course, my number one recommendation would be to switch to DAQmx.  But since you can get the Traditional Daq application to work on another machine, I think replicating the software on the working machine is a good troubleshooting step.


    Message Edited by RT4CY on 07-28-2008 12:33 PM
    Rod T.
    0 Kudos
    Message 16 of 17
    (2,276 Views)

    I changed the HDD(with OS reinstalled) and I repeat the tests => error occured

    I change even the RAM memory = > error occured.

     

    I really do not understand this error "-10810 internalDriverError An unexpected error occurred inside the driver when performing this given operation"

    I don't understand why this error occurs only on some computers ...

     

    Probably I will make the portation to NI-DAQmx of whole application.

     

    Regards,

    cristi   

     

     

    0 Kudos
    Message 17 of 17
    (1,939 Views)