I am attempting to perform both single-shot and continuous acquisition as needed, using niScope Multi Fetch WDT.vi. My current program structure is as follows:
Do
Perform init routines as needed, or if settings have changed since last loop iteration:
{
Init Horiz
Init Vert
Init Trig
Clear init flags
}
niScope Initiate Acquisition.vi //start up the digitizer
niScope Multi Fetch WDT.vi //get data
Display data on waveform graph
Loop
So the problem I'm having is the timeout on the Multi Fetch WDT when the trigger level is set outside of any level the current signal will ever hit.
niScope Multi Fetch WDT.vi
Error -1074126845: Maximum time exceeded before the operation completed. Possibly no trigger received. Buffers done: 0, Points done: 0.00000
For example, using a 100mV input signal with the trigger level = 150mV will make the Multi Fetch WDT.vi eventually timeout after the timeout delay has been reached. This timeout is not a problem in a case where the trigger level is within range of the signal being measured (say trigger level = 50mV) and there was simply no 100mV signal present yet--in that case, the VI should loop and wait again for a signal to be present and acquired. The problem is when there will never be a signal, because the user sets the trigger level too high (or too low).
The way my acquisition loop is set up, it shouldn't be a problem: Set the new trigger level to initialize next time around so the Multi Fetch WDT.vi won't timeout. This is where I'm having problems, because I get the following error:
niScope Configure Trigger Edge.vi
Error -1074118647: A previous acquisition is still in progress. If you are attempting to change an attribute, note you can only change fetch attributes while an acquisition is still in progress.
I'm assuming that I can close the entire session and re-initialize everything (horiz, vert, trig) to get back to where I want to be with a new trigger level value. Is there any way to NOT close the entire session and erase all of the vertical and horizontal settings though? Is there a way to simply update with the new trigger level value?--ie, to tell it to quit whatever acquisition is in progress without erasing all of the settings? Normally when a trigger is being received, this error doesn't occur, and a new trigger level can be set on the next loop iteration, but once it times out once, it's all over (without reseting everything).