Lines Matching +full:read +full:- +full:command
1 .. zephyr:code-sample:: modbus-gateway
2 :name: Modbus TCP-to-serial gateway
3 :relevant-api: modbus bsd_sockets
5 Implement a gateway between an Ethernet TCP-IP network and a Modbus serial line.
11 an Ethernet TCP-IP network and a Modbus serial line.
16 This sample has been tested with FRDM-K64F board,
21 :zephyr:code-sample:`modbus-rtu-server` sample. Client is running on a PC or laptop.
26 In addition to the evaluation boards RS-485 shields may be used.
27 The A+, B- lines of the RS-485 shields should be connected together.
38 .. zephyr-app-commands::
39 :zephyr-app: samples/subsys/modbus/tcp_gateway
44 On the client side, PC or laptop, the following command connects PyModbus
47 .. code-block:: console
49 # pymodbus.console tcp --host 192.0.2.1 --port 502
52 For example, to set LED0 on use FC01 command (write_coil).
54 .. code-block:: console
61 .. code-block:: console
68 To set LED0 off but LED1 and LED2 on use FC15 command (write_coils).
70 .. code-block:: console
74 To read LED0, LED1, LED2 state FC05 command (read_coils) can be used.
76 .. code-block:: console
92 It is also possible to write and read the holding registers.
96 To write single holding registers use FC06 command (write_register),
98 .. code-block:: console
102 or FC16 command (write_registers).
104 .. code-block:: console
108 To read holding registers use FC03 command (read_holding_registers).
110 .. code-block:: console
121 .. _`PyModbus`: https://github.com/pymodbus-dev/pymodbus