LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Storing optical spectrum data for multiple points and recalling a specific one

Solved!
Go to solution

Hi, i am working on an automated optical spectrum measurement setup for a summer project, i have been using labview for approximately a week now and have got hang of the basics for Motor stage control, however i have problems with data management... 

i am looking to store data such as that acquired from an optical spectrum analyser for multiple XY points and recall the optical spectrum for a specified  point? currently i am looking at the Write to Measurement File and Read from Measurement File as options, but i am unsure how to name each piece and data and recall them correctly. Are there any examples where this has been done? any help will be greatly appreciated.

 

I am using an Yokogawa AQ6370 connecte via ethernet, LabVIEW drivers are provided for this, but i cannot seem to find the intended VIs here either

 

thank you very much

Asiri

0 Kudos
Message 1 of 10
(4,073 Views)

If you want to retrieve spectra for different positions of you motor stage you have to build a list where you can look up a position and find something which points to the respective spectra.

 

This can be done e.g. if you write the x and y position in the file name of the data file which you use to store the optical spectra. Then you would have lots of files on your hard disk, each named with the position. To retrieve a spectrum for a specific position you would read the file with the appropriate file name.

 

Another approach would be to make a cluster which contain the data of the optical spectrum as well as the position of the motor stage. These clusters are organized  in an array which is stored in one data file.  To retrieve a spectrum you would  read the array of cluster from the file and scan it for the desired x-x position.

 

I hope that helps a little bit. 

Message 2 of 10
(4,045 Views)

If, and only if, the motor stage has a fixed interval you can forget the cluster stuff and put everything in a 3D array.

Rows & Cols are XY data for each motor position, pages are the different motor positions.

 

See screenshot for both ways 🙂

 

Hope this helped 🙂

0 Kudos
Message 3 of 10
(4,040 Views)

thanks a lot guys, i have looked into 3D arrays and ideally this would be the prefered option, however due to the numerical analysis that has to be performed on the spectra i cannot since MathScript does not support 3D arrays (or thats what i heard anyway), so have decided to go with NxN spreadsheets, a spreadsheet for each spectrum data. is there a way to export (if i was to use a 3D array) into MathLab instead and then back into labview for the display of results/further analysis?

 

thanks a lot

 

asiri

0 Kudos
Message 4 of 10
(4,024 Views)

May I ask why you need MathLab anyway?

Do you need a function that LabView can't handle?

If I were you I would do it all in LabView. But that's maybe because I haven't used MathLab for a while Smiley Wink

0 Kudos
Message 5 of 10
(4,020 Views)

i need to apply a high pass filter and low pass filter to a number of optical spectra that i aquire before doing some more numberical analysis, since they will potentially be in a 3d array, i may need to  use matlab to do the numerical analysis since mathscript cannot seem to handle it. does this seem valid? 

 

thanks  

0 Kudos
Message 6 of 10
(3,989 Views)
Not really.  Native LabVIEW has no problem filtering data contained in a 3D array (you will need at least the Full version to get the filter VIs).  You don't need MathScript or Matlab, unless you really want to use it.  It is just a matter of knowing how to do it.  Let us know your exact data structures and we can give you some hints on how to do it.
0 Kudos
Message 7 of 10
(3,969 Views)

thanks a lot, i will try and find out more about how to do it, but currently (at the test stage) i am saving multiple spreadsheets, however i want to add a way to change the file path for each save.... 

 

so say the stages were are coordinate (0,1) i would like to make the filepath save the spreadsheet as XXXX01.txt automatically ...currently the spreadsheets are saving onto the same path one after the other rather than me getting multiple spread sheets.

 

it seems simple enough to do, but i have no idea where to start. someway to convert 2 numbers (e.g. 0 and 1) into 1 number (01) and then append to the end of a file path C:\....xxxx01.txt  ? 

 

 

thanks 

Asiri  

0 Kudos
Message 8 of 10
(3,957 Views)
Solution
Accepted by Radioman00

Unclear? Please ask Smiley Tongue

Download All
Message 9 of 10
(3,951 Views)

thank you soo much, that pretty much completes this stage 😄 

 

 

asiri  

0 Kudos
Message 10 of 10
(3,929 Views)