- 16 Dec 2021
- 3 Minutes to read
- Print
- PDF
Configuration
- Updated on 16 Dec 2021
- 3 Minutes to read
- Print
- PDF
API configuration
API parameters define the communication between the module and N3uron's bootstrap.Figure 3: API parameters
API configuration includes the following parameters:
- Event rate: Event exchange rate between bootstrap and the module, displayed in milliseconds. Default value is 1000ms and minimum value is 100ms.
- Timeout: Maximum time to wait for a response from bootstrap, displayed in milliseconds. Minimum value is 100ms and default value is 5000ms. In nodes dealing with a high number of tags, this time can be increased to avoid timeouts when communicating with bootstrap.
- Keep-alive period: Time between keep-alive checks with bootstrap, displayed in milliseconds. Set to 0 to disable keep-alive checks for this module. The default value is 60,000ms. When the module fails to respond to keep-alive requests, bootstrap restarts the module process.
Once the API parameters are set, the configuration settings must be saved and the module restarted to apply the new values.
Logger configuration
These parameters define how the module logs its activity.
Figure 4: Logger configuration
Parameters:
- Enabled: When enabled, the module sends the logs to a text file located at <installation_folder>/N3uron/log/<module_name>. The default value is set to Enabled.
- Level: Level of detail in the information sent to the log file.
- Error: Only logs errors
- Warning: Logs errors and warnings.
- Info (default): Logs errors, warnings, and general information messages.
- Debug: Logs most of the module activity for debugging and troubleshooting purposes.
- Trace: Logs all module activity. This mode may log a huge amount of data, so it’s not recommended for production environments.
- Days to keep: Log files are automatically deleted when they become older than the number of days indicated here. The default value is 7 days.
Module configuration
The Derived Tags N3uron module offers the following configuration options:
Figure 5: Derived Tags configuration options
- Scan rate: The module’s internal scan rate. Each tag will be scanned to check for execution at this rate. Higher values mean less checks and less CPU usage but longer latency in the tag updates (the result of the calculation is not affected by this parameter). The minimum value is set to 100 milliseconds.
- S&F resume delay: Wait time displayed in milliseconds before unpausing the tag after all required links are reestablished. This is used to allow the node to receive S&F events before resuming calculation. The default value is 1000 milliseconds.
- Aggregated Tags: This section only contains options affecting Aggregated Tags.
- Aggregation delay: Specifies the delay between starting an aggregation and when the aggregated period is lapsed. This option is used to wait for the last sample from a remote link, in case it has suffered a delay due to connection issues. The minimum value is set to 0 milliseconds, which automatically disables this mechanism and causes aggregations to re-start as soon as possible.
- Maximum buffer size: Specifies how many tag events to hold in the buffer for each aggregated tag. If the buffer hits its capacity, the oldest values are discarded. The minimum value is 10 events.
- Expression Tags: This section only contains options affecting Expression Tags.
- Periodic delay: Specifies the delay for executing periodic expressions, displayed in milliseconds. This option can be used to allow events from remote nodes to propagate correctly to the main node. This setting only affects tags set to “Periodic” in Trigger.
- On change delay: Specifies the minimum amount of time between change events for triggering execution of the expression, displayed in milliseconds. This only affects expression tags with an “On change” trigger.
- Maximum buffer size: Sets the maximum number of tag events that the buffer can hold for each source tag used in the Expression Tag. For example, if the Expression Tag depends on 3 source tags and the buffer is 50 events, there are 3 buffers in total, each holding at most 50 events. The minimum value is 10 events.
- Global variables: These are user defined variables that can be used in Expression Tags.
Global variables
The name given to each global variable after creation will be the name used to access it at a later time. After creating a variable, the following configuration should be applied:Figure 6: Global variables
- Type: Determines the type of variable. Valid types are:
- Number: Holds a double precision floating point number.
- String: Holds a string
- Boolean: Holds a Boolean value.
- Array: Holds an array of variables (any type, including mixing different types).
- Object: Holds a key-value pair collection of variables.
- Value: Sets the initial value of the variable. This value can be changed via code, although this will only affect the value of the variable when the module is started. Arrays and Object variables cannot be given an initial value (they will always start with an empty value).