Перейти к содержанию

Навигация

Modbus-client/en: различия между версиями

Новая страница: «* The first argument '''--debug''' — is arbitrary. It can be specified in any position and enables debugging by displaying the hexadecimal codes of the data bei…»
(Новая страница: «Parameter values (address, timeout, function type, etc.) can be specified in both hexadecimal (0x**) and decimal.»)
(Новая страница: «* The first argument '''--debug''' — is arbitrary. It can be specified in any position and enables debugging by displaying the hexadecimal codes of the data bei…»)
Строка 38: Строка 38:
Parameter values (address, timeout, function type, etc.) can be specified in both hexadecimal (0x**) and decimal.
Parameter values (address, timeout, function type, etc.) can be specified in both hexadecimal (0x**) and decimal.


* Первый аргумент '''--debug''' — произвольный. Он может указываться в любой позиции и включает отладку, выводя на экран шестнадцатеричные коды отправляемых и принимаемых данных.
* The first argument '''--debug''' — is arbitrary. It can be specified in any position and enables debugging by displaying the hexadecimal codes of the data being sent and received.
* Следующий аргумент '''-m'''. Он должен указываться первым в командной строке, или вторым, если первый аргумент — '''--debug''' или имя файла порта RS-485. Аргумент определяет тип используемого протокола '''-mrtu''' — Modbus RTU, '''-mtcp''' — Modbus TCP.
* The next argument is '''-m'''. It must be specified first on the command line, or second if the first argument is '''--debug''' or the file name of the RS-485 port. The argument specifies the type of Protocol used '''-mrtu''' — Modbus RTU, '''-mtcp''' — Modbus TCP.
* Аргумент '''-a''' задает Modbus-адрес устройства, к которому мы обращаемся. Если аргумент не используется, то по умолчанию выбирается адрес 0x01.  
* The '''-a''' argument specifies the Modbus address of the device we are accessing. If the argument is not used, the default address is 0x01.  
* Аргумент '''-с''' определяет, какое количество элементов мы запрашиваем. По умолчанию — один.
* The '''-c''' argument determines how many items we request. The default value is one.
* Аргумент '''-r''' задает начальный адрес для чтения или записи. По умолчанию используется значение 100 (0x64).
* The '''-r''' argument specifies the start address for reading or writing. The default value is 100 (0x64).
* Аргумент '''-t''' указывает код функции Modbus. Кратко они перечислены в выводе modbus_client, подробнее значения кодов описаны на странице [[Special:MyLanguage/Протокол Modbus|Протокол Modbus]].
* The-t argument specifies the Modbus function code. They are briefly listed in the modbus_client output, the code values are described in more detail on the  [[Special:MyLanguage/Протокол Modbus/en|Modbus Protocol]] page.
* Аргумент '''-o''' задает таймаут в миллисекундах (по умолчанию 1000).
* The '''-o''' argument specifies a timeout in milliseconds (the default is 1000).
* Аргумент '''-0''' (ноль) уменьшает на единицу адрес, задаваемый аргументом -r. Это может быть полезным при работе с устройствами с нестандартной адресацией, например, с диапазоном адресов 1 — 65536 вместо привычного 0 — 65535.
* The '''-0''' (zero) argument reduces the address specified by the '''-r''' argument by one. This can be useful when working with devices with non-standard addressing, for example, with the address range 1 — 65536 instead of the usual 0 — 65535.


Затем указываются специфические параметры протокола (Modbus RTU или Modbus TCP). Несмотря на информацию, выводимую в подсказке, эти параметры также начинаются со знака '-' (минус).
Затем указываются специфические параметры протокола (Modbus RTU или Modbus TCP). Несмотря на информацию, выводимую в подсказке, эти параметры также начинаются со знака '-' (минус).
12 063

правки