Memory computation is used to maintain memory variables under the Memory device (virtual device inside the gateway). Memory variables do not directly connect to field devices and are usually used to store script calculation results, intermediate values in rule flow, internal status, statistics, or data that needs to be reused within the gateway.
| Terminology | On-site Understanding |
|---|
| Memory device | A virtual device inside the gateway. It does not connect to a PLC, instrument, or serial port. |
| Memory variables | Internal gateway points, which can store calculation results, temporary status, statistics, or manually written values. |
| Read expression | A rule for calculating or reading a memory variable. When empty, the variable does not update automatically through calculation. |
| Write expression | A rule applied when a value is written. It can validate, convert, or link the value to another variable. |
| Execution interval | The interval between periodic calculation or refreshing of memory variables. Too short a gap increases CPU pressure. |
| Value Filtering | Filters outliers, jump values, or values that exceed the range to avoid false alarm triggers or forwarding. |
| Alarm suppression | When suppression conditions are met, the alarm is temporarily not triggered; it is commonly used to reduce invalid alarms during maintenance, shutdown, or interlock states. |
Function Entry
After logging into GatewayRuntime Web, click the menu on the left "Develop Configuration → Memory Calculation."

- Decide whether each variable is updated by a manual write, a read expression, a script, or a rule flow. Avoid multiple sources overwriting one value.
- Confirm the variable name, data type, unit, initial value, execution interval, and read/write permission.
- If a script, rule, or forwarding group references the variable, keep its name stable after it goes live.
- Review the execution interval before enabling many high-frequency calculations, so CPU usage remains controlled.
Page Structure
| Region | Description |
|---|
| Filter Area | Filter memory variables by variable name, read expression, and state. |
| Operation Area | Displays the total data count, providing refresh, new variable, column settings, variable import, variable export, and export everything. |
| Variable Table | Displays variable runtime values and configuration summaries under the Memory device. |
| Batch Operation Bar | Displays after checking variables, allowing batch editing or batch deletion. |
| Pagination bar | Switch pages and the number of rows displayed per page. |
| Column | Description |
|---|
| Variable Name | Memory Variable Name. Naming should be stable and avoid frequent modifications after being referenced by scripts, rules, or forwarded configurations. |
| Description | Explanation of variable usage. |
| Current Value | The current value of the variable. |
| Original value | Original value before conversion or formatting. |
| Data Type | Data type configured by variable. |
| Runtime Data Type | Data type corresponding to the current runtime. |
| Read Expressions | Expressions used to calculate or read variable values. |
| Online status | Displays whether the variable is currently normal. |
| Collection time | The time when the variable value was last updated. |
| Change time | The time when the variable value last changed. |
| Error message | Error details when calculation or update fails. |
| Operations | View details, write, edit, copy, or delete variables. |
After clicking "Add Variable," the variable configuration popup will open on the page. Variables created on memory calculation pages belong to memory devices by default, without needing to select channels or collection devices.
| Configuration Item | Description |
|---|
| Variable Name | Required. It is recommended to use English, numbers, and underlines to facilitate script and rule references. |
| Assigned device | fixed to Memory device. |
| Unit | Engineering unit for variable values. |
| Enable | to control whether variables participate in running. |
| Description | Explanation of variable usage. |
| Read and write permissions | Control whether variables allow read, write, or read/write access. |
| Execution interval | The interval used for periodic calculation or refresh. |
| Read expression parameters | Select or fill in memory variables to calculate the expression parameters used. |
| Write expression parameters | Fill in when you need to handle the write value. |
| Remarks field | can be used for business expansion, grouping, encoding, or external system mapping. |
| Alarm Configuration | Configure alarm text, alarm level, alarm code, suppression expression, and alarm delay. |
| Value Filtering | Configure minimum, maximum, maximum amplitude, maximum percentage change, and maximum number of consecutive cycles. |
After configuration, choose “Save” to keep editing in the popup, or choose “OK” to save and close it.
- Click “Add Variable”, enter a unique name, select the data type, and leave “Enable” on.
- For manual values, allow writing. For periodic calculation, select a read expression and set the execution interval.
- Click “OK”, return to the list, and refresh.
- Use “Write” to enter a safe test value, or wait for one execution interval and check the calculated result.
| Check | Pass standard |
|---|
| Save result | The variable appears in the list with the expected name, data type, and enabled state. |
| Runtime result | The current value updates from the write or expression, collection time continues to change, and the error message is empty. |
| Write result | The page reports success, and the current value plus any rule or script result using it is as expected. |
| Downstream use | After adding the variable to a rule or forwarding group, the downstream log or receiver shows the expected value. |
Saving a variable is not enough when it is disabled, its expression is not running, or a downstream target receives no value.
| Operations | Description |
|---|
| Refresh | Reload the list of memory variables. |
| Column Settings | Select Table Display Columns; column preferences are saved separately without affecting the collection configuration page. |
| Details | Open the variable details drawer to view basic information, alarm information, value filtering, historical data, and historical alarms. |
| Write | Manually write variable values. Before writing, confirm that the variable read/write permissions allow writing. |
| Edit | Change the configuration settings. |
| Copy | Copy existing variables by quantity, suitable for creating memory variables with similar names and configurations. |
| Batch Edit | After checking variables, batch modify some configurations. |
| Batch Delete | Batch delete variables after checking the box. Before deletion, ensure that scripts, rules, and forwarding configurations no longer reference these variables. |
| Import variables | Import memory variables from Excel files. The import result will display failure lines and error messages. |
| Export variables | Export memory variables within the current filter range. |
| Export all | Export all memory variables. |
| Scenarios | Recommendations |
|---|
| Rule Intermediate Values | Use memory variables to store states that need to be reused across processes or nodes. |
| Script Calculation Values | Put complex computational logic into the script, and memory variables read the script results. |
| Data forwarding auxiliary fields | When internal statistics need to be forwarded externally, memory variables can be included in the data forwarding scope. |
| Manual Write Debugging | During debugging, memory variables can be manually written, but the production environment should control write permissions. |
| Batch Creation | First, create a template variable, then use copy or Excel import to batch generate. |
| Scenarios | Recommendations |
|---|
| Name Change | Before modifying variable names, first check whether scripts, rule flows, data forwarding, and external calls reference the name. |
| Read expressions are null | Variables do not update according to computational logic and can only rely on writing or other process assignments. |
| Write failure | Check read/write permissions, data types, and value formats. |
| State Anomalies | Check the error message columns and check whether the read expression, script compilation status, and dependencies are normal. |
| Delete variables | Export backups before deleting and confirm that the rule flow and forwarding targets are no longer referenced. |
| Phenomenon | Handling Recommendations |
|---|
| List No Variables | Clear filter conditions and refresh; Double-check whether the variable has been created under the Memory device. |
| Current value does not update | Check whether the variable is enabled, whether the reading expression is correct, and whether the execution interval is reasonable. |
| Import failure | Open the import result pop-up window and correct the Excel template based on the failed row. |
| Alarms do not trigger | Check alarm configuration, suppression expressions, alarm delay, and value filtering configuration. |
| Data forwarding does not include this variable | Check in the data forwarding group whether the variable range includes the Memory device or the variable. |