# Multiple triggers in sequence

**URL:** <https://forum.liquidinstruments.com/t/multiple-triggers-in-sequence/1173>\
**Category:** Moku:Pro\
**Created:** [April 15, 2025, 2:24am UTC](https://forum.liquidinstruments.com/t/multiple-triggers-in-sequence/1173 "2025-04-15T02:24:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![1000NightsAKnight](https://avatars.discourse-cdn.com/v4/letter/1/9e8a1a/32.png) [@1000NightsAKnight](https://forum.liquidinstruments.com/u/1000NightsAKnight)\
**Post date:** [April 15, 2025, 2:24am UTC](https://forum.liquidinstruments.com/t/multiple-triggers-in-sequence/1173/1 "2025-04-15T02:24:24Z")

</div>

Hello MokuPro Users,  
I have been studying Data Acquisition using the Deep Memory Mode of the oscilloscope in this [example](https://github.com/liquidinstruments/moku-examples/blob/main/python-api/oscilloscope_deep_memory_mode.py).

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

```auto
        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.

```auto
        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

---

<div class="post-metadata">

**Author:** ![Dylan](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dylan](https://forum.liquidinstruments.com/u/Dylan)\
**Post date:** [April 15, 2025, 7:45pm UTC](https://forum.liquidinstruments.com/t/multiple-triggers-in-sequence/1173/2 "2025-04-15T19:45:14Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![1000NightsAKnight](https://avatars.discourse-cdn.com/v4/letter/1/9e8a1a/32.png) [@1000NightsAKnight](https://forum.liquidinstruments.com/u/1000NightsAKnight)\
**Post date:** [April 15, 2025, 8:14pm UTC](https://forum.liquidinstruments.com/t/multiple-triggers-in-sequence/1173/3 "2025-04-15T20:14:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Dylan](https://avatars.discourse-cdn.com/v4/letter/d/e95f7d/32.png) [@Dylan](https://forum.liquidinstruments.com/u/Dylan)\
**Post date:** [April 16, 2025, 8:02pm UTC](https://forum.liquidinstruments.com/t/multiple-triggers-in-sequence/1173/4 "2025-04-16T20:02:17Z")

</div>

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!
