07-09-2009 05:08 AM
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
Solved! Go to Solution.
07-14-2009 02:34 AM
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.
07-14-2009 05:26 AM
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 🙂
07-15-2009 03:17 AM
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
07-15-2009 03:54 AM
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 ![]()
07-20-2009 08:40 AM
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
07-21-2009 07:47 AM
07-22-2009 10:16 AM
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
07-22-2009 10:59 AM
Unclear? Please ask ![]()
07-23-2009 03:10 AM
thank you soo much, that pretty much completes this stage 😄
asiri