07-26-2022 07:25 PM
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.
Solved! Go to Solution.
07-26-2022 08:04 PM
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
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.
07-27-2022 11:26 AM
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.
07-27-2022 03:49 PM
Your errors indicate it’s not finding the DLLs. You need to post something for help.
07-28-2022 06:38 PM
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.
05-10-2023 12:39 PM
Hi! I'm having the same exact problem. Can you elaborate on how you solved it? It is driving me crazy.