Combining Data files

File I/O & Databases

Combining Data files

Postby magreent on 13 Aug 2008, 18:03

Hi,

I acquired data from my experiment in the form of a series of data files. The data in each column has 2 columns, time and amplitude. Now I want to recombine the data and analyze it. I tried using the merge signals and I get data added side by side. I need the data to continue so that I have a longer and single column with all my time records and likewise for my amplitude record. I have attached 2 of the data files as an example. I use labview 7.0

Thanks,

Mac T. Green.
Attachments
data_001.txt
(524.49 KiB) Downloaded 239 times
data_002.txt
(533.92 KiB) Downloaded 238 times
magreent
beginner
beginner
 
Posts: 14
Joined: 19 Mar 2008, 01:57
Location: United States
LabVIEW Version: 7.1
Karma: 0

Re: Combining Data files

Postby Eugen Graf on 13 Aug 2008, 18:34

May be you can use "Build Array" with Concatenate Inputs option?
User avatar
Eugen Graf
guru
guru
 
Posts: 6502
Joined: 13 Nov 2007, 02:20
Location: Saarbrücken
Medals: 4
Activity (1) Professionalism (1) Silver (1) Black (1)
LabVIEW Version: 2009
Karma: 303
CLAD I/O VIP bloggers internet

Re: Combining Data files

Postby magreent on 15 Aug 2008, 19:26

I can combine three files as shown in the attached file.
I now need help in incorporating this scheme into a
loop so I can combine a large number of files.
Attachments
FileOpen7.vi
(1.09 MiB) Downloaded 264 times
data_001.txt
(524.49 KiB) Downloaded 224 times
data_002.txt
(533.92 KiB) Downloaded 233 times
data_003.txt
(540.48 KiB) Downloaded 232 times
magreent
beginner
beginner
 
Posts: 14
Joined: 19 Mar 2008, 01:57
Location: United States
LabVIEW Version: 7.1
Karma: 0

Re: Combining Data files

Postby Eugen Graf on 16 Aug 2008, 23:06

If the count of files is unknown, you have to use a while loop, else use a for loop.

Therefore you should define a shift register (right click on the loop) where your signal will be saved, and in the loop use the build array VI to append the new signal from file to the shift register.

Should you show the signal live reading data from files?

If yes, so place your last two VIs into the loop, else out of the loop.
User avatar
Eugen Graf
guru
guru
 
Posts: 6502
Joined: 13 Nov 2007, 02:20
Location: Saarbrücken
Medals: 4
Activity (1) Professionalism (1) Silver (1) Black (1)
LabVIEW Version: 2009
Karma: 303
CLAD I/O VIP bloggers internet

Re: Combining Data files

Postby magreent on 18 Aug 2008, 20:32

Still not able to incorporate my scheme into a loop.
magreent
beginner
beginner
 
Posts: 14
Joined: 19 Mar 2008, 01:57
Location: United States
LabVIEW Version: 7.1
Karma: 0

Re: Combining Data files

Postby Eugen Graf on 18 Aug 2008, 20:38

Where is the problem? You will find the while loop in the Programming->Structures->While Loop.

You have to take only

Read LabVIEW Measurement File.vi
and Sample Compression.vi

into the loop. And you have to define a shift register (right klick on the loop).

Show me your block diagramm WITH the loop, so we can discuss your problems.
User avatar
Eugen Graf
guru
guru
 
Posts: 6502
Joined: 13 Nov 2007, 02:20
Location: Saarbrücken
Medals: 4
Activity (1) Professionalism (1) Silver (1) Black (1)
LabVIEW Version: 2009
Karma: 303
CLAD I/O VIP bloggers internet


Return to Data storage

Who is online

Users browsing this forum: No registered users and 4 guests

cron