Jump to content

Mona

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Mona's Achievements

Newbie

Newbie (1/4)

1

Reputation

  1. Hi @reddish, Here are the answers to your questions: * I want to do analog-out generation on a single channel. * Yes, the signal itself should be a plain sine wave with a fixed frequency. I don't need two channels. * The start of the signal is done through code by enabling the wave generator. The burst signal is the input signal to my system so it's not dependent on external sources. * Yes, your understanding is correct. I want this signal to be stopped after a predetermined amount of time (independent of external inputs). * I only need the burst signal once. I don't need it to be repeated. Thank you, Mona
  2. 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 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
  3. 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 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
  4. Hi @attila, That resolved the issue. Thank you for your help! Mona
  5. Hi, I'm using a custom python script to do spectrum analysis using Digilent Analog Discovery 2. I'm relying on the useful WF_SDK modules provided on the github repository here: https://github.com/Digilent/WaveForms-SDK-Getting-Started-PY/tree/master/WF_SDK . The module, tools, contains the spectrum analysis function. However, when the code reached this line (line 55 in the tools module): dwf.FDwfSpectrumWindow(window_buffer, ctypes.c_int(buffer_length), window, ctypes.c_double(1), ctypes.c_double(0)) It resutls in Segmentation fault I'm running the code on Raspberry Pi 4 model B (Raspbian GNU/Linux 11). Waveforms version is 3.19.5, and python version is 3.9.2. I would also like to note that I ran the exact same code on my PC windows 10 (3.19.5, and python version is 3.9.13) and it works just fine. Could this be a Debian compatibility issue? and what are the possible solutions? Thank you in advance, Mona
×
×
  • Create New...