| Customize Help

Using Matrox GenTL Consumer driver with MIL

To use your Matrox GenTL Consumer driver with MIL, you must install at least one third-party GenTL library (GenTL Producer). The MIL GenTL Consumer driver connects with this third-party GenTL library to allow you to configure and acquire images from your camera (or other devices).

You can allocate a MIL GenTL system using MsysAlloc() with M_SYSTEM_GENTL. Set SystemNum to M_DEVn + M_GENTL_PRODUCER(m), where n is the system number, and m is the GenTL library index.

You can allocate more than one MIL GenTL system in a process (executable), as long as each MIL GenTL system in your process uses a unique GenTL library. To allocate several MIL GenTL systems, each must be associated with a different GenTL library and each must have a unique SystemNum. Note that, if the GenICam GenTL Library is of a mixed type, it can be used multiple times; the mixed type supports multiple transport layer technologies, and can be used once per transportation layer technology (for example, a mixed type library could support both a proprietary Ethernet (non-GigE Vision) camera and a proprietary USB (non-USB3 Vision) camera and therefore that GenICam GenTL mixed library could be allocated twice). Otherwise, a GenTL library can only be used once per MIL application.

When allocating a MIL GenTL system, you can also set the InitFlag to the type of transport layer interface to use (such as, mixed or Camera Link). If you do not specify a transport layer interface, all transport layer interfaces are used.

Allocating a GenTL system opens general communication with all connected third-party devices of the specified type. You can then allocate a digitizer for each camera using MdigAlloc().

To determine the number of GenTL libraries, use MappInquire() with M_GENTL_PRODUCER_COUNT or use the General Default Values page of the MILConfig utility.

The Matrox GenTL Consumer driver's features are defined in 3 different categories, each associating to one or more GenTL-compliant device description files (XML).


Inquire using

Control using

GenTL XML file(s)

System and interface



GenTL system configuration information and GenTL interface configuration information.




GenTL device configuration information, GenTL remote device configuration information, and GenTL stream configuration information.

Buffer (optional)



GenTL buffer configuration information

To learn the list of GenICam GenTL standard features available, refer to GenICam's standard feature naming convention (SFNC), available on the GenICam website at: http://www.genicam.org. Additional GenICam GenTL SFNC-extension features might be available; check your camera's manual and Matrox Feature Browser for details. In addition, the standard features specified in the GenICam SFNC also work with the MIL Digitizer module. This standard is also available from the GenICam website, mentioned previously.

Matrox Feature Browser can access all of the GenICam GenTL-compliant device description files (XML), providing an interface to view and change the camera, digitizer, buffer, and system information.

Matrox GenTL Consumer driver information in the MIL Reference can be found in the paragraphs and values marked as being supported by the Matrox GenTL driver. Refer to the Matrox GenTL driver release notes for any additions/modifications to this chapter.

MIL buffer handling with the Matrox GenTL Consumer driver

The GenICam GenTL standard specifies that a buffer must be announced before it can be used to receive a grabbed image. To overcome this requirement, the Matrox GenTL driver automatically announces ten internal buffer to the Matrox GenTL Consumer driver, when any digitizer is allocated (using MdigAlloc()). This allows you to use MdigGrab() or MdigGrabContinuous() to capture frames. These functions use internal buffers to buffer the incoming data before it is copied to the specified MIL buffer. These functions still require you to allocate and specify a MIL buffer. Note that, when using MdigProcess(), each buffer queued is automatically announced by MIL.

Alternatively, before calling MdigGrab() or MdigGrabContinuous(), you can manually announce an allocated MIL buffer using MdigControl() with M_GENTL_ANNOUNCE_BUFFER. When you are finished with the buffer, revoke it using MdigControl() with M_GENTL_REVOKE_BUFFER before freeing it. Note that if using M_GENTL_ANNOUNCE_BUFFER, MIL will not use its internal buffers.