07-11-2014 10:20 AM
I have a NI 9215 DAQ module (screw terminal) in a 9181 chassis on a local ethernet network that sometimes becomes unavailable. My workflow is to
Sometimes when Unreserving a task, I receive the -50405 error (see below). When I try to restart my client, it attempts to reserve the task using the 'task.Control(TaskAction.Reserve)' and then I receive either the -201250 error (see below) or the -201401 error (see below). Obviously the DAQ is not responding, but when searching the forums, people receiving these errors are on wireless or USB. However, I'm on ethernet LAN and the device is assigned a static IP address. So, I'm wondering if something in my workflow is causing the DAQ to not respond or it truly is a connectivity issue with the network. Thanks for any insight. If it helps, I'm programming my client with the .NET DAQmx drivers.
-50405 Error
ERROR Unable to un-reserve the DAQ device. NationalInstruments.DAQmx.DaqException: NI Platform Services: No transfer is in progress because the transfer was aborted by the client. The operation could not be completed as specified. Task Name: _unnamedTask<3> Status Code: -50405 at nNIMSSAIL100.StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >.CheckWithName(StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >* , tCaseInsensitiveBasicString<unsigned short\,_STL::char_traits<unsigned short>\,_STL::allocator<unsigned short>\,nNIDMXS100::tLocaleConsideringWideStringComparitor\,nNIDMXS100::tLocaleConsideringWideStringCaseForcer>* pName) at nNIMSSAIL100.StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >.Check(StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >* ) at NationalInstruments.DAQmx.Task.Control(TaskAction mode)
-201250 Error
NationalInstruments.DAQmx.DaqException: Connection to the network device has timed out. The network device did not respond properly for a period of time. If timeouts persist, contact your system administrator. Device Specified: DEVICE-1 Property: NationalInstruments.DAQmx.Device.TcpipEthernetIP Corresponding Value: xxx.xxx.xxx.xxx Property: NationalInstruments.DAQmx.Device.TcpipHostname Corresponding Value: DEVICE-1 Device: DEVICE-1 Task Name: _unnamedTask<0> Status Code: -201250 at nNIMSSAIL100.StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >.CheckWithName(StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >* , tCaseInsensitiveBasicString<unsigned short\,_STL::char_traits<unsigned short>\,_STL::allocator<unsigned short>\,nNIDMXS100::tLocaleConsideringWideStringComparitor\,nNIDMXS100::tLocaleConsideringWideStringCaseForcer>* pName) at nNIMSSAIL100.StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >.Check(StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >* ) at NationalInstruments.DAQmx.Task.Control(TaskAction mode)
-201401 Error
NationalInstruments.DAQmx.DaqException: Retrieving properties from the network device failed. Make sure the device is connected. Device Specified: DEVICE-1 Property: NationalInstruments.DAQmx.Device.TcpipEthernetIP Corresponding Value: xxx.xxx.xxx.xxx Property: NationalInstruments.DAQmx.Device.TcpipHostname Corresponding Value: DEVICE-1 Device: DEVICE-1 Task Name: _unnamedTask<1> Status Code: -201401 at nNIMSSAIL100.StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >.CheckWithName(StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >* , tCaseInsensitiveBasicString<unsigned short\,_STL::char_traits<unsigned short>\,_STL::allocator<unsigned short>\,nNIDMXS100::tLocaleConsideringWideStringComparitor\,nNIDMXS100::tLocaleConsideringWideStringCaseForcer>* pName) at nNIMSSAIL100.StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >.Check(StatusObserverT<nNIMSSAIL100::ApiTraits<nNIMSSAIL100::DotNetApi> >* ) at NationalInstruments.DAQmx.Task.Control(TaskAction mode)
Note: I replaced my IP with xxx.xxx.xxx.xxx
07-14-2014 03:53 PM
07-14-2014 04:18 PM
Hi, I'm reserving and unreserving the task because I wanted to ensure that there weren't two computer that were trying to execute a task on the same DAQ at the same time. In our setup, I don't think it'd ever happen, unless a user incorrectly chose the wrong DAQ, but I thought I was being careful. Are you saying that I don't need to reserve the DAQ before creating a DaqAnalaogMultiChannelReader nor unreserve the task before disposing?
07-14-2014 04:57 PM
You don't need to explicitly reserve and unreserve it. The task will automatically move from one state to the next according to the actions done to the task (configure settings, read back settings, start, stop, clear, etc.). I suggest running some of the C#.NET example code to see if this causes the same errors as the task finishes. This way here we can start eliminating variables.
07-15-2014 11:21 AM
Thank you for the help Nathan. The error is very infrequent and only occurs in the production lab. I've tested locally and you are correct. I did not need to reserve/unreserve the DAQ manually. I will put these changes in the lab and see if the errors reoccur. Again, thanks for the advice.
07-16-2014 08:12 AM