LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible for a DAQ task to just stop responding to commands?

The software I am working on controls a NI USB-6501 digital I/O device using the NI-DAQmx library.  When the software initializes, it attempts to create 10 "tasks" (for different I/O lines of the device) using DAQmxCreateTask().  If any of the tasks cannot be created, the software should close with an error message. 

 

 

 if ((!CreateTestModeTask(&TestModeTask, USBdevname)) &&
     (!CreateChooseDUTTask(&DUTSelectTask, USBdevname)) &&
     (!CreateChargeStatusTask(&ChargeStatusTask, USBdevname)) &&
     (!CreateInitLinesTask(&InitLinesTask, USBdevname)) &&
     (!CreateChargeEnableTask(&ChargeEnableTask, USBdevname)) &&
     (!CreatePassFailEnableTask(&PF_EnableTask, USBdevname)) &&
     (!CreatePassFailResetTask(&PF_ResetTask, USBdevname)) &&
     (!CreatePassFailStateTask(&PF_StateTask, USBdevname)) &&
     (!CreatePassFailWriteTask(&PF_WriteTask, USBdevname)) &&
     (!CreateResetDUTTask(&ResetDUTTask, USBdevname)))
{

     continue running the software

}

else

{

     show error message and close software

}

 

 

Once the tasks are created, the software goes on to use them to manipulate the I/O signals of the NI USB-6501 device with DAQmxWriteDigitalLines() or DAQmxWriteDigitalU8().  The software does not check whether these functions return an indication of success or not... The assumption is that it works every time.

 

This is my question:

At run time, is it possible for a successfully created DAQ task to simply stop responding to commands?  This is what I believe happened.  I observed it only once out of hundreds of trials, but it is still a great concern.  Only 1 task stopped properly controlling the NI USB-6501.  All of the other ones continued to work properly. It continued to misbehave until I closed and re-started the software (thus re-creating all tasks).

And if it is possible for a task to simply stop responding, is there any way to prevent it?

 

-Mike

 

0 Kudos
Message 1 of 3
(3,052 Views)

Your assumption that instructions will work every time without facing errors is excessive in my opinion. I never observed a daqmx task simply stopping responding to commands: every time it happened, an error condition was raised explaining the misbehaviour.

I would add some error checking where you are manipulating the daq board and look into the informations the error message gives you.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(3,039 Views)

You're absolutely right, Roberto.  It was an oversight to assume the commands would work properly 100% of the time.  I'll be taking your suggestion going forward.

 

Thanks

 

-Mike

0 Kudos
Message 3 of 3
(3,022 Views)