LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI MAX does not recognize my device connected via USB

Dear community,

 

I have a motorized Thorlabs stage connected to a controller cube, which is connected via USB-USB to the PC. There is a APT User software installed, which perfectly functions with the stage. The stage recognizes every command of the software. I wanted to implement this stage into Labview and I made a simple VI following the Labview-Guideline for this device. As I wanted to try out this VI. I got failures. So then I realized the USB connection isnt recognized by VISA MAX, although it is recognized by the Windows device manager. I also checked for updates of the device driver, but in the device manager it couldnt found any updates. So I searched a bit online, but I couldnt find any helpful solution. Also in NI-VISA Driver Wizard, I couldnt find a connected USB. So I really don't know how I should solve this problem, I hope you might have an idea. It would be really helpful for me.

 

Lovely regards

 

Sailor Moon

0 Kudos
Message 1 of 8
(5,959 Views)

Hello again,

 

when I try out NI-VISA Driver Wizard. I got this problem (see picture):

 

Unbenannt.PNG

Does anyone knowes this failure? My USB is recognized, but still I got a failure, when I click next step.

 

Lovely regards

0 Kudos
Message 2 of 8
(5,949 Views)

@SailorMoon wrote:

I have a motorized Thorlabs stage connected to a controller cube, which is connected via USB-USB to the PC.


I guess you found this already:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019La2SAE&l=de-DE

 

 

can you connect to the PC in bypass to the controller cube or is this device essential to connect to the PC?

0 Kudos
Message 3 of 8
(5,944 Views)

Hello Alex,

 

thanks for your reply. Yes, I already saw this page, but I didnt try this step with the deinstallation. I first wanted to search for other solutions before trying out this step.  I also saw this link (https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000g16xSAA&l=de-DE), but it seems to be sooo random and its not well described, I didnt get why you should even do this, but maybe I can also try this out.


I need the controller to connect. Also the USB is only recognized when the cube is turned on. When the power is turned off, the USB isnt recognized by the Windows Device Manager either.

Lovely regards

Sailor Moon

0 Kudos
Message 4 of 8
(5,933 Views)

You don't need VISA.  If you have APT installed, just use the ActiveX calls.

 

Use this manual:

https://www.thorlabs.com/images/TabImages/GuideToLabVIEWandAPT.pdf

 

Start around chapter 6, as the first 5 are for people who haven't used LabVIEW before.

 

Note that the PDF was created a while ago back for LabVIEW 8 or something, so some of the screenshots and such are outdated.

Message 5 of 8
(5,878 Views)

Hello Kyle,

 

thanks for your reply. I already followed the orders of that PDF data. However my VI didnt run and gave an error. So I checked if the controller is recognized by VISA, but it wasn't. So I assumed that this is the failure why the VI isnt running.. My device is recognized by Windows device manager and also works out with the APT software. Only Labview doesnt recognize it..

Lovely regards

Sailor Moon

0 Kudos
Message 6 of 8
(5,842 Views)

NI Max and NI-VISA can not recognize arbitrary USB devices. A USB device can be many things, like a keyboard, mouse, a serial port, a webcam, an oscilloscope, a headphone or a zillion other things. Each of these has a different protocol that is talked over the USB bus.

 

NI-VISA only understands USB devices that talk USB-TMC (Test and Measurement Class) a specific USB protocol developed for test instruments.

 

It also can use USB-VCP devices, that are devices that work like a serial port, but it doesn't do that itself but relies on the underlaying OS to provide these devices as a normal serial port through the OS API.

 

It also has support for USB Raw, which is a mode where you register a specific device to be directed to NI-VISA and the raw data from the device is simply handed to the VISA client and it has to send raw data back. This means that you need to implement the ENTIRE USB protocol yourself in your LabVIEW VIs. This is only an option if the manufacturer of the device provides a detailed low level USB protocol specification, which most won't do. Even if one does it's a pain in the a** to develop such a driver as you have to deal with all kind of low level details for binary data, bit shuffling and many more such things.

 

The USB Driver Wizard is used to designate a USB device as USB Raw device in NI-VISA. It''s the first (very tiny) step to talk with an arbitrary USB device through VISA. After that you have to develop the actual driver which requires the very detailed protocol specification for the device. Unless you have real experience with developing USB devices on embedded hardware or similar, you absolutely surely are not wanting to go down this path! Aside of that I haven't heard that Thorlabs ever shared their protocol specification with anyone, and without such a specification it's simply impossible to develop such a driver.

 

The Thorlabs software certainly installed a device driver and most likely uses a DLL or the aforementioned ActiveX component to access that driver. This is the only feasable way to access this hardware. The APT software driver was not developed to be usable through NI-VISA and NI-VISA can't access arbitrary drivers.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 7 of 8
(5,833 Views)

Hey dear community,

 

sorry for my delayed response. I figured out a lot the last day and also talked to Thorlabs.
I dont know why, but my stage isnt working with APT via Labview. Somehow the motor wents crazy and doesnt do any step, but still you get horrible noises. So anyway I tried with the alternative Kinesis, which uses .net methods in Labview. I tried out an example of Thorlabs and worked out pretty well. But here is my next problem, Thorlabs doesnt have any description for the different methods. They suggest you the help file from the download folder, but this isnt helpful. There are only descriptions for other programming languages. I also talked with Thorlabs about this, but they dont have anything else, but suggested me other example files of them. But still I dont know how I should build up a VI with methods, where I dont have any descriptions. Its really annoying, because you never know, if you are doing the correct step. Did anyone else had such a problem?

Lovely regards

 

Sailor Moon

0 Kudos
Message 8 of 8
(5,760 Views)