Using the CSV Reader

With the CSV reader you can handle Excel style data with impulse. A configuration allows you to define the structure of your file.

Screen Cast: Using the CSV Reader

A comma-separated values (CSV) file stores tabular data (numbers and text) in plain text. Each line of the file is a data set. Each set consists of one or more fields, separated by commas or other delimiters. The top line may contain labels, associated with the fields.

Here a typical example:
 

time;osc_out;lvdt_outp;lvdt_outn
0;0;0;0
1.19209e-07;0.364121124438;0.361954160418;-0.361960938184
2.38418e-07;0.549114671567;0.544246145289;-0.544266588099
3.57627e-07;0.496353600022;0.488405852023;-0.488433470485
4.76836e-07;0.488886165659;0.478050306956;-0.478086469891

Usage

The reader can be used to open workspace resources and together with ports (direct connection to the target using TCP, Serial, J-Link, ...).

Configuration

You can modify the serializer behavior under Preferences->impuse->Serializer->[serializer name]: You may modify the serializer parameters (see "Parameters" - global variables depending on the serializer type).
You may add serializer configurations. You can select one configuration when using the serializer.

The CSV Reader requires a configuration (CSV Configuration) to work. A configuration contains information about the char set, the delimiter, labels and and the actual data fields. Press "Add" and select "CSV Configuration" to create a new reader configuration:

  • Char Set: Select the char set that is used by the log file.
  • Domain Base: Select the time base. This represents is smallest time unit change.
  • First row: Indicated the first row (starting with 1) of data or labels field.
  • Delimiter: The character to splits data and label fields.
  • Has labels: Check if the first row contains labels. These labels will be used to name the generated signals. If not given, standard names (S1 ,S2,..) will be taken.

The time-stamp field needs a special handling. You can either choose:

  1. Date: you need to define the date format. Use content proposals and http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html.
  2. Float execution time: Parse a float value, optionally let it to parse the time unit from the file or assign a unit.
  3. Integer execution time: Parse an integer value, optionally let it to parse the time unit from the file or assign a unit.
For each field you need to select a data type, "Timestamp" (only once), "Ignore" or "None". If you choose "Ignore" the field will not be used. If you choose "None", an existing field and all fields to the right will be ignored. You need to define exactly one  "Timestamp" field.
The data type can be either:
  • Float,
  • Integer,
  • Text ,
  • or Enumeration.

Print

User Rating: 0 / 5

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive