MATLAB S-Function에 대한 블록 기능 구성하기
S-Function에서 샘플 시간, 입력 함수 및 출력 함수 구현
MATLAB® S-Function을 사용하면 다양한 S-Function API를 통해 확장된 블록 기능을 구성할 수 있습니다.
입력/출력 포트 만들기 및 구성
블록 기반 샘플 시간 및 포트 기반 샘플 시간 지정
DWork 벡터를 사용하여 메모리 할당
S-Function으로 파라미터 전달
런타임 파라미터 만들기
메서드
클래스
Simulink.BlockPreCompInputPortData | Provide precompilation information about block input port |
Simulink.BlockPreCompOutputPortData | Provide precompilation information about block output port |
Simulink.MSFcnRunTimeBlock | Get run-time information about Level-2 MATLAB S-function block |
Simulink.RunTimeBlock | Allow Level-2 MATLAB S-function and other MATLAB programs to get information about block while simulation is running |
Simulink.BlockData | Provide run-time information about block-related data, such as block parameters |
Simulink.BlockPortData | Describe block input or output port |
Simulink.BlockCompDworkData | Provide postcompilation information about block's DWork vector |
Simulink.BlockCompInputPortData | Provide postcompilation information about block input port |
Simulink.BlockCompOutputPortData | Provide postcompilation information about block output port |
도움말 항목
- Create Input and Output Ports
Create input and output ports on a MATLAB S-function block.
- Specify S-Function Sample Times
How to specify the rate or rates at which your block operates in MATLAB S-functions.
- Use DWork Vectors in S-Functions
Use DWork vectors to allocate block data to memory.
- Inherit Custom Data Types
Inherit custom data types for the values of a block's signals and parameters in MATLAB S-functions.
- Pass Dialog Parameters to S-Functions
Process parameters passed via the MATLAB S-function block dialog box.
- Create and Update S-Function Run-Time Parameters
Create and use run-time parameters in MATLAB S-functions.
- Use MATLAB S-Functions as Sim Viewing Devices in External Mode
Specify MATLAB S-function as a sim viewing device for use in external mode.