NI Home > Community > NI Discussion Forums

Instrument Control (GPIB, Serial, VISA, IVI)

Showing results for 
Search instead for 
Do you mean 
Reply
Member
RAK-W
Posts: 8
0 Kudos

error 1073807302 with a USB device

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.

Regards
RK


Member
NIyer
Posts: 183
0 Kudos

Re: error 1073807302 with a USB device

Hey,
I think your device supports USBTMC protocol, this link will shows how you can talk to your USB instrument.
Good luck with everything.
Regards
Nikhil A

Active Participant
Makoto
Posts: 525
0 Kudos

Re: error 1073807302 with a USB device

http://www.gigahertz-optik.de/database_de/html/produkte/optometer/

According to Gigahertz-Optik optometer web page, there are two models that have USB interface - X1 and HCT-99.  Assuming one of them is used, the product cataloges say the USB protocol is both HID. 

 

Member
RAK-W
Posts: 8
0 Kudos

Re: error 1073807302 with a USB device

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.

Any help is appreciated.

Regards,
Trusted Enthusiast
Albert.Geven
Posts: 3,371
0 Kudos

Re: error 1073807302 with a USB device

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?

greetings from the Netherlands
Member
RAK-W
Posts: 8
0 Kudos

Re: error 1073807302 with a USB device

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.


Regards,
Knight of NI
Dennis_Knutson
Posts: 34,424
0 Kudos

Re: error 1073807302 with a USB device

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.
Member
RAK-W
Posts: 8
0 Kudos

Re: error 1073807302 with a USB device

OK. I had created the inf files, as tried to use it as a USB RAW dvice. I removed the the inf files. However, MAX still seems to detect it as a USB device under Devices and Interfaces.
Trusted Enthusiast
Albert.Geven
Posts: 3,371
0 Kudos

Re: error 1073807302 with a USB device

Dlete the device in max and eventually in the windows device manager.
The original software will take over

greetings from the Netherlands
Member
RAK-W
Posts: 8
0 Kudos

Re: error 1073807302 with a USB device

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.

Should I completely remove VISA itself?