From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-08-2014 09:01 PM
I have a TDMS file contianing output data, which includes the status of a button (binary 1 or 0). I want to search through the data for the point when the button is active.
I was thinking an "easy" way to do this was to read a single line of data from the TDMS file, one at a time, and then take action depending on whether or not a "1" was present.
I set this up in a while loop so that I could define the offset using the iteration counter. However, I don't get an output that way. Curiously, if I replace the iteration counter with just a numeric constant, I can get it to pull out the single line I want.
Why doesn't this work in the while loop?
05-08-2014 09:06 PM
In while loop, TDMS Read will iterate channels for each call when there is no input for channel name and group name. So, you should give the inputs for these terminals in your case.
05-09-2014 06:52 AM
Personally, I would just read all of the data for the one channel you care about. You can then use a FOR loop with Autoindexing to do whatever you need with the data.
05-09-2014 07:04 AM
crossrulz wrote:
Personally, I would just read all of the data for the one channel you care about. You can then use a FOR loop with Autoindexing to do whatever you need with the data.
Or convert the channel data to an array once it has been read out and use the Search Array function to find the next button state you want
05-09-2014 07:08 AM
Those are good options, but the core file is 3.5gig (and the final ones are expected to be on order of 10gig). Sure, it's one colum out of 23, but that's still a huge file to try and bring into LV.
Maybe I could take those approaches in smaller bites, though.... I'll play with it some more this morning, just discovered the EOF trigger I'd put in didn't flip for some reason, and my poor computer had been searching all night....
05-09-2014 07:10 AM
Follow the process outlined above, but only deal with a "reasonable size dataset at any one time - read the file in chuncks