ImageBuffer Property
Applies To
Vision Sequence
Description
Specifies which image buffer to use for a sequence.
Usage
VGet Sequence.ImageBuffer, var
VSet Sequence.ImageBuffer, value
- Sequence
- Name of a sequence or string variable containing a sequence name.
- var
- Integer variable that will contain the value of the property.
- value
- Integer value or expression for the new value of the property.
Values
Integer value from 0 to 10.
Default: 0
Remarks
When a sequence takes a picture or searches for objects, it uses the image buffer specified with the ImageBuffer property. When ImageBuffer is 0, the camera image buffer is used. ImageBuffer 1 - 10 are global image buffers that are shared between all sequences in the project. Using shared image buffers, you can acquire an image with the one sequence and search the image acquired by that sequence with other sequences. When you are only using the image that has already been acquired by another sequence, you must set the sequence RuntimeAcquire property to None, and set the ImageBuffer property as needed.
Example
In the following example, the robot is moved to five camera positions and a picture is taken at each position into an image buffer. Then, the acquired image is searched by another sequence.
Function FindParts
Integer i
' Move the camera to 5 positions and grab an image into 5 buffers
For i = 1 to 5
Go P(100 + i)
VSet TakePicture.ImageBuffer, i
VRun TakePicture
Next i
' Signal to other tasks that we are done with the robot
MemOn ScanFinished
' Search for a part in each image
' The SearchPart sequence RuntimeAcquire property is set to None
For i = 1 to 5
VSet SearchPart.ImageBuffer, i
VRun SearchPart
VGet SearchPart.Blob01.Found, g_PartFound(i)
Next i
Fend