|
| 1 | +# Interface |
| 2 | + |
| 3 | +This page explains all settings that can be configured for the Energy Meter. To access the settings, place the block and interact with |
| 4 | +it to open its user interface. The interface is divided into two sections. The left panel is the global panel and is always visible. |
| 5 | +The right panel depends on the currently selected tab in the top tab bar. |
| 6 | + |
| 7 | +## Global Panel |
| 8 | + |
| 9 | +<img src="/../img/global_panel.png" width="300" style="float:right; margin-left:10px;" /> |
| 10 | + |
| 11 | +The global panel is located on the left side of the interface. It remains visible even when switching tabs. This panel contains the |
| 12 | +current measurement values and the status. It also includes the I/O grid and the option to reset the total amount of measured energy. |
| 13 | + |
| 14 | +### Measurements |
| 15 | + |
| 16 | +The measurements include the current flow rate and the total amount of measured energy. The total value can be reset using the button |
| 17 | +below the I/O grid. |
| 18 | + |
| 19 | +The values for the current measurements update once per configured interval. The only exception is reaching the [tolerance](#tolerance). |
| 20 | +See that section for more information. |
| 21 | + |
| 22 | +### Status |
| 23 | + |
| 24 | +The status updates whenever a setting or state changes that could affect it. This includes the current flow rate, changes to neighboring |
| 25 | +blocks, and changes to input and output configurations. |
| 26 | + |
| 27 | +The status **Disconnected** indicates that the required settings for the currently selected mode have not been configured. In most cases, |
| 28 | +this means that an input or output is missing. **Idle** means that all settings are configured correctly and the Energy Meter is waiting to |
| 29 | +transfer energy. The final status depends on the selected [transfer mode](#transferring) and indicates that the Energy Meter is currently |
| 30 | +processing requests and operating correctly. |
| 31 | + |
| 32 | +### I/O Grid |
| 33 | + |
| 34 | +This section is used to configure the sides of the block. Each side can be configured as an input, an output, or disabled for energy |
| 35 | +requests. The front side cannot be configured because it is reserved for displaying the flow rate on the block. The sides can be configured |
| 36 | +using left-click or right-click. It is also possible to reset a single side instantly or reset all sides at once. More details can be found |
| 37 | +in the tooltips of the respective buttons. |
| 38 | + |
| 39 | +Whether a side can be configured as an input or output depends on the selected [transfer mode](#transferring). |
| 40 | + |
| 41 | +## Configuration Panel |
| 42 | + |
| 43 | +<img src="/../img/configuration_tab.png" width="400" style="float:right; margin-left:10px;" /> |
| 44 | + |
| 45 | +The configuration panel, accessible by selecting the **Configuration** tab, allows you to adjust settings related to modes and measurements. |
| 46 | + |
| 47 | +### Modes |
| 48 | + |
| 49 | +In this section, different modes can be selected using radio buttons. Only one option per section can be selected at a time. |
| 50 | + |
| 51 | +#### Transferring |
| 52 | + |
| 53 | +The transfer mode determines how energy requests arriving on sides configured as inputs are forwarded to the output sides. |
| 54 | +The default mode is **Split**. |
| 55 | + |
| 56 | +In **Split** mode, incoming requests are distributed evenly across all outputs. The system first attempts to divide the energy equally by |
| 57 | +the number of outputs so that each output receives the same share. If one of the outputs accepts less than its calculated share, the |
| 58 | +remaining energy is redistributed to the other outputs. This means the split is not forced. If there are more outputs than available energy, |
| 59 | +the remainder is sent to a randomly selected output. |
| 60 | + |
| 61 | +The **Transfer** mode is a special mode. It changes the behavior of the I/O grid and allows priorities to be assigned to outputs. Outputs |
| 62 | +with higher priority always receive forwarded energy first. The energy is then forwarded in descending priority order. Lower-priority |
| 63 | +outputs only receive energy if higher-priority outputs cannot accept all available energy. |
| 64 | + |
| 65 | +The **Consume** mode is used for testing setups. Instead of forwarding energy, this mode permanently deletes all incoming energy. This mode |
| 66 | +also changes the behavior of the I/O grid by disallowing outputs. It is typically used to measure how much energy can enter through all |
| 67 | +inputs, especially when the normal flow is limited by the outputs. |
| 68 | + |
| 69 | +#### Measuring |
| 70 | + |
| 71 | +The measuring mode determines how the flow rate for an interval is calculated. The default mode is **Instant**. |
| 72 | + |
| 73 | +In **Instant** mode, only the stored values measured during the current interval are considered. Previous intervals are ignored. This mode |
| 74 | +is useful when exact values are required. |
| 75 | + |
| 76 | +The **Smoothed** mode changes the calculation by incorporating the previous interval. Instead of using only the measurements of the current |
| 77 | +interval, the flow rate is adjusted using the previous interval. This produces a smoother graph and reduces the impact of sudden spikes in |
| 78 | +the flow rate. This mode is useful for observing average behavior over longer periods. |
| 79 | + |
| 80 | +### Settings |
| 81 | + |
| 82 | +The options in this section are text fields that modify certain Energy Meter settings that affect |
| 83 | +measurement and energy flow. These text boxes also have several special behaviors. |
| 84 | + |
| 85 | +By default, the fields always display the current value. While editing a value, the displayed value does not update. Instead, the button on |
| 86 | +the right side becomes active. Pressing this button applies the entered value. Alternatively, the modified value can be confirmed using |
| 87 | +the **Enter** key. |
| 88 | + |
| 89 | +The text boxes also support several smart features, including input validation. If an input is invalid, for example due to an invalid |
| 90 | +number, the box turns red and the value cannot be applied. |
| 91 | + |
| 92 | +All text boxes also support mathematical expressions. Supported operations include addition, subtraction, multiplication, division, |
| 93 | +exponentiation, and parentheses. If a mathematical expression is detected, the text box displays a small popup with the calculated result |
| 94 | +that can be applied. Since all configurable values are integers, results from mathematical expressions are automatically rounded to the |
| 95 | +nearest whole number. Invalid symbols are also prevented while entering mathematical expressions. For example, closing parentheses can only |
| 96 | +be inserted if a matching opening parenthesis exists. |
| 97 | + |
| 98 | +#### Limit |
| 99 | + |
| 100 | +The transfer limit defines how much energy the Energy Meter can transfer per tick _(1 second = 20 ticks)_. |
| 101 | +All inputs are accumulated and limited by this value. The limit therefore applies globally and not per input. Any energy exceeding the |
| 102 | +limit is returned to the sender. |
| 103 | + |
| 104 | +#### Interval |
| 105 | + |
| 106 | +The interval defines the time in ticks _(1 second = 20 ticks)_ after which a new measurement is performed. During an interval, all relevant |
| 107 | +values are internally recorded and stored. Once the interval ends, these values are used to calculate the current flow rate and update the |
| 108 | +total measured energy. |
| 109 | + |
| 110 | +By default, this value is **5 ticks (0.25 seconds)**. This default can be changed in the mod configuration. For performance reasons, the |
| 111 | +value can never be lower than 5 ticks. |
| 112 | + |
| 113 | +The relatively small default value allows the Energy Meter to react quickly to changes. This is |
| 114 | +especially helpful when you want to immediately see when an energy supply is interrupted. However, this can cause fluctuating values to |
| 115 | +produce a changing average. Increasing the interval can smooth out fluctuations but results in less frequent updates of the flow rate. |
| 116 | + |
| 117 | +#### Tolerance |
| 118 | + |
| 119 | +Tolerance is a niche option and is rarely required. It is an additional option that refines the interval and defines how many ticks |
| 120 | +_(1 second = 20 ticks)_ the energy rate may remain zero before the interval resets. |
| 121 | + |
| 122 | +During an interval, the energy supply may temporarily stop. In that case, the flow rate is only set to zero once the entire interval has |
| 123 | +elapsed. This makes it difficult to detect interruptions when long intervals are used. By default, tolerance is **5 ticks (0.25 seconds)**. |
| 124 | +This means it is acceptable for the energy flow through the Energy Meter to be zero for up to 5 ticks. |
| 125 | +If no energy is transferred on the 6th tick, the interval ends early. This option is therefore only useful when the interval is greater |
| 126 | +than 5 ticks. |
| 127 | + |
| 128 | +The tolerance value is inclusive. With a value of 5, it is acceptable for energy to be absent for 5 ticks. Only the 6th tick resets |
| 129 | +the interval. |
| 130 | + |
| 131 | +This option is useful for very long intervals where you want to detect a loss of energy flow early. For example, if the interval is set to |
| 132 | +**400 ticks (20 seconds)**, it may be useful to set the tolerance to **50 ticks (2.5 seconds)**. This would allow you to detect a power |
| 133 | +interruption after only 2.5 seconds instead of up to 20 seconds. This is particularly helpful when using the **Smoothed** [measurement mode](#measuring), |
| 134 | +since the flow rate takes longer to reach zero in that mode. |
| 135 | + |
| 136 | +## Graph Panel |
| 137 | + |
| 138 | +<img src="/../img/graph_tab.png" width="400" style="float:right; margin-left:10px;" /> |
| 139 | + |
| 140 | +The graph panel can be accessed by selecting the **Graph** tab. It displays a graphical representation of the last 10 intervals. |
| 141 | + |
| 142 | +The data is shown in a simple coordinate system. The **x-axis** represents the most recent intervals, while the **y-axis** shows the |
| 143 | +average flow rate of each interval. The maximum value of the y-axis is always **10% higher** than the largest interval value to make the |
| 144 | +graph points easier to interpret. |
| 145 | + |
| 146 | +If data for fewer than 10 intervals exists, only the available intervals are displayed. While the current interval is running, only a |
| 147 | +horizontal line is shown. The graph point appears once the interval result becomes available. |
| 148 | + |
| 149 | +To inspect the data more easily, the graph can be paused using the button in the upper-right corner. Pausing only stops the graphical |
| 150 | +representation of the graph. Internally, new data is still processed and the Energy Meter continues operating. A label inside the graph |
| 151 | +indicates that it is paused. Press the button again to resume the graph. |
| 152 | + |
| 153 | +## Redstone Panel |
| 154 | + |
| 155 | +The Redstone panel is currently still under development and does not yet contain any options. |
0 commit comments