Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change ROI after imgSessionConfigure

Here's an interesting behavior I noted with IMAQ v3.1.3:

1) Open an interface and session
2) Use CreateBufList and CreateBuffer to make a simple, 1 element buffer list
3) Attach the buffer list to the session using imgSessionConfigure()
4) Now, attempt to change the IMG_ATTR_ROI or IMG_ATTR_ACQWINDOW using imgSetAttribute or even imgSessionSetROI

There are no errors generated from this process, but if you perform a subsequent imgGetAttribute for ROI or ACQWINDOW, you will find that they did not change from the original values. It appears as if calling imgSessionConfigure() locks the ROI/ACQWINDOW.

My question is thus: how do you go about "unlocking" the ROI and ACQWINDOW? Must I close and re-open a new session?

(BTW, in the 'LLgrab.c' example they use a function "imgMemLock()" that I was not able to find in the documentation. Perhaps
imgSessionConfigure() calls similar functions, and maybe there is another undocumented function that would provide the corresponding "unlock" function?)

Thanks.
--
[System info: NI-1429e running in 'Base' CL-mode plugged into an x4 PCI-e slot on a Dell PowerEdge 1800, dual 3.2Ghz Xenon, 6GB RAM, Windows 2003 Server SP1, LV8.0/7.1, IMAQ v3.5, Dell CERC SATA RAID controller card with 4x250GB Seagate HDD, one Seagate 250GB HDD connected to system's primary SATA port for OS.]
0 Kudos
Message 1 of 2
(3,135 Views)
A little bit of personal testing seemed to indicate that a call to imgMemUnlock(BUFFLIST_ID bid) did the trick. I was able to re-configure the ROI/ACQ_WINDOW attributes after unlocking the memory that was locked by imgSessionConfigure().
--
[System info: NI-1429e running in 'Base' CL-mode plugged into an x4 PCI-e slot on a Dell PowerEdge 1800, dual 3.2Ghz Xenon, 6GB RAM, Windows 2003 Server SP1, LV8.0/7.1, IMAQ v3.5, Dell CERC SATA RAID controller card with 4x250GB Seagate HDD, one Seagate 250GB HDD connected to system's primary SATA port for OS.]
0 Kudos
Message 2 of 2
(3,106 Views)