Solution
You are not able to use NI-SCOPE API to configure trigger to realize such feature. Since the API configures reference trigger which is different from acquisition trigger. To realize such feature, you need to do some logic programming. The block diagram is shown below.
1. Open a session to the digitizer.
2. Configure the vertical parameters such as input range, offset and coupling.
3. Configure the sample rate.
4. Configure a software reference trigger, which will never be sent, so as to acquire data continuously.
5. Configure the digitizer to fetch relative to the current read pointer and configure the number of samples per fetch.
6a. Initiate the detecting of trigger signal.
6b. Detect the trigger signal.
6c. Check if the fetched signal is higher than the threshold. If so, it tells the trigger has arrived.
6d. Abort the trigger detecting task.
7. Initiate the acquisition of signal waveform.
8. Check the
Fetch Backlog to determine if the
Sample Per Fetch has been acquired.
9. Fetch the requested number of samples with the
niScope Fetch Binary 16 VI.
10. Check if the
Total Samples to Acquire have been fetched, and stop the loop.
11. Close the session to the digitizer.
12. Merge and handle errors.
From the block diagram, you can see that the program uses channel0 to fetch trigger signal. When the trigger signal's amplitude is higher than a threshold, it stops channel0 and starts channel1 to fetch signal waveform.