Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How to restart acquisition after a reference trigger

Hi,
I'm using DAQmx with a USB-6211 board.  I have a repetitive signal with very low duty cycle that I would like to capture.  I'm using a digital start trigger to begin the acquisition, and a digital reference trigger synchronized with the signal to capture samples of interest.  After the first sequence of start and reference triggers, the acquisition stops.  The next start trigger does not seem to restart the acquisition because when attempting to read the channel with DAQmxReadAnalog64 I receive error DAQmxErrorSamplesWillNeverBeAvailable.
 
The only way I've been able to programmatically restart the acquisition is by stopping the task, clearing it, and reconfiguring the triggers, which takes a long time, causing me to miss subsequent triggers.  Is the reference trigger function supposed to work this way?  It seems to be designed for a single trigger only.
    Any advice would be much appreciated.
    Roger
0 Kudos
Message 1 of 3
(7,115 Views)

Hello Roger,

I see that you are using our USB-6211 in an analog acquisition application triggered by a start trigger and reference trigger. For an explaination on how the start trigger and reference trigger is used.

NI USB-621x User Manual

From the looks of your post, it seems like you are trying to do something else. Did you want to do finite acquisition or continuous acquisition?
I also got the impression that you want to time when an acquisition is made based on a digital signal. If this is what you are trying to do, the reference trigger isn't what you are looking for.

Please clarify what you are trying to do and if I have misunderstood your application.

Regards,
  Sandra T.

Applications Engineer | National Instruments

 
0 Kudos
Message 2 of 3
(7,093 Views)
Hi Sandra,
we have an analog signal that is repetitive (10Hz) but has a significant amount of timing jitter (1-5 ms).  We can derive a digital signal that occurs simultaneously with our analog signal.  We don't want to use this digital signal as a Start Trigger because we want to have some pretrigger samples to use to determine the baseline of our signal.  Thus, we're using it as a Reference trigger together with another earlier digital signal as the Start Trigger.  This all works fine for one shot, but then the acquisition stops.
We're using finite acquistion; we want to collect a specified number of samples once the Reference Trigger occurs.  We would then like the Start Trigger to initiate another acquisition.
Our program works fine using just the Start Trigger; once triggered, we can read the specified number of samples.  The next Start Trigger initiates a new acquistion and the process repeats until we stop it.
Let me know what we're doing wrong, or if you have more questions.
   Thanks,
   Roger
0 Kudos
Message 3 of 3
(7,087 Views)