Skip to main content

UART Communication Function Usage

UART Communication Protocol

  • Baud Rate: 115200
  • Data Bits: 8 bits
  • Stop Bits: 1 bit
  • Parity: None
  • Response Mode: Query‑and‑response

The UART communication protocol uses a fixed 10‑byte frame format:

Device AddressCommand CodeObject AddressError/ClearData FieldChecksum
Byte1Byte2Byte3Byte4Byte5Byte6Byte7Byte8Byte9Byte10
IDCMDAddrHAddrLErrRData(MSB)Data(N-1)Data(N-2)Data(LSB)Check
  • ID: Slave device address, default value: 0x01. The device will return no response if the ID does not match.
  • CMD: Command code, including read command 0xA0 and write commands 0x51, 0x52, 0x54.
    Detailed definition of command codes is shown below:
    • Read Command: Host reads data from the specified object address on the drive

      Host‑sent CMDDrive Response CMDDescription
      0xA0By0xA1Object data is 8‑bit: [Data(LSB)]
      0xA00xA2Object data is 16‑bit: [Data(N‑2) - Data(LSB)]
      0xA00xA4Object data is 32‑bit: [Data(MSB) - Data(LSB)]
      0xA00x5FObject address does not exist; data field is invalid
      0xA00x80Checksum error; data field is invalid
    • Write Command: Host writes data to the specified object address on the drive

      Host‑sent CMDDrive Response CMDDescription
      0x510x618‑bit object data: [Data4], write succeeded
      0x50Data type mismatch, write failed
      0x58Object address is read‑only, write failed
      0x5FObject address does not exist, write failed
      0x520x6216‑bit object data: [Data3 - Data4], write succeeded
      0x50Data type mismatch, write failed
      0x58Object address is read‑only, write failed
      0x5FObject address does not exist, write failed
      0x540x6432‑bit object data: [Data1 - Data4], write succeeded
      0x50Data type mismatch, write failed
      0x58Object address is read‑only, write failed
      0x5FObject address does not exist, write failed
  • AddrH, AddrL: High‑byte and low‑byte of the object address
  • ErrR: Error Report & Clear
    • When ErrR = 0xCE in any valid host read/write frame, the drive's error flag will be cleared.
    • The value returned in ErrR by the drive contains fault information. Each of the 8 bits represents one fault condition: 0 = no fault, 1 = fault detected. Fault definitions are listed below:
      ErrR returned by deviceError description
      bit0: [LSB]Reserved
      bit1:Following error exceeds allowed value
      bit2:Encoder error
      bit3:Motor overload
      bit4:Drive over‑temperature
      bit5:DC‑bus voltage too high
      bit6:DC‑bus voltage too low
      bit7: [MSB]Drive output short circuit
  • Data(MSB)-Data(LSB): Data field, most significant byte first, least significant byte last.
  • Check: Checksum, Check = sum of [Byte1-Byte9] taken as the lower 8 bits.

UART Communication Examples

Example 1: Read the actual DC‑bus voltage of the drive
Referring to "Table F1‑3 Measured Data" in Object Dictionary List, the object address for "Actual DC‑bus Voltage" is 0x5001, stored as a 16‑bit signed integer. Assume the actual DC‑bus voltage is 36 V.

Device AddressCommand CodeObject AddressError/ClearData FieldChecksum
Host Send0x010xA00x500x010x000x000x000x000x000xF2
Drive Response0x010xA20x500x010x000x000x000x000x240x18

Example 2: Read the actual motor encoder position
Referring to "Table F1‑3 Measurement Data" in the Common Object List, the object address for "Actual Position Value" is 0x7071, stored as a 32‑bit signed integer.

Device AddressCommand CodeObject AddressError/ClearData FieldChecksum
Host Send0x010xA00x700x710x000x000x000x000x000x82
Assume the current encoder actual position = -8237, hexadecimal: 0xFFFFDFD3
Drive Response0x010xA40x700x710x000xFF0xFF0xDF0xD30x36
If the drive has an error, e.g., "Following error exceeds allowed value"
Drive Fault Response0x010xA40x700x710x020xFF0xFF0xDF0xD30x38

Example 3: Write target speed (rpm)
Referring to "Table F1‑2 Basic Modes & Control" in Object Dictionary List, the object address for Target Speed (rpm) is 0x70B1, stored as a 16‑bit signed integer. Assume the value to be written = 100, hexadecimal: 0x0064.

Device AddressCommand CodeObject AddressError/ClearData FieldChecksum
Host Send0x010x520x700xB10x000x000x000x000x640xD8
Drive Response0x010x620x700xB10x000x000x000x000x640xE8

Example 4: Write Target Speed (High‑resolution speed command)
Referring to "Table F1‑2 Basic Modes & Control" in Object Dictionary List, the object address for High‑Precision Target Speed is 0x70B2, stored as a 32‑bit signed integer.
To set a speed command of 3.21 rpm, apply the conversion formula:
U[y,x]:[DEC]=([rpm] * 512 * [Feedback_Resolution])/1875. Where Feedback_Resolution = 4096.
DEC = (3.21 × 512 × 4096) / 1875 = 3590, hexadecimal: 0x0E06.

Device AddressCommand CodeObject AddressError/ClearData FieldChecksum
Host Send0x010x540x700xB20x000x000x000x0E0x060x8B
Drive Response0x010x640x700xB20x000x000x000x0E0x060x9B