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

Навигация

I/O Mapping Matrix/en: различия между версиями

Новая страница: «We want the input to work as a switch without locking and triggered when pressed (on the rising edge), and when opened, nothing would happen. The state of all rel…»
(Новая страница: «To do this, we turn to the register map of the mapping matrix and see that the input 0 corresponds to the registers 440 — 447. And for interaction with inputs 1…»)
(Новая страница: «We want the input to work as a switch without locking and triggered when pressed (on the rising edge), and when opened, nothing would happen. The state of all rel…»)
Строка 194: Строка 194:




Мы хотим, чтобы вход работал, как выключатель без фиксации и срабатывал при нажатии (по переднему фронту), а при размыкании ничего бы не происходило. При каждом нажатии состояние всех реле должно инвертироваться. Это соответствует комбинации 11 00: (12, 0x0C) — Изменить состояние выхода при замыкании:
We want the input to work as a switch without locking and triggered when pressed (on the rising edge), and when opened, nothing would happen. The state of all relays must be inverted each time they are pressed. This corresponds to a combination of 11 00: (12, 0x0C) — Change the output state when shorted:
[[File:Mm_1100.png|frameless|270px]]<br>
[[File:Mm_1100.png|frameless|270px]]<br>
Запишем в регистры 440 — 445 значение 12:
Write in the registers 440 — 445 the value of 12:


<syntaxhighlight lang="bash">modbus_client --debug -mrtu -pnone -s2 /dev/ttyRS485-1 -a1 -t0x10 -r440 12 12 12 12 12 12</syntaxhighlight>
<syntaxhighlight lang="bash">modbus_client --debug -mrtu -pnone -s2 /dev/ttyRS485-1 -a1 -t0x10 -r440 12 12 12 12 12 12</syntaxhighlight>
12 063

правки