LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving spectra from a cluster of 3 elements

Solved!
Go to solution

Hello All,

I am working on acquiring spectra from a camera attached to a spectrograph. My issue is with saving the consecutive measurements to a single file. I have a cluster of three elements as the output (x node, delta x, y). How do I save it in (x,y) pairs and append the rest of measurements to the same file.I've tried multiple functions and none of them give correct wiring due to data type.I've attached an image of the acquiring case. Thank you so much,

0 Kudos
Message 1 of 5
(2,663 Views)

Attaching an image of a small piece of a VI is almost useless to those trying to help you.  Attach an entire VI as a ".vi" file, i.e. attach real LabVIEW Code so we can really see what you are trying to do.  I, for one, am very puzzled about what you mean by a "camera attached to a spectrograph" -- are you taking pictures of spectra as they appear?  Where are the (x,y) pairs coming from?  Are they numbers, images, what?  A clearer explanation and LabVIEW Code would surely help us to help you.

 

Bob Schor

0 Kudos
Message 2 of 5
(2,628 Views)
Solution
Accepted by topic author AnnaDM

Make a for loop, to which you connect the spectrum, that you acquired from the Andor API in order to loop through the whole spectrum. In the loop make:

 

Min Dispersion + I * Delta Dispersion 

 

and take it out from the loop through and indexing tunnel, this will give you the wavelengths vector. In this way you will have two vectors, as needed. 

 

If something is not clear I can draw this for you.

Message 3 of 5
(2,617 Views)

Hi Aesha,

 

creating a X array from your min/delta values should be easy once you took the free beginner courses offered by NI:

check.png

(This might not be the best solution in terms of floating point precision but it shows basic LabVIEW concepts!)

 

Why do you mix SGL, DBL and integer values for your dispersion data?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(2,611 Views)

Thanks a ton nikodem & GerdW for the suggestions. It worked and I can get (x,y) pairs now.

Bob, to me I just thought that part is relevant and sufficient to post the question as the rest of the vi works ok. Thank you,

0 Kudos
Message 5 of 5
(2,580 Views)