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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SPC
SCDDS
SCDDS-core
Commits
94224dc8
Commit
94224dc8
authored
3 years ago
by
Federico Felici
Browse files
Options
Downloads
Patches
Plain Diff
Better handling in case data is not found
parent
e61628ab
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
code/classes/SCDclass_mdsparenum.m
+3
-3
3 additions, 3 deletions
code/classes/SCDclass_mdsparenum.m
code/classes/SCDclass_taskmdsloadprevETHCAT.m
+9
-6
9 additions, 6 deletions
code/classes/SCDclass_taskmdsloadprevETHCAT.m
with
12 additions
and
9 deletions
code/classes/SCDclass_mdsparenum.m
+
3
−
3
View file @
94224dc8
...
...
@@ -28,10 +28,10 @@ classdef SCDclass_mdsparenum < SCDclass_mdspar
obj
.
marteclassname
=
'MDSParEnum'
;
end
function
actualizedata
(
obj
,
shot
)
function
actualizedata
(
obj
,
shot
)
obj
=
obj
.
preactualizecommon
(
shot
);
if
(
~
obj
.
unlinked
)
if
~
obj
.
actualizable
,
return
;
end
if
~
obj
.
unlinked
% Enumeration map fill
obj
=
obj
.
initenummap
();
...
...
This diff is collapsed.
Click to expand it.
code/classes/SCDclass_taskmdsloadprevETHCAT.m
+
9
−
6
View file @
94224dc8
...
...
@@ -49,10 +49,10 @@ classdef SCDclass_taskmdsloadprevETHCAT < SCDclass_task
end
end
function
[
obj
,
value
]
=
getdata
(
obj
,
shot
)
function
[
value
,
success
]
=
getdata
(
obj
,
shot
)
switch
(
obj
.
node
)
case
2
[
~
,
value
]
=
obj
.
getdataNodeETHCAT1
(
shot
);
[
value
,
success
]
=
obj
.
getdataNodeETHCAT1
(
shot
);
end
end
...
...
@@ -74,7 +74,8 @@ classdef SCDclass_taskmdsloadprevETHCAT < SCDclass_task
function
obj
=
actualizeNode
(
obj
,
shot
)
dd
=
SCDconf_getdatadict
(
obj
.
datadictionary
);
adcbus
=
dd
.
getEntry
(
obj
.
modelbus
)
.
getValue
;
[
~
,
data
]
=
obj
.
getdata
(
shot
);
[
data
,
success
]
=
obj
.
getdata
(
shot
);
if
~
success
,
return
;
end
T
=
timeseries
;
if
obj
.
verbose
==
1
fprintf
(
'Actualizing data for bus:
''
%s
''
(%s, shot %d) 0%% '
,
obj
.
modelbus
,
obj
.
classname
,
shot
);
...
...
@@ -99,11 +100,12 @@ classdef SCDclass_taskmdsloadprevETHCAT < SCDclass_task
%%
% Node 02/03 loading functions
function
[
obj
,
value
]
=
getdataNodeETHCAT1
(
obj
,
shot
)
function
[
value
,
success
]
=
getdataNodeETHCAT1
(
obj
,
shot
)
% node02 and 03 store an equal copy of EtherCAT1 input data
% on MDS. Here we take data from the first ok node on MDS.
% This to allow loading in cases where one of the two nodes
% has not stored.
% status=0 indicates success
mdsopen
(
'rtc'
,
shot
);
mdsnodename
=
'node02'
;
T
=
timeseries
;
...
...
@@ -116,7 +118,7 @@ classdef SCDclass_taskmdsloadprevETHCAT < SCDclass_task
if
~
isnumeric
(
timebase
)
warning
(
'getdataNodeETHCAT1:NoData'
,
...
'Could notget EtherCAT1 int16 data either from node02 or node03'
);
value
=
[];
value
=
[];
success
=
false
;
return
;
end
d_time
=
double
(
mdsvalueraw
([
'\top.'
mdsnodename
'.params:d_time'
]))
*
1.0e-6
;
...
...
@@ -139,7 +141,8 @@ classdef SCDclass_taskmdsloadprevETHCAT < SCDclass_task
value
=
T
;
if
obj
.
verbose
==
1
fprintf
(
'100%% \n'
);
end
end
success
=
true
;
end
end
...
...
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
register
or
sign in
to comment