07-25-2016 08:44 AM
Hello,
I am using tdms read function to read my acquired data (8ch, 2.5MS/s each channel). The high necessary data rate results in file sizes up to 5GB. The user is able to select a part of the data to open it again. Sometimes the selected area of the data is to big, so the tdms read function seems to crash.
Is there a way to manually stop the reading, for example by pressing Escape on the keyboard?
At the moment I generate a time array using a for loop. Is there a more intelligent way?
Thank you for your help.
Best regards,
Michael
07-26-2016 06:20 AM - edited 07-26-2016 06:21 AM
Hi Michael,
if it's not necessary the "Escape Button" but a button on the front panel, you can simply add a conditional terminal to the for loop and press the stop button.
If you want to implement it with the escape button you have to insert an event structure that reacts on a "key down" event.
Hope this helps!
Best, Niko
07-26-2016 07:02 AM
Its Better to use a case with Boolean Input, Read/Pause(True/False). Based on that you can decide whether to Read or Pause
07-26-2016 07:24 AM
Hi PalanivelT,
but then you read again everything at once or nothing at all, if i understand you correctly.
Actually, there is a ton of possibilities to solve that. You can also think of the following (I don't know if that was what you meant!):
and just for the sake of completeness here the other event case (different snippet, same VI):
This will stop the for loop as soon as you press the Escape key.
Cheers, Niko