I am trying to build a script that will create a simulink model taking the input block data from excel.
However facing difficulty in addressing the created block. i have read my data using code
[~, signal] = xlsread('Com Simu mAPPNG.xlsx')
new_system('test');
open_system('test')
count= size(signal,1);
add_block('simulink/Commonly Used Blocks/Bus Creator', 'test/BC1');
set_param('test/BC1','Inputs','count');
This works fine. When i enter the loop to create blocks names from the data read from excel (create memory read blocks).
or x=1:count
add_block('simulink/Signal Routing/Data Store Read', 'test/MemoryRead1', 'MakeNameUnique', 'on');
set_param(gcb,'Name', signal{x,1});
set_param(gcb,'Datastorename', signal{x,1});
This also works.
Now i want to add line. and to address the block
add_line('test','signal{x,1}/1','BC1/x');
Gives error
Invalid Simulink object name: signal{x,1}/1
Pls help how to address these variable.