Stimulus Generator: CSV File as Data Source
Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE This generator takes values for updating the data sink (signal or environment variable) from a CSV file. Output of all values from the CSV file defines one period T of the Stimulus Generator. These periods are automatically repeated. The Reset Function causes a new period to begin immediately, i.e. values are taken from the beginning of the CSV file again.If a Cycle Time is specified for generation by the Stimulus Generator, the data sink is updated periodically with the next value from the CSV file.
If the Stimulus Generator is operating non periodically, the time stamps associated with the values are taken from the CVS file to control updating of the data sink. The format of the CSV file is exactly the same in both cases.
First Example of a csv file:
Non-cyclical
NoteThe time stamps are absolute data in reference to the start of a new period.
Cyclical
NoteFile format: Two backslashes ”\” or one forward slash ”/” must be inserted after the drive characters and between the folders, e.g.:
C:\\path\\to\\the\\file\\testfile.csv
C:/path/to/the/file/testfile.csv
Second Example of a csv file: (same effect as first example)
- Blank characters are ignored
- Time data without decimal point is interpreted as time x 10 µs, e.g. 50000 = 0.5 s
- Time data with decimal point is interpreted as time in seconds, e.g. 1.800000 = 1.8 s
- You can also specify the time unit in the header of the CSV file, e.g. [s] or [µs]:
Functions that create the Stimulus Generator for stimulating signals and environment/system variables
- StmCreate_CSV (non-cyclical)
- StmCreate_CSV (cyclical)