Single Pulse Generation

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.

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?

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?

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.

1 Like