LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

visa usb bulk communication - multiple end points

Solved!
Go to solution

Hi All,

 

I'm setting up an ocean optics USB2000+ spectrometer and would like to use visa instead of the dll I got with the spectrometer (I had a bunch of stability problems, its not supported anymore by ocean optics and I don't want to have to pay for the new version).  I have the documentation for the spectrometer and have been able to set the integration time and receive spectra as quickly as the dll was able to.  But I have not been able to read the calibration information from the spectrometer.  All commands use bulk transfer, so I'm using visa write and read to send/receive.  I think the difference between the spectral data and calibration data is that the data comes from different endpoints.   The spectrometer has 4 endpoint addresses (3 to the PC = IN, 1 from the PC = OUT).  The spectral data comes back on the first IN endpoint and the calibration data comes back on the 3rd IN.  

 

Is there a setting I need to change to read from a different endpoint?  They are all bulk type according to the documentation.  Any suggestions would be much appreciated.

 

thanks!

0 Kudos
Message 1 of 8
(6,983 Views)

Hey gharris,

 

I'm going to have to research into this a bit more before I can provide you with any suggestions. Thanks!

Justin E
National Instruments R&D
0 Kudos
Message 2 of 8
(6,947 Views)

Thats great - thanks for your help.  I'd be happy to provide any vis I've written.  Most of Ocean Optics documentation is password protected, so they probably don't want me sharing it, but I do have the manual for the spectrometer, which is not password protected.

0 Kudos
Message 3 of 8
(6,943 Views)
Solution
Accepted by topic author gharris

Hey gharris,

 

It looks like there is a setting you can change through a property node that will change which endpoint you read from. If you're using a text-based program, the property you need to change is VI_ATTR_USB_BULK_IN_PIPE. If you're using LabVIEW, follow these steps :

 

First, set a VISA property node down on your block diagram (really any property node will work). Next, right-click on the property node and select Select Class -> VISA -> I/O Session -> USB Raw. This step can be found in EndpointSS1.png attached below, and will change the property node to a USB Raw property node. Third, left-click on Property and select USB Settings -> Bulk-In Pipe. This step can be found in EndpointSS2.png, attached below. This is the property that sets which endpoint to read from. To change the value of this, right-click on the property node and select Change all to Write, which will allow you to wire in an endpoint value. 

Justin E
National Instruments R&D
Download All
Message 4 of 8
(6,902 Views)

Hi Justin,

 

Nice work!  Thats exactly what I needed.  I've always had better luck using Visa than most vendor's drivers.  This is another great example of how well it works.

 

thanks,

George

0 Kudos
Message 5 of 8
(6,896 Views)
Can you post your VI having Multiple endpoints supported for bulk transfer?
Message 6 of 8
(6,104 Views)

Are you looking for USB2000 software? Or is your question more general?  For the spectrometer, most of the reads were from one endpoint so I left the endpoint value set for that one.  Once in a while I'd change the endpoint, do a read and then change is back.  Here's an example:

 

0 Kudos
Message 7 of 8
(6,084 Views)

Thanks for the reply..I am working with usb raw interrupt and bulk communication between uC and labview....my controller supports 5 different endpoints atleast 64 bytes long in or out pipes..so I want to know how to write program in labview so it can read or write all the data from all endpoints from controller....

 

I have posted one question regarding my vi...posted here..http://forums.ni.com/ni/board/message?board.id=170&thread.id=469273

 

can you help me out in this vi for multiple endpoint support? 

0 Kudos
Message 8 of 8
(6,072 Views)