Read/Write Memory – Single Register Write Command (06)

circle-info

When writing large values using different data formats (e.g., Float32 or Int64) and performing conversions, very small differences may occur due to internal calculation methods. These differences are typically less than 1/10,000 and are considered normal.

Function Code: 06

The Single Register Write Command (Function Code 06) is used to write one simple Int16 parameter (1 register, 16-bit). It is suitable for setting options, codes, or small-range integers.

Read/Write Memory – Single Register Write Command (06) Format

Read/Write Memory – Single Register Write Command (06)

This example demonstrates how the master uses Function Code 06 to write the parameter “A03 Pipe Geo Unit” and set the unit to inch.

According to the Read/Write Memory List, this parameter has:

  • Starting Address: 00 01

  • Register Length: 1 register

  • Data Type: int16

Master Sends Write Command (TX Frame)

  • Slave Address: 01

  • Function Code: 06

  • Starting Register Address: 00 01 (A03 Pipe Geo Unit address)

  • Written Value: 00 01 (unit = inch)

  • CRC: 19 CA (calculated by CRC algorithm)

Slave Response Data (RX Frame)

When the write command is successful, the master receives a response from the slave as confirmation.

  • Slave Address: 01

  • Function Code: 06

  • Register Address: 00 01 (A03 Pipe Geo Unit)

  • Written Value: 00 01 (inch)

  • CRC: 19 CA (must match the TX CRC)

If the RX frame exactly matches the TX frame (including CRC), it confirms that:

  • The command was successfully executed.

  • The value 00 01 (inch) was correctly written to register 00 01.

  • The slave has acknowledged completion of the operation.

Last updated