12-11-2014 03:14 AM
Hello,
12-11-2014 04:44 AM
First suggestion: Replace the re-opening of the file with the "TDMS File Viewer" after the TDMS Close. It gives you a nice pop-up window that allows you to navigate your TDMS file. It's a nice way to get a grip on how data is actually stored in there.
12-11-2014 05:07 AM
Hi Jarle,
I am not able to run the TDMS file viewer down on the RT target, but I have FTP the file to the host PC and then run the TDMS file viewer. The file viewer show only the single data point as shown in the TDMS read after the close.
Rhys
12-15-2014 03:35 AM
12-15-2014 08:48 AM
Hi,
You can refer Figure-3 of:
http://www.ni.com/white-paper/3727/en/
Regards,
DCKAN
12-15-2014 09:28 AM
@Rhys_CKTC wrote:
Hello,
Any help would be greatly appreciated.Rhys
OK You have several problems with that code that are contributing to your race condition.
First: look at the top loop! You place the same file path on two different shift registers (Without an Always Copy! DANGER!) and one of those SR's is fed by a tunnel using the "Use Default If Unwired" option- And not every case is WIRED! WORSE! It is this SR that actually writes to the terminal for the filename! Insanity must have kissed you just before you wrote that state machine (Humor intended- I've seen code with "Please-Just-one-more featureitis" before and have made simillar mistakes)
Now lets look at the logging loop: You obviously realized you had a race condition and created the case to wait for log file path to not be empty. by reading a local variable! A LOCAL to CURE a race condition!!! What were you thinking! then of course when the file path is not empty you change state to the opaen file state and IGNORE the path on the shift register and READ THE LOCAL AGAIN!
Initialize your log file path before you start any other code loops and you may keep what little hair you may have (I'm almost certain you have pulled out handfulls from your head by now!) You know Its the right thing to do since you have a Sequence Structure out there running parallel to the logging loop that actually WRITES the offensive local.
You may have other nasy habits as well- I just followed the file path!
Now smile- we've all done something like that at least once!