Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

cDAQ 9185 network error recovery

I'm trying to add automatic recovery from network errors to my application (just in case). I'm creating the errors simply by unplugging and re-plugging the Ethernet cable on the cDAQ-9185. The device is directly connected to my computer using a static IP.

 

I'm reading a single TC channel, with continuous sampling. When I disconnect the cable, I get error -201390 from the DAQmx Read. So far good, I can detect the error. However, recovering seems to be difficult. So far I've tried:

 

1. Do nothing, continue reading as if nothing has happened. Reading actually recovers after while and the y-data is correct. However for an unknown reason the timestamp from DAQmx read jumps back to epoch and stays there.

 

2. I read in some forum that resetting the device would help. So I've tried calling DAQmx Reset Device. For unknown reason calling this VI in this situation hangs eternally. I actually need to reboot the Windows to recover. Even Windows hangs at reboot so I need to power off the virtual machine I use for development. I've tried using ping to detect connection to the device before calling the reset. Makes no difference. I also tried calling self test, same behavior. 

 

3. I've tried stopping/starting the tasks, re-creating the tasks (the tasks are created programmatically). I get errors suggesting to reset the device.

 

Is this the expected behavior? Has anyone done this successfully? I have not tried on another VM or computer, also not with another cDAQ device.

 

Unfortunately I cannot share the code at this point. I'll try to create a minimal version for demonstrating the error and post that later.

0 Kudos
Message 1 of 1
(739 Views)