Lines Matching +full:read +full:- +full:command

1 .. zephyr:code-sample:: modbus-rtu-server
3 :relevant-api: modbus
16 This sample has been tested with the nRF52840-DK and FRDM-K64F boards,
26 Using RS-485 transceiver
30 In addition to the evaluation board, an USB to RS-485 bus adapter and
31 a RS-485 shield are required. The shield converts UART TX, RX signals to RS-485.
32 An Arduino header compatible shield like `joy-it RS-485 shield for Arduino`_
34 on the JOY-IT shield. For other shields, ``de-gpios`` property must be adapted
38 The USB to RS-485 adapter connects to the USB port of a computer.
39 The two A+, B- lines should be connected to the RS-485 shield.
48 for example to control relays or to read ADC values via USB connection without
59 .. zephyr-app-commands::
60 :zephyr-app: samples/subsys/modbus/rtu_server
67 .. zephyr-app-commands::
68 :zephyr-app: samples/subsys/modbus/rtu_server
71 :gen-args: -DDTC_OVERLAY_FILE=cdc-acm.overlay -DEXTRA_CONF_FILE=overlay-cdc-acm.conf
74 On the client side, PC or laptop, the following command connects PyModbus
78 .. code-block:: console
80 # pymodbus.console serial --port /dev/ttyUSB0 --baudrate 19200
81 --bytesize 8 --parity N --stopbits 2
84 For example, to set LED0 on use FC01 command (write_coil).
86 .. code-block:: console
92 .. code-block:: console
99 To set LED0 off but LED1 and LED2 on use FC15 command (write_coils).
101 .. code-block:: console
105 To read LED0, LED1, LED2 state FC05 command (read_coils) can be used.
107 .. code-block:: console
123 It is also possible to write and read the holding registers.
127 To write single holding registers use FC06 command (write_register),
129 .. code-block:: console
133 or FC16 command (write_registers).
135 .. code-block:: console
139 To read holding registers use FC03 command (read_holding_registers).
141 .. code-block:: console
152 .. _`joy-it RS-485 shield for Arduino`: https://joy-it.net/en/products/ARD-RS485
153 .. _`PyModbus`: https://github.com/pymodbus-dev/pymodbus