フォースシングルコイル (FC=05)
要求
このコマンドは、アドレス17のスレーブデバイスのディスクリートコイル#173の内容をONに書き込みます。
11 05 00AC FF00 4E8B 11: The Slave Address (11 hex = address17 ) 05: The Function Code 5 (Force Single Coil) 00AC: The Data Address of the coil. (coil# 173 - 1 = 172 = AC hex). ( 00AC hex = 172 , + 1 offset = coil #173 ) FF00: The status to write ( FF00 = ON, 0000 = OFF ) 4E8B: The CRC (cyclic redundancy check) for error checking.応答
通常の応答はクエリのエコーであり、コイルが書き込まれた後に返されます。
11 05 00AC FF00 4E8B 11: The Slave Address (11 hex = address17 ) 05: The Function Code 5 (Force Single Coil) 00AC: The Data Address of the coil. (coil# 173 - 1 = 172 = AC hex) FF00: The status written ( FF00 = ON, 0000 = OFF ) 4E8B: The CRC (cyclic redundancy check) for error checking.