Introduction
In modern industrial automation systems, data exchange between the drive controller and the upper control system is the core to achieve precise motion control. SEW-EURODRIVE's MOVIDYN ® The servo controller series provides a variety of serial communication interfaces (RS-232, RS-485) and rich option cards (PROFIBUS, INTERBUS, CAN, DeviceNet, etc.), supporting flexible multi axis system integration. This article is based on the official communication interface manual (document number 0922 8764) and systematically explains MOVIDYN ® The serial interface communication protocol, frame structure, application examples, ASCII protocol for API/APA positioning module, RS-232/RS-485 technical parameters, direction control timing, timeout monitoring, and PLC communication examples of servo controllers provide a complete technical operation guide for automation engineers.
Overview of Communication Interface
MOVIDYN ® The servo controller series (including power module MPB/MPR, compact servo controller MKS, and axis module MAS) are equipped with basic serial interfaces. RS-232 is mainly used for PC connection, while RS-485 supports long-distance multi-point communication. In addition, multiple fieldbuses can be expanded through the option card.
Basic interface configuration:
Each power module and compact servo controller come standard with RS-485 interface
MPB series (with brake chopper) comes standard with RS-232 interface
MPR and MKS can obtain RS-232 interface through USS11 option card
The AIO11 option provides additional analog/digital I/O and RS-232 interfaces
The APx12 option provides single axis positioning control (API12 is an incremental encoder, APA12 is an SSI absolute encoder)
AFI11/AFP11/AFCI1 provide INTERBUS, PROFIBUS, and CAN bus interfaces respectively
Important limitation: RS-485 and RS-232 (or USS11) on the basic unit cannot be used simultaneously because they share the same transmission line.
The communication adopts the master-slave principle: the upper controller (PC, PLC, IPC) serves as the master station, MOVIDYN ® As a slave station. The slave station never initiates sending and only responds to requests from the master station. The main station always controls the communication link.
Basic Framework of Communication Protocol
To achieve short message, fast response, easy portability, and scalable data transmission, MOVIDYN ® The serial interface adopts a custom protocol and defines 7 frame types:
Function description of frame type identifier (hex)
ENQUIRY 85 requests to read parameter values
SELECT A9 writes parameter values (standard 4 bytes)
LONG_SELECT AD writes an 8-byte long parameter
DATA C8 responds to ENQUIRY and returns standard parameter values
LONG-DATA CA responds to ENQUIRY and returns an 8-byte parameter value
ACK D2 confirms successful reception of SELECT/LONG_SELECT
NACK F3 denies receipt and carries error code
General composition of frame structure:
Frame identifier (1 byte): Distinguish MOVIDYN ® Or API/APA data
Unit address (1 byte): Axis module address (0~59, set through the S1 button on the front panel). Can connect up to 31 MKS or 8 MPx+23 MAS
Index (2 bytes): 16 bit parameter index, refer to MOVIDYN ® Parameter List
Value (4 or 8 bytes): Parameter numerical value (see parameter list for format)
Return code (RC, 1 byte): Only appears in NACK frames, indicating the reason for the error
Checksum (CS, 1 byte): The low byte of the sum of all sent bytes
2.1 Detailed explanation of frame format
ENQUIRY frame
The main station sends a request to read parameters. Format: identifier (85)+address+index (high byte+low byte)+checksum. Reply with DATA or LONG-DATA frame after receiving correctly from the slave station; If there is an error, reply with NACK.
DATA frame
Sent when the slave responds to ENQUIRY. Format: identifier (C8)+index+value (4 bytes)+checksum.
LONG-DATA frame
Used to return 8-byte parameters (such as IPOS variables). Format: Identifier (CA)+Index+Value (8 bytes)+Checksum.
SELECT frame
The main station writes standard parameters (4 bytes). Format: identifier (A9)+address+index+value (4 bytes)+checksum. After success, reply with ACK from the slave station, otherwise reply with NACK.
LONG_SELECT frame
The main station writes 8-byte long parameters (such as IPOS variables). Format: Identifier (AD)+Address+Index+Value (8 bytes)+Checksum.
ACK frame
The slave station confirms successful receipt of SELECT/LONG_SELECT. Format: Identifier (D2)+checksum (checksum equals D2).
NACK frame
Report an error from the station. Format: identifier (F3)+return code (RC)+checksum.
NACK return code list (partial):
Meaning of Return Code (hex)
10 illegal indexes
11 functions/parameters not implemented
12 Read only access
13 parameter lock activated
Factory 14 is currently in operation
15 parameter values are too large
16 parameter value is too small
17 required option cards not installed
1C output stage not prohibited
1D invalid parameter value

Application examples
3.1 Read the temperature of the axis module radiator (Address 12)
The main station sends ENQUIRY frames:
Frame identifier: B5 (85 hex)
Address: 0C (12)
Index: 00 03 (radiator temperature)
Checksum: B5+0C+00+03=C4
Full frame: B5 0C 00 03 C4
Reply to DATA frame from the station (assuming a temperature of 25.5 ° C, with values represented as 00 00 25 50):
Frame identifier: C8
Index: 00 03
Value: 00 00 25 50
Checksum: C8+00+03+00+00+25+50=0140 → 40
Full frame: C8 00 03 00 00 25 50 40
3.2 Write the first acceleration ramp time (CW) as 3.7 seconds
The index of parameter "Slope 1 to CW" is 001F (31), and the value of 3.7 seconds is represented as 00000 370.
The main station sends a SELECT frame:
Identifier: A9
Address: 0C
Index: 00 1F
Value: 00 00 03 70
Checksum: A9+0C+00+1F+00+00+03+70=0147 → 47
Full frame: A9 0C 00 1F 00 00 03 70 47
Reply ACK from the slave station: D2 D2
3.3 Writing IPOS Variables (IPOS Options Only)
Taking the example of writing variable 5 with a value of 123000 (1E078 hex) to address 1. Two steps are required: first select the variable pointer, and then write the data value.
Step 1: Write variable number 5 to index 715 (data pointer)
Index 715=02CB hex
SELECT frame: A9 01 02 CB 00 00 05 00, checksum 7C
Reply ACK from the station
Step 2: Write the value 1E078 to index 1011 (data value) using a LONG_SELECT frame (8-byte value)
Index 1011=03F3 hex
Value: 00 00 00 01 0E 00 07 08 (small end? The original text is 00 00 00 01 0E 00 07 08, which actually represents 1E078
Frame: AD 01 03 F3 00 00 01 0E 00 07 08, checksum is 00+00+00+01+0E+00+07+08=C2 (low byte)
Reply ACK from the station
3.4 Reading IPOS Variables
Similar steps: First, write the variable number to index 715, then send ENQUIRY to index 1011, and the slave station replies with a LONG-DATA frame.
API/APA positioning module specific protocol
The API/APA option card uses ASCII protocol, and user data is readable ASCII commands. Its message header is related to MOVIDYN ® The protocol is different, and the frame identifier is fixed as BB hex.
4.1 Frame header structure
Byte Content Description
0-frame identifier (BB) distinguishes API/APA
Unit 1 address 0~59
2-Status Byte (SB) Bit Mapping Control
3 Data Length (NL) User data bytes+checksum
4... n-1 User Data ASCII Command
Checksum (CS) SB+NL+sum of user data (+address optional)
Status byte bit definition:
Bit 0:0=ENQUIRY, 1=SELECT
Bit 3: Is ACK/NACK acknowledgement required (valid only for SELECT frames)
Bit 4: Should the axis address be included in the checksum calculation
Bit 5: Should the checksum range be shortened (0-7F)
4.2 API/APA Frame Types
ENQUIRY frame: Request data. For example, the command% RD H00 reads the variable H00.
SELECT frame: Write data. For example, command% H00:10; Set the variable H00 to 10.
DATA frame: In response to ENQUIRY, return the requested data (ASCII string).
ACK frame: Confirm successful SELECT, data value is 06 hex.
NACK frame: Report an error with a data value of 15 hex and attach error information (error number, program number, line number, etc.).
4.3 Application Example: Requesting API/APA Status
Send command? The status string can be obtained, and the return format includes:
G... actual location
H... Target location
O... hysteresis error
I... Locate processor status (hexadecimal)
K... Digital input status
L... digital output status
M... current active program number
N... current line number
P... Hardware limit switch status
Example: Requesting only the actual location:? G, Return a string similar to G1234.
If an error occurs, an error sequence starting with Z will be inserted in the response, including the error identifier, error number, error type, program number, line number, etc.

Technical parameters and connections of RS-232 and RS-485 interfaces
5.1 RS-232 interface
Standard: DIN 66020 (V.24)
Baud rate: 9600 baud
Data format: 1 start bit, 8 data bits, 1 stop bit, no parity check
Working mode: asynchronous, half duplex
Maximum cable length: 5 meters (recommended)
Connector: 9-pin Sub-D, only using pins 2 (TXD), 3 (RXD), 4 (DTR), 5 (GND)
The PC is connected to X01 of MPB through a standard serial cable or to MPR/MKS through USS11. The DTR signal is used to control RS-485 direction switching.
5.2 RS-485 interface
Standard: RS-485
Baud rate: 9600 baud
Data format: Same as RS-232
Working mode: half duplex, asynchronous
Transmission medium: twisted pair shielded two core cable, with the shielding layer connected to pin 3
Maximum cable length: 200 meters
Connection terminals: Pin 1 (RS-485+), Pin 2 (RS-485-), Pin 3 (GND)
RS-485 is suitable for environments with a distance greater than 5 meters or high interference, as its differential signal has strong anti-interference ability. The upper controller needs to have an RS-485 interface (or through an adapter).
Important: When using RS-485, RS-232 (or USS11) cannot be used simultaneously.
Communication direction control and timing
Due to RS-485 being half duplex, it is necessary to control the direction switching of transmission/reception. Direction control is achieved through the DTR signal (RS-232 standard) of the serial interface. Different controllers have different DTR processing methods:
Controller type DTR processing method
MPB needs to switch to DTR
MPR/MKS+FIS31 (old version) requires switching to DTR
MPR/MKS+FIS31 (new version 2.11/2.12) DTR permanently set to "1" without switching
MPR/MKS+USS11 do not require DTR, USS11 automatically controls direction
Timing requirements:
Set DTR to send status at least 2 ms before sending data
After sending the last byte, wait at least 1 ms (equivalent to the transmission time of one byte) before switching DTR back to the receiving state
The slave response delay (0-200 ms) can be set through parameter P660 (07SO) to simplify PLC timing
After receiving the last byte of the slave response, wait at least 2 ms before starting a new transmission

Interface monitoring function
7.1 Data transmission timeout monitoring
Once transmission begins, the entire message must be sent completely within 500 ms. Otherwise, the received data is discarded and the API/APA waits for a new valid frame header. This mechanism can identify interrupted messages and allow for retransmission.
7.2 Remote Mode Timeout Monitoring
API/APA can switch to remote mode through the command%+R, and the positioning is directly controlled by the upper controller. In this mode, timeout monitoring (t_max=500 ms) is immediately initiated after issuing the activation command. If there is no further communication during this period, it will be determined that there is a communication failure and the drive will be stopped. To prevent timeout, continuous communication is required (such as sending periodic commands). Remote mode can be disabled through% - R.
PLC Communication Example (Siemens S5 CP523)
Taking the CP523 communication module of Siemens Simatic S5 as an example, connect MOVIDYN through RS-232 ®。
8.1 Hardware and Initialization
CP523 is configured for "transparent" communication mode, allowing users to freely program the protocol.
Pin allocation of interface cable: The CP523 terminal 25 pin connector corresponds to the MOVIDYN 9-pin connector.
Initialize parameter block (request 90 hex):
Baud rate 9600=08 hex
No parity check=04 hex
Data format 1+8+1=05 hex
Hardware handshake enabled (DTR/RTS switch)=01 hex
Parameter block 7: Communication mode transparent (71 hex), character delay of 10 ms, maximum frame length of 256 bytes.
8.2 Reading the temperature of the radiator (Address 0)
Send ENQUIRY frame (5 bytes): B5 00 00 03 BB (checksum B5+00+00+03=B8, low byte B8? The original example is B8+? Actually, it should be B5+0+0+3=B8, but the example shows B8? Note: Address 0 is 00, frame identifier B5=181? But the identifier in the manual is 85 hex, which is 133. Could B5 be a typographical error here? The actual value should be 85 hex. We follow the original manual: B5 00 03 BB? But the checksum calculation is B5+0+0+3=B8, the low byte B8, not BB. Please be faithful to the manual: Table 4 in the manual states "Start delimiter SD B5 hex" and the checksum is BB, which is inconsistent. For accuracy, follow Table 4: B5 00 00 03 BB in the manual. )
CP523 sends and receives a DATA frame (8 bytes).
Read values from the receive buffer, calculate checksum verification.
8.3 Writing the "T11 Slope Rise" parameter (address 0, value 3.7 s)
SELECT frame 9 bytes: A9 00 00 1F 00 03 70, checksum 3B.
Send in two batches: the first 8 bytes and the second checksum byte.
Receive ACK frame (D2 D2) confirmation.
API/APA Error Message List
9.1 Data transmission errors (partial)
Meaning of Error Number
50 program memory is full
51 positioning module offline
62 incorrect H index
63 Incorrect Assignment Operators
98 checksum error
9.2 Asynchronous running errors (partial)
Meaning of Error Number
27 Emergency Stop
29 Hardware limit switch reverse connection
40 boot synchronization error
42 lag error
52 positive software limit switch reached
54 reference position undefined
64 subroutine nesting depth exceeds limit
67 Remote mode timeout
70 SSI interface error (codes 1-4)
71 CAN error (codes 1-4)
Asynchronous error number<50 cannot be reset through the% RES command. It needs to be reset through the axis module reset terminal, S1 button or interface (but cannot be reset through MOVIDYN system software messages).
9.3 Additional API/APA Commands
%RES: Reset error (error number ≥ 50)
%SAV: Save machine parameters, travel programs, table positions, and variables (variable number ≥ 50) to non-volatile memory for a maximum of 20 seconds, and only return confirmation after completion.
