当前位置:网站首页>Simulink variant model and variant subsystem usage

Simulink variant model and variant subsystem usage

2022-06-13 09:04:00 mydate()


One 、Variant Model and Subsystem The role of

1、Variant Model and Variant Subsystem It works like a state machine , Different programs or modules will be executed according to different status values ;
Variant Model Used to call different .Slx Module , According to different state values , Execute different modules ;
Variant Subsystem It is to write programs directly in-house , According to different state values , Perform different procedures ;

Two 、Variant Model How to use

1、 stay Simulink Create different interfaces .Slx modular

 Insert picture description here

2、 stay Simulink Interface insertion Variant Model

 Insert picture description here

3、 Configuration correspondence Variant Model Of Slx The module path

1) Double click to enter the following three modules , The configuration needs to be called .Slx The path of the module ;
 Insert picture description here
2) Effect after configuration
 Insert picture description here

4、 Configuration correspondence Variant Model The state of the value

1) Right click Variant Model choice Block Parameters (Subsystem), Add the corresponding status value ;
 Insert picture description here
2) Different configurations Slx Modular Variant control expression, When K The value is 1 when , execute VDM1(Model, You can change the name when you click the module ), Otherwise, execute other modules ;

 Insert picture description here

5、 function Simulink

1)Matlab Yes K Assign a value , to K Different modules will be highlighted when different status values are assigned ;
 Insert picture description here
2) function Simulink
 Insert picture description here

3、 ... and 、Variant Subsystem How to use

1、 stay Simulink Interface insertion Variant Subsystem

 Insert picture description here

2、 Get into Variant Subsystem And edit the program

 Insert picture description here

Subsystem:

 Insert picture description here

Subsystem1:

 Insert picture description here

Subsystem2:

 Insert picture description here

3、 To configure Variant Subsystem

1) Right click Variant Subsystem choice Block Parameters (Subsystem), Add the corresponding status value ;
 Insert picture description here

  1. Different configurations Subsystem Of Variant control expression, When K The value is 1 when , execute Subsystem, Otherwise, perform other ;**
     Insert picture description here

4、 function Simulink

 Insert picture description here


To sum up, complete Variant Model and Variant Subsystem Introduction to the use of ;

原网站

版权声明
本文为[mydate()]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/164/202206130853214224.html