Company and product overview

Technology Blog

Stepper Motor Sizing: Load to rotor inertia matching

A 1:1 load-to-rotor inertia is the snappiest performer when compared to the other ratios. It has the best move times and the ringing at the end of the move is minimal.

Read the latest blog post...





MDrive Ethernet

  • Introduction
  • Protocol Comparison
  • MCode/TCP
  • EtherNet/IP


MDrive EthernetEthernet is a frame based, standardized networking system used for Local Area Networks. The ease of connectivity and use, reliability and minimal signal degradation over long distance has made it an ideal networking standard for a number of industrial protocols.

A major benefit of using Ethernet in motion control systems is the standardized IP addressing system, which allows for up to 255 devices on a network, while eliminating the complicated wiring and software configuration of traditional multi-drop systems using RS-422/485.

Ethernet overview

  • Developed in 1970 by Xerox Corporation.
  • Standardized into IEEE 802.3 in 1983.
  • If you are on a network, there is a 90% chance it is Ethernet.
  • If you are installing a new network, there is a 98% chance it is Ethernet.

Key advantages

  • Standard RJ45 connector and CAT5/6 cabling.
  • Isolated communication.
  • Minimal signal degradation over long distance.
  • Designed for networking.
  • All error checking handled by the system (no check-summing)


The new MDrive Motion Control Ethernet products support three control methods in a two packages:

  1. MCode/TCP — Schneider Electric Motion USA's proprietary programming language for MDrive Motion Control products, adapted to utilize TCP/IP message formatting. MCode/TCP is standard on both EtherNet/IP and MODBUS/TCP Mdrive products.
  2. EtherNet/IP — A standard industrial protocol allowing interface with other devices commonly supporting this protocol. Devices include PLCs, PACs and host HMIs by manufacturers such as Rockwell Automation, Schneider Electric and Omron. EtherNet/IP is used in 30% of industrial networks.
  3. MODBUS/TCP — A standard open industrial convention supported by a variety of machine components such as programmable controllers, drives and controls, I/O modules and switches. MODBUS/TCP is utilized in 22% of industrial networks.

Comparison: MCode/TCP. EtherNet/IP and MODBUS/TCP

The three control methods operate differently and are accessed separately: Note that EtherNet/IP and MODBUS/TCP are available as separate devices. Both have MCode/TCP availability on port 503.

  • MCode/TCP — example
  • EtherNet/IP example (port number assigned by controller software).
  • MODBUS/TCP — example





Networking model

Programmable node

Server (client-server network)

Server (client-server network)

Port number


Assigned by controller software.


Command format

1 and 2 char. mnemonics

Standard CIP object model

6 standard function codes,
2 manufacturer specific function codes




No, but may execute MCode/TCP programs in operation immediate

Communication modes

Streaming commands and program modes

Streaming commands only

Streaming commands only


Simple 1 and 2 character mnemonics

Standard objects and attributes

Complex hexadecimal addressing and parameter formatting

Compatibility with programs from RS-422/485 MDrive products

Compatible with non-party mode programs



Recommended use

Use in systems where multiple devices using the same protocol aren’t required

Use in systems unified by the EtherNet/IP industrial protocol

Use in systems unified by the MODBUS protocol

Table 1: MCode/TCP. EtherNet/IP and MODBUS/TCP compared

MCode/TCP (Port 503)

MCode is the programming and control language utilized by MDrive Motion Control products developed to communicate over RS-422/485. MCode/TCP is MCode communicating over TCP/IP. The language consists of an extensive command set made up of 1 and 2 character mnemonics.

When connected to ip.address:503 the MDrive with Ethernet will automatically be in MCode/TCP mode. In this mode the device is fully programmable and will operate identically to the RS-422/485 products, with the exception that multidrop communication is accomplished using individual IP addresses instead of party-mode names. Global commands are sent using the UDP protocol to address

The key advantages of MCode/TCP:

  • Ease of connection using commonly available RJ45 connectors and CAT5/6 cabling.
  • Elimination of complicated party mode communication wiring and configuration.
  • Higher speed, less error prone than RS-422/485.
  • Ethernet has collision detection to prevent lost data errors.


EtherNet/IP™ was introduced by Rockwell Automation in 2001. Over the last 9 years it has grown into the most widely used industrial Ethernet solution for factory automation. EtherNet/IP provides a complete set of services and messages for applications such as:

  • Control
  • Safety
  • Synchronization
  • Motion
  • Data exchange


  • Common interoperability with  Rockwell/Allen-Bradley control systems.
  • Ready availability of devices (I/O  modules, controllers, drives, gateways etc;)
  • Use of off-the-shelf Ethernet  hardware such as routers, switches, cabling)
  • Ease of system integration using  the CIP (Common Industrial Protocol)
  • EtherNet/IP™ is a standard. The  group managing EIP, the Open  DeviceNet Vendors Association (ODVA) ensures a  consistent, comprehensive standard that applies to all EtherNet/IP™ vendors and products.

Basic functional overview

EtherNet/IP™, like other CIP networks, follows the Open Systems Interconnection (OSI) model. The OSI model defines a standardized framework for implementing networking. A typical EtherNet/IP™ network is shown in Figure 1.

Figure 1: Typical Ethernet/IP™ network


EtherNet/IP™ uses two types of message connections, Explicit and Implicit.

  1. Explicit  connections enable request-response transactions between two  nodes which are general purpose in in nature. Explicit connections  use TCP/IP services to transfer messages across Ethernet. Explicit messages are asynchronous and are sent as needed.
  2. Implicit (I/O data) connections facilitate the movement of application specific messages at regular intervals.  Implicit connections usually use a one-to-many relationship to make full use of multicast messaging over UDP/IP. Implicit messages must be configured to define the data transferred.

Device classes

EtherNet/IP™ uses three device classes to define the function of the device based upon network communications capability. These classes are defined as: Message Class, Adapter Class and Scanner Class.

  1. Message  Class devices support explicit messages that are sent or  received by all other classes of devices. While they may be the target or originator of explicit message requests, the cannot send  or receive real-time I/O data. Message Class devices include:
    1. PC  interface cards used to up/download programs to PLCs or Host HMI  products
    2. Software  applications not requiring real time I/O data
    3. Network  configuration and diagnostic tools
  1. Adapter  Class devices are the target or real-time I/O data requests from scanner class devices, as well as explicit messaging requests from  all other classes of device. Adapter Class products include:
    1. Drives and modules that send/receive I/O data at the request of PLCs and other controllers
    2. Drives and modules that send/receive explicit messages to and from Message and Adapter class devices
    3. HMI devices that send/receive explicit or implicit messages to/from PLCs
  2. Scanner Class devices are the originator of I/O data connection requests to Adapter Class and other Scanner Class devices. Devices include:
    1. PLCs and controllers that send/receive I/O data at the request of PLCs, Host HMIs and other controllers
    2. PLCs that send/receive explicit messages to and from other PLCs
    3. PC interface cards or software used for PC-based control

Object Model

EtherNet/IP™ uses standard CIP objects. An object class represents a grouping of related attributes. There are three classes of objects:

  1. Required objects: These objects are required by the CIP specification in every EtherNet/IP™ device. These are:
    1. Identity object: contains attributes which includes information such as Vendor ID, Date of Manufacture, Serial number and etc.
    2. TCP or Router object: contains routing information for messaging such as the IP address, gateway, subnet mask.
    3. Ethernet link or network object: hold the physical connection data such as the MAC-ID, interface speed, etc.
  1. Application objects which contain data specific to the device itself.
  2. Vendor specific objects which contain attributes specific to the features and functionality unique to the device such as configuration data, control commands, register data and etc.

EtherNet/IP™ is a standardized, certifiable protocol with a massive industry presence. Implementing EtherNet/IP™ into new network designs is not without it’s challenges, as implementation requires skill and training in both the IT and Automation fields. In the end though, the advantages, savings, and system interoperability and reliability may be worth the transition.

MODBUS/TCP (Port 502)

MODBUS is a communication interface developed in 1979 by PLC manufacturer Modicon, Inc. (now a brand of Schneider Electric). MODBUS is designed for multidrop networks based on a client-server architecture.

The availability of devices using MODBUS has made it a de facto standard for industrial communication networks. MODBUS was originally developed for use with serial communication interfaces such as RS-232 and RS-485. MODBUS communication over TCP/IP has become a standard because of the ease of interface and simpler message format.

When connected to ip.address:502 the MDrive with Ethernet will automatically respond to MODBUS/TCP protocol function codes only. Note that when operating the MDrive using MODBUS/TCP, it is not programmable and can only use immediate command functions.

MODBUS/TCP — MCode/TCP relationship

MODBUS uses a Protocol Data Unit (PDU) embedded in the message frame to send commands to an MDrive.

The PDU consists of two parts:

  1. Function code — identifies the function the command performs (see Table 2).
  2. Data — the command and parameter setting. Each command maps to a standard MCode mnemonic using a hexadecimal address. (see Figure 2).

MODBUS/TCP communications are in Big Endian form (Most Significant Byte first [MSB]).


Figure 2: MODBUS Protocol Data Unit (PDU)

Supported function codes

Standard MODBUS function codes for reading/writing I/O points and registers are supported by the MDrive Motion Control Ethernet products.

Two manufacturer specific function codes provide support for commands whose parameters consist of variable data lengths.

Function code




Device ID



Read device identification




Read digital inputs



Read coils (digital outputs)



Write single coil (digital output)



Read holding register



Write multiple registers

Manufacturer specific



Read I/O and trip configuration and parameters



Write I/O and trip configuration and parameters, enter upgrade mode

Table 2: Supported function codes


The MDrive Motion Control Ethernet products provide the speed, ease of use and reliability of Ethernet networking, while giving the system integrator the power of three protocols, MCode/TCP to access the power, programmability and rich feature set of the MDrive Motion Control family, EtherNet/IP to network with popular PLC's, PACs and motion controllers and MDODBUS/TCP to interoperate with other MODBUS system components.