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

55
Tilt/azzeramenti_TLHRH.m Executable file
View File

@@ -0,0 +1,55 @@
%% Funzione che mette a zero gli spostamenti di alcuni nodi specifici
function [dsY,dsZ] = azzeramenti_TLHRH(IDcentralina,DTcatena,dsY,dsZ,NodoTiltLinkHRH,FileName)
fileID = fopen(FileName,'a');
fmt = '%s \r';
text = 'azzeramenti_TLHRH function started';
fprintf(fileID,fmt,text);
NomeFile = strcat(IDcentralina,'-',DTcatena,'-','Azzeramenti.txt');
if isfile(NomeFile) == 1
Dati = importdata(NomeFile);
i = 1;
while Dati(i,1) ~= 99999
i = i+1;
end
i = i+1; % aggiusto contatore nella prima colonna per le ampolle
fileID = fopen(FileName,'a');
fmt = '%s \r';
END = 0;
while END == 0
if Dati(i,1) == 9999999999
END = 1;
else
nodo = Dati(i);
dsY(nodo,:) = 0;
dsZ(nodo,:) = 0;
num = cell2mat(NodoTiltLinkHRH(nodo,2));
text = ['---Node Tilt Link HR H number ' num2str(num) ' has not been elaborated due to forced reset---'];
fprintf(fileID,fmt,text);
i = i+1;
end
end
else
fclose(fileID);
Parametro1 = 99999;
Parametro2 = 9999999999;
outdat = fopen(NomeFile,'wt+');
fopen(NomeFile,'wt');
fmt = '%d \r';
fileA = fopen(NomeFile,'a');
fprintf(fileA,fmt,Parametro1);
fprintf(fileA,fmt,Parametro2);
fclose(fileA);
fileID = fopen(FileName,'a');
fmt = '%s \r';
text = 'azzeramenti_TLHRH function created the reference file correctly';
fprintf(fileID,fmt,text);
end
text = 'azzeramenti_TLHRH function worked correctly';
fprintf(fileID,fmt,text);
fclose(fileID);
end