function DatiElabTiltLinkH = LastElab_bisTLH(conn,NodoTiltLinkH,rTLH,datainiTLH,... tempoiniTLH,IDcentralina,DTcatena,FileName) NTiltLinkH = cell2mat(NodoTiltLinkH(:,2)); NodeType = 'Tilt Link H'; ii = 1; % contatore col = 13; % contatore colonne while ii <= rTLH ini_col = col-12; nN = num2str(NTiltLinkH(ii,1)); % Scarico di dati di spostamenti comando = ['select EventDate, EventTime, XShift, YShift, ZShift, X, Y, Z, T_node, speed, speed_local, acceleration, acceleration_local from ElabDataView where EventDate = ''' ... datainiTLH ''' and EventTime >= ''' tempoiniTLH ''' and UnitName = ''' IDcentralina ''' and ToolNameID = '''... DTcatena ''' and NodeType = ''' NodeType ''' and NodeNum = ''' nN ''' ']; curs = exec(conn,comando); curs = fetch(curs); DATnodoTLHd = curs.Data; % Scarico di dati di spostamenti comando = ['select EventDate, EventTime, XShift, YShift, ZShift, X, Y, Z, T_node, speed, speed_local, acceleration, acceleration_local from ElabDataView where EventDate > ''' ... datainiTLH ''' and UnitName = ''' IDcentralina ''' and ToolNameID = '''... DTcatena ''' and NodeType = ''' NodeType ''' and NodeNum = ''' nN ''' ']; curs = exec(conn,comando); curs = fetch(curs); DATnodoTLH = curs.Data; [~,c1] = size(DATnodoTLH); [~,c2] = size(DATnodoTLHd); if c1==c2 DATnodoTLH = [DATnodoTLHd; DATnodoTLH]; elseif c1 < c2 % solo giorno di riferimento DATnodoTLH = DATnodoTLHd; end DatiElabTiltLinkH(:,ini_col:col) = DATnodoTLH(:,:); col = col+13; ii = ii+1; end text = 'LastElab_bisTLH function worked correctly for Tilt Link H'; fileID = fopen(FileName,'a'); fmt = '%s \r'; fprintf(fileID,fmt,text); fclose(fileID); end