io

The datalogging object: everything assigned into an io group is recorded by the device.

Available on: Flexs Q5M Flexs Q5C

io is the bridge between your script and the device datalogger: everything placed into the io object is logged and synced whenever run() executes (or immediately with syncIO()).

To log local variables, add them to one of the predefined io groups. This can be an existing group with physical channel values, or a group dedicated to your own logging variables.

Add custom measurements to a predefined group with plain assignment:

// dot syntax for simple names
io.totalPower = { watts: 3000, voltage: 480, current: 48 };

// bracket syntax for group names with spaces
io["Front Bearing"] = amplitudes;

A common pattern from the vibration analysis examples is building a result object from scope.getAmplitudes(), appending extra values, then assigning the whole object to a group:

amplitudes.speed = rpm;             // add the measured speed
io["Front Bearing"] = amplitudes;   // one assignment logs it all

Functions

io[group] assignment

io.groupName = object   /   io["Group Name"] = object

Assigning an object to an io group records all of its values in the datalogger.

Assignment into io is how measurements enter the datalogger. The value should be an object of named numeric measurements. Updates are pushed on the next run() call, or immediately after syncIO().

Arguments

NameTypeRequiredDefaultDescription
group string yes Name of a predefined io group (physical channels or a group dedicated to script variables).
object object yes Named numeric values to record, e.g. { watts: 3000, voltage: 480 }.

Example

To log local variables you need to add them to one of the predefined io groups.
This could be an existing group with physical channel values or a group dedicated to your own logging variables.

To add custom measurements / variables to a predefined group named 'io' use the following Syntax

io.totalPower = {watts: 3000, voltage: 480, current: 48};