This topic contains the following sections.
You can control most of VisionPro's behavior at runtime; some aspects can be configured only at initialization time. The VisionPro.ini file controls these options. The default settings are appropriate for most applications, but there may be situations when you need to change them.
You can find VisionPro.ini in the Windows or WINNT directory of your root system drive. VisionPro.ini is a text file, and you can use any text editor to edit it. However, it is a good idea to make a copy of this file as a backup in case you want to revert to the initial settings.
VisionPro.ini is divided into several sections:
- Acquisition settings
- Frame grabber settings
- Display settings
- Language settings
- Scripting settings
You will need to restart a running application for changes to take effect. If you make changes to VisionPro.ini be sure that you include your version of it in any applications you deploy.
VisionPro.ini is commented extensively and lists the legal options. This topic provides more detail about the kinds of changes you can make in the VisionPro.ini initialization file.
Note: The VisionPro installer will overwrite an existing VisionPro.ini file. However, to help you preserve changes, the installer performs some additional steps. If VisionPro.ini already exists when you install VisionPro, the installer renames the existing file to include the current time: VisionPro.ini.mm-dd-yyyy.hh.mm.ss. When you uninstall VisionPro, the uninstaller renames VisionPro.ini the same way instead of deleting it. It is always a good idea to preserve a backup copy of the original VisionPro.ini file as well as your customized version. If you are creating a deployment installation for VisionPro, keep in mind that your installation must update the VisionPro.inifile to include any non-default settings required by your application.
By default VisionPro allocates 16 MB as the acquisition image pool for all frame grabbers of the same type.
To change the amount of memory allocated for image acquisition, modify the following setting to a value that it appropriate for your application. This value is the number of bytes. You can use the suffixes K for kilobytes and MB for megabytes.
[CogFrameGrabber] AcquisitionPoolSize = 16MB
Note: This setting is comparable to setting the size of the pelroot pool in CVL.
Note: This setting does not apply to GigE Vision cameras.
Note: The MVS-8600 and MVS-8600e have an additional image pool setting, which you can set using the CogAcqHardwareImagePool class.
There are three ways to configure frame grabber settings:
- Using jumpers on the hardware
- Using the VisionPro.ini file
- Using a combination of jumpers on the hardware and the VisionPro.ini file
The MVS-8500L frame grabber is available in three I/O configurations: standard (TTL only), external (Opto-isolated only), and split (a combination of TTL and Opto-isolated). The setting in VisionPro.ini must match your hardware configuration or you will not be able to use the I/O lines.
You can set IOConfig to one of : Standard, External (the default), or Split.
[CogFrameGrabber8500L #0] IOConfig = External [CogFrameGrabber8500L #1] IOConfig = External
If you have more than two MVS-8500L frame grabbers installed, you will need additional entries.
The MVS-8501 frame grabber is available in three I/O configurations: standard (TTL only), external (Opto-isolated only), and split (a combination of TTL and Opto-isolated). The setting in VisionPro.ini must match your hardware configuration or you will not be able to use the I/O lines.
You can set IOConfig to one of : Standard, External (the default), or Split.
[CogFrameGrabber8501 #0] IOConfig = External [CogFrameGrabber8501 #1] IOConfig = External
If you have more than two MVS-8501 frame grabbers installed, you will need additional entries.
The MVS-8504 frame grabber is available in three I/O configurations: standard (TTL only), external (Opto-isolated only), and split (a combination of TTL and Opto-isolated). The setting in VisionPro.ini must match your hardware configuration or you will not be able to use the I/O lines.
You can set IOConfig to one of : Standard, External (the default), or Split.
[CogFrameGrabber8504 #0] IOConfig = External [CogFrameGrabber8504 #1] IOConfig = External
If you have more than two MVS-8504 frame grabbers installed, you will need additional entries.
The MVS-8600 supports different combinations of trigger, strobe, and encoder pinouts, depending on the currently loaded software I/O configuration. You specify the settings in the VisionPro.INI file.
You can set IOConfig to one of : LVDS (the default), TTL, or DualLVDS.
Each I/O configuration corresponds to a different cable that you use to connect the MVS-8600 to the I/O connection module. Refer to the table below and to your MVS-8600 Hardware Manual for additional information. The Configration numbers in the table below refer to the configurations listed in the section entitled Loadable Software I/O Configurations of your hardware manual.
| IOConfig setting | Configuration | Cable |
| LVDS | 1 | 300-0539 |
| TTL | 2 | 300-0540 |
| DualLVDS | 3 | 300-0538 |
The following is the default configuration.
[CogFrameGrabber8600 #0] IOConfig = LVDS [CogFrameGrabber8600 #1] IOConfig = LVDS
This section is used to configure alpha-blending capabilties on video cards, as well as configuring size of interactive graphic handles, primarily for use on touch screens.
Some video cards misrepresent their alpha-blending capabilities, which may result in display problems. If you are having display problems, you may want to change the AlphaBlend setting.
You can set AlphaBlend either to AutoDetect or to Software (the default) to let VisionPro do the blending.
[CogDisplay] AlphaBlend = Software DefaultGraphicHandleSize = 8
The AutoDetect setting results in faster display, but certain graphics (such as masks) may not display correctly with some video cards. The Software setting ensures that the display is always correct, but it may be slower.
The DefaultGraphicHandleSize setting controls the default size of all interactive graphic handles for all VisionPro applications, on a given system. This allows you to set handle sizes in your application without writing any code or adding this setting to your VPP files. The default size is 8 pixels (and cannot be set to any value smaller than 8), and is set as an integer value (if a decimal value is used, such as 15.9, the decimal part will be ignored, becoming 15, instead). Hex formatting (e.g. 0x010) may also be used to set the size. There is not a maximum size, however, if a very large number is applied, it may be unusable in the application due to the limited display sizes of most touch screens.
This section specifies the font mapping of CogDictionary, which enables localized controls to switch fonts based on the currently-selected language. Each section is specified with its 3-letter language identifier. If VisionPro.ini does not contain a section for the current language, VisionPro uses the English (ENU) settings. These are the settings you can change:
| Setting | Type | Description |
| DefaultFont | string | The default font name |
| DefaultCharset | integer | The default character set number (0-255) |
| GraphicLabelFont | string | Font for graphic labels |
| GraphicLabelCharset | integer | Character set for graphic labels |
| InputFont | string | Font for user input |
| InputCharset | integer | Character set for user input |
| NonProportionalFont | string | Font for non-proportional text |
| NonProportionalCharset | integer | Character set for non-proportional text |
These are the default settings:
; English [CogDictionary ENU] DefaultCharset = 0 DefaultFont = "MS Sans Serif" NonProportionalFont = "Courier New" ; Japanese [CogDictionary JPN] DefaultCharset = 128 DefaultFont = "MS PMincho" NonProportionalFont = "MS Mincho"
The [CogScript] section contains three parameters to control how scripts are loaded and executed:
[CogScript] Reuse = True Disable = False SerializationInitOrder = Standard
In VisionPro releases before 6.0, each time a script was loaded or reloaded it was recompiled and a new .NET assembly created. Since .NET assemblies are never unloaded, an application that repeatedly reloaded a script could exhaust system memory. Since VisionPro 6.0, if the same script has already been loaded then the existing assembly is used to create the new script object. To prevent this reuse, set Reuse to False. The default value for Reuse is True.
To prevent scripts from being compiled automatically when the .VPP file that contains them is loaded, set the Disable property to True. This will prevent a scripting error from causing .VPP file loading to fail. The default value for Disable is False.
In VisionPro releases before 8.0, loading a .VPP file calls the script Initialize method before the containing CogToolGroup, CogToolBlock or CogJob is fully de-serialized. This causes errors if the Initialize method accesses members of the ToolGroup, ToolBlock or Job. This issue was fixed in VisionPro 5.0 for ToolGroups and ToolBlocks, and in VisionPro 8.0 for Jobs. The fix, however, causes VisionPro to call the Initialize method on the various scripts in a different relative order. To force VisionPro to use an older serialization order, set the SerializationInitOrder property to Legacy0 for pre-VisionPro 5.0 behavior, or Legacy1 for pre-VisionPro 8.0 behavior. Be aware that Cognex does not recommend relying on the relative initialization order of VisionPro scripts. The default value for SerializationInitOrder is Standard.