Ignore:
Timestamp:
Nov 25, 1999, 2:35:30 PM (26 years ago)
Author:
ansari
Message:

archediab 27

Location:
trunk/Poubelle/archediab.old/archediab.sources/c
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Poubelle/archediab.old/archediab.sources/c/bit_block.c

    r643 r645  
    99#include "archeops.h"
    1010#include "bit_block.h"
     11#include "choix_param.h"
     12#include "structure.h"
     13#include "tm.h"
     14#include "tache.h"
     15#include "bolo.h"
     16#include "carte_acqui.h"
     17#include "carte_pci.h"
     18 
    1119
    12 
    13 
     20#define cadence_taux    16
     21#define mode_acquisition        0x00    //0xff en mode inverse, 0x00 en mode normal
    1422unsigned long   buffer;
    1523int     llgg,somme,type_du_block,numero;
    1624int     deb;    /*deb vaut zero si aucun debut n'a encore ete trouve*/
    1725int     compteur;
    18 int cpt_cherche_debut;
     26int     cpt_cherche_debut;
     27unsigned long   taux;
     28unsigned long   Nvide, Nplein;
    1929def_long_block
    2030
     
    2535{
    2636        int     i,m,bit;
     37       
    2738//      unsigned char   bit;    /*c'est le bit lu*/
    2839       
    29         bit=un_bit();
     40        bit=un_bit()^mode_acquisition;
    3041        switch(bit)
    3142                {
     
    3849                }
    3950       
     51       
    4052        compteur++;
    4153        i=compteur%32;
    4254
    43                
     55       
     56       
    4457       
    4558        switch(deb)
     
    108121                                                if(pbk->mot[m] == fin_block_mesure)
    109122                                                {
     123                                                        /*
    110124                                                        if(calcul_somme_block(pbk,llgg)!=somme)
    111125                                                        {
    112126                                                                ecrit_erreur_bit(erreur_somme);
    113127                                                               
    114                                                                 /*on continue quand meme*/
     128                                                               
    115129                                                        }
     130                                                        */
     131                                                       
    116132//                                                      else    ecrit_erreur_bit(bloc_correct);
    117133                                                               
    118134                                                        deb=0;
    119 
     135                                                        Nplein=compteur+1;
     136                                                        compteur=0;
     137                                                        //Calcul du taux de remplissage
     138                                                        taux=taux+(((0xffff-taux)*Nplein)>>cadence_taux);
     139                                                        tt->nb_lec_fofo_ext=((taux*1000)>>cadence_taux);
    120140                                                        return(lit_bit_un_block);
    121141                                                                               
     
    129149                                                }
    130150                                               
     151                                       
     152                                               
     153                                               
    131154                                               
    132155                                        }
    133                                 }               
     156                                       
     157                                }
     158                               
     159                                               
    134160                        }
    135161                        break;
     
    138164                default :
    139165               
    140                                
     166                        if(compteur>1000)
     167                        {
     168                                Nvide=compteur;
     169                                compteur=0;
     170                                taux=taux-((taux*Nvide)>>cadence_taux);
     171                                tt->nb_lec_fofo_ext=((taux*1000)>>cadence_taux);
     172                        }       
    141173                        if(buffer==debut_block_mesure)
    142174                        {
    143175                                deb=1;
     176                                Nvide=compteur-32;
    144177                                compteur=31;
    145178                                pbk->debut=buffer;
  • trunk/Poubelle/archediab.old/archediab.sources/c/dilution.c

    r643 r645  
    208208
    209209
     210#define c(j,i)          (1e-4*(double)parametr.nom_coef[parametr.bolo[j].numero_nom_coef].coef[i])     
    210211
    211212// les temperatures sur les cartes modifiées
    212213{
    213 double I,V,R[4];
     214double I,V,R[8],llR;
    214215int j,k;
    215216def_gains;
    216217k=0;
     218
    217219for(j=0;(j<nb_max_bolo) && (k<4);j++)
    218220        {
     
    222224                V=0.001*bol_micro_volt(blk->temperature[k],(double)parametr.bolo[j].bolo_gain*gain_ampli(gg->reglage.bolo[j]));
    223225                if(I>0.0000001)         R[k]=V/I;       else    R[k]=0;                         //      R  en ‡
    224                 k++;
     226 //------  calcul de l'etalonnage en temperature des cartes temperature simplifiées 
     227 // j=numero de bebo    T[k] = R[k+4] en Kelvin
     228                if ((R[k]-c(j,6))>1.)
     229                        {if((log(R[k]-c(j,6))-c(j,0))>0.001) llR= log(log(R[k]-c(j,6))-c(j,0)) ; else llR=0;}
     230                else llR=0;
     231                R[k+4]  = exp(  c(j,1) + c(j,2)* llR + c(j,3)* llR* llR + c(j,4)* llR* llR* llR + c(j,5)* llR* llR* llR* llR) ;
     232                if(R[k+4]>9999) R[k+4]=9999;
     233                k++;           
    225234                }
    226235        }
    227236
    228 if(R[0]<90.)    ecritD(fenetre_dilution,dil_temp,"germ= %6.2f‡  4K=%5.1f‡   1.6K=%5.1f‡   10K=%5.1f‡",R[0],R[1],R[2],R[3]);
    229 else    ecritD(fenetre_dilution,dil_temp,"germ= %6.3fk‡  4K=%5.1f‡   1.6K=%5.1f‡   10K=%5.1f‡",R[0]*0.001,R[1],R[2],R[3]);
     237
     238if(R[0]<90.)    ecritD(fenetre_dilution,dil_temp
     239        , "ge=%6.2f‡ 4K=%6.2f‡ 1.6K=%6.2f‡ 10K=%6.2f‡\rge= %6.3fK  4K=%6.2fK 1.6K=%6.2fK 10K=%6.2fK "
     240                ,R[0],R[1],R[2],R[3],R[4],R[5],R[6],R[7]);
     241else    ecritD(fenetre_dilution,dil_temp
     242        ,"ge=%6.3fk‡ 4K=%6.2f‡ 1.6K=%6.2f‡ 10K=%6.2f‡\rge= %6.3fmK 4K=%6.2fK 1.6K=%6.2fK 10K=%6.2fK "
     243        ,R[0]*0.001,R[1],R[2],R[3],R[4]*1000.,R[5],R[6],R[7]);
     244
     245
    230246if(litD(fenetre_dilution,dil_trace_tempe,0))// trace les sondes de niveau helium
    231247        {
     
    240256                        strcpy(graph->xtitre,"minutes");
    241257                        }
    242         tracen(fenetre_temperature_dil,4,minutes,R);
     258        tracen(fenetre_temperature_dil,8,minutes,R);
    243259        }
    244260}
  • trunk/Poubelle/archediab.old/archediab.sources/c/tache_archeops_bit2.c

    r643 r645  
    2323//
    2424//
    25 //   lit directement les blocks recut sur la fifo et les envoie au programme principal
     25//   lit directement les blocks recus sur la fifo et les envoie au programme principal
    2626//
    2727
     
    3434
    3535//*****************************************************************************************
     36unsigned long   N_total_bits,M;
     37unsigned short  Max,Min;
    3638
    3739void init_tache(void)
     
    6971
    7072
    71 char    un_bit(void)
     73char    un_bit()
    7274{
    7375static int i;
    7476static unsigned long RR;
     77unsigned short  Val;
     78
    7579lit_carte;      if(rien_a_lire)         return(bit_vide);       //  fifo vide  ->  retour  ->  sort du while
     80
     81N_total_bits++;
     82Val=((RR>>1) & 0x3f);   //permet de lire les bits de temps dans RR
     83
     84//Calcul de la nouvelle moyenne glissee du temps
     85M=M-(M>>16)+(Val<<8);
     86
     87       
     88//Calcul du Max
     89if(N_total_bits==0) Max=Val;    //initialisation au premier passage
     90if(Val>Max) Max=Val;    //changement de maximum
     91if((N_total_bits%60000)==0)
     92{
     93        Max=Max-1;      //Diminution tous les 60000 bits
     94        N_total_bits=0;
     95}
     96       
     97//Calcul du Min
     98if(N_total_bits==0) Min=Val;    //initialisation au premier passage
     99if(Val<Min) Min=Val;    //changement de minimum
     100if((N_total_bits%60000)==0) Min=Min+1;  //Augmentation tous les 60000 bits
     101//tt->nb_lec_fofo_ext=M;
     102
     103
     104       
    76105//if( RR & 1 )          return(bit_un);
    77106//else          return(bit_zero);
    78107if( RR & 1 )    return(bit_zero);
    79108else            return(bit_un);
     109
    80110}
    81111
     
    135165        }
    136166if(lec_fifo > tt->nb_lec_fofo_int)      tt->nb_lec_fofo_int=lec_fifo;
    137 if(!tt->nb_lec_fofo_ext)                {tt->nb_lec_fofo_ext=tt->nb_lec_fofo_int;tt->nb_lec_fofo_int=0;}
     167//if(!tt->nb_lec_fofo_ext)              {tt->nb_lec_fofo_ext=tt->nb_lec_fofo_int;tt->nb_lec_fofo_int=0;}
    138168
    139169}
  • trunk/Poubelle/archediab.old/archediab.sources/c/telecommande.c

    r643 r645  
    217217        case    tc_dir_reset_epld       :       //printf("tc_reset_epld:\n");
    218218               
    219                         for(j=0;j<14;j++) tc_char(j);
     219//                      for(j=0;j<14;j++) tc_char(j);
     220                        for(j=0;j<15;j++) tc_char(j);   // reset epld+transputer
    220221                        tc_char(1);tc_char(1);
    221222                        tc_char(0x00);tc_char(0x00);    //  synchro
Note: See TracChangeset for help on using the changeset viewer.