LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to monitor input data from USB?

I would like to poll the USB receive buffer without blocking the cpu.  Using viRead() blocks the CPU.  Seems like there should be a straight-forward way of doing this.
 
An even nicer solution would be to install a callback function for when data is received from the USB. 
 
There are to Labview examples on ni.com for using the USB interrupt handler, but nothing for Labwindows/CVI.  Besides,  I don't think my device supports USB interrupts (at least when I connect to it, the interrupt pipes are set to -1). 
 
I am using Labwindows/CVI 7.0 and Ni-Visa 3.2
 
Thanks.
0 Kudos
Message 1 of 2
(3,336 Views)
My understanding is that NI-VISA doesn't support internal monitor function in itself.
 
If you are using Tektronix USB connectable indtruments such as DPO4000 etc. then Tektronix VISA
named TekVISA is a substitution and it supports CALL MONITOR feature logging all input and putput
stream with saving capability and getting timestamp data.
 
I think both Tektronix VISA and NI-VISA are developed based on VXI standard specifications and have
a compatibility from the viewpoint of fundamental functions such as viOepn, viClose, viRead and viWrite
and so forth.
 
Hope this helpful to your work.
 
If your issue is not relevant to my understanding then I apologize.
 
Best regards,
obaq
0 Kudos
Message 2 of 2
(3,315 Views)