Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

visa driver wrong endpoint descriptors

Hello,

 

I am trying to communicate with a custom-made HID device with LabVIEW using the NI-VISA Driver Wizard. The device can be used with the standard windows driver with C#, but now I will use it with LabVIEW.

 

The device has the following endpoint descriptors:

 

Endpoint Descriptor 81 1 In, Interrupt, 1 ms
OffsetFieldSizeValueDescription
0 bLength 1 07h  
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 81h 1 In
3 bmAttributes 1 03h Interrupt
  1..0: Transfer Type   ......11  Interrupt
  7..2: Reserved   000000..   
4 wMaxPacketSize 2 0040h 64 bytes
6 bInterval 1 01h 1 ms
Endpoint Descriptor 01 1 Out, Interrupt, 1 ms
OffsetFieldSizeValueDescription
0 bLength 1 07h  
1 bDescriptorType 1 05h Endpoint
2 bEndpointAddress 1 01h 1 Out
3 bmAttributes 1 03h Interrupt
  1..0: Transfer Type   ......11  Interrupt
  7..2: Reserved   000000..   
4 wMaxPacketSize 2 0040h 64 bytes
6 bInterval 1 01h 1 ms

 

 

There are two endpoint descriptors for communication in Interrupt mode. But after creating a driver with the Driver Wizard this driver doesn't have these two endpoints. Instead it recognizes the descriptor with 0x1 as Bulk In Pipe and the Descriptor 0x81 as Interrupt In Pipe (a screenshot is attached, because the values cannot be copied).

 

A communication with the LabVIEW examples which uses the Interrupt In Pipe does work, but everything else failed because of the wrong out endpoint.

 

Is there any way to correct the descriptors?

 

 

Thanks,

Chris

 

0 Kudos
Message 1 of 5
(4,633 Views)

Wouldn't the easier approach be to make the same calls in LabVIEW as in C#?

In other words, understand how it is done in C# and try to replicate it in LabVIEW instead of going through this Driver wizard?

0 Kudos
Message 2 of 5
(4,620 Views)
A HID device/driver is completely different than a VISA RAW driver. If you used HID before, why are you changing it?
0 Kudos
Message 3 of 5
(4,610 Views)

Hello,

 

I thought it would be much easier to communicate with the device from LabVIEW with such a driver. Are there any good examples to communicate with HID devices with the standard Microsoft dll?

 

I was searching a lot but I didn't find any good material...

 

Regards,

Chris

0 Kudos
Message 4 of 5
(4,596 Views)

@cschwarz wrote:

Hello,

 

I thought it would be much easier to communicate with the device from LabVIEW with such a driver. Are there any good examples to communicate with HID devices with the standard Microsoft dll?

 

I was searching a lot but I didn't find any good material...

 

Regards,

Chris


You mentioned C# in a previous post. Look at that example.

 

 

0 Kudos
Message 5 of 5
(4,582 Views)