Pulse from matlab code to Simulink
이전 댓글 표시
I have written a code in matlab
In that if a particular condition gets satisfied then a pulse should be generated that should turn Off switch which is present in Simulink.
This is the switch i have used- Three Phase BreakerHow can i achieve that
Thanks in advance
답변 (1개)
Ayush Modi
2024년 3월 5일
0 개 추천
Hi,
I understand you want to integrate MATLAB code with a "Simulink" model for controlling a Three-Phase Breaker based on a specific condition. You can use the "Simulink" model's ability to receive external signals for controlling blocks such as switches or breakers. You can use a "From Workspace" block or a "MATLAB Function" block to generate the control signal based on your MATLAB code's logic. Here's a step-by-step guide on how you can achieve this:
Using From Workspace Block
- In your "Simulink" model, drag and drop a "From Workspace" block (you can find it under the Sources library).
- Double-click the "From Workspace" block to open its parameters.
- Set the Data parameter to the name of the variable containing your time series data
- Connect the output of the "From Workspace" block to the control input of your Three-Phase Breaker.
- Ensure that the Three-Phase Breaker block is configured to accept external control signals for switching. You might need to set the block parameters to enable external control if it's not already configured that way.
Using MATLAB Function block
- Drag and drop a "MATLAB Function" block into your "Simulink" model.
- Double-click the block to open the editor, and implement your condition checking and signal generation logic inside the block.
- Connect the output of the "MATLAB Function" block to the control input of the Three-Phase Breaker.
카테고리
도움말 센터 및 File Exchange에서 Switches and Breakers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
