Application Notes

Executing an MCode program over EtherNet/IP

Home > Resources > Application Notes > Executing an MCode program over EtherNet/IP


There are instances where it may be desirable to execute and MCode script over EtherNet/IP. This application note explains the process.


  • Liberty* MDrive



Allowing resident MCode program scripts to function in protocol EtherNet/IP with Liberty* MDrive Ethernet devices that include TCP/IP application version and up, is now available.

Liberty* MDrive Ethernet TCP/IP Configuration Utility contains an “E.I.P.” tab with a frame in the lower left-hand corner labeled “I/O Implicit connection test”. Two Boolean entities are described as follows on their function regarding the enabling of resident program operation with EIP.

To allow resident MCode program scripts to run:

  1. Turn off I/O implicit writes.
    • If ‘Halt Motion’ is ON, an ‘EX 1’ will be issued on every valid EIP implicit I/O connection and an ‘Esc’ will be issued on an I/O connection lost.
    • If ‘Halt Motion’ is OFF, then no ‘EX 1’ or ‘Esc’ commands are issued allowing an ‘SU’ label to be used in an MCode script.
  2. Observe the following closely in your MCode script to be executed via EIP:
    • Always use “H 1000” on the first line following all “SU” labels or methods residing @ address “1”.
    • Do not use or save any “PR”, “L” or “EM” mnemonics in resident programs or saved parameter statements.The following additions have been added to the explicit EIP class 0x64
  3. The following additions have been added to the explicit EIP class 0x64:
    AccessClassInstanceAttribData typeMnemonic

    Note variables V1 through V8 need to be defined as user variables in order to be utilized.

* Previously Lexium

When it comes to your form, fit and function requirements, don’t settle. Get precisely what you need working with us. We know motion.

Contact us with any questions about how we can help you with your motion application or for assistance with your IMS products.

Browse our resource section and find the most useful tools and documents for all our products.