Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

System-breaking bug in NI-DAQ

Hello.
I had a task to implement I2C master via PXIe-6535. I did it by using following scheme:

                                            to pwr 
                                         +-------- 
                                         L         
    6535               2n7002           | |        
   +--------+         +-----+  to gnd   |_|        
   |        | sda_out |    S|--------    |         
   |  GPIO30|---------|G    |            |  to sda 
   |        |         |    D|--+---------+-------- 
   |        |         +-----+  |                   
   |        | sda_in           |                   
   |  GPIO29|------------------+            to pwr 
   |        |                            +-------- 
   |        |                            L         
   |        |          2n7002           | |        
   |        |         +-----+  to gnd   |_|        
   |        | scl_out |    S|--------    |         
   |  GPIO31|---------|G    |            |  to scl 
   |        |         |    D|--+---------+-------- 
   |        |         +-----+  |                   
   |        | scl_pfi          |                   
   |    PFI2|------------------+                   
   |        |                                      
   +--------+            

So, I used two 2n7002 for creating open-drain outputs, and connected SCL to PFI input to aquire data only at SCL pulse. It isn't perfect solution for I2C, but it's work. At least, it was a solution, before I faced with weird bug.
Sometimes, when you call to DAQmxReadDigitalLines this bag hangs up calling process. And it hangs up on OS level: it can't be killed from task manager, and even system running this process can't be normally turned off.
This doesn't happen every time, sometimes about 700-15000 calls could pass before bug happens. Just let it run for a few minutes.

I tried to connect to hanged process with debugger, and looks like it hanging at call to DeviceIoControl from module nipalu.dll

This happends to me with following drivers&libs:
1. NI-DAQmx device driver 21.3.0f165 + NI-PAL 21.3.0
2. NI-DAQmx device driver 22.8.0f202 + NI-PAL 22.8.0

My system information:
PC: Windows 10 Pro 1909 10.0.18363, 8 GB ram, Intel Core i5-8500.
NI PCIe-8361, connected to NI PCIe-1078, which has NI PXIe-6535 installed.

Sample code that can trigger and report this bug attached.

0 Kudos
Message 1 of 1
(661 Views)