The Interactive Test Panel is an alternate way of sending test data to the SUT. In a conventional TestCase, we pre-define how a set of Signals changes relative to each other over time. The Interactive Test Panel enables you to directly interact with the SUT using buttons, sliders, and other controls.
You add Signals to an interactive TestCase in the same way as for a conventional TestCase. A user interface is created for each Signal based on information retrieved from the Signal Dictionary. There are several user interfaces based on whether the Signal is Discrete, Continuous, or message. It takes just a few seconds to create a panel. There is no code to write.
Key features include:
•The value entered in Interactive panel is transmitted when you tab to a new control or hit enter.
•You can use a regular TestCase to record the stimuli that are made on the Interactive Test Panel.
•The SUT can still be either a Software-in-the-Loop or a Hardware-in-the-Loop entity.
To run Interactive Tests, it is necessary to have a Scenario running in the background. The reasons for using a Scenario include:
•To initialize the system
•To get the system into the right operating state or mode
•To run other simulations in MxTransIt, or to run the CAN bus node simulations
•To schedule a TestCase into which you can record the interactive session. See Recording.
To create a minimal Scenario to support interactive testing, include the following TestCases:
1.An initialization TestCase, such as Init.mxc
2.For SIL testing only, include a scheduling TestCase, such as Task_5ms.mxc
3.Create a TestCase with zero or more signals with a duration long enough to perform your interactive testing. Five or ten minutes may be adequate. If you plan to record, include the Signals that you want to record in this TestCase.
Once you start this Scenario you can start using the controls on the Interactive Panel. If no Scenario is running when you use controls on the Interactive Panel, you will see a notification flag indicating that transitions have been queued.
When performing SIL testing, you can cause Scenarios with "Forever" Jobs to continue running after the last job has completed. This is useful when using Interactive Panels because you need an executing Scenario and an executing SUT. If you have a TestCase with a run count of "Forever," uncheck the box called Stop endless jobs when all other jobs have ended. This check box is on the Properties tab of the Scenario window. This keeps the Scenario and SUT running indefinitely.
Set the MxVDev clock to run in real time. On the Simulation toolbar, if the hare () is showing, click the button so that the tortoise () shows. This change is temporary; it is not saved in project settings. Alternatively, on the Main menu, select Projects->Project Settings. Select the Execution tab. In the Simulation Clock Time Source, ensure the RTClock is selected.
You add and remove Signals in the same way as in regular TestCases except that multiple instances of one Signal are allowed in an Interactive Test Panel. For detailed information, refer to Picking Signals.
Interactive Test Panels have the same properties as regular TestCases except that there are no Test Execution Control properties.
You will see that the values of stimulus Signals change on Interactive Test Panel if the Signal is changed on another Panel or TestCase. When you start to edit, the value in a text field updated is no longer applied to that field. The change is applied when you hit Enter or Tab.
For message and event Signals, the transition is not transmitted until the Send button is pressed.
It is possible to queue one transition per Signal in an Interactive Test Panel. You will find this feature useful in the following cases:
•Simulation Paused - You have clicked the Simulation Pause button and you want to set up one of more Transitions to be sent when the Simulation is started again
oTo queue Transitions, just make the adjustment in the panel. When the run button is pressed the most recent change to a Signal will be transmitted.
•Simulation Running - The Simulation is running and you want to make changes to two or more Signals at the same time (or at least in rapid succession). It may not be possible to do this with the mouse alone.
oTo queue the Transitions, first click the Hold radio button at the top of the Interactive Test Panel. Now adjust one or more Signals to the desired values. Click the Send radio button to cause the Transitions to be transmitted. Again, only one Transition (representing the Signal's final value) is transmitted for each modified Signal.
When a Transition is queued you will see that the signal classification icon changes to a flag . At the time that the transition is sent, the icon will revert to the regular signal classification icon.
•To see the stimulus transitions from the Interactive Test Panel in other TestCases that are running consecutively, set the Show Actual Values option for the stimulus Signals.
•For response Signals of type Message, the value is shown in Hex or Text format based on the Display Format selected for that Signal in the Signal Dictionary.
•Interactive Test Panels work with Simulink, however you must use the S-Function interface to Simulink.