LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Thorlabs SDK

My lab recently purchased the LP126MU camera from Thorlabs, and I'm hoping to interface it with Labview to perform some real near-time data processing. I have done some really basic labview programming in the past, so I was really excited to see that Thorlabs offered SDK kits for their cameras. However, I'm having trouble loading all of the programs into Labview and keep getting the following error in my dependencies (see below) which leads to 1172 errors all over the place.

DoingMyBest_0-1739810842940.png

 

I'm almost certain the issue is with how I'm saving/nesting the different provided Thorlabs files, which is probably breaking the library/assembly, but I've tried a bunch of different configurations and nothing has worked. Does anyone have advice on how best to store/manage/upload the provided Thorlabs SDK so that everything loads properly? I am so hopelessly lost on how to manage assemblies/libraries that any help would be greatly appreciated.

 

I've attached a couple of the provided guides below, but the entire SDK folder can be downloaded here: https://www.thorlabs.com/software_pages/ViewSoftwarePage.cfm?Code=ThorCam

0 Kudos
Message 1 of 7
(196 Views)

I must confess that my experience with Image processing in LabVIEW is largely based on using GenICam-compatible cameras that interface with the LabVIEW Vision modules (LabVIEW Vision Development Module and LabVIEW Vision Application Software).

 

The instructions you attached seem pretty explicit where and how to install the (presumably non-GenICam) drivers that use .NET.  

 

Can you provide some addition information about your hardware and software?

  • What operating system (and 32 or 64 bit)  are you using?
  • What version of LabVIEW (and bit version) are you using?
  • Provide the paths where you installed the .NET drivers.
  • Does ThorLabs provide any routines to verify if the software has been installed correctly?

Can you describe the Image data you hope to acquire?

  • What pixel size is planed?
  • If B&W, how many bits per pixel?
  • I thought you said B&W, but if color, I'm assuming 4-byte pixels, please confirm.

My first exposure to LabVIEW Vision was just over a decade ago, when a colleague asked me for assistance in acquiring 5-10" videos of mouse behavior.  Video acquisition and Image processing definitely follow different "rules" for LabVIEW data, with Video having a 3-D structure (2-D for pixels + time).  One of the harder things was learning to manage access to the Camera settings and understanding how video was stored in the computer and what hoops we needed to jump through to get the images saved (let alone processed).  I'm glad I had a lot of experience with "conventional" data I/O (one of my first tasks was to rewrite a LabVIEW 7 program that used "Traditional DAQ" into LabVIEW 8 and successors using DAQmx (what an improvement!).  I'm not currently involved with any Vision projects.

 

Bob Schor

 

 

0 Kudos
Message 2 of 7
(176 Views)

Hi Bob!

 

Thanks for your speedy response. I agree that they have a lot of documentation but my general inexperience with labview and this type of programming have made it very difficult to trouble shoot what is probably a very basic issue in just getting the base VI's loaded. I'm going to do my best to answer your questions.

 

  • What operating system (and 32 or 64 bit)  are you using?

Operating system is 64 bit.

  • What version of LabVIEW (and bit version) are you using?

Labview 2023 Q1, 64 bit (I'm using a student account so this is the version I get access to).

  • Provide the paths where you installed the .NET drivers.

I'm almost certain this is the root of my problem. Following step 2.2 from the Labview net interface guide, I've added the necessary DLL's and included controls/subvi's folders (lets call these collective files the ThorLabsFiles) into a blank labview project. I'll be honest, I have no idea how to do step 2.3, which is setting the current directories to load libraries. I was trying to do this by updating the path to the folder where I have the ThorLabsFiles stored, and it still wasn't fixing anything. I've also tried deleting/redownloading/moving files into different program folders and such and I just can't get it to work. I'm sure I'm doing something silly but I don't have enough experience with labview formatting to know how to fix it.

  • Does ThorLabs provide any routines to verify if the software has been installed correctly?

Not that I can tell!

  • What pixel size is planed?

The base camera specs are 4096x3000 pixels - the displayed image can be smaller than that if need be.

  • If B&W, how many bits per pixel?

It is indeed a monochromatic camera, if I'm reading specs right there are 12 bits per pixel.

 

My goal for right now is just to get the base VI's to run. There's additional image processing I'd like to perform, but it would be nice to have the included Thorlabs packages working so I don't have to write all the VI's from scratch. I would also be more than happy to scrub all the downloads I have so far and start from scratch if someone has a beginner-friendly way to download everything.

0 Kudos
Message 3 of 7
(166 Views)

Step 2 in the README file tells you where to copy the DLL files. The directory is named according to the bitness of your OS. 

aputman_0-1739825469885.png

 

aputman
0 Kudos
Message 4 of 7
(157 Views)

I've copied the DLL files into that folder, it still errors out on me.

0 Kudos
Message 5 of 7
(152 Views)

This is the way I interpret the README.  Is this what you tried, with DLLs in the Library_X64 directory? 

aputman_0-1739826316200.png

Don't install the SDK into the Library_X64 directory.  Install the SDK into the default directory and then copy the necessary DLLs into the Library directory and add both the VI and folder to your LabVIEW project. 

 

Sorry if you've already answered this.  I just want to make sure I understand what you've tried.

aputman
0 Kudos
Message 6 of 7
(141 Views)

@DoingMyBest wrote:

My lab recently purchased the LP126MU camera from Thorlabs, and I'm hoping to interface it with Labview to perform some real near-time data processing. I have done some really basic labview programming in the past, so I was really excited to see that Thorlabs offered SDK kits for their cameras. However, I'm having trouble loading all of the programs into Labview and keep getting the following error in my dependencies (see below) which leads to 1172 errors all over the place.

DoingMyBest_0-1739810842940.png

Can you try a couple things:

 

1. Right-click on those missing items in the dependency list and choose "Why is this item in dependencies?"

 

This will just take you to either the only file trying to use this DLL, or a list of all files trying to use it.  Either way, could be helpful to find out what things it's missing these.

 

One thing to check for is to try and see what in a VI is using those.  Usually if there's a DLL missing and you try to open it, it will open up a file find dialog and ask you to find it on disk.  If it doesn't, that may mean that the dependency is in a disable structure (the LabVIEW equivalent of being commented out).

 

2. Highlight those missing files in Dependencies and either press control-E or right-click and choose "Show in files view"

 

This should show you where it thinks it should find those files.  It might be a path you can just drop them in, or it might be a nonexistent path on a different drive or something that Thorlabs accidentally left a reference to.  Either way, check it out and see if it's someplace you can put the DLLs.

0 Kudos
Message 7 of 7
(137 Views)