LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Datalogger for Light Intensity Meter

I'm using LIFA to do some light intensity measurements and would like to log the analog values to a spreadsheet. What I would like to do is turn on a UV LED which will light up a fluorescent indicator, read the intensity of the fluorescence, and log that value onto a graph and/or spreadsheet. I have been successful with writing a digital pin high and measuring the light intensity, but I'm struggling with the datalogging side of it. Some basic guidance is appreciated.

0 Kudos
Message 1 of 4
(4,274 Views)

Hey jlovaasen,

 

Here is a really simple example using random numbers to 'simulate' the analog data you'd get from the Arduino.  The idea here is to acquire samples in a loop until you are done, then use the Write to Spreadsheet File VI to save the data.  Since the Write to spread sheet file does not have a path wired it will prompt the user to specify a path.  The file will use tab delimination by default but you can configure to use a coma if you prever a .csv file.

 

0.PNG

If you want to sample multiple channels you can use a 2D array instead of 1D.

 

 

The above is probably the simplest case, but may not work for every application.  Lets say for example you need to log data as you aquire it because you'll be logging for days and days.  Then you may want to use a producer consumer achitecuter where one loop aquires data and sends it to another loop that logs it to disk.  When using this method it's almost aways still a good idea to buffer data and write in chunks.  This allows you to wait until you have buffered data, then open, write and close the file all at once.  This prevents the file from being open for too long which allows other applications to access the file if necissary and also helps reduce the risk of file corruption (power failure when a file is open can cause corruption).

 

 

Let us know if you have more questions. 

 

-Sam K

LabVIEW Hacker

Join / Follow the LabVIEW Hacker Group on google+

0 Kudos
Message 2 of 4
(3,157 Views)

Hi sir, I would like to measure the temperature emitted by LED lighting systems. Is this ppossible in LABVIEW.

0 Kudos
Message 3 of 4
(3,157 Views)

Sure, many things are possible with LabVIEW given that you have the appropriate equipment.

If you are planning on using Arduino and LabVIEW, you should use LINX (labviewhacker.com/linx).  If you don't plan on using Arduino and have other hardware that you want to use with LabVIEW, you should post in the NI Forums (forums.ni.com).

0 Kudos
Message 4 of 4
(3,157 Views)