23 lines
687 B
Matlab
Executable File
23 lines
687 B
Matlab
Executable File
% Funzione che converte i dati grezzi dei Therm Link
|
|
|
|
function val_PT100 = conv_grezziPT100(val_PT100,rPT100,DCalPT100Tot,FileName)
|
|
|
|
text = 'conv_grezziPT100 function started';
|
|
fileID = fopen(FileName,'a');
|
|
fmt = '%s \r';
|
|
fprintf(fileID,fmt,text);
|
|
|
|
ca_PT100 = DCalPT100Tot(:,1);
|
|
int_PT100 = DCalPT100Tot(:,2);
|
|
i = 1;
|
|
% Contatore dei nodi, converte i punti ADC con le calibrazioni in valori angolari
|
|
while i <= rPT100 % nodo
|
|
val_PT100(:,i) = val_PT100(:,i)*ca_PT100(i,1)+int_PT100(i,1);
|
|
i = i+1;
|
|
end
|
|
|
|
text = 'Raw Data of PT100 Link converted into physical units correctly. conv_grezziPT100 function closed';
|
|
fprintf(fileID,fmt,text);
|
|
fclose(fileID);
|
|
|
|
end |