I have a PXIe 5122 oscilloscope (scope) and a PXIe 5413 function generator (fgen). The fgen sends a train of pulses with a trigger at the start of each pulse configured as:
I want the scope to measure each pulse starting from the trigger on RTSI0, so I configured it as:
Then I fetch each record individually in a for loop:
This works, but not quite correctly. What happens is that the time between acquisition is exactly double the time it should take. What I think happens is that when I fetch the data, the trigger occurs at the same time, since I acquire exactly as long as the fgen pulse lasts. Then it waits for the next trigger to read the signal again.
I want that the scope is always measuring and then I just fetch the data from the buffer when it's available. How can I do that?