Reinhard Posted December 18, 2017 Share Posted December 18, 2017 Hello everyone, is there an option to specify an infinit record length? like (which doesn't work) dwf.FDwfAnalogInRecordLengthSet(hdwf, c_double(-1)) Thanks. Link to comment Share on other sites More sharing options...
attila Posted December 19, 2017 Share Posted December 19, 2017 Hi @Reinhard For infinite record you can specify negative number for record length: AnalogIn_Record.py dwf.FDwfAnalogInRecordLengthSet(hdwf, c_double(-1)) It looks like for infinite record the lost samples are reported wrongly. Try ignoring this: ... dwf.FDwfAnalogInStatusRecord(hdwf, byref(cAvailable), byref(cLost), byref(cCorrupted)) #cSamples += cLost.value # ignore for infinite record #if cLost.value : # fLost = 1 ... Link to comment Share on other sites More sharing options...
Reinhard Posted December 19, 2017 Author Share Posted December 19, 2017 @attila Thank you for the answer. Will this be fixed in a future release? Link to comment Share on other sites More sharing options...
attila Posted December 19, 2017 Share Posted December 19, 2017 Hi @Reinhard Sure, it will be fixed. You have in private message a beta version solving this issue. Link to comment Share on other sites More sharing options...
Filippo Posted February 14, 2018 Share Posted February 14, 2018 Hi, I am interested in using the AD2 acquisition in continuous record mode. I would like to know if the issue mentioned here On 19/12/2017 at 4:11 PM, attila said: Hi @Reinhard Sure, it will be fixed. You have in private message a beta version solving this issue. has been fixed in the present release 3.7.5 (January 2018). Could not find any mention of it in the change log: https://reference.digilentinc.com/reference/software/waveforms/waveforms-3/change-logs/3-7-5 It is also not very clear to me the difference between the int *pcdDataLost and int *pcdDataCorrupt counts provided by the FDwfAnalogInStatusRecord() function: aren't they the same thing ? (if 1 sample has been overwritten before the USB readout, I lost 1 sample, thus 1 sample in the buffer i got is corrupted). The SDK reference manual did not make it clear to me. Can someone please help me spotting out the difference? Actually I just want to know that no sample has been dropped between my buffer readout cycles, which of the two variables should I take confidently into account ? Thank you very much, Filippo Link to comment Share on other sites More sharing options...
attila Posted February 15, 2018 Share Posted February 15, 2018 Hi @Filippo You can consider both as error and reduce the acquisition frequency. During recording the device buffer is used as a circularly written memory. The corrupt indicates that the read data could have been altered, the device buffer got above 50% full. The lost indicate how many samples are dropped, device buffer overflow. FDwfAnalogInStatusRecord( HDWF hdwf, int *pcdDataAvailable, int *pcdDataLost, int *pcdDataCorrupt) Parameters: - hdwf – Interface handle. - pcdDataAvailable – Pointer to variable to receive the available number of samples. - pcdDataLost – Pointer to variable to receive the lost samples after the last check. - pcdDataCorrupt – Pointer to variable to receive the number of samples that could be corrupt. The function above is used to retrieve information about the recording process. The data loss occurs when the device acquisition is faster than the read process to PC. In this case, the device recording buffer is filled and data samples are overwritten. Corrupt samples indicate that the samples have been overwritten by the acquisition process during the previous read. In this case, try optimizing the loop process for faster execution or reduce the acquisition frequency or record length to be less than or equal to the device buffer size (record length <= buffer size/frequency). Link to comment Share on other sites More sharing options...
Filippo Posted February 15, 2018 Share Posted February 15, 2018 Thank you @attila. Link to comment Share on other sites More sharing options...
Question
Reinhard
Hello everyone,
is there an option to specify an infinit record length?
like (which doesn't work)
Thanks.
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.