Modbus protokoll rs485

Modbus Funktions Codes
es gibt wohl auch Sonderfunktionen die nur bei bstimmten Geräten vorhanden sind hier z.B. 0x10h setzten der UID
 * das sind wohl noch nicht alle Modbus Funktion Codes

adr -> device Adress oder auch UID - 1 Byte lang fc  -> Function Code 1 Byte data -> n Bytes

Modbus RTU Instructions:

Baud rate: 9600 8 NONE 1

Hexadecimal send hexadecimal receive Operation steps: 1. Software settings communication baud rate 2. Set the address (communication using the device address, the default address is 01) Set the address from from Broadcast to 0x01, 0x02 , 0x03

Read Address at Broadcast Call

Modbus Rtu 2
Hardware Resources: Data register address *  RS485 communication interface *  TTL communication interface *  2 Input ( max. DC +12 Volt UB ) *  2 Relay Output *  A user button *  A user LED *  A power indicator *  A STM32F030F4 microcontroller *  2 relay status indicators LED lights *  Power supply terminal interface (12V power supply)

Meaning of each byte: Byte 1:       address byte 2:       function byte 3 4:     register address byte 5 6:     register data byte 7 8:     CRC check

[address 1 bzw. UID 0x01]

Switch Single

all Funktion

Quelle - https://hacktronics.co.in/2-channel-relay-module/modbus-rtu-2-way-relay-output-2-way-input-switch-ttl-rs485-interface-communication

Modbus Rtu 4
Specifications:

*  RS485 communication interface *  TTL communication interface *  4 Input ( Switch to GND !!!! NO + UB !!! ) *  4 Relay Output *  2 user button *  A user LED *  A power indicator *  A STM32F030F4 microcontroller *  4 relay status indicators LED lights *  Power supply terminal interface (12V power supply)

[address 1 bzw. UID 0x01]

Switch Single

all Funktion

hacktronics.co.in/4-channel-relay-module github Board-C0135

Modbus_RTU_4_Way_Relay_Module.pdf

DDS578R Energy Meter
MODBUS-RTU communication protocol Description:

1.the data format: Address + function code + data + CRC check code 2.the register type This meter uses two types of registers, individually addressed The first is the data register, read-only, using the command code 0x04 to read. The second category is the parameter register, readable and writable, using the command code 0x03 read, write parameters using 0x10 3.the data format Float type data: Read the internal data within the meter in line with IEEE-754 standardv floating-point number, data format is 32-bit 4-byte single-precision floating-point data format. 4、Data register list

The second category register (parameter register) read and operate read the meter Address:

(HEX):01 03 00 08 00 02 45 C9

Date descriptions

Returns Data (HEX) 01 04 03 40 00 00 00 EF F3

USB To RS485 Converter
USB-To-RS485-Converter ll /sys/class/tty/*/device/driver lrwxrwxrwx 1 root root 0 Dez 21 19:30 /sys/class/tty/ttyUSB0/device/driver -> ../../../../../../../../bus/usb-serial/drivers/pl2303/ lsusb Bus 003 Device 014: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

https://developer.toradex.com/knowledge-base/uart-(linux)