LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

getting started with thorlabs lc1-usb

Hello,
Ive always been a big fan of labview, one of the big reasons is that I can get a  good head start on any applicatino using the example programs.
For this new device, a lc1-usb from thor labs, i just have had a hard time getting started.
 
Ive read the instructions and see in need to import the labwindows drivers into labview.
I see the device is in measurement and automation under usb heading and appears to be working.
When i try to initialize the device, I am getting errors in debug mode saying the "device cannot be locked".
Ive tried resetting it, and just havent had luck.
I can upload the .vi later if it is recommended, dont have it infront of me right now.
 
I really would just like to see an example program which is reading the input of this device.
It really would help me get started in debugging if i could actually had soemthing that worked to start with.
 
Many thanks
 
 
 
0 Kudos
Message 1 of 33
(8,003 Views)

it woudl help if there was even a help file associated with the thor labs driver for these devices.

asking for a sample file is not really being that lazy.

anyone?

0 Kudos
Message 2 of 33
(7,962 Views)
Hey Jimmy,
 
I have done some looking around on our site and thorlabs' site.  With our IMAQ drivers, we only support firewire, cameralink, analog, and GigE cameras. There is a USB for IMAQ driver on the website, however, this driver only works with DirectShow USB cameras.  It does not appear that your camera is a DirectShow.  This is of course to get the camera to work with our IMAQ software.
 
I noticed from looking around the thorlabs' site that they have an instrument driver that communicates with LabVIEW.  Are you just trying to use this camera with the VISA driver? 
 
As for why you are having problems with your camera and the instrument driver, I am not sure what would cause that.  You might try contacting thorlabs and seeing if they have any ideas?  It sounds like it may be a problem with their instrument driver interfacing with LabVIEW.  I would imagine that they could provide more insight into why you are seeing this problem.
 
I hope some of this helps.  Take care.
 
Thanks,
Evan D.
Installer R&D
National Instruments
0 Kudos
Message 3 of 33
(7,946 Views)
Evan, thanks for clearing that up.
I just assumed the language was Proprietary

and NI made the driver.
 
yea, first time using a device that dosent start wtih ni but in this day and age, i take whatever work is given to me..
i hate not having the sample vis, its like having 3/4 of the project done before you start but also almost impossible to start without it or help documents..
 
 
best wishes.
 
 
0 Kudos
Message 4 of 33
(7,924 Views)
Hey Jimmy,
 
If you get a chance, post back here and let us know what you hear from ThorLabs please.  That'll be awesome and it'll help us better help other users of ThorLabs products.  Good luck and best wishes.
 
Thanks,
 
 
Evan D.
Installer R&D
National Instruments
0 Kudos
Message 5 of 33
(7,918 Views)
Hi,
 
Customer Service at Thorlabs came across your post and asked me to contact you to see if I can help you with your problem.  I plan on trying to reproduce your problem here next week.  Why don't you email me your vi for me to try.  Email it to sbartolett@thorlabs.com.
 
Thanks,
Scott
 
0 Kudos
Message 6 of 33
(7,905 Views)

 

Funny the thor labs customer service people read the post here, yet, didnt return a calls or the emails I sent last week.

The lack of responsiveness was part of what made me think they didnt make the drivers and i was barking up the wrong tree and post on this board..

 

thanks Scott,

Email sent with attachment

 

 

Id like a 2nd opinion so will post part of my email



 

I am using two different machines, both with labview 8.0, one is mine, one is theirs (peoplei am consulting for)

They have a brand new lc1-usb from thor labs.

So as I previously reported to thor labs tech support (although not knowing as much), one of the problems that each time the device is accessed from labview, there is an error, “device is locked”.  At first we figured out the only way to fix it is to reboot the PC. Subsequently, after a few days of work, we happened to notice that running the sample application (no code provided), releases the device so it can be used again.  So the problem was determined that if the programmer hits the stop execution button on the front panel, the device is left locked state.  So obviously running the sample labview exe hits the “close.vi” so it can be freed.  How the sample program is getting a handle to begin with when I cant is beyond me.  Ive tried resetting (reset.vi) the device it but that cant be done if you can even get the initialization done to get to it.  This is with the premade labview 7 driver that was provided with the installation CD. 

Im not an expert with labview, I have made more then a few professional applications, but could be wrong here. But.. I don t remember this ever happening, where a device is left in a locked state after halting execution before hitting close.vi, this even with third party hardware.

The first problem we had to do with importing the instrument driver into labview.  The readme.txt says  “A convenient way to import the driver directly to your NI-LabView  environment is to use the NI-LabView 'Import CVI Instrument Driver' .  So we have done such, using the Labview Interface Generator for LabWindows™/CVI™ Instruments for labview 8.   When we did so, the Vis that we ended up with a complete mess and not functional althought it took us a few days to figure that out.  We have become disgusted with this and decided to use the premade lab view 7 driver since we can atleast somewhat use them in the current state.  This is the reason we wanted to see how these VIs are used by have since then figured out they are just garbage.



 
0 Kudos
Message 7 of 33
(7,890 Views)

Hello,

Getting the device locked error doesn't surprise me if the execution is stopped before entering the "close.vi" because my suspicion is that the driver does not have built in logic to reset the device if a session is opened but never closed.  Just to clarify, in the sample exe that you mentioned in your previous post, are you able to use the camera as long as the stop execution button is not hit?

Carlton
CLA
0 Kudos
Message 8 of 33
(7,861 Views)
the sample program that frees the resouce is an exe built from labwindows, not a sample code program.
I dont feel like looking into it to much as Im working again at this point now that i understand why i was always locked out.
 
Ive worked with quite a few hardware devcies through labview and and none of them have have trouble restarting if the they are halted from the IDE before reaching close.vi
 Im sure there is something in the driver that frees the device when it its starts, such as by closing unfinished sessions.
What i am more or less questioning, in your terms, is  how often this "logic" is used and if it is enough to be thought of somethign that is standard, atleast with ni if not third parties.
 
.
 
 
 
0 Kudos
Message 9 of 33
(7,850 Views)

Hello Jimmy,

You're right.  Most device drivers will free up their resources if halted before reaching the close.vi, and this is a standard we use in National Instruments drivers.  It seems like the driver you are using does not do this.  I'm glad you are able to get the program running, but it looks like you will not be able to frequently use the abort execution button.

Carlton
CLA
0 Kudos
Message 10 of 33
(7,836 Views)