11-13-2012 07:31 AM
I have written a VI to test AC motors. The VI controls and gathers information from a hypot tester and a power meter. I have the data time stamped also. The program is set up to terminate if the motor under test fails the hypot test. The problem this causes is that the failure data for the hypot test is recorded but the power meter readings are not. When the TDMS file is opened in excel, my test readings after a hypopt failure are no longer aligned with the proper hypot data. The power meter data is shifted up a row. What is the best way to put a place holder into the TDMS data to prevent this from happening.
Thanks,
Solved! Go to Solution.
11-13-2012 08:02 AM - edited 11-13-2012 08:04 AM
Was a channel created twice? I have seen that if the channel names are identical, data is stored in one column and you will have one column that has more data than the other columns. Also, it would be nice if you posted the code.
11-13-2012 08:12 AM
The channel is only created once. I actually setup a state just to write data into the TDMS file. The problem is not in column aligmnment but in the rows. I will need to get to the machine and post the code.
11-13-2012 09:02 AM
Here is the VI.
11-13-2012 10:02 AM
If the number of elements is not the same as the number of channels you are writing to everytime, your data will be shifted. In your power case, make sure that the OSI PDM Read Array.vi does output an array of 9 elements for the DATA REGISTER and READ REGISTER. Simplest fix is to reshape the arrays to the number of channel counts in the ANALYZE case.
12-19-2012 06:11 AM
Thanks, this solved the problem.