Skip to content

Other Tasks (microDisplay X)#

Setting User Preferences#

You can set parameters in microDisplay X that affect the following:

  • GUI display of microDisplay X (display of applet and dec/hex/bin display of parameter values)
  • Acquisition parameters (number of buffers, acquisition time out, max. DMA buffer size)
  • Behavior of camera detection and camera control

To set your preferences for working with microDisplay X:

  1. In microDisplay X, from the Tools menu, select Settings.
  2. In the dialog that opens, adapt the settings you want to change:

    • Display of applets: Click GUI, and under Applet Layout / View Mode, decide about the way the applet is displayed in the applet layout pane of the program window. Select if you want get the resources (ports) of an applet listed by process (Process Mode) or by resource type (Resource Mode):
      • In process mode, the resources (ports) belonging to one process (one acquisition channel) are listed as an entity Acquisition Process in the applet layout pane.
      • In resource mode, under DMAs, all active DMA ports (of applets loaded in microDisplay X) are listed. Under Camera Ports, all cameras connected to the involved frame grabbers are listed.
    • Default integer display mode: For the display of parameter and pixel values in the program window, you have the options decimal, hexadecimal, and binary available.
    • Acquisition parameters: To set the acquisition parameters, click Acquisition and define your preferences:

      Acquisition Parameters

    • Discovery settings: To set the discovery parameters, click Discovery and define your preferences:

      Discovery Parameters

Saving Applet Configuration#

After you have configured your applet (in microDisplay X or via Framegrabber API), you can save your configuration.

Saving the applet configuration allows you to load the applet (on the frame grabber, in microDisplay X and/or in your software) next time with all parameters already set.

Info

Make sure you work with the same Framegrabber SDK version for saving the applet configuration and for using it. For example, if you configure your applet and save this configuration using the Framegrabber SDK version 5.9.0, you should load the configuration only in a version 5.9.0 environment.

Info

Some third-party interfaces to the frame grabber API actually require an MCF file for frame grabber initialization. These are:

  • Cognex VisionPro (version 2 and 3)
  • Halcon (offered by MVTec)
  • any third party software using the GenTL interface (like Common Vision Blox (CVB) by Stemmer).

The following sections provide all information you need for working with MCF files.

MCF and MFS Files#

MCF Files#

When you save your applet configuration, the configuration data are saved to file. The configuration file has the file extension *.mcf. (MCF = microEnable Configuration File)

The MCF file is saved in text format, so that you can change the settings of individual parameters not only via microDisplay X or API, but also directly in this file.

Example of an MCF File

The MCF file contains:

  • The name of the applet it belongs to.
  • All parameter settings you have made (only exception: field values).
  • If required, a link to an MFS file (which contains the field values you have defined during applet configuration).

Camera Configuration in Separate XML File

MCF files don't contain the camera configuration. You can save the camera configuration in a separate *.xml file. The MCF file only contains the applet configuration.

MFS Files#

The configuration of an applet may contain field parameters, for example, LUTs. These field parameters aren't directly stored in the MCF file, but in a separate file with file extension *.mfs. (MFS = microEnable Field Storage)

You never need to handle the MFS file directly:

  • If your applet configuration contains field parameters, the MFS file is created automatically, together with the MCF file, while you save the applet configuration.
  • When loading an applet configuration, it is enough to load the MCF file, as the contents of the MFS file (field parameters) will be loaded automatically together with the MCF file.

Info

For each frame grabber model, a set of applets is available for free. These applets are called Standard Acquisition Applets. All Standard Acquisition Applets have the file extension *.dll. Standard Acquisition Applets come in applet sets (one set per frame grabber model). Applet sets can be installed together with the Framegrabber SDK or via an individual applet set installer (available on the Basler website's download section. After installation, standard qcquisition applets are located in the Framegrabber SDK installation directory, sub-directory Dll. (Example: C:\Program Files\Basler\FramegrabberSDK5.x.x\Dll.) Standard Acquisition Applets run on programmable and non-programmable frame grabbers (i.e. A Series and V Series Frame Grabbers).

All Standard Acquisition Applets contain field parameters. Thus, each time you save the configuration of a Standard Acquisition Applet, two files are created, the *.mcf file and the *.mfs file. However, you don't need to handle the *.mfs file separately, as it is always automatically created/loaded when you save/load the *.mfs file.

The following arrays (field parameters) are part of all or some Standard Acquisition Applets:

  • LUTs
  • KneeLUTs
  • PoCXPStatePort_x (marathon CXP boards only)
  • PoCXPCurrentPort_x (marathon CXP boards only)
  • PoCXPVoltagePort_x (marathon CXP boards only)

Info

Saving all field data into a separate file keeps the applet configuration file MCF clear and allows for downward compatibility.

Saving and Loading in mDisplay X#

Saving the Applet Configuration to File in microDisplay X#

In microDisplay X, you can save the configuration of the currently loaded applet to file.

  1. From menu File, select Save Configuration.

    MicroDisplay X: Save Configuration

  2. Select the directory where you want to store the applet configuration file (*.mcf).

  3. Give a name to your *.mcf file.
  4. Click Save.

The *.mcf file is created and stored in the directory you have specified in step two. If the applet configuration contains field values, an additional *.mfs file is created that contains all field parameter values of the applet configuration. The MFS file is created automatically if the applet contains field parameters.

Loading the Applet Configuration from File in microDisplay X#

  1. In microDisplay X, select the frame grabber you want to use the configured applet on.

    MicroDisplay X: Select frame Grabber

  2. From menu File, select Open Configuration.

    MicroDisplay X: Open Configuration

  3. In the dialog that opens, navigate to the directory that contains your applet configuration.

  4. Select the *.mcf file you want to use and click Open.

The configured applet is loaded in microDisplay X and is activated on the frame grabber. If the applet configuration contains field parameters, the field values are loaded from the according *.mfs file automatically. You don't need to load the *.mfs file separately.

Saving and Loading via Framegrabber API#

Saving the Applet Configuration to File via Framegrabber API#

For saving applet configuration files, the following function is available in the Framegrabber API (library fglib5.lib, header file basler_fg.h):

int Fg_saveConfig (Fg_Struct *Fg, const char *Filename)

Parameters:

  • Fg: Frame grabber (board index) in your system. Specify here the frame grabber from which you want to save the active configuration (active applet and its parametrization).
  • Filename : Specify here the name of and the path to the configuration file. File extension is always *.mcf.

If the applet configuration contains field values, an additional *.mfs file is created that contains all field parameter values of the applet configuration. The MFS file is created automatically if the applet contains field parameters.

Loading the Applet Configuration from File via Framegrabber API#

For loading an applet configuration from file, various functions are available (library fglib5.lib, header file basler_fg.h):

Frame Grabber Initialization#

You can initialize a board directly via an *.mcf file. As the MCF file contains the applet name, the frame grabber is initialized with the applet specified in the MCF file, and the applet configuration (parametrization) stored in the *.mcf file is already set on the frame grabber.

If your applet configuration contains field parameters and an according *.mfs file is stored in the same directory as the *.mcf file, the field parameters are loaded automatically when you call this function.

Fg_Struct* Fg_InitConfig (const char * Config_Name, unsigned int BoardIndex)

Parameters:

  • Config_Name: Specify here the name of and the path to the configuration file. File extension is always *.mcf.
  • BoardIndex: Specify here (via its board index) the frame grabber which you want to initialize with the *.mcf file. After calling Fg_InitConfig, the frame grabber is initialized with the applet named in the *.mcf file and the applet configuration specified in the same file.
Loading Applet Configuration#

You can also load the configuration of an applet after you have already initialized a frame grabber with the applet.

Prerequisites for using this function:

  • The frame grabber has already been initialized via function FG_Init or as a master with FG_InitEx.
  • The applet configuration stored in the *.mcf file applies to the applet the frame grabber has been initialized with. (In case of doubt, have a look into the *.mcf file. The applet name is mentioned in the first lines of the *.mcf file.)

If your applet configuration contains field parameters, and an according *.mfs file is stored in the same directory as the *.mcf file, the field parameters are loaded automatically when you call this function.

Function for loading the applet configuration after frame grabber initialization:

int Fg_loadConfig (Fg_Struct *Fg, const char *Filename)

Parameters:

  • Fg: Specify here the frame grabber (via board index) which you want to parametrize with the applet configuration contained in the *.mcf file.
  • Filename: Specify here the name of and the path to the configuration file. File extension is always *.mcf.

Info

Don't forget to release frame grabber resources after using the frame grabber via function

int Fg_FreeGrabber (Fg_Struct *Fg)

This function also frees frame buffer that has been allocated for this frame grabber earlier via Fg_AllocMem().