이 번역 페이지는 최신 내용을 담고 있지 않습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
Variant 인라인 구성요소
인라인 Variant 블록을 사용하면 시스템의 모든 설계 대안을 단일 모델로 표현할 수 있습니다. 각 설계의 선택은 단일 레이어의 Variant 선택지로 모델에 포함됩니다. 이러한 모델은 고정된 공통 구조와 한정된 세트의 가변 구성요소를 가지며, 가변 구성요소는 Variant 제어에 따라 활성화되거나 비활성화됩니다. 구성요소는 자동 또는 수동으로 활성화할 수 있습니다.
예를 들어, 다양한 레인 센서(rain sensor)를 사용하여 자동차 앞 유리 와이퍼의 속도를 제어하는 모델을 시뮬레이션한다고 가정하겠습니다. 레인 센서 모델을 Variant Source 블록에 입력으로 제공한 다음 사용자가 선택한 Variant 제어에 따라 센서 간에 전환할 수 있습니다. 자세한 내용은 Introduction to Variant Controls 항목을 참조하십시오.
인라인 Variant 블록에 대해 생성한 코드에는 시스템의 모든 Variant 선택지가 포함될 수 있습니다. Activate Variant During Different Stages of Simulation and Code Generation Workflow 항목에 설명한 대로 코드를 컴파일하기 전에 또는 모델을 시작할 때 선택지 간에 전환할 수 있습니다. 인라인 Variant 블록으로 코드를 생성하는 방법에 관한 자세한 내용은 Represent Subsystem and Variant Models in Generated Code (Embedded Coder) 항목을 참조하십시오.
블록
Variant Source | Route among multiple inputs using variants |
Variant Sink | Route amongst multiple outputs using variants |
Manual Variant Source | Switch between multiple variant choices at input |
Manual Variant Sink | Switch between multiple variant choices at output |
클래스
Simulink.VariantControl | Create a variant control variable object |
Simulink.Parameter | Store, share, and configure parameter values |
Simulink.Variant | Specify conditions that control variant selection |
함수
enumeration | 클래스의 열거형 멤버와 이름 |
객체
struct | 구조체형 배열 |
도움말 항목
Variant Source와 대상 신호 자동 선택
- Define and Configure Variant Sources and Sinks
Represent variant choices using Inline Variants. - Visualize Variant Implementations in a Single Layer
View the variant choices in a model containing Inline Variants. - Variant Control Modes in Variant Blocks
Learn how to control variant blocks. - Variant Condition Propagation with Variant Sources and Sinks
Propagate variant conditions from the Variant Source and Variant Sink blocks. - Propagate Variant Conditions from Variant Source Blocks to Subsystem Blocks
Understand variant condition propagation to virtual and non-virtual subsystems. - Propagate Variant Conditions from Variant Source Blocks to Conditionally Executed Subsystems
Learn about variant condition propagation from Variant Source blocks to conditional subsystems. - Variant Elements Within Buses
Understand how to create variant bus, generate code, and variant condition propagation with bus. - Use Variant Source Block to Receive or Output Function-Call Signals for Simulation and Code Generation
This example shows how a Variant Source block receives function-call signals at its input ports and conditionally merges the signals at its output port.
Variant Source와 대상 신호 수동 지정
- Provide Variation at Source and Destination of a Signal Using Manual Variant Source and Manual Variant Sink Blocks
This example shows how to use the inline variant blocks — Manual Variant Source and Manual Variant Sink.
문제 해결
Transform Model to Variant System (Simulink Check)
Use the Model Transformer tool to transform a model into a variant system.