Jump to content

AndyMessier

Newcomers
  • Posts

    3
  • Joined

  • Last visited

AndyMessier's Achievements

Newbie

Newbie (1/4)

1

Reputation

  1. Thank you so much for your time! This is working great.
  2. Thanks Attila. I have something running but I'm not sure how to implement that hold function properly ... In this code example it seems that the hold function works, but then when I play the next waveform there is a 200us glitch before it plays my samples (see the scope shot). def play_waveform(y): ts = 1/fs hzFreq = 1 / (len(y)*ts) cSamples = len(y) channel = c_int(0) rgdSamples = (c_double * len(y))(*y) dwf.FDwfDeviceAutoConfigureSet(hdwf, c_int(0)) dwf.FDwfAnalogOutModeSet(hdwf, channel, DwfAnalogOutIdleHold) dwf.FDwfAnalogOutIdleSet(hdwf, c_int(0), DwfAnalogOutIdleHold) dwf.FDwfAnalogOutNodeEnableSet(hdwf, channel, AnalogOutNodeCarrier, c_int(1)) dwf.FDwfAnalogOutNodeFunctionSet(hdwf, channel, AnalogOutNodeCarrier, funcCustom) dwf.FDwfAnalogOutNodeDataSet(hdwf, channel, AnalogOutNodeCarrier, rgdSamples, c_int(cSamples)) dwf.FDwfAnalogOutNodeFrequencySet(hdwf, channel, AnalogOutNodeCarrier, c_double(hzFreq)) dwf.FDwfAnalogOutNodeAmplitudeSet(hdwf, channel, AnalogOutNodeCarrier, c_double(3.3)) dwf.FDwfAnalogOutRunSet(hdwf, channel, c_double(1.0/hzFreq)) dwf.FDwfAnalogOutConfigure(hdwf, channel, c_int(1)) ramp_test.py
  3. I have been writing scripts in Python for the AD3 but I'm looking for some general advice on how to use the Arbitrary Waveform Generator Function. I see that it can run at 125Msps .. but what is the max memory data-points? Is there an example of how the memory can be filled from a file? (I see some .wav example but I think the sample rate is encoded in those? I want to define that at the full rate). In my application I'd like to play a waveform and hold the last sample indefinitely until I decide to play another waveform. Any high level advice on how I could do this or what sample files are the closest to this? Many thanks!
×
×
  • Create New...