VSaveImage Statement
Applies To
Sequence
Description
Saves the current frame grabber image on a disk file.
Usage
VSaveImage Sequence, fileName[, saveGraphics]
- Sequence
- Name of a sequence or string variable containing a sequence name.
- fileName
- Path and file name. The file extension must be BMP(Default format), TIF, or JPG.
- saveGraphics
- Optional. Specify whether to save the image detection result with the graphics included.
Remarks
VSaveImage can be used to save an image to a disk file at run time. This is particularly useful for analyzing images where parts were not found.
The image that is saved is the currently displayed image. The RuntimeFreeze property should be set to "True" for the sequence that you are saving the image from.
When you are using Compact Vision, USB memory plugged into the CV unit can be specified in filename. as "CVUSB:\path\filename"
.
When saveGraphics is "True", the image and sequence result graphics will be saved (Default: False).
However, there is a possibility that the sequence processing cannot be completed immediately after VRun is executed against the sequence in which AsyncMode Property is set to "True". The image and the result graphics are saved surely if waiting for the completion of the sequence processing by calling VGet and VSaveImage is called.
Example
VRun seq1
VGet seq1.AllFound, found
If found = False Then
VSaveImage seq1, "c:\badimages\seq1.bmp"
EndIf
See Also
ImageFile Property, SaveImage Property