DW Datareader, support for multiple data ranges
I use DW datareader (a lot) for using d7d and dxd files in Matlab. I use the most recent version 126.96.36.199. Until recent, I have no problems with it.
Now I have some dxd files that seem to have two ranges with data in them. There are two separate triggered data ranges in the file.
When exported using Dewesoft X2, the ranges are named Data1_....etc and Data2_....etc (for each channel).
However, I am not able to read both ranges with DW Datareader. In fact, the call to "DWGetScaledSamplesCount" returns "-1", making it impossible to read-in the file.
How can I read in these two ranges? I really need a solution for this, since I have quite a lot of dxd files with this issue.
Update: of course DW datareader does support multiple ranges of triggered data, but I have some dxd files that seem to be corrupt.
Although the "DWGetScaledSamplesCount" returns "-1", the data is actually in the file.
My workaround is to make the call to "DWGetScaledSamples" with a big number for the number of samples. This seems to return the correct values. After the call, I strip the data (where the timestamps are zero).
It works, but makes me a bit uncertain if this is reliable. Anyway, real problem seems to be a corrupt dxd file. Which is also disturbing...
Thanks. I will put the file in the private forum.