Jump to content
  • 0

Waveform SDK continuous measurement using scanScreen


joeck

Question

Hello,

First of all thank you very much for all the answers in the forum questions they helped me out a lot!

I am trying to continuously measure the logic levels using the acquisition mode scanScreen currently at a sampling frequency of 800000. During this process I came across some questions I unfortunately did not find any answers to. I am not using the record feature as this is limited to 100ms/div in Waveforms. Is this because it can't get higher?

After that I wanted to mimic the repeated acquisition mode. I tried using 10 buffers and then constantly reading and rearming the device. This unfortunately has sometimes some data loss as well, which makes we wonder how the repeated acquisition in Waveform works?

I ended up storing the old index position and acquiring the new one using FDwfDigitalInStatusIndexWrite. I am able to get the new data every round. However sometimes if the background activity is to high presumably there is some data missing. Is there a way other than guessing from the amount that has to be read every single time that can tell me when this happens eg. receiving the amount of samples written after the buffer was last read?

I've already tried:

1) FDwfDigitalInStatusSamplesValid this always returns 4096. At the beginning using the shift Acquisition mode this counts up however unfortunately I did not find a way to get by how much the shift register was shifted.

2) FDwfDigitalInStatusSamplesLeft this function, if I did not misunderstand how to use it, constantly returns a growing negative value seemingly unrelated to the growing buffer.

cValid = ctypes.c_int()
dwf.FDwfDigitalInStatusSamplesValid(device_handle, ctypes.byref(cValid))
print(cValid)

Thanks in advance.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi @joeck

Use record mode to have information about lost/corrupt samples like in case of a "hiccup". The scan modes do not give such info, these are intended to simply get the last N samples.
For AD1,AD2,ADP3 you can enable the data compression which will support higher rate for typical burst transfers protocols SPI,I2C...

See WF SDK/ samples/ py/ DigitalIn_Record.py DigitalIn_Record_Compress.py

Edited by attila
Link to comment
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
×
×
  • Create New...