| MIL 10 User Guide
| Customize Help

Using MIL with GenICam



See also
Availability
Available in MIL-Lite

Available in MIL
Next

MIL supports the use of GenICam's standard naming feature convention (SFNC) when dealing with GigE Vision, CoaXPress (CXP), USB3 Vision, and Camera Link cameras (the latter requires third-party software). GenICam's SFNC is an industry standard designed to provide a common software interface for machine vision cameras, and is administered by the European Machine Vision Association (EMVA). For more information on GenICam's SFNC, refer to the GenICam website at: http://www.genicam.org. For more information regarding which boards can connect to the above-mentioned cameras, refer to the MIL Hardware-specific Notes.

Note that when dealing with Camera Link cameras, you must first install, identify, and enable the CLProtocol for your camera; to so do, refer to the Using GenICam with Camera Link cameras subsection of this section.

Basic concepts when dealing with GenICam's SFNC

The following terms are common when dealing with GenICam's SFNC.

  • Camera's device description file (XML). An XML file on your camera that contains data used to identify the camera's features (such as, the feature name, type, and value). A copy of this XML file is also stored on your computer. The local camera description file and the information in the camera are synchronized both through specifying a periodical update period and when the camera's features are inquired or written.

  • Extension features. Additional features that are part of the camera's device description file, and are not currently part of the GenICam SFNC specification.

  • Feature. A specific property of the camera that can be controlled and/or inquired (such as, the pixel depth) through the camera's device description file. Features are subdivided into several different types, such as a category type (a group of features), command type (an action), or data type (such as strings, booleans, and doubles). Note that while data type features have a value that can be inquired, category type features and command type features do not.

  • GenApi. The application interface used to control the camera through its device description file.

Steps to view your GenICam SFNC-compatible camera's features

MIL provides several ways to access your GenICam SFNC-compatible camera's features. When dealing with an existing MIL program, or an application written to work regardless of the camera and frame-grabber combination, use the traditional MIL control and inquire types (for example, those in MdigControl() and MdigInquire()) that are listed as supported for your MIL system. When dealing with a new application written only for acquisition with GenICam SFNC-compatible cameras, use MdigControlFeature() and MdigInquireFeature(). In most cases, however, a combination of the traditional and GenICam SFNC-specific is probably best.

MIL constants in the Mdig...() module, which are only supported on one or more GenICam SFNC-compatible products, typically start with M_GC.... In other cases, where a GenICam SFNC concept could easily be converted to an existing MIL concept, the traditional MIL constant is used instead (for example, when dealing with timers and exposures).

Your application can parse through the camera's device description file (XML) and return a list of all the features starting from the highest level feature of the XML structure (the root) or from a specified feature name (provided the specified feature name is a category containing additional features). Most cameras support the majority of the features defined in the GenICam SFNC. Some cameras have additional features (GenICam SFNC-extension features) and can lack other features (such as, limiting the number of timers or counters). To accumulate a complete list of the GenICam SFNC features available on your camera, inquire the list of features, by performing the following:

  • Count the number of features in the camera's device description file at the highest-level feature of the XML structure (using MdigInquireFeature() with MIL_TEXT("Root") and M_SUBFEATURE_COUNT).

  • For each feature, inquire the feature's name (using M_SUBFEATURE_NAME + n), and feature type (using M_SUBFEATURE_TYPE + n). If the feature type is not a category or a command, inquire the feature's value (using M_FEATURE_VALUE). Print the result to the screen.

  • Optionally, inquire additional attributes of each subfeature, using MIL_TEXT("FeatureName").

    Note that features that are commands and categories do not have a feature value (that is, M_FEATURE_VALUE); all other attributes of the feature can be inquired (for example, its description, size, tooltip, and type).

  • Repeat this process for each category found, replacing Root with the name of the category.

The following example lists the available features, starting from the root.

Other ways to view the GenICam SFNC-compatible camera's features include:

  • Opening the limited version of Matrox Intellicam's Feature Browser, using MdigControl() with M_GC_FEATURE_BROWSER.

  • Opening Matrox Intellicam's Feature Browser. In Matrox Intellicam, select your camera from the drop-down list of available cameras, and then click on the Feature Browser button.

Using GenICam with Camera Link cameras

MIL supports using the GenICam CLProtocol to allow you to communicate with your Camera Link camera using the GenICam SFNC standard. The GenICam CLProtocol is only available if you first install the required third-party vendor-supplied, standard complaint, GenICam CLProtocol library. Then, in your MIL application, you must select the GenICam CLProtocol library and identify your Camera Link camera (by its manufacturer, family, model, version, and/or serial number); to do so, use MdigControl() with M_GC_CLPROTOCOL_DEVICE_ID. Once these are identified, you must enable the CLProtocol module using MdigControl() with M_GC_CLPROTOCOL. You can then use any of the GenICam interfaces to configure and inquire your camera's settings; that is, you can use MdigControlFeature() and MdigInquireFeature(), as well as MIL constants in MdigControl() and MdigInquire() that typically start with M_GC... and that are marked as being supported for your board. You can also use the limited version of Matrox Intellicam's Feature Browser, as described in the previous section.

An alternative method to using MIL to select the GenICam CLProtocol library is to select the Boards Camera-Link item in the tree structure of the MILConfig utility, and then select the Enable GenICam for Camera Link (CLProtocol) option from the presented pane. A list of Camera Link libraries and their associated camera identifier(s) are presented. Once the Camera Link camera identifier is selected, a similar list will appear when you open Matrox Intellicam, allowing you to select a different identifier.

Note that, using the CLProtocol will occupy one COM port.

The following example enumerates the available Camera Link camera identifiers from the third-party GenICam CLProtocol libraries installed on your computer, and provides some additional information relating to each Camera Link camera identifier to help you select the right one. In addition, it initializes GenICam SFNC values and opens a Feature Browser, populating it with values. It also inquires the camera's name and model (using MdigInquireFeature()) and prints this information to screen.