The MxTransIt Simulink (Via S-Function) Connector is the preferred method for streaming test data between Simulink and MxVDev. The Connector interacts with Simulink via an S-Function. The benefits to the S-Function approach include: •MxVDev Breakpoints can be used to halt execution at any time. •MxVDev Triggers can be used to change the execution sequence of the tests. •Portability of tests to a HIL environment is simplified. (Since the MxSuite S-Function is C/C++ code, it can be used on the HIL tester, or on the target microcontroller. In these cases, use TCP/IP, CAN, or another transport to deliver the test data into the test environment.) •Pass/Fail analysis can be done on-the-fly, so MxVDev can be configured to Stop-On-Fail. •Interactive Test Panels in MxVDev can be used to interact directly with the model, perform experimental tests, and record the testing sequence.
|
Using the Simulink (Via S-Function) Connector is easy. This is how it works: •In MxTransIt, you load an instance of the Simulink (Via S-Function) Connector. •You provide a reference to the model (either the plant model or the model to be tested). •The S-Function Simulink Connector Transform makes a copy of your model (.mdl or .slx) file. MxV and a version number are appended to the end of the model name. For example: MyPidMxV33418 WARNING - Although the copy of the model (for example, MyPidMxV33418) tends to be persistent, it should not be modified by the user because changes may be lost at any time. Make changes to the original model file (such as MyPid). If you modify the original model file, all changes to the copy (saved or not) will be lost. •The Connector inspects the model file to determine the number and type of the inputs and outputs. •The S-function is equipped with the MxNet test data transport, which is already linked to a lower level transport (such as TCP/IP, Global Shared Memory, or CLIB). •When your MxVDev project is loaded, a communication link is established between MxVDev and the S-function. •The strategy works for MIL, SIL, and HIL. •Output signals are routed through a Memory Block during the automation process to ensure that the model remains causal. Type conversion blocks may also be added.
|
|
||||||||||||||
|
The following verbs are available at the bottom of the Properties box for the Simulink Transform: •Load Attached Model - Opens Simulink and loads the model with the S-function. •Edit Original Model - Opens Simulink and loads the model before the S-function was inserted. •Close Model - Closes Simulink. •Re-Attach to Model - Copies the original model file (such as Example.mdl) to a new file (MxExample.mdl), inserts the S-function, and attaches the new model to MxTransIt. See How It Works. |
Simulink S-Function Video Demonstration
Using Multiple Simulink Models
Troubleshooting Simulink Projects
Timing and Performance Considerations for Co-Simulation