LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

problem debug

Hello

im new on labwindows traying to excute this code but i have problem debuging i dont now why , help pleas thks

code :

#include "niimaq.h"
#include "nivision.h"
main ()
 {
 //declare variables
 INTERFACE_ID iid;
 SESSION_ID sid;
 Int8* ImaqBuffer=NULL; //NI-IMAQ image
 Image* myImage = NULL; //IMAQ Vision image
 //Initialize interface and session
 imgInterfaceOpen ("img0", &iid);
 imgSessionOpen (iid, &sid);
imgSnap (sid, (void **)&ImaqBuffer); //NI-IMAQ function
myImage = imaqSnap (sid, myImage, IMAQ_NO_RECT); //IMAQ Vision function
 }

 

 

0 Kudos
Message 1 of 4
(2,798 Views)

Hello, 

 

Img0 should correspond to the camera name defined in NI MAX such as show in the image from this link 

http://digital.ni.com/public.nsf/allkb/CCC5BB5990AA416786256C23006E687C

Make sure that is the correct name, and try using some CVI examples first to be sure the error is not comming from your code

Paolo_P
Certified TestStand Architect
Certified LabVIEW Architect
National Instruments France

Message 2 of 4
(2,768 Views)

Hello

thanks for help i know why i have this problem becaus i dont use an NI camera im using just a webcam devices its why i have this error

thaks

0 Kudos
Message 3 of 4
(2,766 Views)

It can work as well with a Webcam, it just need to be DirectShow compliant and use IMAQdx as main driver for your webcam

more details:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P6COSA0

 

Paolo_P
Certified TestStand Architect
Certified LabVIEW Architect
National Instruments France

0 Kudos
Message 4 of 4
(2,760 Views)