Sync from remote server: 2025-10-12 18:56:41

This commit is contained in:
2025-10-12 18:56:59 +02:00
commit 7e8ee264aa
553 changed files with 161447 additions and 0 deletions

42
Tilt/LastElab_bisRL.m Executable file
View File

@@ -0,0 +1,42 @@
function DatiElabRainLink = LastElab_bisRL(conn,NodoRainLink,rRL,datainiRL,...
tempoiniRL,IDcentralina,DTcatena,FileName)
NRainLink = cell2mat(NodoRainLink(:,2));
NodeType = 'Rain Link';
ii = 1; % contatore
col = 4; % contatore colonne
while ii <= rRL
ini_col = col-3;
nN = num2str(NRainLink(ii,1));
% Scarico di dati di spostamenti
comando = ['select EventDate, EventTime, ZShift, Z from ElabDataView where EventDate = ''' ...
datainiRL ''' and EventTime >= ''' tempoiniRL ''' and UnitName = ''' IDcentralina ''' and ToolNameID = '''...
DTcatena ''' and NodeType = ''' NodeType ''' and NodeNum = ''' nN ''' '];
curs = exec(conn,comando);
curs = fetch(curs);
DATnodoRLd = curs.Data;
% Scarico di dati di spostamenti
comando = ['select EventDate, EventTime, ZShift, Z from ElabDataView where EventDate > ''' ...
datainiRL ''' and UnitName = ''' IDcentralina ''' and ToolNameID = '''...
DTcatena ''' and NodeType = ''' NodeType ''' and NodeNum = ''' nN ''' '];
curs = exec(conn,comando);
curs = fetch(curs);
DATnodoRL = curs.Data;
[~,c1] = size(DATnodoRL);
[~,c2] = size(DATnodoRLd);
if c1==c2
DATnodoRL = [DATnodoRLd; DATnodoRL];
elseif c1 < c2 % solo giorno di riferimento
DATnodoRL = DATnodoRLd;
end
DatiElabRainLink(:,ini_col:col) = DATnodoRL(:,:);
col = col+4;
ii = ii+1;
end
text = 'LastElab_bisRL function worked correctly for Rain Link';
fileID = fopen(FileName,'a');
fmt = '%s \r';
fprintf(fileID,fmt,text);
fclose(fileID);
end