-
Notifications
You must be signed in to change notification settings - Fork 4
measurement control
The RocketLogger offers three options for controlling the system and performing measurements:
- The fully featured command line interface tool
- A feature-rich web interface for convenient remote control with sample live preview
- A hardware button interface to control the RocketLogger device and measurements without any network connectivity
The RocketLogger command line interface (CLI) offers detailed control over measurements.
Note: the CLI interface changed and is not directly compatible with version 1.x CLI commands. For the list of changes and how to remap version 1.x commands, see the CLI changes summary.
The basic CLI command structure is:
rocketlogger [OPTION...] ACTION
A detailed list of all available ACTION and OPTION arguments of the CLI are
listed using rocketlogger --help
. The installed program version is identified
using rocketlogger --version
.
The RocketLogger CLI supports two actions to control measurement sampling:
-
start
-- Start a new measurement with provided configuration, -
stop
-- Stop measurement running in the background,
and two additional actions for configuration of the measurement parameters and polling the measurement status:
-
config
-- Display configuration, not starting a new or affecting any ongoing measurements, -
status
-- Display the current sampling status.
A set of optional arguments are used to configure measurement parameters and specific behavior of the RocketLogger CLI.
Basic measurement configuration options:
-b, --background Start measurement in the background and exit after
start.
-c, --channel=SELECTION Channel selection to sample. A comma separated
list of the channel names (V1, V2, V3, V4, I1L,
I1H, I2L, and/or I2H) or 'all' to enable all
channels.
-i, --interactive Display measurement data in the command line
interface.
-o, --output=FILE Store data to specified file. Use zero to disable
file storage.
-r, --rate=RATE Sampling rate in Hz. Supported values are: 1, 10,
100, 1k, 2k, 4k, 8k, 16k, 32k, 64k.
--samples=COUNT Number of samples to record before stopping
measurement (k, M, G, T scaling suffixes can be
used).
-u, --update=RATE Measurement data update rate in Hz. Supported
values: 1, 2, 5, 10.
Measurement configuration options for storing measurement files:
-C, --comment=COMMENT Comment stored in file header. Comment is ignored
if file saving is disabled.
-f, --format=FORMAT Select file format: 'csv', 'rld'.
--size=SIZE Select max file size (k, M, G, T scaling suffixes
can be used).
Setting and resetting the stored default:
--default Set current configuration as default. Supported
for all measurement configurations.
--reset Reset default configuration to factory defaults
and ignores any other provided configuration
without notice. Only allowed in combination with
the 'config' action.
Optional arguments for extended sampling features:
-a, --ambient[=BOOL] Enable logging of ambient sensors, if available.
Disabled by default.
--calibration Ignore existing calibration values. Use this
option for device calibration measurements only.
-d, --digital[=BOOL] Enable logging of digital inputs. Enabled by
default.
-g, --aggregate=MODE Data aggregation mode for low sample rates.
Existing modes: 'average', 'downsample'.
-h, --high-range=SELECTION Force high range measurements on selected
channels. A comma separated list of the channel
names (I1H and/or I2H) or 'all' to force high
range measurements all channels. Inactive per
default.
-w, --web[=BOOL], --stream[=BOOL]
Enable data stream interface (required for web
interface plotting). Enabled per default.
Optional arguments for status and config actions:
--cli Print configuration as full CLI command.
--json Print configuration or status as JSON formatted
string.
Generic program switches:
-q, -s, --quiet, --silent Do not produce any output
-v, --verbose Produce verbose output
-?, --help Give this help list
--usage Give a short usage message
-V, --version Print program version
This section summarizes all changes introduced with version 2.x compared to the previous version 1.x.
A overview of all RocketLogger modes available in versions 1.x and how they are to be mapped to the simplified modes in version 2.x for equivalent functionality is given in the table below:
Mode (v1.x) | Equivalent Command (v2.x) | Comment |
---|---|---|
rocketlogger sample number |
rocketlogger start --samples=COUNT |
start measurement for a finite number of samples |
rocketlogger cont |
rocketlogger start --background |
start measurement in background |
rocketlogger meter |
rocketlogger start --interactive |
short option: -i
|
rocketlogger status |
rocketlogger status |
unchanged |
rocketlogger stop |
rocketlogger stop |
unchanged |
rocketlogger set |
rocketlogger config --default |
available for all actions |
rocketlogger conf |
rocketlogger config |
unchanged |
The subset of command line options that have changed from version 1.x to version 2.x are summarized in the table below.
Option (v1.x) | Equivalent Option (v2.x) | Comment |
---|---|---|
-c |
--calibration |
enable switch only, -c now used for channel selection |
-ch |
--channel , or -c
|
changed from integer to label based channel selection |
-f |
--output , or -o
|
output file name, -f now used for file format |
-fhr |
--high-range , or -h
|
changed from integer to label based channel selection |
-format |
--format , or -f
|
formats: csv , rld (replaces former bin format) |
-h |
--help , or -?
|
-h now used for high range configuration |
-s |
--default |
now available in all modes |
-size |
--size |
value specification unchanged |
N/A | --background |
return after starting measurement and continue sampling in background |
N/A | --interactive |
display measurement values in CLI during measurements |
N/A | --samples |
stop measurement after reading a given number of samples |
N/A | --reset |
reset configuration to factory defaults |
N/A | --cli |
print CLI command for stored configuration |
N/A | --json |
format status or configuration output as JSON |
All other command line options from version 1.x are also available in version 2.x without changes.
The RocketLogger web interface enables convenient remote control of the sampling. It consists of the following three parts.
- Start/stop a measurement
- Display information on running measurement and the device
- Select the configuration for a new measurement
- Show configuration of a currently running measurement
- Access log and data files
- Store/restore a default configuration
- The default configuration is stored on the board and can be used for offline measurements. The RocketLogger daemon will apply this configuration when triggered with the hardware start/stop button.
- Configure data file split
- If file split is enabled and the maximum file size is reached, new files
with a
*_p#.rld
suffix are created (see log file), counting from 1 upwards. - The first file is not renamed.
- It is recommended (especially for long measurements) to set a maximum file size of some 100 MB to few GB to improve the performance in Matlab.
- If file split is enabled and the maximum file size is reached, new files
with a
- Add a comment briefly summarizing your measurement (optional, but highly recommended). This comment is stored in the header of your measurement data file and will help to better identify your measurement data.
- Plot of recent values in several time scales
- Can be paused without affecting the measurements
There are a few shortcut keys integrated into the web interface for power users.
Key | Action |
---|---|
S | start/stop |
D | store configuration as default |
L | load default configuration |
P | un-/pause plot update |
1-3 | change plot time scale (1: 1 s/div, 2: 10 s/div, 3:100 s/div) |
As of version 2.0.0, the RocketLogger supports a set of hardware button gestures to control the logger:
- Short press (< 2 sec): stops an ongoing measurement or starts a continuous measurement using the stored default measurement configuration. The default measurement configuration is configured using the command line or the web interface.
- Long press (> 3 sec): resets the RocketLogger measurement frontend
- Very long press (> 6 sec): reboots the RocketLogger system
- Extra long press (> 10 sec): power down the RocketLogger system
RocketLogger versions 1.x support only the short press functionality.
The measurement state is indicated by the status and error LEDs. When idle, the status LED is off, when a measurement is ongoing, the status LED is on. The error LED indicates an ADC interface issues when active.
The location of the hardware button and the status LEDs on the RocketLogger:
Prior to version 2.0.0, the RocketLogger command line interface (CLI) used a different, incompatible command line interface. The documentation of the arguments of his legacy CLI is given below.
When using RocketLogger version 2.0.0 or later, refer to the latest CLI documentation. To port existing scripts/interfaces from version 1.x to version 2.0.0, refer to the CLI changes summary.
The basic CLI command structure is:
rocketlogger mode -[option value]
To print detailed usage and list of options of the CLI, use the rocketlogger --help
command.
The installed program version is printed using the rocketlogger --version
command.
The CLI tool support the following measurement modes:
sample number Acquires number of samples.
cont Continuously acquires samples.
meter Starts RocketLogger Meter.
status Get status of RocketLogger.
stop Stops RocketLogger.
set Set default configuration of RocketLogger (use normal options).
Use 'set 0' to reset the default configuration.
conf Print default configuration of RocketLogger.
The list of command line options is given below:
-r rate Acquisition rate selection.
Possible rates: 1, 10, 100, 1k, 2k, 4k, 8k, 16k, 32k, 64k
-u update_rate Data update rate selection.
Possible update rates: 1, 2, 5, 10 (in Hz)
-ch ch1,ch2,... Channel selection.
Possible channels ('-ch all' to enable all):
0: I1H 4: I2H
1: I1L 5: I2L
2: V1 6: V3
3: V2 7: V4
-fhr ch1,ch2 Force high-range.
0: no channel, 1: I1, 2: I2
-c Use calibration, if existing.
'-c 0' to ignore calibration.
-f file Stores data to specified file.
'-f 0' will disable file storing.
-d Log digital inputs.
Use '-d 0' to disable digital input logging.
-a Log ambient sensors, if available.
'-a 0' to disable ambient sensor logging.
-g Data aggregation mode for low sample rates.
Existing modes: 'average', 'downsample'.
'-g 0' to disable aggregation/low sample rates.
-format format Select file format: csv, bin.
-size file_size Select max file size (k, m, g can be used).
-C comment Comment stored in file header. Comment is ignored
if file saving is disabled.
-w Enable webserver plotting.
Use '-w 0' to disable webserver plotting.
-s Store current configuration as default.
-h Show this help.