Jump to content

Nithin

Members
  • Posts

    3
  • Joined

  • Last visited

Nithin's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. Hi, I have a custom built Testing program in python that captures Analog Discovery (AD2) digital-In data for certain period and compares the captured data against some expected results. Is there any way I could export the captured data to Waveform's ".dwf3logicacq" file format, so that I can view the captured data in Waveform application for debugging? Here is a code snippet from my test program. I would like to save the data accumulated in 'rgwSamples' ----- rgwSamples = (c_uint16 * nSamples)() while (cSamples < nSamples): if (self.exitFlag != False): break dwf.FDwfDigitalInStatus(hdwf, c_int(1), byref(sts)) dwf.FDwfDigitalInStatusRecord(hdwf, byref(cAvailable), byref(cLost), byref(cCorrupted)) cSamples += cLost.value if cLost.value: fLost = 1 if cCorrupted.value: fCorrupted = 1 if cAvailable.value == 0: continue if cSamples + cAvailable.value > nSamples: cAvailable = c_int(nSamples - cSamples) dwf.FDwfDigitalInStatusData(hdwf, byref(rgwSamples, 2 * cSamples), c_int(2 * cAvailable.value)) cSamples += cAvailable.value dwf.FDwfDigitalInConfigure(hdwf, c_bool(0), c_bool(0)) # Halt the sampling. dwf.FDwfDigitalInTriggerSourceSet(hdwf, trigsrcNone) dwf.FDwfDigitalInTriggerPositionSet(hdwf, c_int(0))
×
×
  • Create New...