09-07-2007 06:05 PM
09-10-2007 03:59 AM
Hi Carolax,
the first step for comunicate with your usb device is get the operating system to recognize the interrupt pipe USB device and use the VISA Driver Development Wizard to attach VISA to the device as a driver. Take a look at this
http://digital.ni.com/public.nsf/allkb/E3A2C4FE42D7ED0D86256DB7005C65C9?OpenDocument
Once you have configured the device correctly, the USB RAW appears in NI Measurement & Automation Explorer (MAX).
Then you can look at USB RAW- interrupt.vi example in LabView Example Finder. (You can find it under Hardware Input Output > VISA)
I hope this helps.
Clara
09-20-2007 08:28 AM
09-20-2007 08:44 AM
Hi,
you can typically use the VISA Driver Development Wizard to create an INF file so that Windows can detect your USB RAW device and use the NI-VISA driver to communicate with it. If you want to access an HID Compliant device is by making calls directly to the hid.dll library provided in Windows this KnowledgeBase should provide a good starting point to solve your problem:
http://digital.ni.com/public.nsf/allkb/8FD4C1DC8E80637E862572EF00784338?OpenDocument
Please note the following: you should have hid.dll in Windows XP too. Mine is located in C:\WINDOWS\system32 (hid.dll is not supported by National Instruments you should ask Microsoft for issues specific to the use of this dll.)
If you are new to dll calls in labview you can find the proper manual here. It's a very good resource when dealing with external code in labview.
http://digital.ni.com/manuals.nsf/websearch/8D930295FFBF9F7686256D2C00624728
Clara
09-20-2007 07:45 PM
09-20-2007 08:32 PM
09-21-2007 07:25 PM
09-13-2008 05:48 AM
Hi all,
I get the error 0xBFFF003E using USB raw with a microcontroler from Freescale. In fact, I can ask for the USB descriptors fine, however if I press the command to read them constantly (say 10x very quickly), I receive this error.
And the error goes to the point of needing to deleting the driver and reinstalling the whole thing again (inf file), so that VISA can recognize it again (in fact, in the system folder it remains there with the exclamation sign).
Is it maybe a configuration from the firmware and somehow it freezes if I request it many times? I don't think there would be a problem in the pipe0 in terms of bandwidth... 🙂
Does anyone have any idea?
Thx!
09-15-2008 02:08 AM
Hi echarry,
Have you already looked at these two threads
VISA viClear on USB-Device sometimes returns 0xBFFF003E
http://forums.ni.com/ni/board/message?board.id=140&message.id=20991&requireLogin=False
VISA: (Hex 0xBFFF003E) Could not perform operation because of I/O error
http://forums.ni.com/ni/board/message?board.id=140&message.id=19430&requireLogin=False
Seems they already dealt with similar issues.
Have a good day
09-15-2008 07:10 PM
HI Jon,
Thanks for the reply!
No I haven't, but it didn't seem to help me out here. I'll keep trying.
Btw, to I need to set a buffer size for a USB raw communication? Or even flush my buffer before reading? I thought this was only necessary for RS232 comms.
Question is: why I can read the descriptors from my device using pipe 0 and by reading my other pipe's status I get this error? Maybe the device is in another state. I don't know..
Any ideas?
Thanks!