LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with some instructions for using USB

Hello everybody I have a problem, i am making a  program using LabWindiws 7.1 for a USB control (ty and rx mainly), i have made some tests asking for some details about my usb raw, and it is ok, but for certain commands for example for the attributes VI_ATTR_USB_NUMPIPES,VI_ATTR_USB_BULK_IN, VI_ATTR_USB_BUL_OUT y got the next error when i compile the program
 
undeclared identifier VI_ATTR_USB_NUMPIPES
 
I don not why, i declared the visa library since the begining (#include <visa.h>   ), i have read this .h file and almost at the end has some instructions that seems to be only available when you declarate NIVISA_USB or something like that because has the next restriction : #if defined(NIVISA_USB)    so how can i include this part of the library, or how i need to declared it...?
 
Thanks
0 Kudos
Message 1 of 3
(3,196 Views)
You have to #define  NIVISA_USB
Either with  :
 
#define NIVISA_USB
#include <visa.h>
 
in your source code
or
add \DNIVISA_USB
to the compiler defines field in the Build Options dialog of your workspace
Message 2 of 3
(3,187 Views)
Thanks for the helpfull tip, now everything it's ok. Bye
0 Kudos
Message 3 of 3
(3,176 Views)