Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

imaqExtractFromRing - "Not an image" fatal runtime error

Hi.
I integrated the ring acquisition into my program. I made and initialized all the variables as in the NI ring example, but something is wrong.

 

Image    *currentImage;           // global

int            imageToExtract;       // global

int            imageExtracted=0;   // local

Sid ok,

 

 err5.JPG

 

currentImage =  imaqExtractFromRing (Sid, f.imageToExtract, &imageExtracted);

 

At this line the program cracks with the Fatal error:

Function imaqExtractFromRing (errorCode = -1074396120 [0xbff60428]). Not an image

 



A have checked all the variables just before execution of this line, and it seems to be all right. After a week still haven´t got any idea what can be wrong.
0 Kudos
Message 1 of 6
(4,223 Views)
What is the buffer name you have used?
0 Kudos
Message 2 of 6
(4,220 Views)

 

 status = imaqSetupRing (Sid,                                  images,               bufferCount,      skipCount,      IMAQ_NO_RECT);

[int          imaqSetupRing (SESSION_ID sessionID, Image** images, int numImages, int skipCount, Rect rect); ]

 

unsigned short int    bufferCount;              //global

Image  *images[NUM_RING_BUFFERS];   //global      <-   this one

0 Kudos
Message 3 of 6
(4,213 Views)
Maybe the problem is that I`m using imgGrabSetup (Sid, TRUE); and ImaqBuffer = NULL; instead of imaqStartAcquisition (Sid); but my basic funcionality is based on img session. If it would be it, I have no idea how to solve it.
0 Kudos
Message 4 of 6
(4,191 Views)
0 Kudos
Message 5 of 6
(4,144 Views)
Thank You for the reply. I have read the article and any tip that I might take from it is: always create 8bit image buffers allocated with IMAQ Create when you want to extract some info from your picture, what I`m doing.  It`s not that.
0 Kudos
Message 6 of 6
(4,140 Views)