Home Examples Saving Custom Data
Data Recording

Saving Custom Data

The analog_inputs input on the DataLogging block can also be used to save any custom data. This input accepts a vector of doubles. Each element of the vector represents a separate channel of data that will be optionally saved in your data file. Several things are important to know about the saving process:

  • In order for the data to be saved with your exam you will need to name the channel and mark it as one you want to save when you create or edit your Task Protocol in Dexterit-E. For details on protocol editing please see the Dexterit-E User Guide.
  • Data is always saved in the data files as single precision. In order to save integer data, you will need to convert the integers to doubles prior to connecting them to the analog_inputs input on the DataLogging During analysis, those values can then be converted back to integers in MATLAB as necessary.
  • Your model will be running at 4 kHz, but the data will only be streamed to Dexterit-E at 1kHz. If you need to actually save data at 4 kHz then you will need to send 4 channels of data (with appropriate time-delays) and then reconstruct them later in MATLAB during analysis.
  • A maximum vector size of 80 elements can be sent to the analog_inputs This means you can save a maximum of 80 channels of custom data. Creating more than 80 channels of custom data may lead to your exam files being corrupted.

Note: You do not need to save any kinematics created by your Kinarm Lab (e.g. arm angles, velocities, accelerations) or any of the data created by Kinarm supplied peripherals. Those types of data are automatically saved with your recorded data. Be sure to familiarize yourself with the data that is recorded automatically by your Kinarm Lab before saving data as custom analog inputs. Dexterit-E Explorer can be used to review a collected exam and the kinematics that are recorded.

Related Tasks

Coding Tips
Persistent Variables
Persistent variables are ones that hold their value between calls to the embedded MATLAB code they are defined in.
Coding Tips
Custom Control of the Trial Protocol Order
Normally, Dexterit-E manages and controls the order in which Trial Protocols (TPs) execute based on what is defined in the block table of the Task Protocol (see the Dexterit-E User Guide for more details).