01-11-2010 06:17 AM
Hi
I want to read all the LVM file in a folder as shown in picture 1. In each LVM file there is a row of data that is important as shown in picture 2. I want to extract that row of value in all the LVM files of that particular folder.
Then i want to compile it into 1 Excel file or text file.
Furthermore, i also want to name each row of values in the newly compile file. The name will be the name of the file it previously extract from , together with the date and time it was created.
I tried to use loop and List Folder but to no avail.
Hope it wont be too much a trouble. Thank you
Solved! Go to Solution.
01-13-2010 12:25 AM
Hi pengxin,
Which part are you stuck at?
Below is a simple block diagram I've created that should do what you need. First we get all the individual file names, then one-by-one we read the data from the file. Since you only need the first row's data, we'll index the array, then append the file name, date and time the file was last modified to the front of the data, then save them into a new file.
Hope this helps.
Regards,
Boon Chen
01-19-2010 09:46 AM
Hi
Sorry for the late reply , just got back from my bangkok trip. Could you send me your VI ? It will be a great help. I would test it and post you more information if i need more help. Thank you
Cheers
PX
01-21-2010 05:05 AM
Hi Boon Cheng
What is the function on the right of Read from Measurement File ? I could not find it .
Cheers
PX
01-21-2010 08:59 PM
Hi PengXin,
Sorry for my late reply as I was travelling.
The function is called Convert from Dynamic Data, it can be found under the Express palette >> Signal Manipulation. It is used to determine the type of output in the data file. If I didn't remember wrongly, it should be either rows are data, or columns are data.
I didn't save the example I created so I'm unable to send it to you.
Let me know if you need further help in understanding the logic behind the block diagram.
Regards,
Boon Chen
01-21-2010 09:17 PM
Hi Boon Cheng
1) It the next VI i am asking , it looks like array subset. So i want to confirm it with you.
2) Now i am facing the problem in List Folder, it keep giving me an error as shown below
Cheers
PX
01-21-2010 10:13 PM
Hi Pengxin,
It's the Index Array function. Idea behind it is to take out the first row of data as you indicated from your file.
I'm not sure why you are getting error 13. It should not happen, try putting in the *.lvm extension and see if it helps?
Otherwise, let me know the version of LabVIEW you are using so I can check if there's any bug.
Regards,
Boon Chen
01-21-2010 11:13 PM
Hi
I have manage to solve the problem. I have replaced some of the VI. Thank you and it worked perfectly well
Cheer
PX
01-21-2010 11:15 PM