Migrating From VeriStand Model Framework to VeriStand Model Generation Support 24.3

Updated Jun 21, 2024

Environment

Software

  • VeriStand
  • Simulink
  • VeriStand Model Framework

I am using VeriStand 2024 Q2 with MATLAB R2020b. I plan to use MATLAB 2022b with the VeriStand Model Generation Support 24.3. As the Simulink model was built in MATLAB R2020b with VeriStand Model Framework, I can't compile the model with the VeriStand Model Generation Support directly. I have to replace the old VeriStand In/Out blocks with the new VeriStand In/Out blocks, but the Simulink contains hundreds of In/Out blocks. Replacing them manually is time-consuming. This article will introduce migrating from the VeriStand Model Framework to the VeriStand Model Generation Support 24.3.

1. Direct MATLAB's directory to your model's subfolder. Let's use the Simulink model - InOut.slx as an example.
Capture.JPG
2. Run the following commands sequentially. It will load the model and replace old VeriStand In/Out blocks with Simulink In/Out blocks.
  • load_system("InOut")
  • replace_block("InOut","NI VeriStand Inport","Inport")
  • replace_block("InOut","NI VeriStand Outport","Outport")
  • save_system("InOut")
3. Verify if the old VeriStand In/Out blocks have been replaced successfully. 
4. Uninstall VeriStand Model Framework from NI Package Manager, then install VeriStand Model Generation Support Addon 24.3 from MATLAB Add-Ons. Restart MATLAB.
5.  Redirect MATLAB's directory to your model's subfolder. Run the following commands sequentially. It will load the model and replace Simulink In/Out blocks with the new VeriStand In/Out blocks.
  • load_system("InOut")
  • replace_block("InOut","Inport","VeriStandBlocks/VeriStand In")
  • replace_block("InOut","Outport","VeriStandBlocks/VeriStand Out")
  • save_system("InOut")
6. Verify if all the Simulink In/Out blocks have been replaced.
7. Refer to Creating Simulation Models Using VeriStand Model Generation Support Add-On to compile the Simulink model.