Skip to content
Snippets Groups Projects
Commit 640ccd1a authored by Cristian Galperti's avatar Cristian Galperti
Browse files

standalone cfs 1 and 2 tester model working

parent 0377e96e
No related branches found
No related tags found
No related merge requests found
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
function obj = algoobj_cfs12combined()
%% cfs1 and cfs2 algo objects configuration
%% Doublets SPC controller algorithm
obj = SCDclass_algo('algo_cfs12combined');
obj1=algoobj_cfs1; obj1.init; obj1.setup;
obj2=algoobj_cfs2; obj2.init; obj2.setup;
%% Timing of the algorithm
obj=obj.settiming(0,1e-3,1.0);
%% Dummy fixed param to define a dd
obj=obj.addfpinitfcn('algo_cfs12combined_loadfp','algo_cfs12combined_fp');
%% Define cfs1 and cfs2 algo obj in the base workspace
addpath('../cfs1');
addpath('../cfs2');
obj1=algoobj_cfs1;
obj2=algoobj_cfs2;
%%
assignin('base','obj1',obj1);
assignin('base','obj2',obj2);
evalin('base','obj1.init; obj1.setup; ');
evalin('base','obj2.init; obj2.setup; ');
%% Referenced data dictionaries
obj=obj.addrefdd('algo_cfs1.sldd',obj1);
obj=obj.addrefdd('algo_cfs2.sldd',obj2);
%% test shot actualization
shot=1;
obj1.actualize(shot);
obj2.actualize(shot);
%% Workaround to define proc buses in one place only
% NOTE: this is not to be replicated,
% an higher hyerarchical SCDDS level must be put in place
% (eg. SPC wrappers and expcodes objects)
% to do it properly
dd1=Simulink.data.dictionary.open('algo_cfs1.sldd');
ddd1=dd1.getSection('Design Data');
ddd1.deleteEntry('algo_cfs2_procout');
%
dd2=Simulink.data.dictionary.open('algo_cfs2.sldd');
ddd2=dd2.getSection('Design Data');
ddd2.deleteEntry('algo_cfs1_procout');
%
dd1.addDataSource('algo_cfs2.sldd');
dd2.addDataSource('algo_cfs1.sldd');
%
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment