LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create database for csv file

Huh. I didn't think of that as the reason! Then yes, I imagine it might be easier. I'll have to check the behaviour with multiple days worth of hours, but perhaps if that becomes the case I should also look for a days input and can try grab another element from the cluster.

 

Will check tomorrow - thanks for bearing with my confusion. 


GCentral
Message 11 of 18
(1,642 Views)

Hey Cbutcher, 

Thanks for all the help and suggestions in the discussion. i am still not able to open the snippets that you send me . I guess I will install labview 2016 and try to open from it. 

0 Kudos
Message 12 of 18
(1,631 Views)

Which version of LabVIEW do you have installed? The second set were snippets for 2013 so they should have worked in anything since then.

 

One thing to note is that you can't copy and paste, you have to drag and drop. Another is that apparently some browsers don't allow it properly, so if no snippets work for you, consider saving the image to disk then dragging and dropping from say File Explorer.


GCentral
0 Kudos
Message 13 of 18
(1,621 Views)

Hi cbutcher, I tried all the things you suggested, but none of them is working.

What I actually Wanted to do is basically create a directory structure disguised as a database. I attached my application in the original post and it will be similar to that. All my thousand files; I want to assign them random id and after that make a master spreadsheet where the parameters of each data file is listed based on their id. I somehow want to import that master spreadsheet into LabVIEW and work from there. I want to open up a directory and it will show the list of files/ master spreadsheet. I can filter the list based on their parameters ( for example voltage, wavelength) and click a specific file to open them into a graph. I can plot more than one at a time which I already have in my application. 

0 Kudos
Message 14 of 18
(1,599 Views)

Hello LabView Users, 

I want to create a directory structure disguised as a database. I attached my application in this post and it will be similar to that. I have thousands of csv data files with huge names. I want to assign them random Id and after that make a master spreadsheet where the parameters of each data file are listed based on their id. I somehow want to import that master spreadsheet into LabVIEW and work from there. I want to open up a directory and it will show the list of files/ master spreadsheet (including the parameters). I can filter the list based on their parameters ( for example voltage, wavelength) and click a specific file to open them into a graph. I can plot more than one at a time which I already have in my application.

I have attached two front panel scenarios ( Keep in mind they are only front panel, the block diagram doesn't exist yet). I also have attached data files to play with. If anyone can help or direct me in the right direction then that would be great. thank you. Screen Shot 2017-07-05 at 12.02.08 PM.png

 

Screen Shot 2017-07-05 at 11.55.25 AM.png

Download All
0 Kudos
Message 15 of 18
(1,612 Views)

Following the previous reply. the scenario is kinda like that. I just made up these two front panel. Screen Shot 2017-07-05 at 12.02.08 PM.png

 

Screen Shot 2017-07-05 at 11.55.25 AM.png

0 Kudos
Message 16 of 18
(1,589 Views)

Here are the directions for the application that I attached. Screen Shot 2017-07-05 at 12.26.18 PM.png

0 Kudos
Message 17 of 18
(1,604 Views)

I'm still a little confused about the motivation for obfuscating the file names. It's certainly possible to go ahead and rename files (possibly automatically, which would seem to be necessary if you have thousands) to just some integer, and store information about them in perhaps a cluster array with an interface via a MCLB, including filters, sorting, and so on.

 

I'm just unsure why you'd want to do the first part (renaming). Are there a very large number of attributes? Or are you trying to hide information? Your test files show just 3 voltages, which could be encoded in a (shorter, if need be) filename like I suggested. If you rename them to "1.csv", "2.csv", ... (or "00001.csv", "00002.csv" etc) then you become inherently reliant on whatever your store of information is - if the file is lost/damaged/unreadable (either due to corruption, or the program changing file version, and you not having a good copy of the previous storage mechanism, etc) then you're just left with a bunch of numbered files.

 

How do you want to add new files? Do you have an 'import' directory containing files like "Ring-...V_MZ1-0V_MZ2-0V.csv" and a working directory where you want "0001.csv" or similar? This implies at the least moving files in your program, using some logic like:

  • Check import directory for files (any)
  • Move to the next number file, in a different directory
  • Append information (taken only from the original file name?) to the array of information, along with the new file name
  • Save the array (perhaps you do this before you move the file, so that you're less susceptible to problems if there's an error somewhere)

and to then display:

  • Read the working directory
  • Load the array of information
  • Look-up each entry by fileID number (i.e. filename) and get the relevant Strings or numbers to place into the MCLB
  • Keep this ID number linked somehow to the index of the MCLB, or place the filename in the MCLB, so that you can quickly go back to the filename when you want to load the data (you want to avoid having to again search through the info array to find the matching filename by information, especially if there might be duplicates taken at different times etc)

GCentral
0 Kudos
Message 18 of 18
(1,568 Views)