PDA

Просмотр полной версии : Проблема с управлением выходами в МК110-4ДН.4Р...



zlogic
25.12.2013, 09:28
Здравствуйте.

Протокол MODBUS RTU.
Считываю регистр 51.
Получаю ответ.
---> Read 16-bit unsigned value from single register - OK.
Всё нормально, состояние входа получаю.
Записываю в регистр 50. uint16. Значение 15 (включить все выходные реле).
Получаю ответ.
---> Выдано исключение типа "Modbus.SlaveException".
Function Code: 134
Exception Code: 1 - The function code received in the query is not an allowable action for the server (or slave). This may be because the function code is only applicable to newer devices, and was not implemented in the unit selected. It could also indicate that the server (or slave) is in the wrong state to process a request of this type, for example because it is unconfigured and is being asked to return register values.

Такое сообщение приходит при любой команде записи в другие регистры.
Что может быть?

Разобрался. Программа работы с MODBUS чужая. Она на кнопку "запись" слала код 06 (функция записи в регистр), а МК110 требует 16...