Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Triggered Analog Sample causing labview to freeze intermittently - NI USB6009

Hi All,

 

I'm trying to set up a DAQ card to sample an analog channel whenever it is triggered by a digital pulse. Both the analog and digital signal fire at the same time with a duration of 32us. The purpose of this is to have a warning light pop up whenever the system sees a digital pulse but no voltage on the analog channel (fuse is blown).

 

The issue I'm having is that the DAQmx analog sample VI freezes intermittently, anywhere from 15s after running to 5min. Here is my code thus far:

analog sample digital trigger.png

 

When the code hangs highlight execution shows labview waiting on the daqmx analog sample vi (green arrow on it). Once the code hangs the only way to stop it is to unplug the daq card, the red abort button does not work. I'm guessing this is some sort of buffer error?

 

Any suggestions as to what might solve this problem? I've been trying different approaches for over a week now.

 

Thanks for any help!

0 Kudos
Message 1 of 5
(3,067 Views)

Hello,

 

Have you received any type of error codes when your program stops working and freezes?  If you let your program continuously run will it recover from the freeze?  

 

Another suggestion I have would be to pull an example directly for the LabVIEW example finder and without any modification run it.  Test and see if this program exhibits the same behavior.  If it does we can rule out the program and focus on the computer and hardware or we might be able to locate the issue in the code.

 

Regards,

 

Marcus

Marcus M.
PXI Product Support Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,044 Views)

Hi Marcus,

 

I haven't seen any error codes.

 

I actually started with the example code "Acq&Graph Voltage-Int Clk-Dig Start.VI" and put it on run continuously. When I do this it freezes at "DAQmx clear task.vi". I'm guessing this must be some sort of computer/hardware problem. I've also tried a fresh out of the box 6009 with the same results.

 

The other computers in my lab are nearly identical spec wise, but I'll see if they produce different results. 

0 Kudos
Message 3 of 5
(3,038 Views)

Hello,

 

I'm interested to see if your program behaves the same way on multiple computers or if this is an issue contained within a single computer.  One step you could use to help alleviate the issue would be to not use the run continuously button but instead build a loop around the piece of code that you wish to run multiple times.  Using the run continuously button can sometimes causes errors like the one you are seeing.  

 

Regards,

 

Marcus 

Marcus M.
PXI Product Support Engineer
National Instruments
0 Kudos
Message 4 of 5
(3,022 Views)

I did some testing this weekend and it looks like its a computer issue. The code ran fine on a different computer the entire weekend.

 

I think I'll have to try a workaround that involves using continuous sampling rather than finite. I've seen the run for hours on continous mode, although I need finite to get the retriggerable aspect.

I'm going to try sampling signals on analog channels and use logic to check if both are up at the same time

0 Kudos
Message 5 of 5
(3,016 Views)