Всем привет!
Наконец-то я запустил систему, что купил полгода назад. Правда с самого начала она меня начала ставить в тупик. Жму кнопку или у контроллера замыкаю проводами и отрабатывает по разному, то в мгновение ока, то держать нужно секунд 10-20-30.
Опишу систему.
В слаботочном шкафу стоит WB6 и от него уходит в силовой щит шина RS-485.
Далее по порядку как проходит шина:
WB-MR6C v.2 (1 реле)
WB-MR6C v.2 (2 реле)
WB-MIO и от него WBIO-DI-WD-14 к нему подключена кнопка.
Запускаю правило из примеров, а оно работает через раз:
var di9 = “DI0/IN9”; //Сохраним в переменной имя входа.
var di10 = “DI0/IN10”; //Сохраним в переменной имя входа.
var r1Name = “R1”; //Сохраним в переменной имя устройства.
Раскинул для теста WB-MR6C и WB-MIO на разные шины и о чудо, все залетало. Ребятf из WB это как понимать? Ваше же оборудование на одной шине конфликтует.
Я первый день с вашей продукцией и пока на вы, так что от подробной инструкции что искать не откажусь.
Дебаг вывел:
WARNING: [serial] no devices defined for port </dev/ttyRS485-2 9600 8 N 2>. Skipping.
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:90: Serial protocol error: request timed out
WARNING: [mqtt] connection lost
WARNING: [modbus] Register <modbus_io:22:1:: 10000> setup failed: Serial protocol error: malformed response: invalid crc
WARNING: [modbus] failed to read 6 input(s) @ 32 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 13 input(s) @ 39 of device modbus:130: Serial protocol error: malformed response: invalid crc
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 coil(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 discrete(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] Register <modbus_io:22:1:: 10002> setup failed: Serial protocol error: request and response slave id mismatch
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 13 input(s) @ 39 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 coil(s) @ 0 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 discrete(s) @ 0 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] Register <modbus_io:22:1:: 10003> setup failed: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 input(s) @ 32 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 coil(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 discrete(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 discrete(s) @ 7 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 input(s) @ 32 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 13 input(s) @ 39 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 coil(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 discrete(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] Register <modbus_io:22:1:: 10000> setup failed: Serial protocol error: malformed response: invalid crc
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 input(s) @ 32 of device modbus:90: Serial protocol error: malformed response: invalid crc
WARNING: [modbus] failed to read 13 input(s) @ 39 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 coil(s) @ 0 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 discrete(s) @ 0 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 discrete(s) @ 7 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] Register <modbus_io:22:1:: 10000> setup failed: Serial protocol error: request and response slave id mismatch
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:130: Serial protocol error: request timed out
WARNING: [mqtt] connection lost
WARNING: [modbus] failed to read 6 input(s) @ 32 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:130: Serial protocol error: malformed response: invalid crc
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 coil(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 discrete(s) @ 0 of device modbus:130: Serial protocol error: malformed response: invalid crc
WARNING: [modbus] failed to read 1 discrete(s) @ 7 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 input(s) @ 32 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 13 input(s) @ 39 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 discrete(s) @ 0 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 discrete(s) @ 7 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 coil(s) @ 0 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 discrete(s) @ 7 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 13 input(s) @ 39 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 discrete(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 discrete(s) @ 7 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] Register <modbus_io:22:1:: 10000> setup failed: Serial protocol error: malformed response: invalid crc
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 input(s) @ 32 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 13 input(s) @ 39 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 coil(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 discrete(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 discrete(s) @ 7 of device modbus:130: Serial protocol error: malformed response: invalid data size
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 input(s) @ 32 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 13 input(s) @ 39 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 coil(s) @ 0 of device modbus:90: Serial protocol error: request timed out
WARNING: [mqtt] connection lost
WARNING: [modbus] failed to read 6 discrete(s) @ 0 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] Register <modbus_io:22:1:: 10001> setup failed: Serial protocol error: request and response slave id mismatch
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 input(s) @ 32 of device modbus:90: Serial protocol error: malformed response: invalid crc
WARNING: [modbus] failed to read 13 input(s) @ 39 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:90: Serial protocol error: malformed response: invalid crc
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 discrete(s) @ 0 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 discrete(s) @ 7 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] Register <modbus_io:22:1:: 10001> setup failed: Serial protocol error: request and response slave id mismatch
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 input(s) @ 32 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 13 input(s) @ 39 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 coil(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 discrete(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 discrete(s) @ 7 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] Register <modbus_io:22:1:: 10000> setup failed: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 input(s) @ 32 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 13 input(s) @ 39 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 coil(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 discrete(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 discrete(s) @ 7 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:90: Serial protocol error: malformed response: invalid crc
WARNING: [modbus] failed to read 6 input(s) @ 32 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 13 input(s) @ 39 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:90: Serial protocol error: malformed response: invalid data size
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 coil(s) @ 0 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 discrete(s) @ 7 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 input(s) @ 32 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:130: Serial protocol error: request timed out
WARNING: [mqtt] connection lost
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 coil(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] Register <modbus_io:22:1:: 10000> setup failed: Serial protocol error: malformed response: invalid crc
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:90: Serial protocol error: malformed response: invalid crc
WARNING: [modbus] failed to read 6 input(s) @ 32 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 13 input(s) @ 39 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 coil(s) @ 0 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 discrete(s) @ 0 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 discrete(s) @ 7 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 input(s) @ 32 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 13 input(s) @ 39 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 2 input(s) @ 54 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 input(s) @ 121 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 coil(s) @ 0 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 discrete(s) @ 0 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 discrete(s) @ 7 of device modbus:90: Serial protocol error: request timed out
WARNING: [modbus] Register <modbus_io:22:1:: 10000> setup failed: Serial protocol error: malformed response: invalid crc
WARNING: [modbus] failed to read 1 holding(s) @ 8 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 input(s) @ 32 of device modbus:130: Serial protocol error: request timed out
^CWARNING: [modbus] failed to read 13 input(s) @ 39 of device modbus:130: Serial protocol error: malformed response: invalid crc
WARNING: [modbus] failed to read 6 coil(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 6 discrete(s) @ 0 of device modbus:130: Serial protocol error: request timed out
WARNING: [modbus] failed to read 1 discrete(s) @ 7 of device modbus:130: Serial protocol error: request timed out
WARNING: [mqtt] connection lost
WARNING: [backend] Unable to cleanup topic ‘/devices/R2/controls/Supply voltage’: timed out
wb-mqtt-serial: wblib/mqtt.cpp:211: virtual WBMQTT::TFuture WBMQTT::TMosquittoMqttClient::PublishSynced(const WBMQTT::TMqttMessage&): Assertion `Connected.load()’ failed.
По статье Настройка параметров обмена данными по RS-485 для modbus-устройств Wiren Board — Wiren Board увеличил скорость, теперь срабатывание происходит при зажатой кнопке за секунду. На отдельной шине вообще в момент, по одному щелчку. Отдельную шину выделить не могу под это, так как она зарезервирована под терморегулятор. Мне честно не понятно почему так происходит, как сделать, что бы по человечески все работало?
В правилах, кстати, лучше в whenChanged использовать не текущий статус входа, а счётчик срабатываний. Задержка так меньше не станет, но срабатывать будет от любой длительности нажатия.
Мгновенной реакции при использовании Modbus на общей шине не добиться. Если есть возможность, то подключите WBIO-DI-WD-14 напрямую к WB6 без WB-MIO - работать будет мгновенно.
Нет, очень не советую. Там i2c.
Судя по логу - сплошные ошибки… Надо разобраться - почему. Для этого, как лучший путь предлагаю кинуть кабель для Modbus и питания отдельный, времянку. И подключить на него одно устройство из второго щита. Именно новым кабелем и только одно. Остальные - отключить в конфиге.
Вот только эти вижу:
WARNING: [modbus] failed to read 14 coil(s) @ 0 of device modbus_io:22:1: Serial protocol error: request timed out
WARNING: [modbus] failed to read 14 coil(s) @ 0 of device modbus_io:22:1: Serial protocol error: request timed out
WARNING: [modbus] failed to read 14 coil(s) @ 0 of device modbus_io:22:1: Serial protocol error: request timed out
WARNING: [modbus] failed to read 14 coil(s) @ 0 of device modbus_io:22:1: Serial protocol error: request timed out