Application Notes

Executing an MCode program over EtherNet/IP

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

Description

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

Applicable

  • Liberty* MDrive

Requirements

Details

Allowing resident MCode program scripts to function in protocol EtherNet/IP with Liberty* MDrive Ethernet devices that include TCP/IP application version 2.3.0.3 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
    WO0x640x010x06MDRV_STRINGEX
    RO0x640x010x07MDRV_BITBY
    RW0x640x010x08MDRV_I32V1
    RW0x640x010x09MDRV_I32V2
    RW0x640x010x0AMDRV_I32V3
    RW0x640x010x0BMDRV_I32V4
    RW0x640x010x0CMDRV_I32V5
    RW0x640x010x0DDRV_I32V6
    RW0x640x010x0EMDRV_I32V7
    RW0x640x010x0FMDRV_I32V8

    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.