Multiple triggers in sequence

Hello MokuPro Users,
I have been studying Data Acquisition using the Deep Memory Mode of the oscilloscope in this example.

The following lines allow us to get a single triggered frame and save it to the buffer:

        i.get_data(wait_reacquire=True, wait_complete=True)
        response = i.save_high_res_buffer(comments="Triggered")

)

Is there a way to loop this so that I could acquire the frames from, say, 10 triggers in a row? My impression so far is that the action of saving from ssd buffer to hard disk, as below, causes me to miss the data from some triggers.

        temp_filename = FILE_PATH + "/high_res_data-" + time.strftime('%d-%m-%Y-%H_%M_%S')
        i.download("ssd", file_name, temp_filename + ".li")
        os.system("mokucli convert --format=npy " + temp_filename + ".li")

However, if I don’t save to disk, I imagine that I would be overwriting any data already in the data.
Am I correct? And is there any way around these problems?

Regards,
L

Hello @1000NightsAKnight ,
Thank you for reaching out! If I am understanding correctly, you want to be able to collect a certain number of triggers (say 10) and average those. To do this using the script, change NUM_FRAMES to 10. This will collect a frame, download it, and add it to ch1 which holds all of the data, then average at the end of the loop. If I am misunderstanding please let me know, but I hope this helps!

Thanks for the quick reply @Dylan. My precise question, though, is not whether I can eventually get 10 triggers but whether I can get 10 sequential triggers (i.e. one immediately after the other) even if I am triggering at high frequency (let’s say 10 kHz)?

My impression so far is that only after I have collected and downloaded a frame is the device ready to collect the next one. In which case, I will likely have missed the next immediate trigger if I am triggering at high frequency.

Hello @1000NightsAKnight ,
Since the oscilloscope is a frame based instrument, this is the correct operation. If you were to use the GUI to download a trigger event, you would not be able to capture another trigger event until the download was done which is essentially what is happening in the script. If you want a continuous stream of data, I would recommend using the Data Logger to either log data for a certain duration and download the data to post process in Python, or stream to a file and post process the data. If you need any help implementing this please let me know!