function [tp]=get_campbell_TRH_volt(fn)

fid=fopen(fn);
if (fid~=0)
    for n=1:4
        junk=fgetl(fid);
    end
    clear junk
    cc=0;
    while (~feof(fid))
        junk=fgetl(fid);
        ix=strfind(junk,'"');
        if ~isempty(ix)
            cc=cc+1;
            DT=junk(ix(1)+1:ix(2)-1);
            if ~isempty(DT)
                tp.PC_TIME(cc,1)=str2num(DT(1:4));  tp.PC_TIME(cc,2)=str2num(DT(6:7));  tp.PC_TIME(cc,3)=str2num(DT(9:10));
                tp.PC_TIME(cc,4)=str2num(DT(12:13));tp.PC_TIME(cc,5)=str2num(DT(15:16));tp.PC_TIME(cc,6)=str2num(DT(18:19));
            else
                tp.PC_TIME(cc,:)=ones(1,6).*NaN;
            end
            
            clear ix
            ix=strfind(junk,',');
            rec=junk(ix(1)+1:ix(2)-1);
            if ~isempty(rec)
                tp.record_number(cc)=str2num(rec);
            else
                tp.record_number(cc)=NaN;
            end 
            
            T1V=junk(ix(2)+1:ix(3)-1);
            if ((~isempty(T1V))&(strcmp('"NAN"',T1V)~=1))
                tp.T1V(cc)=str2num(T1V);
            else
                tp.T1V(cc)=NaN;
            end 
            
            RH1V=junk(ix(3)+1:ix(4)-1);
            if ((~isempty(RH1V))&(strcmp('"NAN"',RH1V)~=1))
                tp.RH1V(cc)=str2num(RH1V);
            else
                tp.RH1V(cc)=NaN;
            end
            
            PTemp=junk(ix(4)+1:ix(5)-1);
            if ((~isempty(PTemp))&(strcmp('"NAN"',PTemp)~=1))
                tp.PTemp(cc)=str2num(PTemp);
            else
                tp.PTemp(cc)=NaN;
            end
            
            Batt_V=junk(ix(5)+1:ix(6)-1);
            if ((~isempty(Batt_V))&(strcmp('"NAN"',Batt_V)~=1))
                tp.Batt_V(cc)=str2num(Batt_V);
            else
                tp.Batt_V(cc)=NaN;
            end
            
            T2V=junk(ix(6)+1:ix(7)-1);
            if ((~isempty(T2V))&(strcmp('"NAN"',T2V)~=1))
                tp.T2V(cc)=str2num(T2V);
            else
                tp.T2V(cc)=NaN;
            end
            
            RH2V=junk(ix(7)+1:length(junk));
            if ((~isempty(RH2V))&(strcmp('"NAN"',RH2V)~=1))
                tp.RH2V(cc)=str2num(RH2V);
            else
                tp.RH2V(cc)=NaN;
            end
        
            clear junk DT rec T1V RH1V PTemp Batt_V T2V RH2V
        end
    end
else
    tp=[];
end

 fclose('all');