Clear Filters
Clear Filters

How to prevent changes to model made in Simulink Test being applied to main model

1 view (last 30 days)
Hi.
I using Simulink Test, and a test sequence to test a model. For me to be able to run the test sequence in the I want, I have had to make changes to the model within the test harness (such as adding goto/from blocks) by clicking on the subsytem block for the model. The issue I'm having is that when i then return to the main model (not within the test harness), the changes that I made in the test harness to the model have been applied. I do not want these changes to be applied. Is there anyway that I cann get around this? I want to basically break any link between the model i am testing, and the main model.
Thanks

Accepted Answer

Vinayak
Vinayak on 5 Jan 2023
It is possible to have independent test harnesses, you can implement these using Synchronization modes.
There are three synchronization modes:
"SyncOnOpenAndClose" -> The block and all its parameters are synchronized FROM the main model to the test harness on harness open, AND Any changes to the block or its parameters in the harness model ARE SYNCED BACK on harness close. (This is two-way sync from model to harness, and from harness to model)
"SyncOnOpen" -> The block and all its parameters are synchronized FROM the main model to the test harness on harness open. Any changes to the block or its parameters in the harness model ARE NOT synced back on harness close. (This is one-way sync from model to harness)
"SyncOnPushRebuildOnly" -> The block and its parameters are never synchronized between model and harness, unless explicitly done through Harness Push or Rebuild. We call this explicit synchronization mode. This should only be used is you want truly independent parameters among multiple harnesses for the same block.

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!