Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SCDDS-core
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SPC
SCDDS
SCDDS-core
Commits
5e4dc42e
Commit
5e4dc42e
authored
Jun 29, 2022
by
Cristian Galperti
Browse files
Options
Downloads
Patches
Plain Diff
holy grail cosmetics
parent
44986d7a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
sandbox/test/cfs12combined/cfs12combined_test_run.m
+17
-9
17 additions, 9 deletions
sandbox/test/cfs12combined/cfs12combined_test_run.m
with
17 additions
and
9 deletions
sandbox/test/cfs12combined/cfs12combined_test_run.m
+
17
−
9
View file @
5e4dc42e
%% 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
..
/
..
%% Trasfer
ring
gencode and cfg to the realtime machine
%% Tra
n
sfer 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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment