(0x02) — чтение значений из нескольких дискретных входов (Read Discrete Inputs).
(0x03) — чтение значений из нескольких регистров хранения (Read Holding Registers).
(0x04) — чтение значений из нескольких регистров ввода (Read Input Registers).
(0x05) — запись значения одного флага (Force Single Coil).
(0x06) — запись значения в один регистр хранения (Preset Single Register).
(0x07) — Чтение сигналов состояния (Read Exception Status)
(0x0F) — запись значений в несколько регистров флагов (Force Multiple Coils)
(0x10) — запись значений в несколько регистров хранения (Preset Multiple Registers)
(0x16) — запись в один регистр хранения с использованием маски «И» и маски «ИЛИ» (Mask Write Register).
(0x18) — Чтение данных из очереди (Read FIFO Queue)
(0x14) — Чтение из файла (Read File Record)
(0x15) — Запись в файл (Write File Record)
(0x08) — Диагностика (Diagnostic)
(0x0B) — Чтение счетчика событий (Get Com Event Counter)
(0x0C) — Чтение журнала событий (Get Com Event Log)
(0x11) — Чтение информации об устройстве (Report Slave ID)
(0x2B) — Encapsulated Interface Transport
C34F - 047C start
C34F - 042C stop
C359 - 20 00 set frequency 25,6 Hz
Read Status Word (read coils 33-48) чтение слова состояния
(0x03) — чтение значений из нескольких регистров хранения (Read Holding Registers).
(0x04) — чтение значений из нескольких регистров ввода (Read Input Registers).
(0x05) — запись значения одного флага (Force Single Coil).
(0x06) — запись значения в один регистр хранения (Preset Single Register).
(0x07) — Чтение сигналов состояния (Read Exception Status)
(0x0F) — запись значений в несколько регистров флагов (Force Multiple Coils)
(0x10) — запись значений в несколько регистров хранения (Preset Multiple Registers)
(0x16) — запись в один регистр хранения с использованием маски «И» и маски «ИЛИ» (Mask Write Register).
(0x18) — Чтение данных из очереди (Read FIFO Queue)
(0x14) — Чтение из файла (Read File Record)
(0x15) — Запись в файл (Write File Record)
(0x08) — Диагностика (Diagnostic)
(0x0B) — Чтение счетчика событий (Get Com Event Counter)
(0x0C) — Чтение журнала событий (Get Com Event Log)
(0x11) — Чтение информации об устройстве (Report Slave ID)
(0x2B) — Encapsulated Interface Transport
C34F - 047C start
C34F - 042C stop
C359 - 20 00 set frequency 25,6 Hz
Read Coil Status (01 HEX)
Read Status Word (read coils 33-48) чтение слова состояния
Send hex string 01 01 00 20 00 10 and CRC 3C 0C
Response hex string 00 01 01 02 07 0B FA 0B 00 (FA 0B - CRC)
The coil status in the response message is packed as one coil per bit of the data field. Status is indicated as: 1 = ON; 0 = OFF. The LSB of the first data byte contains the coil addressed in the query. The other coils follow toward the high order end of this byte, and from ‘low order to high order’ in subsequent bytes. If the returned coil quantity is not a multiple of eight, the remaining bits in the final data byte will be padded with zeros (toward the high order end of the byte). The Byte Count field specifies the number of complete bytes of data.
NOTE
Coils and registers are addressed explicit with an off-set of -1 in Modbus. I.e. Coil 33 is addressed as Coil 32.
Force/Write Single Coil (05 HEX)
This function forces the coil to either ON or OFF. When broadcast the function forces the same coil references in all attached slaves. The query message specifies the coil 65 (parameter write control) to be forced. Coil addresses start at zero, i.e. coil 65 is addressed as 64. Force Data = 00 00HEX (OFF) or FF 00HEX (ON).
Response
The normal response is an echo of the query, returned after the coil state has been forced.
Force/Write Multiple Coils (0F HEX)
This function forces each coil in a sequence of coils to either ON or OFF. When broadcast the function forces the same coil references in all attached slaves. The query message specifies the coils 17 to 32 (speed set-point) to be forced.
NOTE
Coil addresses start at zero, i.e. coil 17 is addressed as 16.
Response
The normal response returns the slave address, function code, starting address, and quantity of coils forced.
Read Holding Registers (03 HEX)
This function reads the contents of holding registers in the slave. The query message specifies the starting register and quantity of registers to be read. Register addresses start at zero, i.e. registers 1-4 are addressed as 0-3. Example: Read 3-03 Maximum Reference, register 03030.
Response
The register data in the response message are packed as two bytes per register, with the binary contents right justified within each byte. For each register, the first byte contains the high-order bits and the second contains the low-order bits.
Example: Hex 000088B8 = 35.000 = 15Hz.
Preset Single Register (06 HEX)
This function presets a value into a single holding register. The query message specifies the register reference to be preset. Register addresses start at zero, i.e. register 1 is addressed as 0.
Example: Write to 1-00 Configuration Mode, register 1000.
Response
The normal response is an echo of the query, returned after the register contents have been passed.
Preset Multiple Registers (10 HEX)
This function presets values into a sequence of holding registers. The query message specifies the register references to be preset. Register addresses start at zero, i.e. register 1 is addressed as 0. Example of a request to preset two registers (set 1-24 Motor Current to 738 (7.38 A)):
Response
The normal response returns the slave address, function code, starting address, and quantity of registers preset.
Комментариев нет:
Отправить комментарий
ваше мнение...