11-21-2008 12:49 AM
Hi Brad,
Thanks for reply, i tried by that but still it's giving same error, i m sending u the tdm file which i have.
Thanks
Nidhi
11-21-2008 01:46 PM
Well Nidhi,
I was able to reproduce the error you described with the TDMS file you sent and the old code I sent you, but when I implemented the "CLng()" change I mentioned the other day the error went away. Try this code on your end:
Sub LoadTimeSubset(FilePath, DataPlugin, ChnStr)
Dim DataFileHeader, Offset, Delta, Length, StartIdx, StopIdx
:
:
StartIdx = 1 + CLng((R11 - Offset)/Delta)
StopIdx = 1 + CLng((R12 - Offset)/Delta)
IF StartIdx < 1 THEN StartIdx = 1
IF StopIdx > Length THEN StopIdx = Length
Call DataDelAll
Call DataFileLoadRed(FilePath, DataPlugin, ChnStr, "IntervalWidth", 1, eInterFirstValue, StartIdx, StopIdx)
End Sub ' LoadTimeSubset()
Brad Turpin
DIAdem Product Support Engineer
National Instruments
11-25-2008 01:16 AM
Hi Brad,
Thanx a lot,it works very fine.
Thanks
Nidhi
12-02-2008 09:17 PM
Nidhi,
Hope your problem is solved. Do let us know if you have further issues.
Gaurav