Getting Started with MxTransIt™

In this procedure, we show you how to create a simple Custom Test Harness using the MxTransIt editor.  We begin with a transform to convert a signal in degrees Celsius to Fahrenheit. We also show how to use a System Signal.

1.Create a new project in MxVDev. Follow the wizard until you see this form:


2.Select Custom SUT and MxClock.

3.Check Start MxTransIt on Finish.

4.Click the Finish button.  MxTransIt opens.

5.From the Toolbox on the left of the screen, select the Scale & Offset Transform and double-click to put it into the Harness (center) window.


6.In the Harness editor, click on the Transform to select it. Its properties are displayed on the right of your screen:


7.Enter a name for your Transform in the Name field.  In our example, we named it CtoF.

8.Enter values for Offset and Scale.  Using the conversion F = (C x 1.8) + 32, we use a scale of 1.8 and an offset of 32.

9.Next, we define the properties of the input and output Signals:

a.Move the mouse over the output port. It is important that the mouse be over the port, not just the Transform. When the mouse is positioned properly, the port name is displayed in a bubble as shown here:


b.Right-click to display the context menu and select Edit Port:


c.On the Edit Port form, enter an appropriate name, such as Deg F, for the Signal.

d.Select the Continuous and Floating-point buttons.

e.Enter the units, an Init value of 0, min of -10, and max of 220.

f.Click OK.

g.Repeat steps 9a through 9d for the input Signal.  Choose min and max values of 0 and 100 for temperatures in Celsius. Click OK.

10.Click on the transform again to select it.

11.Select Transform->Export Ports from the main menu:


12.Check your Inport and Outport signals to export your ports to MxVDev.  Click OK.  (For more details, see Exporting Ports.)

13.Click Save to save your Transform.

14.Select File->Exit from the main menu to close MxTransIt.  

15.Return to MxVDev.

You have now created a simple SUT using MxTransIt.  The next step is to create a test case in MxVDev.

Using Your Transform in a TestCase

1.When you see the reload message in MxVDev, click Yes.



2.When the Connections windows are displayed, click OK to import the Signals from MxTransIt into the MxVDev Signal Dictionary. For more information, see Connecting Signals.



3.To build a test case, select File‑>New‑>TestCase from the main menu.


4.Enter the name GettingStartedTestCase. Use the default properties as shown in the figure above.

5.Press the OK button.  The Pick Signals box is displayed.


6.Make sure that Stimulus>Standard is selected on the left-hand side.

7.Select the Deg C  and click addPickSignal to add it to Selected Signals.

8.Then select Response>Standard on the left-hand side and add Deg C to the Selected Signals (on the right).

9.Click the OK button and save the TestCase with an appropriate file name.

10.Create a test pattern similar to the one shown below for your input Signal.  See Creating/Editing Test Patterns. You may wish to use the enlarge button (enlarge_btn). For this example, the Signal value should not return to zero.



11.Create a Scenario. See Working with Scenarios.

12.Add the TestCase to the Scenario by clicking on it in the Project Explorer and selecting Add to Scenario.

13.Click Run_btn (in MxVDev) to run the test.



This test fails because we have not defined the expected behavior. You may wish to use the enlarge button (enlarge_btn) again.

14.Click AcceptResults_btn to accept the test results as the expected behavior.  See Accept Results.

15.Click Rewind_btn to rewind the test.

16.Click Run_btn to re-run the test:


The test passes.


Related Topics:

System Reset

System Signals


Exporting Ports

Exercises and Examples

Getting Started with MxVDev

An Example Using the C# Snippet Transform