Sync from remote server: 2025-10-12 18:56:41
This commit is contained in:
42
Tilt/LastElab_bisTL.m
Executable file
42
Tilt/LastElab_bisTL.m
Executable file
@@ -0,0 +1,42 @@
|
||||
function DatiElabTiltLink = LastElab_bisTL(conn,NodoTiltLink,rTL,datainiTL,...
|
||||
tempoiniTL,IDcentralina,DTcatena,FileName)
|
||||
|
||||
NTiltLink = cell2mat(NodoTiltLink(:,2));
|
||||
NodeType = 'Tilt Link';
|
||||
ii = 1; % contatore
|
||||
col = 16; % contatore colonne
|
||||
while ii <= rTL
|
||||
ini_col = col-15;
|
||||
nN = num2str(NTiltLink(ii,1));
|
||||
% Scarico di dati di spostamenti
|
||||
comando = ['select EventDate, EventTime, XShift, YShift, ZShift, X, Y, Z, HShift, HShift_local, HShiftDir, T_node, speed, speed_local, acceleration, acceleration_local from ElabDataView where EventDate = ''' ...
|
||||
datainiTL ''' and EventTime >= ''' tempoiniTL ''' and UnitName = ''' IDcentralina ''' and ToolNameID = '''...
|
||||
DTcatena ''' and NodeType = ''' NodeType ''' and NodeNum = ''' nN ''' '];
|
||||
curs = exec(conn,comando);
|
||||
curs = fetch(curs);
|
||||
DATnodoTLd = curs.Data;
|
||||
% Scarico di dati di spostamenti
|
||||
comando = ['select EventDate, EventTime, XShift, YShift, ZShift, X, Y, Z, HShift, HShift_local, HShiftDir, T_node, speed, speed_local, acceleration, acceleration_local from ElabDataView where EventDate > ''' ...
|
||||
datainiTL ''' and UnitName = ''' IDcentralina ''' and ToolNameID = '''...
|
||||
DTcatena ''' and NodeType = ''' NodeType ''' and NodeNum = ''' nN ''' '];
|
||||
curs = exec(conn,comando);
|
||||
curs = fetch(curs);
|
||||
DATnodoTL = curs.Data;
|
||||
[~,c1] = size(DATnodoTL);
|
||||
[~,c2] = size(DATnodoTLd);
|
||||
if c1==c2
|
||||
DATnodoTL = [DATnodoTLd; DATnodoTL];
|
||||
elseif c1 < c2 % solo giorno di riferimento
|
||||
DATnodoTL = DATnodoTLd;
|
||||
end
|
||||
DatiElabTiltLink(:,ini_col:col) = DATnodoTL(:,:);
|
||||
col = col+16;
|
||||
ii = ii+1;
|
||||
end
|
||||
|
||||
text = 'LastElab_bisTL function worked correctly for Tilt Link V';
|
||||
fileID = fopen(FileName,'a');
|
||||
fmt = '%s \r';
|
||||
fprintf(fileID,fmt,text);
|
||||
fclose(fileID);
|
||||
end
|
||||
Reference in New Issue
Block a user