function DatiElabPreConvLinkHR = LastElab_bisPCLHR(conn,NodoPreConvLinkHR,rPCLHR,... datainiPCLHR,tempoiniPCLHR,IDcentralina,DTcatena,FileName) text = 'LastElab_bisPCLHR function started'; fileID = fopen(FileName,'a'); fmt = '%s \r'; fprintf(fileID,fmt,text); NPreConvLinkHR = cell2mat(NodoPreConvLinkHR(:,2)); NodeType = 'PreConv Link HR'; ii = 1; % contatore col = 13; % contatore colonne while ii <= rPCLHR ini_col = col-12; nN = num2str(NPreConvLinkHR(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 = ''' ... datainiPCLHR ''' and EventTime >= ''' tempoiniPCLHR ''' and UnitName = ''' IDcentralina ''' and ToolNameID = '''... DTcatena ''' and NodeType = ''' NodeType ''' and NodeNum = ''' nN ''' ']; curs = exec(conn,comando); curs = fetch(curs); DATnodoPCLHRd = 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 > ''' ... datainiPCLHR ''' and UnitName = ''' IDcentralina ''' and ToolNameID = '''... DTcatena ''' and NodeType = ''' NodeType ''' and NodeNum = ''' nN ''' ']; curs = exec(conn,comando); curs = fetch(curs); DATnodoPCLHR = curs.Data; [~,c1] = size(DATnodoPCLHR); [~,c2] = size(DATnodoPCLHRd); if c1 == c2 DATnodoPCLHR = [DATnodoPCLHRd; DATnodoPCLHR]; elseif c1 < c2 % solo giorno di riferimento DATnodoPCLHR = DATnodoPCLHRd; end DatiElabPreConvLinkHR(:,ini_col:col) = DATnodoPCLHR(:,:); col = col+13; ii = ii+1; end text = 'LastElab_bisPCLHR function worked correctly for PreConv Link HR'; fprintf(fileID,fmt,text); fclose(fileID); end