User Tools

Site Tools


webhmi_internal_registers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
webhmi_internal_registers [2018/11/27 13:13] – [User data registers] akuzmukwebhmi_internal_registers [2023/12/04 12:30] (current) atolstov
Line 1: Line 1:
 ====== WebHMI Internal Registers ====== ====== WebHMI Internal Registers ======
 +{{ network:ic_icon.png?direct&100|}}
 Through internal register it is possible to access user memory areas, WebHMI hardware related data etc.  Through internal register it is possible to access user memory areas, WebHMI hardware related data etc. 
-The following internal registers are available in WebHMI (for version 1.5 and higher):+The following internal registers are available in WebHMI: 
 + 
 ===== User data registers ===== ===== User data registers =====
 ==== Dxxx - Data registers ==== ==== Dxxx - Data registers ====
Line 11: Line 14:
 |D1999 |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.+ 
 +Prior firmware v3.5 following rules apply: 
 + 
 +The data in these registers are NOT stored after the reboot before firmware version 3.5.
  
 The user can access 2000 bytes of RAM. The register address is the address of the beginning of the fragment in the memory block. 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. 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.
 +
 +Since version 3.5 following rules apply:
 +
 +These registers are non-volatile. System saves their value every 15 minutes or on any project change or correct shutdown event. If you poweroff Raspberry PI or manually shutdown virtual machine from VirtualBox UI these registers could loose latest values changes.
 +
 +There is no limit on these registers. You can add as much registers as you need. 
 +
 +Addresses are no longer used in system. Each register has its own memory block and register's address means nothing except help for users to identify the register. You can add multiple registers with the same address and use them as different registers. For example you can add 2 registers with address D10 and WebHMI with threat them as different registers with their own values.
 +
 ==== DSxxx - Data static registers ==== ==== DSxxx - Data static registers ====
  
Line 27: Line 42:
 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. 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.+Nonvolatile memory is implemented in the hardware revision platform V5.34 and higher. VirtualBox and Raspberry PI images does not have non-volatile memory chip and can't save these registers. Instead, use D-registers which are non-volatile since firmware 3.5
  
 ==== Sxxx - String ==== ==== Sxxx - String ====
Line 45: Line 60:
  
 ===== Special data registers ===== ===== Special data registers =====
- 
----- 
  
 ==== Tx - Time registers ==== ==== Tx - Time registers ====
Line 60: Line 73:
  
 You can read the values ​​that are added to the report table. For convenience, each such value is signed directly in the condition editor. You can read the values ​​that are added to the report table. For convenience, each such value is signed directly in the condition editor.
-{{::event_registers.png?direct&1000|}}+ 
 +{{ network:event_int_regs.png?direct&800 |}}
  
 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. 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.
Line 98: Line 112:
 Example: R123 will return random numbers in the range from 0 to 122 inclusive. Example: R123 will return random numbers in the range from 0 to 122 inclusive.
  
-^Register ^Description ^Units ^Data type ^Read/Write^+^Register ^Description ^Data type ^Read/Write^
 |R2 |Random integer in the range from 0 to 1 (inclusive). |Double Word, Unsigned Int |Read/-| |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/-| |R3 |Random integer in the range from 0 to 2 (inclusive). |Double Word, Unsigned Int |Read/-|
Line 124: Line 138:
 ===== WebHMI system registers ===== ===== WebHMI system registers =====
  
----- 
  
 ==== Hx - Hardware-related registers ==== ==== Hx - Hardware-related registers ====
Line 134: Line 147:
 |H2 |RTC IC Temperature |Celsius degrees |Double word, float 32 |Read/-| |H2 |RTC IC Temperature |Celsius degrees |Double word, float 32 |Read/-|
 |H3 |Input voltage |Volts |Double word, float 32 |Read/-| |H3 |Input voltage |Volts |Double word, float 32 |Read/-|
-|H4 |Battery voltage |Voltage |Double word, float 32 |Read/-|+|H4 |Battery voltage |Volts |Double word, float 32 |Read/-|
 |H5 |“Power OK” - power is good.| |Bit |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/-| |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/-|
Line 168: Line 181:
  
 ===== Weather registers ===== ===== Weather registers =====
- 
----- 
  
 ==== WCxxx - Weather Condition registers ==== ==== WCxxx - Weather Condition registers ====
Line 194: Line 205:
 WF1 = Air temperature in the next 3 hours interval. WF1 = Air temperature in the next 3 hours interval.
 WF21 = Air temperature in the next 6 hours interval. WF21 = Air temperature in the next 6 hours interval.
-WF31 = Air temperature in the next 9 hours interval+WF31 = Air temperature in the next 9 hours interval, etc.
-И т.д.+
  
 For a more accurate understanding of how long a forecast is built, you can use timestamps in the WFx0 registers. For a more accurate understanding of how long a forecast is built, you can use timestamps in the WFx0 registers.
Line 240: Line 250:
 |WS1 |Sunset time. |Double Word, Unixtime |Read/-| |WS1 |Sunset time. |Double Word, Unixtime |Read/-|
  
-A textual description of the current weather can be: Clear, Clouds, Rain, Snow, Thunderstorm, Mist.+
webhmi_internal_registers.1543324428.txt.gz · Last modified: 2018/11/27 13:13 by akuzmuk

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki