Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting camera's ROI on the fly

Eric,

Thanks for your reply and help.  I've attached two files: the "Basler_GigE_Version_2_0.xml" one resided in the XML folder, while the other one came from the XML\PreProcessedCache folder.  I'm not sure which one is being used.

When you tested your prototype with the Basler Scout, did you do it my modifying the property nodes?  Can you attach your example?  Two milliseconds is excellent!

Thanks again,
Lcarlson
0 Kudos
Message 11 of 15
(1,832 Views)
Hi Lcarlson,
 
Attached is a modified copy of the Basler_GigE_Version_2_0.xml file (the one in the PreProcessedCache can be left alone). With this file I have added two new attributes, OffsetXUnlocked and OffsetYUnlocked. If you replace your existing file and close/reopen MAX you should see that the AOI controls in the attribute tree now show those new features and they remain writable while the acquisition is in progress (its still fairly slow to move the slider in MAX, but that's because MAX has lots of overhead refreshing the entire tree). You can modify those attributes using the property node in LabVIEW just like any other features. I don't have my prototype still around, but it should be trivial to make one if you've used any IMAQdx camera attributes under LabVIEW previously. Please let me know if you have trouble with this.
 
Hope this helps,
Eric
0 Kudos
Message 12 of 15
(1,825 Views)
Eric,

Yes, the new XML file does work - thanks for the modifications.  It allows the X and Y offsets to be writable in MAX while capturing.  However, I have a problem implementing the LV code.  The NI-IMAQdx property node does not have these new attributes included in the selections.  In fact, there is not an "AOI attributes" list, where the OffsetsX,Y (unlocked) should be.  There ARE OffsetX,Y under the "acquisition attributes" tab, but I don't think these are the unlocked ones as there is no speed improvement and it does not allow modification while capturing.

How is the NI-IMAQdx property node constructed?  Does it just contain general camera properties or can it be customized?  Or are OffsetX,Y the unlocked attributes in disguise?

Thanks again,
Lcarlson
0 Kudos
Message 13 of 15
(1,800 Views)
Hi Lcarlson,
 
The property node is not able to be dynamic in LabVIEW, so any custom attributes like the ones I added will not show up directly there. To access them you have to use the propety node to set the ActiveAttribute property to the attribute to manipulate, then use the value properties to Get/Set the value, range properties to retrieve the ranges, etc. You'll want to set the ActiveAttribute to "OffsetXUnlocked" and then wire the new value to the "ValueU32" property.
 
The NI-IMAQdx concepts help file (in C:\Program Files\National Instruments\NI-IMAQdx\Docs) gives a good explanation of how to use attributes. If you use the example finder we have an example in LabVIEW that uses attributes as well.
 
-Eric
0 Kudos
Message 14 of 15
(1,794 Views)
Eric,

Thanks for the insight into the ActiveAttributes.  I did this and was able to move the AOI in 3ms.

Thanks for all your help,
Lcarlson
0 Kudos
Message 15 of 15
(1,771 Views)