From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting to a Thor labs Camera through labview

Hi,

 

I am having an issue with connecting to a Thor lab camera (DCC1545M) through labview. Thor labs provides pre-built VIs for interfacing, I am recieving an error calling the method uc480.Information.ToString, this I believe is from the uc480DotNET.dll which I am referencing but does not have much effect.

One concern of mine is that I am using a 32-bit LabView 2012 and I have installed the 64-bit version of thorCam software, the 32-bit will not install on my computer. Does anyone know if this could be causing an issue?

kind regards,

 

Kealan

0 Kudos
Message 1 of 7
(8,666 Views)

Hi Kealan, 

 

We have one of these cameras working smoothly on one of our machines. We just got another camera for a different computer and keep getting the following error. The strange thing is the DLL is called "uc480DotNet.dll", not "uc480.dll". 

 

Error 1172 occurred at Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
Inner Exception: System.DllNotFoundException: Unable to load DLL 'uc480.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

Possible reason(s):

LabVIEW: 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.DllNotFoundException in ThorCam.lvlib:Open Camera.vi

0 Kudos
Message 2 of 7
(8,444 Views)

Thanks for the information, but I ended up getting it to work finding an old version of the 32 bit ThorCam software.

 

many thanks,

 

Kealan

Message 3 of 7
(8,421 Views)

Hi gregoryj,

 

I assumed you ran the code in LabVIEW 32-bit, as I did and got the same error.

I copied and pasted uc480.dll and uc480DotNet.dll from C:\Windows\System32 to C:\Windows\SysWOW64.

It fixed my issue. I read other thread that somehow sysWOW64 is for 32-bit drivers, and that system32 is for 64-bit drivers. 

I hope it helps.

Message 4 of 7
(8,315 Views)

Cool, thank you for reporting your fix! Another colleague reported uninstalling ThorCam fixed it for him, but it was probably related to where Windows thought the driver was located as well.

Message 5 of 7
(8,302 Views)

hi, Kealan, I am using the same Thorlabs' camera (DCC1545M) and I've the same problem with Labview. Could you tell me wich version of the camera software package have you used to fix that?

Regards,

Anays

0 Kudos
Message 6 of 7
(7,977 Views)

I was having a very similar problem and am posting the details and solution (which is similar to chin.ho's) in case it helps anyone else:

 

I installed the 64-bit ThorCam software for running a DCC1645C Thorlabs camera on Windows 10 (x64) with 32-bit LabView 2015. (As Kealan found, the 32-bit version of ThorCam refuses to install on a 64-bit machine, so in this post, "ThorCam" always refers to the 64-bit version of the software.) I could see that the camera was correctly installed in the device manager, and I was able to connect to it and acquire images in ThorCam. However, the camera was not detected in NI-MAX, and when I tried to run the example VIs in the folder C:\Program Files\Thorlabs\Scientific Imaging\DCx Camera Support\OtherDrivers\LabVIEW\For_32-bit_LabVIEW, I received one of the following error messages:

 

"Invoke Node Error calling method uc480.Information.ToString, (System.ArgumentNullException: Key cannot be null. Parameter name: key) <append><b>System.ArgumentNullException</b> in uc480_SubVI_Example_MemoryAllocation.vi->uc480_Basics.vi"

 

Or:

 

"Error 1172 occurred at Invoke Node System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. Inner Exception: System.DllNotFoundException: Unable to load DLL 'uc480.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
"Possible reason(s):
"LabVIEW:  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.DllNotFoundException in uc480_SubVI_Example_CameraInit.vi->uc480_Basics.vi"
 
I emailed Thorlabs tech support and was informed that the 32-bit DLLs are missing from Thorcam v3.0.0 due to an oversight that they plan to correct soon. The application engineer sent me the correct files (attached) and said to put them in the "For 32-bit LabView" folder in the ThorCam installation and to copy them into C:\Windows\SysWOW64. After I did this, the example VIs ran without errors, and I was able to acquire images from the camera. 
 
The camera is still not detected by NI-MAX, presumably because MAX (at least my installation) does not support the .NET framework (?); however, this does not prevent it from working with LabView.
Message 7 of 7
(7,489 Views)