Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 69373

Trouble with DAQmx in subvi

$
0
0

Hello, 

 

I have trouble running some daqmx tasks within a subvi (and I am really not sure why, they worked fine when not sub-vi'd). 

When I run my code, I eventually get a timeout error in one of the daqmx tasks in the subvi (usually accsens or pulse 2, but it varies). the frustrating thing is that this error sometimes doesn't happen at all, and sometimes it occurs at the second stimulation, sometimes at the 7th, 10th, 63th etc. I think that either something is eating up all my memory, or that I have a race condition somewhere without realizing it (or perhaps it's something stupid).   

 

What I try to do is the following:

The vi controls a stimulation mapping setup (I send two pulses to one of 64 channels and note if there is a twitch in return). 

First, I need to set the correct current on an external machine, after which I can press the stimulate button. When I press the button, two pulses are generated. The output pulses are pulse 1 and 2, I trigger pulse 2 at the end of pulse 1.

I record the response with 4 acceleration sensors, also triggered by pulse 1 (records 1k samples at 1kHz), write these traces to file and show them in a graph (blip1 to 4). 

I then decide if there was a twitch and where, store the result in an array (which stimulation, which channel of the array, which current and which response), and repeat for the next electrode. I also make two arrays to sort the electrodes in Y (twitch) and N (no twitch) for the next stimulation step. 

 

Any ideas or help? 

Thanks, 

Susan 

 


Viewing all articles
Browse latest Browse all 69373


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>