中文字幕 另类精品,亚洲欧美一区二区蜜桃,日本在线精品视频免费,孩交精品乱子片免费

<sup id="3hn2b"></sup>

    1. <sub id="3hn2b"><ol id="3hn2b"></ol></sub><legend id="3hn2b"></legend>

      1. <xmp id="3hn2b"></xmp>

      2. 新聞中心

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

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

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

        本文引用地址:http://www.antipu.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)生一個脈寬的負脈沖。

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


        評論


        相關推薦

        技術(shù)專區(qū)

        關閉