日本a√视频在线,久久青青亚洲国产,亚洲一区欧美二区,免费g片在线观看网站

        <style id="k3y6c"><u id="k3y6c"></u></style>
        <s id="k3y6c"></s>
        <mark id="k3y6c"></mark>
          
          

          <mark id="k3y6c"></mark>

          新聞中心

          EEPW首頁 > 測試測量 > 設計應用 > 大型貨車超載超速實時檢測系統(tǒng)

          大型貨車超載超速實時檢測系統(tǒng)

          作者: 時間:2014-04-18 來源:網(wǎng)絡 收藏

          本文引用地址:http://yuyingmama.com.cn/article/259120.htm

          Void BeforeTheStateDidNotExercise(float* parameter,float weight,int *countR,int *countW)

          {

          (*countR)++;

          if(*countR>=17)

          *countR=0;

          if(weight>M)

          {

          (*countW)++;

          if(*countW>=12)

          {

          *parameter=0;

          *countW=0;

          overloadAlarm();//啟動報警

          }

          }

          }

          運動中超載處理程序:

          void campaignStatus(float* parameter,float weight,int *countR,int *countW,clock_t *start)

          {

          if(* parameter!=1)

          (*countR)++;

          momentNow();//記錄當前時間

          *start=clock();

          t1recordTheCurrenttime();//記錄當前時間

          if(weight>M)

          (*countW)++;

          if(*countR>=100)

          {

          if( *countW>=70)

          {

          overloadAlarm();//啟動報警

          * parameter=1;

          }

          *countR=0;

          *countW=0;

          }

          }

          運動后停車超載處理:

          void afterStoppingState(float* parameter,float weight,int *countR,int *countW,clock_t *finish)

          {

          (*countR)++;

          //記錄當前時間t2

          *finish=clock();

          if(weight>M)

          (*countW)++;

          if(*countR>=100)

          {

          if(*countW30)

          {

          *parameter=-1;

          sendRelevantInformationToTheHost(countW,countR);// 發(fā)送相關信息到主機

          }

          *countR=0;

          *countW=0;

          }

          }

          //根據(jù)速度和參數(shù)K和parameter確定車體狀態(tài)

          void carStatus(float speed,float* parameter,float weight,int *countR,int *countW)

          {

          //超載持續(xù)時間

          clock_t start, finish;

          double duration;

          if(speed==0)

          {

          if(*parameter=0)

          BeforeTheStateDidNotExercise(parameter,weight,countR,countW);

          else

          afterStoppingState(parameter,weight,countR,countW,clock_t finish);

          }

          else

          campaignStatus(parameter,weight,countR,countW,clock_t start);

          //超重持續(xù)時間

          duration = (double)(finish - start) / CLOCKS_PER_SEC;

          printf( %f secondsn, duration );

          }

          //獲取當前時間

          int momentNow(void)

          {

          time_t t;

          t=time(0);

          local=localtime(t);

          printf( %d-%d-%dn%d:%d:%dn,local->tm_year+1900,local->tm_mon,local->tm_mday,local->tm_hour,local->tm_min,local->tm_sec);

          return 0;

          }

          4.2 獲取速度模塊設計

          4.2.1 硬件設計

          本方法采用測量一個轉(zhuǎn)盤的轉(zhuǎn)速間接地測出貨車的速度,因此轉(zhuǎn)盤要與貨車的轉(zhuǎn)軸相連,轉(zhuǎn)盤的轉(zhuǎn)速與車軸的轉(zhuǎn)速成一定的關系。將轉(zhuǎn)盤等分為四等份,在每等份的分界線上安裝一塊磁鋼,如圖4.2所示。

          圖4.5 測速硬件原理

          的VCC端接5~12V直流電源,OUT端接到SPCE061A的IOB3(外部中斷2輸入口)[27],另一端接公共地。每次磁鋼經(jīng)過下方時,OUT端都會產(chǎn)生一個脈寬的負脈沖。

          稱重傳感器相關文章:稱重傳感器原理
          傾角傳感器相關文章:傾角傳感器原理


          評論


          相關推薦

          技術專區(qū)

          關閉