AOPI: File Playback

Mr Kick Home

The File Playback Analog Output Plug-In (AOPI) allows you to use an acquired signal as an analog output pattern. Or you can produce your own patterns.

There are three steps to playback a file:

  1. Generate a data file to be played back
  2. Choose the AOPI File Playback.pi plug-in
  3. Load the data file to be played back through Set Up

Generate a Data File for Playback

There are at least two ways to generate a data file for playback:

  1. Export a Single Trace from a data file opened in Mr. Kick as explained here
  2. Generate a file with the right format - either by hand or via another program

The file format is discussed below.

File Format

The file is a plain ASCII file that can be viewed and edited in any text editor, e.g. NotePad. Also Excel can load and generate this type of file (tab delimited text).

Data are organized in one column: The first four rows form a header, all following rows contain data samples. The header rows contain:

  1. A file ID, always 1.29932E+5.
  2. The version of Mr. Kick that produced the file. If you generate the file yourself you may use here 0.85 (8.50000E-1).
  3. The time in seconds when the first sample was sampled (To, -100 ms in the example). Relative to time zero in the original sweep.
  4. The time between samples (Ts) in seconds. If sampled at 1 kHz this will be 1.0E-3, i.e. 1 ms. Data in the file must have been sampled at a fixed sample rate.

Note: The number format must comply with the settings for decimal point (comma in Denmark) on the computer where it is to be played back! - Unfortunately this does not make the files easy portable from country to country, but it's easier to load into e.g. Excel in the country where data were exported...


Set Up

The parameters of analog output plug-ins are subject to classification, if classification method is set to Stim. Type and Act On to Analog Output. If analog output is not classified only class 0.0 will be available, otherwise you choose the class for which to set parameters via the Class control. Each defined class may have its own set of parameters.
In the File Playback Setup you may load a different file in each of the available classes. - Press one of the two load buttons:

  • Load w. Edit allows you to modify the loaded data
  • Load wo. Edit loads the file as it is

Refer to the example below for further instructions. Also the following parameters are available:

  • Active specifies whether a pattern will be issued in the given class.
  • Delay specifies if the pattern should be delayed in relation to the incoming trigger; measured in seconds. If two plug-in outputs are superimposed you may use this parameter to delay the one relatively to the other. You could combine the File Playback with the Ramp-Hold-Ramp plug-in in order to perturb a 'natural' movement with stretch.
  • Repetitions and Interval: The pattern may be repeated. The number of repetitions and the interval from the end of one cycle to the onset of the next is specified via these controls.

The Keep / Restore and Copy / Paste buttons feature the same functionality here as explained elsewhere.

Example

A subject was asked to walk on a treadmill, while the ankle angle was measured. A sweep length of two seconds were chosen to acquire approx. two full strides. The ankle movement was exported via the Export Single Trace feature (full trace). We may now restore that movement on another device and/or maybe another subject. This allows us to measure e.g. during passive movement or at static contraction levels.

[Import Edit FPB-ASCII animation, 36k]

From the File Playback Setup panel we Load the file w. Edit, which opens the Edit File Playback panel.

The upper graph displays the data found in the file. Here we may set the markers to cut out the exact part of the stride we want to play back. Then press Apply. Use Restore to get back to the original cut.
The lower graph displays what will be used if you press OK.

Note: The baseline of the signal is shifted so that both endpoints - the first and last samples - become zero. This is in order to avoid rapid jumps if played back to a (potentially strong) actuator.
You may skip this via the Baseline parameter. More baseline options may become available in the future.

You may also boost or attenuate the signal via the Gain parameter.
If the Gain/Sensitivity setting was right during acquisition and the analog output sensitivity is right during playback, the movement should be restored as closely as the (mechanical) hardware is capable of.

The sample rate during acquisition may differ from the playback update rate. Mr. Kick will automatically resample the signal if needed. You may also do that here: Enable the Set Fs option and supply the analog output (playback) update rate. This will lower the workload on the computer during acquisition.

Changes to parameters only take effect when you press Apply!

If you Load wo. Edit the full file will be loaded and the End-Point Zero baseline shift will be applied.

Top - Menu