04-23-2009 10:16 AM
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!
Solved! Go to Solution.
04-24-2009 02:42 PM
Hey gharris,
I'm going to have to research into this a bit more before I can provide you with any suggestions. Thanks!
04-24-2009 03:14 PM
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.
04-27-2009 11:35 AM
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.
04-27-2009 11:46 AM
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
01-20-2010 02:07 AM
01-20-2010 08:22 AM
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:
01-20-2010 11:54 AM
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?