Внутренние регистры WebHMI/en — различия между версиями
(Новая страница: «== Sxxx - String == Since version 1.11.0.3478 in WebHMI, a new data type has been added-strings. The strings are available as internal Sxxx registers. A total of…») |
(Новая страница: «== TRxxx - Title of recipe == Since version 2.7 in WebHMI, a new type of internal registers TRxx has been added. They contain the names of recipes with the specif…») |
||
Строка 164: | Строка 164: | ||
== TRxxx - Title of recipe == | == TRxxx - Title of recipe == | ||
− | + | Since version 2.7 in WebHMI, a new type of internal registers TRxx has been added. They contain the names of recipes with the specified ID. | |
− | + | ||
<table border="1" cellspacing="0"> | <table border="1" cellspacing="0"> | ||
− | <tr><td> | + | <tr><td>Register</td><td>Description</td><td>Data type</td><td>Read/Write</td></tr> |
− | <tr><td>TR1</td><td> | + | <tr><td>TR1</td><td>Title of recipe with ID=1</td><td>String</td><td>Read/Write</td></tr> |
− | <tr><td>TR2</td><td> | + | <tr><td>TR2</td><td>Title of recipe with ID=2</td><td>String</td><td>Read/Write</td></tr> |
− | <tr><td>TR3</td><td> | + | <tr><td>TR3</td><td>Title of recipe with ID=3</td><td>String</td><td>Read/Write</td></tr> |
<tr><td colspan="7" align="center">...</td></tr> | <tr><td colspan="7" align="center">...</td></tr> | ||
</table> | </table> |
Версия 09:34, 13 июля 2017
The following internal registers are available in WebHMI (for version 1.5 and higher):
Содержание
- 1 Cx - Communication registers
- 2 CDxxx - Connection Disabled registers
- 3 Dxxx - Data registers
- 4 DSxxx - Data static registers
- 5 Tx - Time registers
- 6 Hx - Hardware-related registers
- 7 B0 - Sound alert register
- 8 DOx - Digital Output registers
- 9 Ixxx - Intervals
- 10 Rxxx - Random values
- 11 Lx - Linux-related registers
- 12 Exxx.xxx - Event registers
- 13 ESxxx - Event State
- 14 ELxxx - Event Length
- 15 Sxxx - String
- 16 TRxxx - Title of recipe
- 17 WCxxx - Weather Condition registers
- 18 WFxxx - Weather Forecast registers
- 19 WSxxx - Sunset/Sunrize registers
Cx - Communication registers
The presence of communication errors on different connections
Register | Description | Units | Data type | Read/Write |
C0 | The presence of communication errors in any of the connections. 0 means there is no communication error. A positive number indicates the connection number in which there is a communication error. | Connection number | Word, Unsigned Int | Read/- |
C1 | The presence of a communication error in connection with ID = 1. 0 means there are no errors. A positive number means a register ID that can not be read. | Register number | Word, Unsigned Int | Read/- |
C2 | The presence of a communication error in connection with ID = 2. 0 means there are no errors. A positive number means a register ID that can not be read. | Register number | Word, Unsigned Int | Read/- |
... | ... | ... | ... |
CDxxx - Connection Disabled registers
Connection status - enabled / disabled. This register allows you to see whether the exchange is disabled for a specific connection. If the exchange is disabled, the system will return 1. If the exchange is not disabled, it will return 0. Recording to these registers allows you to enable / disable the exchange on the desired connection. To disable the exchange, you need to write 1 to the appropriate register.
Register | Description | Data type | Read/Write |
CD1 | Exchange turned on connection with ID = 1. | Bit | Read/Write |
CD2 | Exchange turned on connection with ID = 2. | Bit | Read/Write |
CD3 | Exchange turned on connection with ID = 3. | Bit | Read/Write |
... | ... | ... |
Dxxx - Data registers
Register | Описание | Units | Data type | Read/Write | ||
D0 | A common register for user needs. | Bit, Byte, Word, Double Word | Read/Write | |||
... | ||||||
D1999 | A common register for user needs. | Bit, Byte, Word, Double Word | Read/Write |
The data in these registers are NOT stored after the reboot.
The user can access 2000 bytes of RAM. The register address is the address of the beginning of the fragment in the memory block.
Depending on the selected data type, a different number of bytes is required per register. So, you can access the register with address D12 as byte. In this case, there will be a reference to one byte in memory. If you access the register with the address D12 as a word (Word), then physically there will be access to two bytes with addresses D12 and D13 of which the word will be composed. In this way, you can access the individual bytes in the desired word or double word. The system does not check the register addresses for intersections or overlays. This control must be performed by the user.
DSxxx - Data static registers
Register | Description | Units | Data type | Read/Write | ||
DS0 | Non-volatile register for user needs. | Byte, Word, Double Word | Read/Write | |||
... | ||||||
DS1999 | Non-volatile register for user needs. | Byte, Word, Double Word | Read/Write |
The data in these registers are stored after rebooting. The user can access 2000 bytes in non-volatile memory. The register address is the address of the beginning of the fragment in the memory block.
Depending on the selected data type, a different number of bytes is required per register. So, you can access the register with the DS12 address as a byte. In this case, there will be a reference to one byte in memory. If you access the register with DS12 as the word (Word), then physically it will access two bytes with DS12 and DS13 addresses of which the word will be composed. In this way, you can access the individual bytes in the desired word or double word. The system does not check the register addresses for intersections or overlays. This control must be performed by the user.
Nonvolatile memory is implemented in the hardware revision platform V5.34 and higher.
Tx - Time registers
Register | Description | Units | Data type | Read/Write |
T0 | Current time | Seconds | [UnixTime] | Read/- |
T1 | The time taken to exchange data with all the registers in the previous cycle. | Милисекунды | Double Word, Unsigned Int | Read/- |
T2 | Time spent on data exchange, processing of all events, scripts, writing to the database, writing new values to the devices in the previous cycle. In fact, this is a complete cycle without taking into account the pause between cycles. | Милисекунды | Double Word, Unsigned Int | Read/- |
T3 | The total actual time of the previous cycle, taking into account the pause between cycles. | Milliseconds | Double Word, Unsigned Int | Read/- |
Registers for reading WebHMI on-board hardware status
Register | Description | Units | Data type | Read/Write |
H0 | Flag is the validity of the temperature value. 1 = value is reliable, 0 = value is not reliable | Bit | Read/- | |
H1 | Validation flag of power controller registers, 1 = valid values, 0 = values are not reliable | Bit | Read/- | |
H2 | RTC IC Temperature | Celsius degrees | Double word, float 32 | Read/- |
H3 | Input voltage | Вольты | Double word, float 32 | Read/- |
H4 | Battery voltage | Вольты | Double word, float 32 | Read/- |
H5 | “Power OK” - power is good. | Bit | Read/- | |
H6 | "Battery Low" - the battery is discharged. 1 means that the battery voltage reached a minimal but still operational voltage, WebHMI will complete its work in a regular manner. | Bit | Read/- | |
H7 | Battery Critical.The voltage on the battery has reached a minimum value, and if the input voltage does not appear within 10 seconds, the controller will de-energize WebHMI. | Bit | Read/- | |
H8 | System OK. 1 means the system has booted up and running. | Bit | Read/- | |
H9 | “External Power Supply”. Working from 24V. 1 means that the system is powered by external power. | Bit | Read/- | |
H10 | “Internal Power Supply”. Working from battery. 1 means the system is running on battery power. | Bit | Read/- | |
H11 | "Reset enabled" - The timer for the RESET signal is switched on. 1 means the system is about to reboot. | Bit | Read/- | |
H12 | “Power OFF enabled”. 1 means the system is going to shut down. | Bit | Read/- |
B0 - Sound alert register
With the help of this register you can make sounds of the built-in WebHMI buzzer. A value of 1 to 8 must be written to the register. WebHMI will issue a corresponding number of beeps. After the signals sound, WebHMI stops making a sound. To repeat the sound signal, you need to write down the desired number again in this register. You can write to this register using scripts. So, for example, you can make a squeaking when the connection breaks down or when an emergency situation occurs.
When reading from this register, 0 will always return.
DOx - Digital Output registers
Registers of external solid-state relays (SSRs). When writing to the register, the corresponding SSR will be closed.
With the help of SSR it is possible to organize control of external devices or to transmit signals to external systems. For example, you can connect a security or fire system and send them alarm signals.
Register | Description | Ubits | Data type | Read/Write |
DO0 | SSR number 1 | Bit | Read/Write | |
DO1 | SSR number 2 | Bit | Read/Write |
Ixxx - Intervals
Interval registers. Usually used in the event conditions. For example, if you want to receive an event that fires every 10 seconds, you can compare the value of I10 with zero (I10 == 0). If you need an interval of 2 minutes then you need to use the I120 register.
Register | Description | Units | Data type | Read/Write | ||
I1 | The remainder of the current time division by 1 | Seconds | Double Word, Unsigned Int | Read/- | ||
I2 | The remainder of the current time division by 2 | Seconds | Double Word, Unsigned Int | Read/- | ||
I3 | The remainder of the current time division by 3 | Seconds | Double Word, Unsigned Int | Read/- | ||
... |
Rxxx - Random values
Random number generator. Rxxx = rand() % xxx.
The value of the register with the number xxx is the remainder of the division of the random number by xxx (register address).
Example: R123 will return random numbers in the range from 0 to 122 inclusive.
Register | Description | Units | Data type/td> | Read/Write | ||
R2 | Random integer in the range from 0 to 1 (inclusive). | Double Word, Unsigned Int | Read/- | |||
R3 | Random integer in the range from 0 to 2 (inclusive). | Double Word, Unsigned Int | Read/- | |||
R4 | Random integer in the range from 0 to 3(inclusive).. | Double Word, Unsigned Int | Read/- | |||
... |
Some most important metrics of the operating system.
Register | Description | Units | Data type | Read/Write |
L0 | Free memory | KiB | Word, Unsigned Int | Read/- |
L1 | Free memory plus memory occupied by OS buffers | KiB | Word, Unsigned Int | Read/- |
L2 | 1 minute [load average] | Double Word, Float 32 | Read/- | |
L3 | 5 minutes [load average] | Double Word, Float 32 | Read/- | |
L4 | 15 minutes [load average] | Double Word, Float 32 | Read/- |
Exxx.xxx - Event registers
Registers of events. If the event X, for which id = Y, is now being executed, then some of its values from registers of the form EY.xxx can be read. Only reading.
You can read the values that are added to the report table. For convenience, each such value is signed directly in the condition editor.
On this screen threre are registers E1.0, E1.1, E1.2. When the event is now on, the register will store respective values from the report with id = 1. In this example the E1.0 register will store event start time [UnixTime], E1.1 - event end time or 0 if event not finished yet, E1.2 - the value from register "Recipe" at the moment of event start.
ESxxx - Event State
Event state registers.
For example, value "1" in the ES2 register means that the event with id = 2 is now running. If the register ES2 = "0", then event is not active.
Register | Description | Units | Data type | Read/Write | ||
ES1 | Event state with id=1 | Bit | Read/- | |||
ES2 | Event state withid=2 | Bit | Read/- | |||
ES3 | Event state with id=3 | Bit | Read/- | |||
... |
ELxxx - Event Length
Event length registers.
For example, the EL2 register will contain the duration in seconds of the event with id = 2, provided that this event is currently running. If the register EL2 is zero, then this means that the condition is not met or its duration is less than 1 second.
Register | Description | Units | Data type | Read/Write | ||
EL1 | Duration of the event with id=1 | Секунды | Double Word | Read/- | ||
EL2 | Duration of the event with id=2 | Секунды | Double Word | Read/- | ||
EL3 | Duration of the event with id=3 | Секунды | Double Word | Read/- | ||
... |
Sxxx - String
Since version 1.11.0.3478 in WebHMI, a new data type has been added-strings. The strings are available as internal Sxxx registers. A total of 200 such registers are available S1 ... S200.
Register | Description | Data type | Read/Write | |||
S1 | String variable 1 | String | Read/Write | |||
S2 | String variable 2 | String | Read/Write | |||
S3 | String variable 3 | String | Read/Write | |||
... | ||||||
S200 | String variable 200 | String | Read/Write |
TRxxx - Title of recipe
Since version 2.7 in WebHMI, a new type of internal registers TRxx has been added. They contain the names of recipes with the specified ID.
Register | Description | Data type | Read/Write | |||
TR1 | Title of recipe with ID=1 | String | Read/Write | |||
TR2 | Title of recipe with ID=2 | String | Read/Write | |||
TR3 | Title of recipe with ID=3 | String | Read/Write | |||
... |
WCxxx - Weather Condition registers
Текущая метеоинформация. Группа регистров, предоставляющих погодную информацию на текущий момент в месте установки WebHMI. Данные обновляются примерно каждые два часа. Для работы сервиса требуется интернет-подключение, учетная запись в Level2 и подписка на метеопрогноз. Регистры доступны начиная с версии 2.5.2400.
Регистр | Описание | Тип данных | Read/Write |
WC0 | Время, для которого получены данные. | Double Word, Unixtime | Read/- |
WC1 | Температура воздуха, градусы Цельсия. | Double Word, Float | Read/- |
WC2 | Давление, hPa. | Word, Int | Read/- |
WC3 | Относительная влажность, %. | Word, Int | Read/- |
WC4 | Скорость ветра, м/с. | Double Word, Float | Read/- |
WC5 | Направление, откуда дует ветер, метрологические градусы. | Double Word, Float | Read/- |
WC6 | Облачность, %. | Word, Int | Read/- |
WC7 | Количество осадков (дождь), мм. | Double Word, Float | Read/- |
WC8 | Количество осадков (снег), мм. | Double Word, Float | Read/- |
WC9 | Текстовое описание текущей погоды | String | Read/- |
Текстовое описание текущей погоды может быть: Clear, Clouds, Rain, Snow, Thunderstorm, Mist.
WFxxx - Weather Forecast registers
Прогноз погоды на ближайшие сутки с интервалом 3 часа. Доступен прогноз на семь 3-х часовых интервалов вперед. Данные обновляются примерно каждые два часа. Для работы сервиса требуется интернет-подключение, учетная запись в Level2 и подписка на метеопрогноз. Регистры доступны начиная с версии 2.5.2400.
Регистры аналогичны регистрам WCxxx. Адреса регистров строятся таким образом: [номер интервала] * 10 + [адрес регистра WCxxx].
Пример:
WF1 = Температура воздуха в следующем 3-х часовом интервале.
WF21 = Температура воздуха примерно через 6 часов.
WF31 = Температура воздуха примерно через 9 часов.
И т.д.
Для более точного понимания на какое время строится прогноз, можно использовать метки времени в регистрах WFx0.
Регистр | Описание | Тип данных | Read/Write |
WF0 | Интервал 1. Время, для которого получены данные. | Double Word, Unixtime | Read/- |
WF1 | Интервал 1. Температура воздуха, градусы Цельсия. | Double Word, Float | Read/- |
WF2 | Интервал 1. Давление, hPa. | Word, Int | Read/- |
WF3 | Интервал 1. Относительная влажность, %. | Word, Int | Read/- |
WF4 | Интервал 1. Скорость ветра, м/с. | Double Word, Float | Read/- |
WF5 | Интервал 1. Направление, откуда дует ветер, метрологические градусы. | Double Word, Float | Read/- |
WF6 | Интервал 1. Облачность, %. | Word, Int | Read/- |
WF7 | Интервал 1. Количество осадков (дождь), мм. | Double Word, Float | Read/- |
WF8 | Интервал 1. Количество осадков (снег), мм. | Double Word, Float | Read/- |
WF9 | Интервал 1. Текстовое описание текущей погоды | String | Read/- |
WF10 | Интервал 2. Время, для которого получены данные. | Double Word, Unixtime | Read/- |
WF11 | Интервал 2. Температура воздуха, градусы Цельсия. | Double Word, Float | Read/- |
WF12 | Интервал 2. Давление, hPa. | Word, Int | Read/- |
WF13 | Интервал 2. Относительная влажность, %. | Word, Int | Read/- |
WF14 | Интервал 2. Скорость ветра, м/с. | Double Word, Float | Read/- |
WF15 | Интервал 2. Направление, откуда дует ветер, метрологические градусы. | Double Word, Float | Read/- |
WF16 | Интервал 2. Облачность, %. | Word, Int | Read/- |
WF17 | Интервал 2. Количество осадков (дождь), мм. | Double Word, Float | Read/- |
WF18 | Интервал 2. Количество осадков (снег), мм. | Double Word, Float | Read/- |
WF19 | Интервал 2. Текстовое описание текущей погоды | String | Read/- |
... | ... | ... | ... |
WF60 | Интервал 7. Время, для которого получены данные. | Double Word, Unixtime | Read/- |
WF61 | Интервал 7. Температура воздуха, градусы Цельсия. | Double Word, Float | Read/- |
WF62 | Интервал 7. Давление, hPa. | Word, Int | Read/- |
WF63 | Интервал 7. Относительная влажность, %. | Word, Int | Read/- |
WF64 | Интервал 7. Скорость ветра, м/с. | Double Word, Float | Read/- |
WF65 | Интервал 7. Направление, откуда дует ветер, метрологические градусы. | Double Word, Float | Read/- |
WF66 | Интервал 7. Облачность, %. | Word, Int | Read/- |
WF67 | Интервал 7. Количество осадков (дождь), мм. | Double Word, Float | Read/- |
WF68 | Интервал 7. Количество осадков (снег), мм. | Double Word, Float | Read/- |
WF69 | Интервал 7. Текстовое описание текущей погоды | String | Read/- |
Текстовое описание текущей погоды может быть: Clear, Clouds, Rain, Snow, Thunderstorm, Mist.
WSxxx - Sunset/Sunrize registers
Время восхода и заката солнца в текущих сутках. Для работы сервиса требуется интернет-подключение, учетная запись в Level2 и подписка на метеопрогноз. Регистры доступны начиная с версии 2.5.2400.
Регистр | Описание | Тип данных | Read/Write |
WS0 | Время рассветра. | Double Word, Unixtime | Read/- |
WS1 | Время заката. | Double Word, Unixtime | Read/- |
Текстовое описание текущей погоды может быть: Clear, Clouds, Rain, Snow, Thunderstorm, Mist.