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
866e1df1
Commit
866e1df1
authored
4 years ago
by
Cristian Galperti
Browse files
Options
Downloads
Patches
Plain Diff
ETHCAT1 loader task can work with node02 and node03
parent
9f7e007c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/classes/SCDclass_taskmdsloadprevETHCAT.m
+17
-2
17 additions, 2 deletions
code/classes/SCDclass_taskmdsloadprevETHCAT.m
with
17 additions
and
2 deletions
code/classes/SCDclass_taskmdsloadprevETHCAT.m
+
17
−
2
View file @
866e1df1
...
@@ -98,13 +98,28 @@ classdef SCDclass_taskmdsloadprevETHCAT < SCDclass_task
...
@@ -98,13 +98,28 @@ classdef SCDclass_taskmdsloadprevETHCAT < SCDclass_task
%%
%%
% Node 02 loading functions
% Node 02
/03
loading functions
function
[
obj
,
value
]
=
getdataNodeETHCAT1
(
obj
,
shot
)
function
[
obj
,
value
]
=
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.
mdsopen
(
'rtc'
,
shot
);
mdsnodename
=
'node02'
;
mdsnodename
=
'node02'
;
mdsopen
(
'rtc'
,
shot
);
T
=
timeseries
;
T
=
timeseries
;
timebase
=
mdsvalue
([
'dim_of(\top.'
mdsnodename
'.ethcat1.in.int16_001)'
]);
timebase
=
mdsvalue
([
'dim_of(\top.'
mdsnodename
'.ethcat1.in.int16_001)'
]);
if
~
isnumeric
(
timebase
)
mdsnodename
=
'node03'
;
T
=
timeseries
;
timebase
=
mdsvalue
([
'dim_of(\top.'
mdsnodename
'.ethcat1.in.int16_001)'
]);
end
if
~
isnumeric
(
timebase
)
warning
(
'getdataNodeETHCAT1:NoData'
,
...
'Could notget EtherCAT1 int16 data either from node02 or node03'
);
value
=
[];
return
;
end
d_time
=
double
(
mdsvalueraw
([
'\top.'
mdsnodename
'.params:d_time'
]))
*
1.0e-6
;
d_time
=
double
(
mdsvalueraw
([
'\top.'
mdsnodename
'.params:d_time'
]))
*
1.0e-6
;
%timebase = round(timebase.*1/d_time)*d_time-d_time/2;
%timebase = round(timebase.*1/d_time)*d_time-d_time/2;
timebase
=
round
(
timebase
.*
1
/
d_time
)
*
d_time
-
d_time
/
100
;
timebase
=
round
(
timebase
.*
1
/
d_time
)
*
d_time
-
d_time
/
100
;
...
...
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