Jump to content

Hansi

Members
  • Posts

    4
  • Joined

  • Last visited

Hansi's Achievements

Newbie

Newbie (1/4)

1

Reputation

  1. I updated to version 3.21.3 and everything works wonderfully now. Thank you once again for all your effort, it is greatly appreciated !
  2. Thank you very much @attila for taking the time to correct my script ! The images you show are exactly what I'm trying to accomplish :) Unfortunately, in the Python script you provided, I get stuck at the while loop just after the "Starting oscilloscope" print statement: while True: # fetch status and data from device if dwf.FDwfAnalogInStatus(hdwf, 1, byref(sts)) != 1 : szerr = create_string_buffer(512) dwf.FDwfGetLastErrorMsg(szerr) print(szerr.value) quit() if sts.value == DwfStateDone.value : break Do you know what might be the issue ?
  3. Thank you attila for the help! I think I've figured out the correct settings with regards to the trigger now. But I have run into another problem. Maybe for a bit more context, what I'm trying to accomplish is the following: 1. Generate a repeating pulse on channel 1 (every 100ms, and stays on for 1ms). 2. Within this first pulse, have a second one that is delayed by 67us and is on for 2us. To achieve this, I use the settings provided in the screenshot: The result is then the following: However, when I try to recreate this with the SDK, the FDwfAnalogOutRunSet somehow seems to cause problems. It remains in the "high" state: Not specifying (or commenting out the respective line) this FDwfAnalogOutRunSet looks like this: Why am I not able to specify the run lenth of the pulse ? If it helps, here is my Python code, maybe the error is somewhere else entirely... double_pulse_and_acquisition_SDK.py
  4. I use an Analog Discovery 2 device. With it, I create two pulses on Channel 1 and Channel 2 respectively. With the WaveForms GUI, I am able to set a trigger for channel 2 and include a wait and run time. Next I would like to reproduce this with the SDK in Python for easier integration into my existing measurement procedure. This mostly works but two things are not clear to me. 1. Do I need to set the two channels to "Independent" (as opposed to "No synchronization" or "Synchronized")? Or is this done automatically as soon as I configure a wait time or run time of the signal ? For instance, a small part of my code includes: dwf.FDwfAnalogOutWaitSet(hdwf, c_int(1), c_double(67e-6)) # wait length dwf.FDwfAnalogOutRunSet(hdwf, c_int(1), c_double(2e-6)) # pulse length Is this enough to have them be "independent"? 2. How do I set the trigger to "Scope"? In the reference manual, I have found what I believe to be the correct command (FDwfAnalogOutTriggerSourceSet), but I am confused as to which of the arguments is the correct one to achieve this (trigsrcDetectorAnalogIn, trigsrcAnalogIn, etc). Any help would be greatly appreciated :)
×
×
  • Create New...