取消
显示结果 
搜索替代 
您的意思是: 

Using thorlabs CS165CU camera to continuously take pictures in labview

已解决!
转到解答

Hi,

I want to add an image part to my spectra gaining VI. I can control the camera and take pictures using Thorcam. I downloaded the VIs provided by thorlabs and tried some demos. They all showed error 3 below:

Error 1386 occurred at Invoke Node in Open TLCameraSDK.vi->Software triggered acquisition - polling.vi

Possible reason(s): LabVIEW: (Hex 0x56A) The specified .NET class is not available in LabVIEW.

Error 1172 occurred at Invoke Node Error calling method Thorlabs.TSI.TLCameraInterfaces.ITLCameraSDK.Dispose, (System.ArgumentNullException: Key cannot be null.
Parameter name: key)

Possible reason(s):

LabVIEW: (Hex 0x494) A .NET exception occurred in an external assembly. For information about correcting this error, copy the following exception (in bold), and search the Microsoft Developer Network (MSDN) Web site or the Web for a possible explanation.
System.ArgumentNullException in Close TLCameraSDK.vi->Software triggered acquisition - polling.vi

 

I have added the LabVIEW.exe.config file as here said, but it didn't work.

 

0 项奖励
1 条消息(共 6 条)
4,463 次查看
解答
接受人 Peiyi1919

Did you read all the instructions for the Thorslabs VIs?

 

Specifically from the Readme File

 

LabVIEW README

For LabVIEW support for Thorlabs camera series DCC and DCU, please see the DCx Camera Support folder typically installed at C:\Program Files\Thorlabs\Scientific Imaging\DCx Camera Support.

For LabVIEW support for Thorlabs camera series 340, 1500, 1501, 4070, 8050, 8051, CC215, CS126, CS135, CS165, CS2100, CS235, CS505, and CS895, please use the .NET camera interface by following these directions:

1. Install ThorCam and the appropriate drivers. The installer can be found at Thorlabs.com on any of the camera pages. Click on the Software tab, then on the Software button.

2. Copy the managed DLLs from

Scientific Camera Interfaces\SDK\DotNet Toolkit\dlls\Managed_32_lib\*.dll (for 32-bit LabVIEW)
or
Scientific Camera Interfaces\SDK\DotNet Toolkit\dlls\Managed_64_lib\*.dll (for 64-bit LabVIEW)

to the a folder with your VIs in a subfolder called Library_X86 (for 32-bit LabVIEW) or Library_X64 (for 64-bit LabVIEW).

3. See the following guides found in the Documentation folder (usually C:\Program Files\Thorlabs\Scientific Imaging\Documentation\Scientific Camera Documents):

TSI_Camera_LabVIEW_Interface_Guide.pdf
TSI_Camera_DotNET-LabVIEW-MATLAB_Programming_Guide.chm

 

You also need to specify the directory of these dlls, before calling them, ie

 

mcduff_0-1658883708300.png

 

Otherwise, things won't work.

 

If you make an exe, there are some other dlls that need to be added. They can be found in the Thorlabs program. Not sure why Thorslabs doesn't include them also.

 

2 条消息(共 6 条)
4,443 次查看

I think I exactly followed the instructions in step 1 and 2. The provided VIs also have specified the directory of these dlls. However, they didn't work.

 

I am now looking through the TSI_Camera_LabVIEW_Interface_Guide, but I don't expect any solution there because the examples are in accord with the guide.

 

I also tested the VIs on two different computers. They both didn't work. Do you have any suggestion then? Thank you so much.

0 项奖励
3 条消息(共 6 条)
4,399 次查看

Your errors indicate it’s not finding the DLLs. You need to post something for help.

0 项奖励
4 条消息(共 6 条)
4,385 次查看

Thank you so much. I think I find the problem. I have to change the file path in Set Current Directory To Library Folder.vi. The default one is wrong. Everything works well now.

0 项奖励
5 条消息(共 6 条)
4,358 次查看

Hi! I'm having the same exact problem. Can you elaborate on how you solved it? It is driving me crazy.

0 项奖励
6 条消息(共 6 条)
3,597 次查看