'DC Voltage Source' Block Parameter Name Error
古いコメントを表示
I'm trying to run a simple script to place a Simscape block, but an error has occurred.
What is the parameter name for the DC Voltage Source block?
block direction :
Simscape - Foundation Library - Electrical - Electrical Sources - DC Voltage Source
---------- My script ----------
clc;
% Create a new Simulink model
modelName = 'mySimscapeModel';
open_system(new_system(modelName));
% Load the DC Voltage Source block
blockPath = 'fl_lib/Electrical/Electrical Sources/DC Voltage Source';
add_block(blockPath, [modelName, '/DC Voltage Source 1']);
% Optionally, set parameters for the DC Voltage Source
set_param([modelName, '/DC Voltage Source 1'], 'Constant voltage', '5'); % Set output voltage to 5V
---------- Error ----------
Error using BDC_FET_test (line 12)
DC Voltage Source block (mask) does not have a parameter named 'Constant voltage'
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Electrical Sensors についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
