07-13-2012 08:06 AM
Hi all,
I meet some having difficulty in achieving a small application labview.
My goal is to display a graph of values received by a USB device.
I followed the example of the link:
http://www.ni.com/white-paper/4478/en
I have designed the driver with the program : VISA.
I remade the example of the tutorial. It detects my device.
I designed the system to respond to commands.
For example, I need to send a character to my embedded system to starts its acquisition.
Unfortunately, I can not retrieve the message back to my system.
I get the following message was an error:
VISA Read dans TEST_USB_HID.vi
with the code :
-1073807302
I also tested several examples's forum, but I have not found an simple example enough to start.
I just want to write and read data.
Sorry if the question already been asked.
thank you very much 🙂
07-19-2012 04:57 AM
Hello GGelec,
Can you give some more information about the USB-device you're using?
Is it conform to the USB Test and Measurement Class protocol?
Can you also share some of the code you have written?
If I understand you correctly, then you succeed in detecting and identifying (with *IDN?) the USB-device in LabVIEW?
07-19-2012 05:29 AM
hi ThiCop ,
thanks for reply to my topic. (what a surprise i come from belgium too 🙂 )
I designed myself the USB system.
This is a PIC18F processor with USB interface.
I manage to communicate with my generic HID device throught a HID terminal.
But I can not communicate with my device with labview.
I have to use VISA to create a driver for my system right ?
The VI i create from the links in the prévious post starts well, I manage to see my system in a list.
But I can not send or receive data.
My device has a 64 byte buffer for read / write.
I would like to simply return data to labview to display a graph and send some commands with 1 byte size.
Thank you in advance for your help.
cordially.
07-20-2012 05:26 AM
Hello GGelec,
HID devices are a bit a special case. By default, Microsoft Windows installs a Microsoft signed driver for any HID Compliant device on your machine, which you couldn't overwrite by the VISA Driver Development Wizard generated INF file.
Were you able to follow all steps described in the tutorial above. (including the installation of the inf-file?)
More information about an alternative (not officially supported) approach can be found over here:
http://digital.ni.com/public.nsf/allkb/8FD4C1DC8E80637E862572EF00784338
Can you try this and let me know if it resolves your issue?
07-20-2012 05:36 AM
hi ThiCop,
I realized throughout the entire installation (with installation .inf automatically perform by the VISA prgm).
Apparently it is necessary to use VISA to exploit the USB system in labview.
but I've never used a DLL in labview.
Maybe he is an example on the forum ?
I think I'm on the right way. Create a driver with VISA and then operate the system with labview.
There is no mystery I think. 😕
But then we must use hid.dll.
thanks
07-20-2012 06:31 AM
Hello Mr. GGelec,
Have you completely read the document above?
According to this document it's not possible to overwrite the default Windows HID driver with the VISA driver in Windows Vista.
I'm afraid that this might also be the case on Windows 7.
In that case you will not be able to use a VISA driver.
Instead you will have to use the Windows HID driver.
This can be done by calling the Windows DLL.
Please take a look at the links at the bottom of the webpage from (http://digital.ni.com/public.nsf/allkb/8FD4C1DC8E80637E862572EF00784338) my previous post .
This in combination with the following guide should allow you to access the HID device:
http://digital.ni.com/public.nsf/allkb/8FD4C1DC8E80637E862572EF00784338
In this case you will not use any VISA function.
08-17-2012 02:42 AM
Hello,
I haven't heard back from you in a while..
Were you able to resolved the issue with the steps above?