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

45
ATD/LastElab_bisAL.m Executable file
View File

@@ -0,0 +1,45 @@
function DatiElabAnalogLink = LastElab_bisAL(conn,NodoAnalogLink,rAL,...
datainiAL,tempoiniAL,IDcentralina,DTcatena,FileName)
text = 'LastElab_bisAL function started';
fileID = fopen(FileName,'a');
fmt = '%s \r';
fprintf(fileID,fmt,text);
NAnalogLink = cell2mat(NodoAnalogLink(:,2));
NodeType = 'Analog Link';
ii = 1; % contatore
col = 8; % contatore colonne
while ii <= rAL
ini_col = col-7;
nN = num2str(NAnalogLink(ii,1));
% Scarico di dati di spostamenti
comando = ['select EventDate, EventTime, XShift, YShift, ZShift, X, Y, Z from ElabDataView where EventDate = ''' ...
datainiAL ''' and EventTime >= ''' tempoiniAL ''' and UnitName = ''' IDcentralina ''' and ToolNameID = '''...
DTcatena ''' and NodeType = ''' NodeType ''' and NodeNum = ''' nN ''' '];
curs = exec(conn,comando);
curs = fetch(curs);
DATnodoALd = curs.Data;
% Scarico di dati di spostamenti
comando = ['select EventDate, EventTime, XShift, YShift, ZShift, X, Y, Z from ElabDataView where EventDate > ''' ...
datainiAL ''' and UnitName = ''' IDcentralina ''' and ToolNameID = '''...
DTcatena ''' and NodeType = ''' NodeType ''' and NodeNum = ''' nN ''' '];
curs = exec(conn,comando);
curs = fetch(curs);
DATnodoAL = curs.Data;
[~,c1] = size(DATnodoAL);
[~,c2] = size(DATnodoALd);
if c1 == c2
DATnodoAL = [DATnodoALd; DATnodoAL];
elseif c1 < c2 % solo giorno di riferimento
DATnodoAL = DATnodoALd;
end
DatiElabAnalogLink(:,ini_col:col) = DATnodoAL(:,:);
col = col+8;
ii = ii+1;
end
text = 'LastElab_bisAL function worked correctly for Analog Link';
fprintf(fileID,fmt,text);
fclose(fileID);
end