Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

What is error code -25600 in DAQmx base?

I am setting up a counter with the following code on a PCI-6251, OS X. I am trying to create a clock at 10000 Hz. The board often returns a non-fatal positive error 25600 with no associated description (on OS X).
What does it mean? I reset the board prior to calling this function.


#define WarnOnError(x) { int error = (x); if ( error != 0) { char errBuff[2048]; DAQmxBaseGetExtendedErrorInfo(errBuff,2048); fprintf(stderr, "Line %d in %s, Error #%d: %s\n", __LINE__, __FILE__, error, errBuff);} }


TaskHandle createMasterClockTask(float64 freq, uInt64 npoints, bool32 continuous)
{

// Task parameters
int32 error = 0;
TaskHandle taskHandle = 0;

// Channel parameters
char chan[] = "Dev1/ctr0";
float64 duty = 0.5;
float64 delay = 0.0;

error = DAQmxBaseCreateTask("",&taskHandle);
WarnOnError(error);
error = DAQmxBaseCreateCOPulseChanFreq(taskHandle,chan,"",DAQmx_Val_Hz,DAQmx_Val_Low,delay,freq,duty);
WarnOnError(error);
error = DAQmxBaseCfgImplicitTiming(taskHandle, DAQmx_Val_ContSamps , npoints );
WarnOnError(error);

return taskHandle;
}
0 Kudos
Message 1 of 2
(3,263 Views)
Hello,
 
If you refer to KnowledgeBase3BC6I9GP: Where Can I Find NI-DAQmx Base Examples? you can find the location of some example programs that should have installed with DAQmx Base.  Unfortunately, there is not an example program demostrating how to do counter output.  However, there is a counter input example which you could run just to verify that your device is functioning properly. 
 
I did some research into this error code and I'm not sure that 25600 is a DAQmx Base error.  I cannot find any documentation whatsoever on this error.
 
If you could please provide the following information, I can help you further:
  • What development environment are you using?
  • What version of DAQmx Base are you using?
  • You mention that the error occurs and there is no error description.  Could you please post a screenshot of the error?  Are you confident that it is a DAQmx Base error (as opposed to an error from the OS or from the IDE)?  If it is indeed a DAQmx Base error, which function is returning the error?
  • You mention that the board "often" returns an error.  Could you be more specific about this?  How often does the error occur?
  • Have you ever had this board working successfully with this code or any other code?  I ask this to see if you can verify that the board is functioning properly and does not have any known issues.
  • I am assuming that you start the task and clear the task elsewhere in the program -- is that correct? 

I look forward to hearing back from you with more information.

0 Kudos
Message 2 of 2
(3,240 Views)