Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

imgGrab() and imgSnap() API Changes?

I noticed in the documentation for the IMAQ 1408 that the imgSnap and imgGrab functions are defined as follows:

rval = imgSnap(SESSION_ID sid, void* bufAddr)
rval = imgGrab(SESSION_ID sid, void* bufAddr, uInt32 syncOnVB)

I have an existing VC++ 6.0 application that has been working nicely with this interface.

Now that we've upgraded to the IMAQ 1409, I see these two functions are now defined as:

rval = imgSnap(SESSION_ID sid, void** bufAddr)
rval = imgGrab(SESSION_ID sid, void** bufAddr, uInt32 syncOnVB)

Note that in each the bufAddr is now a pointer to a pointer rather than a pointer.

Now I'll admit I'm new to this, but why did the API change? This change has broken all my existing code that was using these function
s (granted it's only a few lines to change but..) Am I missing something here? Usually published API's don't change, they're added to, this change broke code.

-Paul
0 Kudos
Message 1 of 4
(3,728 Views)
Paul,

What are the different versions of the IMAQ driver are you using? In IMAQ 2.6.0 both the 1408 and 1409 use rval = imgSnap(SESSION_ID sid, void** bufAddr) Could you tell me what older version of the driver you are using so I could look into the calls on it?

A Talley
0 Kudos
Message 2 of 4
(3,728 Views)
Hi Austin - I might as well just comment here rather than follow up on the private email support thread of the same question.

Basically if you are saying that we can use the 2.6.0 IMAQ software with BOTH 1408 and 1409 cards, then I have no issue. The older (2.5.something.. I don't have it on-hand) version was definitely defined as:

rval = imgSnap(SESSION_ID sid, void* bufAddr)

and it's now changed to a pointer-to-a-pointer.. causing some mild-headaches in my code, but knowing that I can upgrade my code and not worry about compiling at 1408 specific version of my app makes my happy.

thanks
-Paul
0 Kudos
Message 3 of 4
(3,728 Views)
Paul,

Yes, you can use both the 1408 and the 1409 with IMAQ 2.6.0. They are both supported under the current version of the driver.

A. Talley
0 Kudos
Message 4 of 4
(3,728 Views)