The CSV SUT Transform creates a CSV file (called the stim file) when a Scenario is run. The file can be delivered asynchronously to a HIL tester or other consumer of CSV test data.  Later, the responses from that tester can be brought back into MxVDev by re-running the Scenario. The file produced by the HIL tester is called the RSP file.

CSV SUT Transform Before Init file is Selected

CSV SUT Transform Before Init file is Selected

Set the following properties:

If there is no time column in the RSP file, set the Default Time Interval property to specify the interval between response transitions.

Use the Path property to specify the Init CSV file that enumerates the ports.

Set the Sparsely Populated property as described below.

Use the Stimulus Response Folder Path to select the folder where the stim and RSP files are located.

Use the Time Units property to select the units used for the transition times in the stim and RSP files.

CSV SUT Transform Properties box

CSV SUT Transform Properties box

 

CSV SUT Transform with ports after selecting Init CSV file

CSV SUT Transform with ports after selecting Init CSV file

Init CSV File Format

This file provides port details. For a sample Init file, refer to the CSV To DataDictionary.csv  file in the \Templates\CSV Import Examples subfolder of the MxSuite installation folder.

The columns listed below must be filled. Others are optional.

Classification

Name

Data Flow

Continuous

For messages:

Message Length

Variable Length Message

Creation of the Stim File

When a new Scenario begins execution, the Transform creates an output file called the Stim file. The Stim file is named <ScenarioName>.stim.csv. <ScenarioName> is replaced by the actual Scenario name.  The file is located in the same folder as the Scenario file. By default this is \<project name>\ScenariosAndTestCases\. However, when running a regression test all of these files get copied to the regression test folder. So the likely location of STIM files generated by a regression test is \<project name>\Regression\<regression test name>\ScenariosAndTestCases\.

All stimulus transitions received are written to the stim file. If a file of same name already exists, it is overwritten by the new stimulus information.

Each row of the stim file represents all the transitions at the time in the first column. The unit of time is as specified in the Time Units property of the Transform.

Sparsely Populated Property

The Sparsely Populated property determines how data is written to the STIM files. The default value of this is TRUE, and when TRUE it only records transitions at each time step.  This is the way MxSuite handles all other data recording for TestCases and the like. Setting the value to FALSE causes the STIM files to be populated with all signal values at every time step. This is needed by certain HIL testers that are not able to handle blank values for a signal.

An example follows:

When Sparsely Populated = TRUE, a STIM file might look like this:

Time(s),

sig1,

sig2,

sig3

0,

0,

0,

0

1

,

1,

 

2,

,

,

1

3,

,

0,

 

 

When Sparsely Populated = FALSE, the same STIM file would look like this:

Time(s),

sig1,

sig2,

sig3

0,

0,

0,

0

1

0,

1,

0

2,

0,

1,

1

3,

0,

0,

1

 

Response Transitions from Response (RSP) File

Response files are produced by the HIL tester.

Place the Response CSV File in the folder specified in the Transform's Stimulus Response Folder Path property. The file name should use the format: <ScenarioName>.rsp.csv (where <ScenarioName> represents the Scenario name). Refer to "Sample Scenario.rsp.csv" in the \Templates\CSV Import Examples subfolder in the MxSuite Installation Folder.)

If a Response CSV file exists in the Scenario folder, responses are read from the file, transitions are created (with appropriate  time and value) and transmitted on the response ports. If no such file exists, then there will be no responses (null data).

Time Format

In all cases, the first row of the Response (.rsp) file represents time zero. If the first time stamp in the file is non-zero, subsequent rows are offset by that amount. For example, if the first two times in the file are 5.0 and 5.5, the response transition times in the TestCase are 0 and 0.5.

The Time column is optional in RSP files. If present, the header and data in the column should be in one of the formats below. If there is no Time column, the time units and intervals (between lines in the file) are defined by the Time Units and Default Time Interval properties of the Transform.

Heading

Units

Time(s)
Time(sec)

all of the times will be formatted in seconds

Time(ms)

all of the times will be formatted in milliseconds

Time(us)

all of the times will be formatted in microseconds

Time(ns)

all of the times will be formatted in nanoseconds

Time
Times

(no units) all of the times will be read as the default specified in the Transform's Time Units property

Note: The generated stim file also has a Time header of the format described above.