Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS Files corruption when using FTP

Solved!
Go to solution

I am using FTP to transfer TDMS files from a cRIO to the computer.  The transfer looks like it works; however, when I try to open the fiule using the TDMS file viewer, I get an error stating that the file in not a TDMS standards.  With that being said, I then use Windows to FTP the same file over to compare.  I use the TDMS viewer to open that file just fine... no problems.  Have any ideas?

 

0 Kudos
Message 1 of 6
(7,020 Views)
Solution
Accepted by TheJTUX

Did you find the difference between the size of the TDMS files before and after the transferring? If so, maybe it's very possible that the "transfer mode" of FTP software matters, maybe you can try to use "binary" instead of "text" for the mode?

0 Kudos
Message 2 of 6
(7,014 Views)
Solution
Accepted by TheJTUX

Thanks for the suggestion.  I actually had the "binary" boolean as False thinking that the data transfer should be in ASCII form; I was thinking that transmitting TDMS data in binary form would not work because, and I may be wrong but, I thought the data in a TDMS file is in ASCII form.  Anyways, long storey short: I took your suggestion and changed the input from a FALSE to a TRUE for the binary option and sure enough it worked like a charm. Good call friend!

 

 

 

0 Kudos
Message 3 of 6
(6,993 Views)

Just thought I'd add what actually happens as I stumbled across the same thing.

 

When using ASCII, FTP seems to add carriage return (CR - "0D") in front of line feed (LF - "0A") where in the original file only line feeds exist.

 

See comparison attached.

 

Content for a knowledgebase maybe?

 

0 Kudos
Message 4 of 6
(6,667 Views)

When I set my FTP vi code to Binary the file will not transfer, when I change it back to false (ASCII) it starts working? What is wrong? Windows 7, Labview 14 on a cRIO

0 Kudos
Message 5 of 6
(4,674 Views)

Can you post your code? Also, what cRIO are you working with?

0 Kudos
Message 6 of 6
(4,653 Views)