CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Reading .TDMS files

 



gouse.aman
Novice

Apr 25, 2013, 8:58 PM

Post #1 of 10 (810 views)
Reading .TDMS files Can't Post

Hi all, I am working with perl since an year on just basic working of text file moving, copying, read and write data. But, now my requirement is to read a .TDMS file and grab the data to a text file. A tdms file consist of binary data which is output of LabView. It is opened only ifwe have a add-in in our excel to open tdms files. Please help me around it soon!

Thanks in advance.


(This post was edited by gouse.aman on Apr 28, 2013, 9:40 PM)


Laurent_R
Veteran / Moderator

Apr 26, 2013, 12:20 AM

Post #2 of 10 (807 views)
Re: [gouse.aman] Reading .TDMS files [In reply to] Can't Post

Please note that the language we are uning on this forum is called Perl, not Pearl.

I have no idea of the format of a TDMS file and can't help you if you don't provide us specifics about it.


g4143
Novice

Apr 26, 2013, 6:41 AM

Post #3 of 10 (799 views)
Re: [gouse.aman] Reading .TDMS files [In reply to] Can't Post

You could try the pack and unpack functions which come with Perl.


BillKSmith
Veteran

Apr 26, 2013, 8:25 AM

Post #4 of 10 (793 views)
Re: [gouse.aman] Reading .TDMS files [In reply to] Can't Post

It sounds like your file uses a proprietary format that your are unlikely to figure out. Can you do the job with an Excel macro? If so, you probably can translate the macro into perlscript or duplicate its function with a perl Excel module.
Good Luck,
Bill


wickedxter
User

Apr 27, 2013, 1:57 PM

Post #5 of 10 (783 views)
Re: [gouse.aman] Reading .TDMS files [In reply to] Can't Post

from what i found about the .TDMS is its a Tab-delimited file... which if thats what you have perl can do this. Can you copy and paste or attach a example of it to the the forum?


FishMonger
Veteran / Moderator

Apr 27, 2013, 2:21 PM

Post #6 of 10 (780 views)
Re: [wickedxter] Reading .TDMS files [In reply to] Can't Post


In Reply To
from what i found about the .TDMS is its a Tab-delimited file...


Not likely if it was produced by LabView.
http://www.ni.com/white-paper/5696/en


Laurent_R
Veteran / Moderator

Apr 27, 2013, 2:49 PM

Post #7 of 10 (778 views)
Re: [FishMonger] Reading .TDMS files [In reply to] Can't Post

Hmmm, looking at the format description, I'm will quote a song of Elton John (I hope I am not wrong and it is really from him): it ain't gonna be easy...

Maybe someone out there will want to write a module, but it looks like we're not gonna solve the problem just in the context of a couple of forum posts.

The idea of translating into Perl the Excel macros is possibly the shortest path to a solution, but one would have first to see how complicated they are (and personnally I certainly have no inclination to try to translate that type of script into perl, don't ask me, I hate having to deal with VB and similar mess).

Wink


gouse.aman
Novice

Apr 28, 2013, 9:42 PM

Post #8 of 10 (759 views)
Re: [Laurent_R] Reading .TDMS files [In reply to] Can't Post

Hi Laurent, that was certainly the grammatical spelling mistake indeed.


gouse.aman
Novice

Apr 28, 2013, 9:44 PM

Post #9 of 10 (757 views)
Re: [FishMonger] Reading .TDMS files [In reply to] Can't Post

Monger that can be a tab delimited file if we make the LabView setting do so, wherein my client may not accept for!


gouse.aman
Novice

Apr 28, 2013, 9:51 PM

Post #10 of 10 (756 views)
Re: [Laurent_R] Reading .TDMS files [In reply to] Can't Post

Here is a sample TDMS file, which needs an excel importer add-in to open. Use the following link to download the add-in:
http://zone.ni.com/devzone/cda/epd/p/id/2944


(This post was edited by gouse.aman on Apr 28, 2013, 9:54 PM)
Attachments: Voltages.tdms (34.2 KB)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives