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

it stored as int32, ADC prev node09 modifs WIP

parent 88f134bc
No related branches found
No related tags found
No related merge requests found
......@@ -308,22 +308,18 @@ classdef SCDclass_taskmdsloadprevADC < SCDclass_task
mdsopen('rtc',shot);
T=timeseries;
T.TimeInfo.Units='samples';
if shot>73708
samplecnt=mdsvalue('node09.thread02.mems.mem_002');
thomsontime=mdsvalue('node09.thread02.mems.mem_001');
thread02time=double(mdsvalue('node09.thread02.stats.stat_002'));
else
samplecnt=mdsvalue('node09.thread02.mems.mem_005');
thomsontime=mdsvalue('node09.thread02.mems.mem_006');
thread02time=double(mdsvalue('node09.thread02.stats.stat_002'));
end
if(samplecnt(1)==0)
samplebase=samplecnt+1;
warning('SCDclass_taskmdsloadprevADC:init','node 09 thread 2 starts with sample counter = 0, incrementing by 1');
if shot<74139
warning('SCDclass_taskmdsloadprevADC:init','node 09 too old shot to actualize on');
value=0;
time=0;
samplecnt=0;
return;
else
samplebase=samplecnt;
samplecnt=mdsvalue('node09.thread02.mems.mem_002');
timeraw=mdsvalue('node09.thread02.mems.mem_008');
adcraw=mdsvalueraw('node09.thread02.mems.mem_009');
end
%timebase(samplecnt(1)+1:end)=timebase(samplecnt(1)+1:end)+thomsontime(1);
timebase=1:numel(samplecnt);
T.Time=timebase;
......@@ -345,18 +341,10 @@ classdef SCDclass_taskmdsloadprevADC < SCDclass_task
if obj.verbose==1
fprintf('100%% \n');
end
% Need to delay by 1 sample since ADC acquired on the sync
% thread w.r.t these signal
% NO, TODO: better to store ADC data from within
% the processing thread to mems and use it,
% otherwise there would always be the possibility
% on unsiched data between thread01 ADC and these two signals
% below
T.Data=single([thread02time(2:end) thread02time(end)]');
T.Data=single(timeraw);
time=T;
T.Data=int32([samplecnt(2:end) samplecnt(end)]');
T.Data=int32(samplecnt);
samplecnt=T;
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