Sync from remote server: 2025-10-12 18:56:41
This commit is contained in:
45
ATD/LastElab_bisPCL.m
Executable file
45
ATD/LastElab_bisPCL.m
Executable file
@@ -0,0 +1,45 @@
|
||||
function DatiElabPreConvLink = LastElab_bisPCL(conn,NodoPreConvLink,rPCL,...
|
||||
datainiPCL,tempoiniPCL,IDcentralina,DTcatena,FileName)
|
||||
|
||||
text = 'LastElab_bisPCL function started';
|
||||
fileID = fopen(FileName,'a');
|
||||
fmt = '%s \r';
|
||||
fprintf(fileID,fmt,text);
|
||||
|
||||
NPreConvLink = cell2mat(NodoPreConvLink(:,2));
|
||||
NodeType = 'PreConv Link';
|
||||
ii = 1; % contatore
|
||||
col = 13; % contatore colonne
|
||||
while ii <= rPCL
|
||||
ini_col = col-12;
|
||||
nN = num2str(NPreConvLink(ii,1));
|
||||
% Scarico di dati di spostamenti
|
||||
comando = ['select EventDate, EventTime, YShift, ZShift, Y, Z, AlfaX, AlfaY, T_node, speed, speed_local, acceleration, acceleration_local from ElabDataView where EventDate = ''' ...
|
||||
datainiPCL ''' and EventTime >= ''' tempoiniPCL ''' and UnitName = ''' IDcentralina ''' and ToolNameID = '''...
|
||||
DTcatena ''' and NodeType = ''' NodeType ''' and NodeNum = ''' nN ''' '];
|
||||
curs = exec(conn,comando);
|
||||
curs = fetch(curs);
|
||||
DATnodoPCLd = curs.Data;
|
||||
% Scarico di dati di spostamenti
|
||||
comando = ['select EventDate, EventTime, YShift, ZShift, Y, Z, AlfaX, AlfaY, T_node, speed, speed_local, acceleration, acceleration_local from ElabDataView where EventDate > ''' ...
|
||||
datainiPCL ''' and UnitName = ''' IDcentralina ''' and ToolNameID = '''...
|
||||
DTcatena ''' and NodeType = ''' NodeType ''' and NodeNum = ''' nN ''' '];
|
||||
curs = exec(conn,comando);
|
||||
curs = fetch(curs);
|
||||
DATnodoPCL = curs.Data;
|
||||
[~,c1] = size(DATnodoPCL);
|
||||
[~,c2] = size(DATnodoPCLd);
|
||||
if c1 == c2
|
||||
DATnodoPCL = [DATnodoPCLd; DATnodoPCL];
|
||||
elseif c1 < c2 % solo giorno di riferimento
|
||||
DATnodoPCL = DATnodoPCLd;
|
||||
end
|
||||
DatiElabPreConvLink(:,ini_col:col) = DATnodoPCL(:,:);
|
||||
col = col+13;
|
||||
ii = ii+1;
|
||||
end
|
||||
|
||||
text = 'LastElab_bisPCL function worked correctly for PreConv Link';
|
||||
fprintf(fileID,fmt,text);
|
||||
fclose(fileID);
|
||||
end
|
||||
Reference in New Issue
Block a user