I have been trying to communicate to a USB device, a Gigahertz-Optik Optometer. I have Windows 2000, VISA 4.0 and Labview 7.1 installed on my PC.
I am successfully able to Open the device, however while using Bulk in or Bulk out operations, I get an error 1073807302. The code is attachd below, actually USB RAW BULK example from NI website. The device seems to use a 32 bit Int datatype. But whatever bytes u try in the Bulk-in session generates the same error. What could be the issue? Is it a version problem?
I have read all the discussions on simillar error, unfortnately none was helpful. I have also attached a Spy file generated while the program was being run, in case it is helpful.
Thanks for the reply. The USB protocol for the X11 Optometer that I am using, supports both HID. Moreover, there is no problem in detecting the device as MAX detects it as a USB device and I can open it using VisaOpen. However, VisaRead or VisaWrite gives me the error 1073807302 (at HEX0x0BFFF003A). If I need to retrive the output of the optometer, I should be able to send in the commands set by the manufacturer. VisaRead/write is not working, I can't do that.
VisaRead needs just 2 inputs. A VISA resource-name (Which is correct as VISAOpen returns no error with the same name) and byte count. Now, this is 12bit ADC device, and the accompanying header file for the dll states it to use a 32 bit data type. ANy number in byte count doesn't seem to work.
Moreover, if I try to communicate to the device using a Call Library Function Node (manufacturer has provided a dll), I get the message that the exception has occured at the external. This I believe is the direct consequence of improper VisaRead/Write.
Never mix up calls via visa and the dll. You should probably only use the dll calls, visa does not make life easier for you. The dll knows how to handle usb already, or do you need visa for something else?
I was already trying to communicate using VISA, when I actually got hold of the dll from the manufacturer. But Call library node function returns error to even the easiest commands defined in the header file. It returns the message that the exception has occured at the external code, and program crashes. What could be the mistake in such as small cade (Given below). I have also added the header file, if you might need.
I don't quite understand how the device even shows up in MAX if it's HID. Only USBTMC devices or devices you create an inf file with the VISA Driver Development Wizard should be listed. If you did use the wizard, that was a mistake and you should remove the inf and pnf files that were created by the wizard.
I can't delete the device form MAX as delete button for the device in MAX is disabled. Device Uage enable button is checked, but disabled and hence can't change its state. If I remove its driver from the device manager, it get re-installed for the same USB device. The alias is also not getting deleted as the option is also disabled.