Hello everyone,
my Name is Heiko and I have a Question. Topic: Create PLECS circuits automatically with MATLAB code
I would like to use MATLAB code to automatically generate PLECS Circuits in Simulink.
I usually use the following command in MATLAB:
add_block
Example code:
new_system(‘Example’);
open_system(‘Example’);
add_block([‘fl_lib/Electrical/Electrical Elements/Resistor’], [Example/R_1’]);
works perfectly.
For the PLECS Blockset, I first create:
add_block(‘plecslib/Circuit’, [‘Example/PLECS Circuit’]);
Then I want to insert a resistor into the PLECS Circuit:
add_block([‘plecslib/Components/Electrical/Passive Components/Resistor’], [Example/PLECS Circuit/R_1’]);
The PLECS Circuit is inserted correctly into SImulink, but then the following error message appears:
There is no block named ‘plecslib/Components/Electrical/Passive Components/Resistor’
Thanks for your support
Heiko