Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQ Becomes Unavailable

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

 

  1. Reserve the task 'task.Control(TaskAction.Reserve)'
  2. Run my measurements using a series of 1 second 'reader.BeginReadWaveform' 'reader.EndReadWaveform
  3. Stop my task with 'task.Stop()'
  4. Unreserve the task 'task.Control(TaskAction.Unreserve)'

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

0 Kudos
Message 1 of 6
(4,921 Views)

Hey vermicelli,

 

Do you get these same errors when you triy running any of the example code? You shouldn't need to make the low-level calls into the task-state model unless you really need to for advanced applications. Why are you specifically unreserving the task? 

Nathan Murphy
0 Kudos
Message 2 of 6
(4,866 Views)

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?

0 Kudos
Message 3 of 6
(4,862 Views)

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. 

Nathan Murphy
0 Kudos
Message 4 of 6
(4,856 Views)

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.

0 Kudos
Message 5 of 6
(4,834 Views)

Of course - post back here if you have more questions!

Nathan Murphy
0 Kudos
Message 6 of 6
(4,812 Views)