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

holy grail cosmetics

parent 44986d7a
Branches
No related tags found
No related merge requests found
%% cfs1 and cfs2 algo objects configuration %% Holy grail test script:
% defineds, inits and sets up cfs1 and cfs2 algo obj
% actulizes them on -1
% configures an interlaced cfs1 / cfs2 simulation model
% simulates it, storing outputs in th ebase workspace
% builds cfs1 and cfs2 .so libs
% builds MARTe2 dual thread cfs1 and cfs2 cfg file
% transfers these to realtime machine
% runs 1 MARTe2 run of cfs1 and cfs2
% retrieves the outputs from MDSplus
% plots the sim vs realtime signals (some of them)
%% cfs1 and cfs2 algo objects configuration
obj1=algoobj_cfs1; obj1.init; obj1.setup; obj1=algoobj_cfs1; obj1.init; obj1.setup;
obj2=algoobj_cfs2; obj2.init; obj2.setup; obj2=algoobj_cfs2; obj2.init; obj2.setup;
%% test shot actualization %% test shot actualization (model, to cope with MARTe2 settings)
shot=-1; shot=-1;
obj1.actualize(shot); obj1.actualize(shot);
obj2.actualize(shot); obj2.actualize(shot);
...@@ -39,25 +50,22 @@ cd marte2cfg/2threads/ ...@@ -39,25 +50,22 @@ cd marte2cfg/2threads/
algo_cfs1and2_create_marte2_cfg; algo_cfs1and2_create_marte2_cfg;
cd ../.. cd ../..
%% Trasferring gencode and cfg to the realtime machine %% Transfer gencode and cfg to the realtime machine
system('scp marte2cfg/2threads/algo_cfs1and2_2threads.cfg root@node06:/root/MARTe2-examples/Configurations'); system('scp marte2cfg/2threads/algo_cfs1and2_2threads.cfg root@node06:/root/MARTe2-examples/Configurations');
system('scp ../../../gencodes/CodeGenFolder/algo_cfs1.so root@node06:/root/MARTe2-examples/Simulinkso'); system('scp ../../../gencodes/CodeGenFolder/algo_cfs1.so root@node06:/root/MARTe2-examples/Simulinkso');
system('scp ../../../gencodes/CodeGenFolder/algo_cfs2.so root@node06:/root/MARTe2-examples/Simulinkso'); system('scp ../../../gencodes/CodeGenFolder/algo_cfs2.so root@node06:/root/MARTe2-examples/Simulinkso');
%% MARTe2 run of the same thing %% MARTe2 run of the same thing, on the realtime machine
% Here we assume .cfg and .so for
% cfs1 and cfs2 algos have been already generated
% ans transferred to realtime test machine
system('ssh root@node06 ''source /etc/profile; cd MARTe2-examples; ./runcfs.sh'''); system('ssh root@node06 ''source /etc/profile; cd MARTe2-examples; ./runcfs.sh''');
%% Getting MARTe2 outputs %% Getting MARTe2 outputs
mdsconnect('scd'); mdsconnect('scd');
op=mdsopen('scdds',0) op=mdsopen('scdds',0)
e
cfs1signal3marte2=tdi('cfs1.outputs.signal3'); cfs1signal3marte2=tdi('cfs1.outputs.signal3');
cfs2signal3marte2=tdi('cfs2.outputs.signal3'); cfs2signal3marte2=tdi('cfs2.outputs.signal3');
%% Plot combined simulation / realtime exec signals %% Plot combined simulation / realtime ouput signals
figure(1); figure(1);
clf clf
hold on hold on
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment