NI-HSDIO C Function Reference

niHSDIO_HWC_FetchSampleErrors

  • Updated2023-02-21
  • 2 minute(s) read

ViStatus = niHSDIO_HWC_FetchSampleErrors( ViSession vi, ViInt32 numSampleErrorsToRead, ViInt32 maxTimeMilliseconds, ViInt32* numSampleErrorsRead, ViReal64 sampleNumber[], ViUInt32 errorBits[], ViInt32 errorRepeatCount[], ViUInt32* reserved1, ViUInt32* reserved2);

Purpose

Returns the sample error information from a hardware comparison operation.

Related topics:

Parameters

Input
Name Type Description
vi ViSession Identifies your instrument session. vi was obtained from the niHSDIO_InitAcquisitionSession or niHSDIO_InitGenerationSession function.
Sample Errors to Read ViInt32 Specifies the number of sample errors to fetch.
Max Time Milliseconds ViInt32 Specifies the number of milliseconds to allow the function to complete before returning. If the specified time elapses before the data operation has completed, the function returns a timeout error.

Setting a value of 0 causes the function to return immediately. This setting can be useful to manually poll for hardware errors after a data operation has been initiated. If no other error has occurred and the data operation is still not complete, the function returns a timeout error.

Setting a value of -1 causes the function to never timeout. Be careful not to use this value during a continuous operation, as it does not return unless a hardware error occurs. Perform a manual device reset from Measurement & Automation Explorer if you get stuck in this state or call the niHSDIO_reset or niHSDIO_ResetDevice functions from the other session of the device.
Output
Name Type Description
Number Of Sample Errors Read ViInt32 Returns the number of samples that were successfully acquired and transferred into data[].
Error Sample Numbers ViReal64[] Returns the number of samples with errors.
Error Bits ViUInt32[] Returns the bit numbers that were in error for each sample that has an error. 1 indicates an error. 0 indicates no error.
Error Repeat Counts ViInt32[] Returns the number of times that error was repeated. This parameter only yields data when the NIHSDIO_ATTR_HWC_FILTER_REPEATED_SAMPLE_ERRORS attribute is set to TRUE.
Reserved 1 ViUInt32 Reserved field. Use NULL.
Reserved 2 ViUInt32 Reserved field. Use NULL.

Return Value

Name Type Description
Status ViStatus

Reports the status of this operation. To obtain a text description of the status code, call the niHSDIO_error_message function. To obtain additional information concerning the error condition, use the niHSDIO_GetError and niHSDIO_ClearError functions.

The general meaning of the status code is as follows:

Value Meaning
0 Success
Positive Values Warnings
Negative Values Errors

Log in to get a better experience