• 0
Sign in to follow this  
BlueSky

DwfDigitalInSampleModeNoise in Digital Discovery

Question

 

Hi  

I thank you for making a good product.

Could let me know How to get the sampled data from Digital Discovery when DwfDigitalInSampleModeNoise is used in FDwfDigitalInSampleModeInfo()?

    From WaveForms™ SDK Reference Manual

        DwfDigitalInSampleModeNoise: Stores alternating noise and sample values, where noise is more than one transition between two samples.

Which function is used when I get the data from Logic analyzer ialternating noise and sample values is saved,?

Should I refer to the the function like FDwfDigitalInStatus() & FDwfDigitalInStatusData() in DigitalIn_Record.py & DigitalIn_Acquisition.py?

 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
Posted (edited)

Hi @BlueSky

With DwfDigitalInSampleModeNoise use the FDwfDigitalInStatusNoise2 to retrieve the noise samples and FDwfDigitalInStatusData or FDwfDigitalInStatusData2 for the normal samples, like:

while cSamples < nSamples:
    dwf.FDwfDigitalInStatus(hdwf, c_int(1), byref(sts))
    dwf.FDwfDigitalInStatusRecord(hdwf, byref(cAvailable), byref(cLost), byref(cCorrupted))
    cSamples += cLost.value

    if cSamples+cAvailable.value > nSamples :
        cAvailable = c_int(nSamples-cSamples)
    dwf.FDwfDigitalInStatusData2(hdwf, byref(rgdwSamples, 4*cSamples), c_int(0), c_int(4*cAvailable.value)) # 4* bytes for 32 bit sampling
    dwf.FDwfDigitalInStatusNoise2(hdwf, byref(rgdwNoise, 4*cSamples), c_int(0), c_int(4*cAvailable.value)) # 4* bytes for 32 bit sampling
    cSamples += cAvailable.value

Edited by attila

Share this post


Link to post
Share on other sites
  • 0

Hi   attila

   I do not find the usage of in WaveForms™ SDK Reference Manual(Revised August 8, 2018) With the newest Waveforms 3.9.1. 

   (Maybe there is not the explanation of FDwfDigitalInStatusNoise2(), Please check)

11 hours ago, attila said:

dwf.FDwfDigitalInStatusNoise2(hdwf, byref(rgdwNoise, 4*cSamples), c_int(0), c_int(4*cAvailable.value)) # 4* bytes for 32 bit sampling

What is the contents of "rgdwNoise"?

Does rgdwNoise have the count of noise occurring between sampling clocks?

Share this post


Link to post
Share on other sites
  • 0

Hi @BlueSky

The noise samples are bit flags for each DIO/DIN indicating more than one transition between two sampling points.
Each noise sample represent DIO/DIN bits [31...0] like the normal samples [31...0]
Noise sample at T1 indicates noise flag between T0 and T1, noise T2 between T2 and T1,...

In the WF app the noise bits are represented with gray strips.

image.png.e9bf3ea768b389bba41253cd11385ec4.png

Share this post


Link to post
Share on other sites

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
Sign in to follow this