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

21
RSN/datainiziale.m Executable file
View File

@@ -0,0 +1,21 @@
% Funzione che scarica la data iniziale per quell'installazione
function [date,time,unitID] = datainiziale(DTcatena,unitID,conn,FileName)
text = 'datainiziale function started';
fileID = fopen(FileName,'a');
fmt = '%s \r';
fprintf(fileID,fmt,text);
unitID = num2str(cell2mat(unitID));
comando = ['select prod_date from tools where unit_ID like ''' unitID ''' and name like ''' DTcatena ''' '];
data_ini = fetch(conn,comando);
stringa = cell2mat(data_ini);
[lS] = length(stringa);
date = stringa(1,1:10);
time = stringa(1,12:lS);
text = ['Starting date for the download of data: ' date ' ' time '. datainiziale function closed.'];
fprintf(fileID,fmt,text);
fclose(fileID);
end