RS-485:Configuration via Web Interface/en: различия между версиями

Нет описания правки
(Новая страница: «=== Setting the polling period ===»)
 
(не показаны 3 промежуточные версии этого же участника)
Строка 2: Строка 2:


{{DISPLAYTITLE:Начальное конфигурирование устройств через web-интерфейс}}
{{DISPLAYTITLE:Начальное конфигурирование устройств через web-интерфейс}}
For general information on connecting RS-485 devices to the controller, see page  [[Special:MyLanguage/RS-485|RS-485]].
For general information on connecting RS-485 devices to the controller, see page  [[RS-485/en|RS-485]].




Строка 43: Строка 43:
=== Setting the polling period ===
=== Setting the polling period ===


Драйвер ([[https://github.com/contactless/wb-homa-drivers/tree/master/wb-mqtt-serial wb-mqtt-serial|https://github.com/contactless/wb-homa-drivers/tree/master/wb-mqtt-serial wb-mqtt-serial]]) позволяет определять, с какой скоростью будут опрашиваться те или иные каналы устройства. Данный параметр называется Desired poll interval и задается в миллисекундах. Общий для всех интервал опроса задается параметром Desired poll interval в конфигурации порта. Если этот параметр не будет переопределен в других устройствах или других каналов, то для каждого канала будет использоваться именно это значение. Если скорость опроса задана для какого-то конкретного устройства, то для всех каналов этого устройства будет использоваться именно она, опять-таки, если для какого-то канала не задан свой интервал опроса. Приоритет интервалов выглядит таким образом: канал-> устройство -> порт. Например, если у нас есть несколько входов релейного модуля, критичных ко времени срабатывания, для них мы можем задать минимальный интервал в 1 мс. По умолчанию в web-интерфейсе отсутствует поле для изменения этого свойства -- его надо добавить. Сначала указываем канал, свойство которого мы хотим переопределить, для чего щелкаем по кнопке '''+Item'''. Имя контрола и его адрес можно узнать в файле шаблона устройства [[Special:MyLanguage/Файл:Channel_name_address.png|400px|thumb|left|Фрагмент описания канала устройства из файла шаблона из директории /usr/share/wb-mqtt-serial/templates]]
The driver ([[https://github.com/contactless/wb-homa-drivers/tree/master/wb-mqtt-serial wb-mqtt-serial|https://github.com/contactless/wb-homa-drivers/tree/master/wb-mqtt-serial wb-mqtt-serial]]) allows you to determine what speed certain channels of the device will be polled at. This parameter is called Desired poll interval and is specified in milliseconds. Common to all the polling interval is specified by the Desired poll interval in the configuration of the port. If you do not override this setting in other devices or other channels, this value will be used for each channel. If the polling rate is set for a particular device, then it will be used for all channels of this device, again, if a channel does not have its own polling interval. The priority of intervals looks like this: channel-> device -> port. For example, if we have multiple relay module inputs that are time-critical, we can set a minimum interval of 1 MS for them. By default, there is no field in the web interface to change this property -- it must be added. First, we specify the channel whose property we want to override by clicking the ''+Item button''. The control name and address can be found in the device template file [[Файл:Channel_name_address.png|400px|thumb|left|The fragment of the detailed description of the device channel from the template file in the directory /usr/share/wb-mqtt-serial/templates]] In the 'Control name' field we substitute the value of the variable "name", Address -- "address". This way we fill in fields Control type and Register type. [[Файл:Channel_props_poll.png|400px|thumb|center|Add the polling interval property for the device channel]] Click on the Properties button of the corresponding channel and put a check mark in the Desired poll interval (ms), as shown in the figure. The result is the following set of fields: [[Файл:Channel_settings.png|600px|thumb|center|A set of fields that define the properties of a particular channel. The Desired poll interval (ms) field defines the interval between two parameter polls]]
В поле Control name мы подставляем значение переменной "name", Address -- "address". Соответственно заполняем поля Control type и Register type. [[Special:MyLanguage/Файл:Channel_props_poll.png|400px|thumb|center|Добавляем свойство интервала опроса для канала устройства]] щелкаем на кнопке Properties соответствующего канала и ставим флажок в поле Desired poll interval (ms), как показано на рисунке.
To save, click the Save button at the top of the page.
В результате получаем следующий набор полей:[[Special:MyLanguage/Файл:Channel_settings.png|600px|thumb|center|Набор полей, определяющих свойства конкретного канала. Поле Desired poll interval (ms) определяет интервал между двумя опросами параметра]]
Для сохранения нажимаем кнопку Save в верхней части страницы.
12 063

правки