LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA USB(RAW) interrupt endpoints data

My device has 2 IN interrupt endpoints, of which default sets to 1. How should I do it to listen to both simultaneously? Do I need to open a different session for each one?
And in the other hand I've not come by writting in OUT interrupt endpoint. What function do I need to use??
Image Hosted by ImageShack.us
0 Kudos
Message 1 of 5
(3,318 Views)
If a single device has 2 interrupt IN endpoints, you will need 2 VISA sessions if you need to listen to them simultaneously. If you only need one or the other, you can just change the interrupt IN endpoint number attribute on the fly.

Interrupt OUT? That's an abomination that we don't support. There is no advantage to interrupt OUT over using a bulk OUT or control pipe instead.

Dan Mondrik
National Instruments
0 Kudos
Message 2 of 5
(3,318 Views)
So I need OUT pipes to be bulk or control... Thank you for your answer.
I'd like to ask you another question on this subject. One of the interrupt IN endpoints only sends data when it receives the call of an infrared receiver that it has connected to. Using the function
viWaitOnEvent (just as with the other IN interrupt) always gives me
timeout error. The fact that it does't transfer data
periodically is a problem?. Exists any other method to read an interrupt IN endpoint data that is not by events?
Thanks again.
Image Hosted by ImageShack.us
0 Kudos
Message 3 of 5
(3,318 Views)
Since you are writing a C program, you may want to consider using callbacks (viInstallHandler and then viEnableEvent) rather than queueing (viEnableEvent and then viWaitOnEvent). Your callback will be invoked whenever an interrupt IN packet is received.

This is still using VISA events, it's just that VISA supports two event models for different types of applications.

Dan Mondrik
National Instruments
0 Kudos
Message 4 of 5
(3,318 Views)
Using viIntallHandler I get a general protection run-time error: Unknown source position, thread id 0x00.... I read somewhere it's due to a driver fault, how can I solve it?
Image Hosted by ImageShack.us
0 Kudos
Message 5 of 5
(3,318 Views)