LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

getting started with thorlabs lc1-usb

Hi Jimmy.

So, did you make it work? I am trying to use LC1-usb with LabView without any success for now.

Any advice or VI example will be appreciated.

Thank you,

Sergey

0 Kudos
Message 11 of 33
(2,709 Views)
the lc1 is going to be a hot item if thor labs ever gets activex out for it.
the way this use to be done was very difficult
 
Sure, ill upload what im doing, i was planning on doing this, im just not done yet.. .
We are making a holographic interferometer for laser etching of our objects
I was going t upload teh code when i was done but at this point, we maybe changing to a device that supports active x and to a faster programmign language.
 
the lc1 driver does hang up a lot if you use the stop execution button, i never bothered to fix it and we just stop it from running through a "stop button" to exit a while loop;.
you have to restart labview if you if hit halt execution
 
  Just for any general intrest of this code, there is a simultor mode that allows it to control parameters such as phase shifting, noise, and frequency and study them in relation to the lc1.  You should be able to see that when teh noise is shut off, the simulator mode will track teh known phase shift of the input signal and plot it in relation to the calcuated peak position with a fair amount of accuracy.  With very small phase shifts, such as less then one, and with no noise, you can see how interpolation fills in the values perfectly.    The program starts by extracting the 3000 line elements from the lc1, crops out a area of interest to evaluate, does a FFT and filters by zeroing out all frequcies but the area with teh fundeamental frequency. This type of flitering wont cause phase shift, even "zero phase shift.vi" causes enough shift to make micrometer nmever mm resolution useless.   We had this working to a few degrees of accurary until all my more recent files got corrupted somehow .
 
The lc1 driver library, with all its function, as supplied by thor labs will be uploaded in the same directory.
It is freely downloadable from their site, yet is hidden in all the files they have.
If you open the library, you will see all teh vis.
This library seems to be very limited in terms of what is offered by the device such as being able to change teh scan rate.
I need to get in touch wti hthem to find out how to add this function.
 
 
 
 
 
0 Kudos
Message 12 of 33
(2,696 Views)

im only leaving this up for a day or two

 

http://www.engr.uconn.edu/~jmacione/temp/

0 Kudos
Message 13 of 33
(2,695 Views)

Thank you, Jimmy

Your VI files are extremely helpful.

 

“we maybe changing to a device that supports active x”.

Do you have any particular device in mind?

 

Sergey

0 Kudos
Message 14 of 33
(2,666 Views)
i havent looked at other line cameras yet.
thor really dont have it together with this new product yet.
For this project, i was just given a thor camera and told to ues it.
 
I know there is a variety of line carmeras out there, apps like holographic inter. are not new.
 
Activex is the way to go, esp if i can work with matlab without the labview scripting environment which slows down the code dramatically.
matlab is desiged for workign iwth large multidimentional arrays, can access many areas of the array with little effort.
building a labview dll and calling it from matlab or other language  is also a good option.
 
most of the past apps ive made simply use labview dlls to get data and then use enhance speed in c++, vb, or whatever.
 
I can keep you posted if your intrested..
 
 
 
0 Kudos
Message 15 of 33
(2,643 Views)

Hi Jimmy.

It is my first LabView project. For many years I was able to avoid it using VB, C++ and Matlab. In this case I need to incorporate camera into existing LabView project. Your example gives me practically everything I need. Thank you.

If you have time just keep me informed if you find better hardware or more efficient software solution.

0 Kudos
Message 16 of 33
(2,623 Views)
Hi Jimmy,
I also try to control LC1-USB by Labview but it do not success until now. could you share your VI file for me?
0 Kudos
Message 17 of 33
(2,538 Views)
here is a copy for now.
this is a holographic interferometer, lots of stuff in there you dont need..
 
im going to post a permanent copy when im done with the project.
 
I may need to fix their driver when im done.
If you halt execution on it, it will lock the device next time its used.
So use the stop button.
 
The scan rate is proportional to how fast you call it.
Its not a property that is set.
 
good luck
0 Kudos
Message 18 of 33
(2,528 Views)
Hi Jimmy,
I have some problems with controlling LC1-USB CCD camera with Labview.
Could you once more share your VI file ?

Many thanks.
0 Kudos
Message 19 of 33
(2,386 Views)

below is an older simplifed version using the driver  ( i took out specifics of my project like matlab scripts and other drivers which you wont have)

www.engr.uconn.edu/~jmacione/forinternet.vi

 

to make it work, you need to download the library files and put them in the same directory

or you can get them from the cd that came with it or from

http://www.thorlabs.com/software_pages/LC1-USB.cfm

 

LC1_Drv.llb is the name i believe

 



Message Edited by jimmyinCT on 04-25-2008 06:56 PM
0 Kudos
Message 20 of 33
(2,371 Views)