Jump to content
  • 0

Generating Burst Signals Using Code


Mona

Question

Hi,

I'm using using Digilent Analog Discovery 2. I'm trying to generate a sine wave signal for a period of time and then shut it off using the Arbitrary Wave Generator (AWG). I am able to do it in the waveforms software using Independent or Synchronized signal states as explained in the help section below

image.png.2ff26d39e5bc6df245d9248cb0d45a50.png

However, I'm unable to replicate the same signal using my python code. I'm relying on the sdk provided on the github repository: https://github.com/Digilent/WaveForms-SDK-Getting-Started-PY/tree/master/WF_SDK

One approach I tried was to turn on the wavegen for a period of time then close it and record the signal as shown below

device_data=device.open()

scope.open(device_data, sampling_frequency= 60e6, amplitude_range = 1)

wavegen.generate(device_data, channel=1, function=wavegen.function.sine, offset=0, frequency=50e3, amplitude=1)

scope.trigger(device_data, enable=True, source=scope.trigger_source.analog, channel=1, level=0.5)

sleep(0.0006)

wavegen.close(device_data)
wave1, time1, s = scope.record(device_data, channel=1)

This approach didn't work though. The scope gets stuck in the while loop in the record function indicating that triggering didn't happen correctly. 

Is there another way to generate burst signals using code? I looked in the SDK Reference Manual but couldn't find anything. 

 

Thank you,

Mona

 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...