07-14-2014 04:17 AM
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:
Offset | Field | Size | Value | Description |
---|---|---|---|---|
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 |
Offset | Field | Size | Value | Description |
---|---|---|---|---|
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
07-14-2014 08:20 AM
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?
07-14-2014 10:35 AM
07-15-2014 12:21 AM
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
07-15-2014 07:29 AM
@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.