# Single Pulse Generation

**URL:** <https://forum.liquidinstruments.com/t/single-pulse-generation/548>\
**Category:** Projects & Applications\
**Created:** [June 20, 2022, 5:53pm UTC](https://forum.liquidinstruments.com/t/single-pulse-generation/548 "2022-06-20T17:53:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jtaylor](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jtaylor](https://forum.liquidinstruments.com/u/jtaylor)\
**Post date:** [June 20, 2022, 5:53pm UTC](https://forum.liquidinstruments.com/t/single-pulse-generation/548/1 "2022-06-20T17:53:46Z")

</div>

I want to use the API to set up arbitrary waveforms in both channels then send a command through the API that will trigger a single iteration of the waveforms.

Presently when I set waveforms using `generate_waveform()` the system immediately starts outputting the waveforms continuously. I tried to use `enable_output()` to turn off the channels until a later time when both channels were ready to fire but disabling a channel this way doesn’t last beyond the next call to `generate_waveform()`.

I want to be able to run a series of waveforms with a return to the API between each waveform to change the output.

---

<div class="post-metadata">

**Author:** ![Sam.Speece](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.liquidinstruments.com/sam.speece/32/191_2.png) [@Sam.Speece](https://forum.liquidinstruments.com/u/Sam.Speece)\
**Post date:** [June 21, 2022, 1:02am UTC](https://forum.liquidinstruments.com/t/single-pulse-generation/548/2 "2022-06-21T01:02:15Z")

</div>

The way you plan to use the the AWG may actually be a bit easier to use within our dedicated software. In the screenshot below, you can set both channels to a custom waveform and can then enable the modulation option (see red arrows) where your waveform can be either pulsed (like you mention) or burst (which has a return to the user depending on the mode. Try N cycle and select only 1 cycle).

This approach will work if you are okay with manually loading the new custom waveform into the AWG. Also, this approach allows you to set a trigger for the waveforms which allows to generate from a timed pulse, however, you can not manually start both channel simultaneously by clicking on them.

Is there a need beside what you have listed that requires you too use the APIs? Which API are you using?

 ![Untitled](https://canada1.discourse-cdn.com/flex035/uploads/liquidinstruments/original/1X/b035cb5f284daddd3b3ecdc40e9926fc9488ac0e.png)

If you do have to use one of our APIs, then for me to help could you please explain a bit more about the issue you are having? I am confused by your sentence "when both channels were ready to fire but disabling a channel this way doesn’t last beyond the next call to `generate_waveform()`. Did you get an error code when trying to use the `generate_waveform()` command after disabling a channel?

---

<div class="post-metadata">

**Author:** ![jtaylor](https://avatars.discourse-cdn.com/v4/letter/j/e79b87/32.png) [@jtaylor](https://forum.liquidinstruments.com/u/jtaylor)\
**Post date:** [June 23, 2022, 8:15pm UTC](https://forum.liquidinstruments.com/t/single-pulse-generation/548/3 "2022-06-23T20:15:31Z")

</div>

I have a system that I want to test with, say, 10 different frequency excitations. The system I have needs a square wave that is high for the duration of the time the excitation is being sent. So I need both channels of the arb, and they need to be precisely synced. I am using another system to collect the data, it will be set up to record data for a set amount of time starting with the trigger based on that square wave.

I would like to be able to configure a waveform for each channel via the API then trigger both channels at precisely the same time to perform exactly one pulse of the waveform. I’m looking at the github repo now and see `en=true` keyword argument, that should solve the problem I had at first where changing the wave makes it start triggering automatically. I’m also seeing that `enable_output()` can enable both channels at once. Maybe the combination of those two things is enough that I can do what I want to do, assuming enough dead time between signals that I can turn off the outputs again before the next cycle.

I will confirm and report back if I have more troubles.
