Professional Documents
Culture Documents
100136
Title .................................................................................................. Sending CI-commands over Ethernet (CMMP)
Version ............................................................................................................................................................. 1.10
Document no. .............................................................................................................................................. 100136
Original .................................................................................................................................................................en
Author ............................................................................................................................................................. Festo
Copyright Notice
This documentation is the intellectual property of Festo AG & Co. KG, which also has the exclusive copyright. Any
modification of the content, duplication or reprinting of this documentation as well as distribution to third par-
ties can only be made with the express consent of Festo AG & Co. KG.
Festo AG & Co KG reserves the right to make modifications to this document in whole or in part. All brand and
product names are trademarks or registered trademarks of their respective owners.
Legal Notice
Hardware, software, operating systems and drivers may only be used for the applications described and only in
conjunction with components recommended by Festo AG & Co. KG.
Festo AG & Co. KG does not accept any liability for damages arising from the use of any incorrect or incomplete
information contained in this documentation or any information missing therefrom.
Defects resulting from the improper handling of devices and modules are excluded from the warranty.
The data and information specified in this document should not be used for the implementation of safety func-
tions relating to the protection of personnel and machinery.
No liability is accepted for claims for damages arising from a failure or functional defect. In other respects, the
regulations with regard to liability from the terms and conditions of delivery, payment and use of software of
Festo AG & Co. KG, which can be found at www.festo.com and can be supplied on request, shall apply.
All data contained in this document do not represent guaranteed specifications, particularly with regard to func-
tionality, condition or quality, in the legal sense.
The information in this document serves only as basic information for the implementation of a specific, hypo-
thetical application and is in no way intended as a substitute for the operating instructions of the respective
manufacturers and the design and testing of the respective application by the user.
The operating instructions for Festo products can be found at www.festo.com/sp.
Users of this document (application note) must verify that all functions described here also work correctly in the
application. By reading this document and adhering to the specifications contained therein, users are also solely
responsible for their own application.
1 Components/Software used
CMMP-AS-…-M3 General --
CMMP-AS-…-M0 General --
1.1 Usage
This document is very useful for applications were the old CMMP drives (without M0/M3) were used with the
RS232 port. Some PLC’s use this way of communication to change parameters inside the controller or start posi-
tioning jobs. Now that the new CMMP-...-M0/M3 controllers don’t have the RS232 port available anymore, this
can be used for easy adaptation.
Advantage:
– Applications were the RS232 port was used the CMMP can now be exchanged to M0/M3 variants without the
need of rewriting a lot of code. The message remains the same, it only needs to be send over Ethernet (UDP).
This document only describes the way the CI-command is implemented inside the UDP message. It does not ex-
plain in detail the way a UDP-message itself can be build. To send the UDP messages a free-ware is used:
“Packet Sender”.
Application Note – Sending CI-commands over Ethernet (CMMP) – 1.10 Seite 5 von 10
Short explanation for UDP
Seite 6 von 10 Application Note – Sending CI-commands over Ethernet (CMMP) – 1.10
Creating the message
0x02FAF080 = 50000000 (the value is written in 0,1 microseconds, so the value is 5000ms)
The CMMP replies with ‘OK!’, to check the value we can resend the Object Read command:
Application Note – Sending CI-commands over Ethernet (CMMP) – 1.10 Seite 7 von 10
Creating the message
To send the message over Ethernet we need to add some information. In total it contains the following:
– Transaction Identifier
– Identification
– Reserve
– Message
– Carriage return
The Transaction Identifier can be used to validate which reply send by the motor controller belongs to which
send message. To use this function, simply increase the Transaction Identifier with each send packet. If you
don’t want to use it, it can be set to 0000 (hexadecimal).
The Identification represents the username and has to be equal to what’s set in the CMMP. It can be changed
but at default it’s empty. So this part of the message is: “MTX “ (5 spaces after MTX).
The Message itself contains the CI-command and a Checksum. This checksum is added to check if the infor-
mation inside the CI-command is correctly send. Section 3.3 will explain how the checksum is calculated.
Because the checksum must be added after the value a ‘:’ is used to separate them. This character needs to be
there when calculating the HEX value:
Seite 8 von 10 Application Note – Sending CI-commands over Ethernet (CMMP) – 1.10
Creating the message
To calculate the checksum you need to add up all the HEX value’s. For this message the result is ‘0x3C1’.
Because the checksum can only contain 2 characters, a modulo (or mask) needs to be performed (0xFF).
The result is: ‘C1’
PLEASE NOTE: The calculation is case sensitive. Since the HEX transformation from ASCII ‘ow’ is different than
‘OW’, the checksum is also different. The controller does not care if the message is low/high case, as long as the
checksum is correct according to the used characters.
Application Note – Sending CI-commands over Ethernet (CMMP) – 1.10 Seite 9 von 10
Sending the message with ‘Packet Sender’
After hitting the button ‘send’, the message is send. If everything is correct the controller should reply
Immediately with ‘OK!’:
Seite 10 von 10 Application Note – Sending CI-commands over Ethernet (CMMP) – 1.10