LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB HID/VISA Eo embedded system

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 🙂

0 Kudos
Message 1 of 7
(3,539 Views)

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?

 

 

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 2 of 7
(3,518 Views)

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.

0 Kudos
Message 3 of 7
(3,513 Views)

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?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 4 of 7
(3,502 Views)

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

0 Kudos
Message 5 of 7
(3,498 Views)

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.

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 6 of 7
(3,494 Views)

Hello,

 

I haven't heard back from you in a while..

Were you able to resolved the issue with the steps above?

Kind Regards,
Thierry C - CLA, CTA - Senior R&D Engineer (Former Support Engineer) - National Instruments
If someone helped you, let them know. Mark as solved and/or give a kudo. 😉
0 Kudos
Message 7 of 7
(3,471 Views)