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

problems with retriggering of analog output by stop/restart of task

$
0
0

I am trying to build a LabVIEW DAQ system (using a NI USB-6218 BNC and LV 2013) which performs continuous single-channel AI and periodic two-channel AO.  My woes are currently with getting the  implementation of the AO tasks to work as desired.  My implementation scheme is as follows:

  1.        I am using a continuous CO Pulse Time task (Ctr0) to control the interval between the repeated outputs of my AO pace pulse waveforms
  2.        The AO task is configured to utilize the falling edge of Ctr0InternalOutput to trigger the output of the (finite) pace pulse AO waveforms
  3.        After each time the pace pulse AO is completed (by using DAQmx Wait Until Done), I stop and restart the task in order to re-enable its digital trigger (in anticipation of the next falling edge from Ctr0).

A representative example of this implementation is attached.  (There are specific reasons why I wish to separate the control of the pacing interval from the pacing waveform output itself.)

 

According to my review of the LabVIEW KB and examples archive, AO generation should be “retriggered” by stopping and restarting the task (eg, see http://www.ni.com/example/30008/en/).  (I know that there is another suggested method for generating retriggerable AO using onboard counters [http://www.ni.com/example/29787/en/], but I don’t have enough counters for this implementation in the context of the larger scope of my actual program.)  However, when I run my program, it appears that my AO output task only respects the trigger on the first iteration thru the stop/start loop; on all subsequent iterations, the loop appears to free-run (the DAQmx Start doesn't seem to wait for the next CO trigger).

 

Can someone please help me identify what I’m doing wrong here?

 

Thanks,

==Matthew


Viewing all articles
Browse latest Browse all 66860

Trending Articles



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