Expand description
Drive traces as the drives’ and controllers’ own tools export them, turned into a Trace at the motor
shaft (rad, rad/s, N m, s) by a mapping file that names the signals and says how to scale them.
Formats read (see docs/measurement-procedure.md for where each comes from and what is not confirmed):
csv: any table with one header line of names (a unit in[..]or(..)after a name is read), optionally a line of units under it; comma, semicolon or tab; decimal point or comma.sinamics: the CSV export of a Startdrive / TIA Portal trace. Siemens does not document its layout; it is read ascsv, with the time column found by name. The native.ttrecxis not documented and not read.twincat: the CSV export of TwinCAT 3 Scope View: a header block of name/value pairs per channel (Name, SymbolName, SampleTime[ms], Unit, …), then a time and a value column per channel, or one time column shared by channels of the same sample time. Times in ms from the start, or full FILETIME stamps. The binary.svdxis not documented and not read.codesys: the three exports of a CODESYS trace:.trace(XML, UTF-16, values and timestamps per variable),.txt(one time column in ms or µs, space-separated) and.trace.csv(a block per variable with its own times).
Structs§
- Channel
- One recorded signal with its own time base, in the units of the file.
- Imported
- A trace read through a mapping, and per motor the torque setpoint where the mapping names one.
- Mapping
- The mapping file: which signals of the file are which motor quantities.
- Motor
Mapping - Signal
- How one signal of the file becomes a motor quantity in SI units:
(raw + offset) × unit factor × scale, with the time shifted bytime_offset_s.
Constants§
Functions§
- channels
- The channels of a file in one of the
FORMATS, and the notes on how it was read. - decode
- Text from a file’s bytes: UTF-16 (little or big endian) with its byte order mark, as a CODESYS
.traceis written, otherwise UTF-8 (a byte order mark dropped, invalid bytes replaced). - import
- Reads a file through a mapping: every signal converted to SI units, shifted by its time offset, and all resampled (linear) onto one grid that spans the time all of them cover, from 0.