Matrox Imaging Library (MIL) 10 Update 93
Release Notes (Mcom)
August, 2020
(c) Copyright Matrox Electronic Systems Ltd.,
1992-2020.
This document outlines what is new with the MIL Industrial Communication (Mcom) module and explains the current limitations and particularities when using MIL for industrial communication.
It also presents last-minute information that did not make it into the manual or on-line help. Note that this help file serves to complement your manual. The information found in this file supersedes your formally documented material.
Contents
2. PROFINET-specific information
3. Using MILConfig to create and enable Industrial Protocol instances
4. Using a PLC with the MIL examples
5. Migrating from MIL 10 with Update 50
6. Using MIL’s CC-Link IE Field Basic protocol
7. McomHookFunction for PROFINET
8. MIL 10 Industrial Communication release history
The MIL Industrial Communication module supports the CCLink-IE Field Basic, EtherNet/IP™, Modbus® and PROFINET protocols as well as a protocol to communicate with robot controllers from ABB, DENSO, EPSON, FANUC, KUKA, and Stäubli.
Note that the MIL API to McomRead and McomWrite does not support the use of reference to a std::vector<MIL_UINT8> for the UserArrayPtr parameter.
The PROFINET protocol in the Industrial Communication module only supports Matrox hardware that incorporates the PROFINET engine (ex. Matrox 4Sight EV6, Matrox 4Sight GPm, Matrox Indio, or Matrox Iris GTR). Enabling an instance of the PROFINET service activates the associated PROFINET engine.
The PROFINET engine is only available on the LAN2-labelled port for the Matrox 4Sight EV6 and Matrox 4Sight GPm (Ivy Bridge) and the LAN-labelled port for the Matrox 4Sight GPm (Bay Trail). For Matrox Indio and Matrox Iris GTR, the PROFINET engine is available on the lone Gigabit Ethernet port.
The PROFINET engine supports a minimum I/O cycle time of 1 msec. The network connection associated with the PROFINET engine communication can be shared with other Ethernet traffic.
When activated, the PROFINET interface is able to act as a second Ethernet communication device with its own MAC and IP settings; these settings are distinct from those of the main Ethernet communication interface available to the operating system. Note, the second Ethernet communication device is not accessible by the operating system. The two Ethernet communication channels can be represented as follows:
Assigning a static IP address
To configure the PLC to recognize your runtime platform as a slave device when using the PROFINET industrial communication protocol, you must use the Siemens Totally Integrated Automation (TIA) Portal software to assign the runtime platform's PROFINET interface a static IP address that is compatible with the automation network.
The general purpose NIC interface must also have a static IP address (set up using normal operating system settings); otherwise, the Auto-IP or DHCP modes might lead to the connection failing when the general purpose NIC interface attempts to discover a DHCP server or renegotiate its IP address. Note, the installation of the Intel network driver for the general purpose NIC interface is highly recommended for obtaining the highest performance of the PROFINET engine's execution.
Both the PROFINET interface and the general purpose NIC interface must be on the same subnet to run the Siemens TIA Portal software. The IP addresses of both interfaces must be unique on your network; otherwise, they will interfere with each other. To verify that there is no conflict, access the Communication page in the MILConfig utility and click on the PROFINET page. If there is a conflict, change either the general purpose NIC's IP address in the operating system settings, or change the PROFINET interface's IP address using the Siemens TIA portal software.
You should not enable the PROFINET service on a computer that has both the Siemens TIA Portal software and Matrox Design Assistant installed; this can cause network adapter addressing conflicts.
Configuring the PLC
After assigning the IP address, load the provided GSD file (located in Program Files\Matrox Imaging\Config\Profinet), add the runtime platform as a device in your PROFINET network, specify the address of the fields, and if required, change the size of the input/output modules; acceptable sizes range between 16 and 256 bytes.
Turning off the LLDP protocol for hardware assisted PROFINET ports
The PROFINET certification process requires the disabling of the Microsoft Link Layer Discovery Protocol (LLDP) on the device being tested to ensure all validation is successful. Subsequently, it is highly recommend to disable the LLDP protocol service on your system containing the Matrox hardware that incorporates the PROFINET engine. For example, if using a Matrox 4Sight system, the Microsoft LLDP can be disabled as follows:
· Open your system control panel
· Select Network and Internet settings.
· Select Network and Sharing Center.
· Select Change Adapter Settings from left vertical pane.
· Select the Ethernet Adapter that is providing the hardware assistant PROFINET port.
· Right click and select Properties.
· From the new Ethernet Properties dialog, select the Microsoft LLDP Protocol Driver.
· Uncheck the associated checkbox of the Microsoft LLDP Protocol Driver.
· This LLDP protocol disable is required only on ports using hardware assisted PROFINET.
· If the hardware assisted PROFINET in MILConfig is not associated to any PROFINET protocol instance, there is no need to disable the LLDP protocol of the hardware assisted PROFINET port.
The MIL Industrial Communication module (the Mcom API) supports multiple instances of the same protocol on different Ethernet interfaces. These protocol instances are created from the Communication section in the MILConfig utility. The Communication section has a dedicated page for each protocol. To create a new instance, select the appropriate protocol, click the Add button, and fill the dialog box with the values required for the chosen protocol.
Each new protocol instance must be given a name that is unique with respect to all other instances. Each Ethernet interface can have one and only one instance of a particular protocol type.
PROFINET
The MILConfig Communication PROFINET page will only be enabled if the system offers the corresponding hardware engine. The PROFINET input and output module sizes must match those in the PLC project that will be linked to the PROFINET instance. The hardware engine associated with the PROFINET instance will report its device name, its MAC address, and its IP address when available. The reported PROFINET device name field will be empty up to the moment that the Siemens TIA Portal application will set the device name. Note, the device name reported in MILConfig can be slightly different when non alphanumeric characters are used in the device name definition under the Siemens TIA Portal application. The PROFINET IP address will report ‘Set by PLC’ whenever the IP address is supplied directly by the PLC controlling the PROFINET instance. Otherwise, the IP address will be reported whenever it is assigned statically by the Siemens TIA Portal application.
EtherNet/IP
The EtherNet/IP producer, consumer, and configuration sizes must match those in the PLC project that will be linked to the EtherNet/IP instance.
Modbus
The Modbus type, mode, and ID are assigned when adding a slave instance. The Modbus type, mode, and associated slave list are assigned when adding a master instance.
CC-Link
The CC-Link number of stations is assigned when adding an instance.
Examples are provided to demonstrate the use of MIL’s Industrial Communication module. These examples implement communication with an automation controller (that is, a PLC). A PLC needs to be programmed in a specific way in order for these MIL examples to run properly. The following section explains how to program a PLC using ladder logic to work with the relevant MIL examples.
PLC ladder logic for the MIL examples
1. The ladder logic initially generates a trigger pulse with a duration of 1 second.
2. When the trigger pulse is generated, the ladder logic sets the trigger bit, and resets the ready ACK-bit on the slave device.
3. When the ladder logic receives the trigger ACK-bit from the slave device, it resets the trigger bit.
4. Finally, when the ladder logic receives the ready bit from the slave device, it moves the result from the input to the output, and it sets the ready ACK-bit.
The following table summarizes the sequence produced by the ladder logic (PLC) and MIL examples.
Output (Set by the PLC) |
T1 |
T2 |
T3 |
T4 |
T5 |
T6 |
Trigger (1bit) |
1 |
1 |
0 |
0 |
0 |
0 |
Ready ACK (1bit) |
0 |
0 |
0 |
0 |
1 |
1 |
Result copy (8bits) |
0 |
0 |
0 |
0 |
22 |
22 |
Input (Set by MIL example) |
|
|
|
|
|
|
Trigger ACK (1bit) |
0 |
1 |
1 |
0 |
0 |
0 |
Ready (1bit) |
0 |
0 |
0 |
1 |
1 |
0 |
Result (8bit) |
0 |
0 |
0 |
22 |
22 |
22 |
An automatic migration process should be considered when both of these conditions are met on the target system for installation of this MIL 10 Update:
- The target system includes the MIL Industrial Communication (Mcom) module.
- The target system includes MIL 10 Update 50 (Mcom) or older.
The migration process is applicable when one of these newer Mcom MIL 10 Updates will be installed on the target system:
- MIL 10 Update 68.
- MIL 10 Update 93.
Protocol instances created and enabled under a MIL 10 installation with MIL 10 Update 50 and older will be maintained with the newer Mcom MIL 10 Update installation. Such protocol instances will be assigned a unique name. For example, below are PROFINET, Modbus, and EtherNet/IP Instances set up with MIL 10 Update 50.
After the installation of the newer Mcom MIL 10 Update, these protocol instances appear as shown below.
Note, to complete a PROFINET migration, you must select the ProfinetDefault instance and click on the Modify button to allow for the interface name change to occur.
PROFINET-specific considerations
The generic GDSML file supplied with Mcom MIL 10 Update 50 and older has been replaced by hardware-specific ones, starting with newer Mcom MIL 10 Updates. There are now GSDML files for the Matrox 4Sight GPm, Matrox Indio, and Matrox Iris GTR. Support for PROFINET on the Matrox 4Sight EV6 is added using a specific GSDML file included with MIL 10 Update 93 (Mcom).
A PLC project will need to be altered to use the new Matrox device-specific GSDML file. For example, when using a Matrox Iris GTR, you must use GSDML-V2.34-Matrox Electronic Systems LTD-IrisGTR-20190524.xml.
Note, slot 1 and 2 sizes must be the same for the module inserted in the slot and the value set in MILConfig. For example, if a 128 byte module is inserted into slot 1 and a 16 byte module is inserted into slot 2, the values 128 and 16 must be selected for the Input module (slot 1) and Output module (slot 2), respectively, in MILConfig's Communication PROFINET page.
EtherNet/IP-specific considerations
The EDS file for EtherNet/IP was changed from Mcom MIL 10 Update 50 and older starting with newer Mcom MIL 10 Updates. This was done to use a different device type. You need to change your PLC project to use the new EDS file.
The CC-Link IE Field Basic protocol implemented in the MIL Industrial Communication module allows a MIL application to exchange data with a CC-Link IE Field Basic MASTER device. The MIL application and executing system are understood to be a CC-Link IE Field Basic SLAVE device. The data exchange supported between a MIL application and MASTER device using CC-Link IE Field Basic is illustrated below.
The McomAlloc function is used to allocate a CC-Link IE Field Basic communication context. Note, the connection to the MASTER device is attempted as soon as the context is allocated. As such, the protocol service must have been enabled and configured in MILConfig prior to allocating the context.
The McomInquire function is used to inquire the number of occupied stations in the CC-Link protocol instance as specified in the MILConfig Communication CC-Link page. M_COM_CCLINK_TOTAL_OCCUPIED_STATION is the inquire type. The return value is a MIL_INT from 1 to 16.
The McomWrite function writes data to a MASTER device. The function actually writes to local computer memory with the data sent to the MASTER device during its next read cycle. Below is a description of the supported function parameter values for CC-Link communication.
DataObjectEntryName - Specifies the location in which to write the data
M_COM_CCLINK_INPUT_REGISTER
Specifies to write CC-Link 16bits input register data in local memory
The function's Offset parameter is an offset in 16-bits
The Offset must be between 0 and 32 * [Number of occupied stations (max=16)]
The function's Size parameter must be set to 2
M_COM_CCLINK_INPUT_FLAG
Specifies to write CC-Link 1bit input flag data in local memory
The function's Offset parameter is an offset in bits
The Offset must be between 0 and 64 * [Number of occupied stations (max=16)]
The function's Size parameter must be set to 1
M_COM_CCLINK_RAW
Specifies to write CC-Link sequence of values for input data in local memory
The function's Offset parameter must be between one of:
M_COM_CCLINK_INPUT_REGISTERS_MEMORY_BANK
Start writing at location 0
Use sequence of 8bits values
The function's Size parameter maximum is 64 bytes * [Number of occupied stations (max=16)]
M_COM_CCLINK_INPUT_FLAGS_MEMORY_BANK
Start writing at location 0
Use sequence of 8bits values
The function's Size parameter maximum is 8 bytes * [Number of occupied stations (max=16)]
Offset - Specifies the offset from which to start writing the
data
Specifies the offset from which to start writing the data in the specified data table.
For CC-Link register-type data tables M_COM_CCLINK_INPUT_REGISTER, specify the offset in 16-bit words.
For CC-Link bit-type data table M_COM_CCLINK_INPUT_FLAG, specify the offset in bits.
For CC-Link RAW mode, M_COM_CCLINK_INPUT_REGISTERS_MEMORY_BANK and M_COM_CCLINK_INPUT_FLAGS_MEMORY_BANK selects the whole memory region and starts writing at 0.
Size - Specifies the size of the data to be written
Specifies the amount of
the data to write in bytes.
However for a CC-Link bit-type data table M_COM_CCLINK_INPUT_FLAG,
specify the size in bits.
UserArrayPtr - Specifies the address of the array containing the
data
The McomRead function can be used to read data from a MASTER device. The function actually reads from local computer memory data received from the MASTER device during its last write cycle. Below is a description of the supported function parameter values for CC-Link communication.
DataObjectEntryName - Specifies the location in which to read the data
M_COM_CCLINK_OUTPUT_REGISTER
Specifies to read CC-Link 16bits output register data in local memory
The function's Offset parameter is an offset in 16-bits
The Offset must be between 0 and 32 * [Number of occupied stations (max=16)]
The function's Size parameter must be set to 2
M_COM_CCLINK_OUTPUT_FLAG
Specifies to read CC-Link 1bit output flag data in local memory
The function's Offset parameter is an offset in bits
The Offset must be between 0 and 64 * [Number of occupied stations (max=16)]
The function's Size parameter must be set to 1
M_COM_CCLINK_RAW
Specifies to read CC-Link sequence of values for input or output data in local memory
The function's Offset parameter must be between one of:
M_COM_CCLINK_INPUT_REGISTERS_MEMORY_BANK
Start reading at location 0
Use sequence of 8bits values
The function's Size parameter maximum is 64 bytes * [Number of occupied stations (max=16)]
M_COM_CCLINK_INPUT_FLAGS_MEMORY_BANK
Start reading at location 0
Use sequence of 8bits values
The function's Size parameter maximum is 8 bytes * [Number of occupied stations (max=16)]
M_COM_CCLINK_OUTPUT_REGISTERS_MEMORY_BANK
Start reading at location 0
Use sequence of 8bits values
The function's Size parameter maximum is 64 bytes * [Number of occupied stations (max=16)]
M_COM_CCLINK_OUTPUT_FLAGS_MEMORY_BANK
Start reading at location 0
Use sequence of 8bits values
The function's Size parameter maximum is 8 bytes * [Number of occupied stations (max=16)]
Offset - Specifies the offset from which to start reading the data
Specifies the offset from which to start reading
the data in the specified data table.
For CC-Link register-type data tables M_COM_CCLINK_OUTPUT_REGISTER, specify the offset in 16-bit words.
For CC-Link bit-type data table M_COM_CCLINK_OUTPUT_FLAG, specify the offset in bits.
For CC-Link RAW mode, M_COM_CCLINK_INPUT_REGISTERS_MEMORY_BANK, M_COM_CCLINK_INPUT_FLAGS_MEMORY_BANK, M_COM_CCLINK_OUTPUT_REGISTERS_MEMORY_BANK and M_COM_CCLINK_OUTPUT_FLAGS_MEMORY_BANK selects the whole memory region and starts reading at 0.
Size - Specifies the size of the data to read
Specifies the amount of the data to read in bytes.
However for a CC-Link bit-type data table M_COM_CCLINK_OUTPUT_FLAG, specify the size in bits.
UserArrayPtr - Specifies the address of the array in which to write the data
CSP files are provided in order to describe the SLAVE device. The files are located in Program Files\Matrox Imaging\MIL\Config\Cclink folder. There is a CSP file for the Matrox 4Sight EV6, Matrox 4Sight GPm, and Matrox Iris GTR.
A MIL example showing how to communicate using CC-Link is available in the Users\Public\Documents\Matrox Imaging\MIL\Examples\IndustrialCommunication\PLC\CC-Link IE Field Basic folder.
The new McomHookFunction function minimizes the execution load of a MIL application that is waiting for a particular signal from the PLC master device using the PROFINET protocol. It allows a MIL application to be signaled when a change in the input data occurs.
void McomHookFunction(ComId, HookType, HookHandlerPtr, UserDataPtr)
The HookType parameter is set to
M_COM_DATA_CHANGE + M_HOOK – This is to add a hook function
on data change
M_COM_DATA_CHANGE + M_UNHOOK – This is to remove a hook function on
data change
The HookHandlerPtr is set to the function being called on data change. It has to be of type MIL_COM_HOOK_FUNCTION_PTR.
The UserDataPtr points to user data to be passed to the hook function when it is called. This allows the programmer to attach data to a specific event and retrieve it when the event occurs. It can be set to M_NULL if not used.
The hook handler will be defined as
MIL_INT MFTYPE HookHandler(MIL_INT HookType, MIL_ID EventId, void *UserDataPtr)
During a call to the hook handler function, the McomGetHookInfo can be used to retrieve more information on the reason of the signal.
MIL_INT McomGetHookInfo(EventId, InfoType, UserVarPtr)
The InfoType parameter can be set to
M_COM_PROFINET_SLOT_CHANGED_COUNT – It will return a MIL_INT64 value that will determine the number of slots that are detected as being changed.
M_COM_PROFINET_SLOT_CHANGED_LIST – It will return a MIL_INT array to describe the list of slots that were detected as being changed.
Note that MIL Update 93 (U93) is a cumulative update, including all content from MIL Update 68 (U68), Update 50 (U50), Update 38 (U38), and Update 23 (U23).
MIL 10 Update 23
· Contains support for FANUC, DENSO, KUKA and EPSON robots protocol.
· Added support for ABB robots protocol.
MIL 10 Update 38
· Added support for EtherNet/IP, Modbus and PROFINET (including hardware-assisted on 4Sight-GPm) communication protocols.
· Added support for communication protocol with ABB, DENSO, EPSON, FANUC, KUKA and Stäubli robot controllers.
MIL 10 Update 50
· Added support for hardware-assisted PROFINET communication on the Matrox Indio and Matrox Iris GTR.
· Fixed bugs.
MIL 10 Update 68
· Removed support for software-based PROFINET.
· Added support for CC-Link IE Field Basic.
· Added ability to create multiple protocol instances.
· Modified MILConfig to handle multiple protocol instances.
· Replaced generic PROFINET GSDML file with ones specific to Matrox 4SightGPm, Matrox Indio, and Matrox Iris GTR.
· Updated EtherNet/IP EDS file.
· Added function to hook on input data change for PROFINET.
· Fixed bugs.
MIL 10 Update 93
· Added Profinet support for Matrox 4Sight EV6.
· Added CCLink support for Matrox 4Sight EV6.