10-27-2011 09:27 AM
I have a program which receives measurement data and writes this data to TDMS file. However, I want to create a new TDMS file every hour. When I put a while loop in mu sub vi which creates the new file the program doesn't run. I have attached the sub vi. Can anyone help me out here?
Cheers
10-27-2011 10:06 AM
How are you running this subVI? Is it part of another VI?
Your subVI runs. It has a while loop in it that doesn't do much other than create a new file path every 60 seconds. It stays in the while loop until the user presses the stop button. And that won't happen if this is a subVI and the front panel isn't shown.
I don't know why you are obtaining a queue outside the loop.
10-27-2011 10:41 AM - edited 10-27-2011 10:44 AM
One trick for doing this is to prepend the file name with YYJJJHH See example
Then just check if file exists (if not create and add headder) when you write to file.
This also generates the reports in "alphabetical" order so windows explorer presents them chronologically.
10-31-2011 03:53 AM
Yes this is a sub VI inside another VI. And that is exactly my problem, the sub vi keeps running when I hit stop. Although I don't know how to keep creating new files at a time interval without using a loop...
Will it help if I post the main VI?
10-31-2011 08:38 AM
@TGL wrote:
Yes this is a sub VI inside another VI. And that is exactly my problem, the sub vi keeps running when I hit stop. Although I don't know how to keep creating new files at a time interval without using a loop...
Will it help if I post the main VI?
can't hurt
10-31-2011 08:41 AM