LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3rd party USB raw present in VISA but Labview says "insufficient location information"

Solved!
Go to solution

Hi-

 

I am trying to control a third party USB device via labview. I have created a driver with VISA driver wizard and done all the steps such that the device appears in the VISA and I can control it from NI-Max. However, if try to use any function that take a visa resource name, while I can select the resource from the resource name control drop down, I get a "Driver Status: (Hex 0xBFFF0011) Insufficient location information or the device or resource is not present in the system." The same happens if I copy the resource name directly from VISA. Any thoughts on what I can do? 

 

Thanks

0 Kudos
Message 1 of 7
(1,046 Views)

Please provide additional information about the device, its driver/programmer's manual etc.,

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 7
(1,041 Views)

Thank you-

 

The programmers manual is documented on pg 55. (https://www.thorlabs.com/drawings/95ae2119fcf31947-9C9FEFDE-0B7F-8D2A-B812F2556403956A/DMP40-P01-Man...)

 

And the control VIs are present in the software download here (https://www.thorlabs.com/software_pages/viewsoftwarepage.cfm?code=DMP40

I followed this procedure to get the device into NI Visa (https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000x1qzCAA&l=en-US)

 

I appreciate your help as I am new to Labview.

 

 

0 Kudos
Message 3 of 7
(1,036 Views)

I’m on my mobile and can’t download the SDK and your url for the manual produces a 404 error. But you almost certainly are barking up the wrong tree here. Thorlabs divers never required a VISA USB raw driver being installed . Instead they use their own DLL developed in this case in LabWindows/CVI as VXIpnp driver and then generate a LabVIEW wrapper for it. The resulting resource control looks like a VISA resource control but isn’t. It’s an IVI control.

Where did the Thorlabs manual state you needed to install your own VISA USB raw driver? That’s anyhow not really possible anymore on modern OSes without booting up in special debug mode!

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 7
(985 Views)

Thank you very much for your response. 

I appreciate you bearing with me, as I am a novice so some of this is likely very obvious and I've looked at the manual, but still do not understand what I need to do... would you have insight into how I can actually communicate with this device via a Labview VI without generating a visa driver via the visa driver wizard? 

Basically, where I am confused is that if I do not do this (followed by the process to generate and sign a .cat file), then I will not see the device in NI VISA. In order to call any of the VIs in the NI llb (for example the VI that initializes the device), a VISA resource name is required. How can I call this VI if I don't go through the process of generating a VISA driver for the device so that it appears w/ the associated resource name? 

Btw, this should be the fixed link to the manual: https://www.thorlabs.com/drawings/8a0837f02a975a54-0346ACC1-A276-9E16-D88B5519E2605C33/DMP40-F01-Man...

 

thanks again

0 Kudos
Message 5 of 7
(962 Views)
Solution
Accepted by topic author cthomasUW

That's because this driver works a little different than how NI has designed VISA. It's hacking a few things on its own.

 

Look in the TLDF.llb/TLDFM Simple Example.vi how they do it. Basically you have to call the TLDFM Get Device Information.vi with an index to retrieve the required resource name to use to open an instrument with TLDFM Initialize.vi. There is no device driver installed into NI-VISA that makes the device available as a device that is discoverable by NI-VISA itself, but instead the underlying DLL does some trickery to do its own enumeration based on its own proprietary USB drivers and shove that device under the nose of LabVIEW to make it look like a VISA resource.

 

So first uninstall the VISA USB raw driver that you created. It is never the right thing to do, unless you have an extensive manual available for your device that details the USB protocol used and you also know the several 1000 pages of USB documentation from the USB consortium at least in broad lines. On this level you do not write command strings to a device, but bits and bytes to various endpoints using interrupt, bulk or isochronous transfers. Not knowing what these terms mean? Then trying to create an USB Raw driver is definitely the wrong tree to bark up.

 

Then if you know to never happen to have more than one device connected, simply use the TLDFM Get Device Count.vi to see if there is any device connected and then the TLDFM Get Device Information.vi with index 0 to get the resource name for that device. If you intend to use more than one device you need to do your own enumeration (call TLDFM Get Device Information.vi in a loop as many times as the TLDFP Get Device Count.vi told you that there are devices connected to the computer currently) and then somehow select which device you want to use for which operation, probably based on serial number or letting the user select them.

 

Then go from there.

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 7
(941 Views)

thank you so much

 

The solution ended up being so trivial...but I literally struggled with this for weeks. I made things much more complicated than they needed to be because I was trying to hack together some code based on an undocumented implementation which did use the driver wizard to generate a visa driver and used the visa resource name to initialize the device. I still don't know how the person who developed the original code got it to work this way haha. 

 

Also, I got things working now thanks to you, so it's not necessarily important, but once again I'm wondering if I just lack basic understanding, but while the manual states there should be an example VI in the driver llb and there is a "examples.mnu" palette file, I can't actually find these example VIs. I can add the examples subpalette to the functions palette and if I click on the subpalette, "simple example" and "extended example" vis are present. However, if I click either open or place vi, nothing happens (I can't put anything into the block diagram). Would you have an idea what's wrong here?

Anyway, since things are working, this is not so important, I'm still just trying to learn. Really, I appreciate your help tremendously. This was such a huge headache with a straightforward answer. 

0 Kudos
Message 7 of 7
(922 Views)