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

<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) > 設計應用 > z3050搖臂鉆上升控制時序

        z3050搖臂鉆上升控制時序

        作者: 時間:2012-09-18 來源:網(wǎng)絡 收藏
        #include reg52.h>
        #define uchar unsigned char
        #define uint unsigned int
        sbit p10=P1^0; /*搖臂上升鍵*/
        sbit p11=P1^1; /*搖臂下降鍵*/
        sbit p35=P3^5; /*搖臂夾緊到位*/
        sbit p34=P3^4; /*搖臂松開到位*/
        sbit p01=P0^1; /*油泵電機啟動*/
        sbit p02=P0^2; /*上升繼電器*/
        sbit p03=P0^3; /*下降繼電器*/
        sbit p04=P0^4; /*搖臂松開電磁閥*/
        sbit p05=P0^5; /*搖臂夾緊電磁閥*/
        void main()
        {
        while(1)
        {
        if(p10==0) /*搖臂上升按下*/
        {
        delay(200); //延時消抖
        if(p10==0)
        {
        p01=0; /*啟動油泵*/
        p04=0; /*搖臂松開電磁閥*/
        }
        }
        if((p10==0)(p34==0)) /*如果搖臂上升按下和搖臂松到位*/
        {
        p04=1; //關閉松開電磁閥
        p02=0; /*搖臂上升繼電器吸合*/
        }
        if(p10==1) /*松開搖臂夾緊鍵*/
        {
        p02=1; /*上升繼電器停止*/
        delay(2000); /*延時2s*/
        p05==0; /*夾緊*/
        }
        if(p35==0) /*夾緊到位*/
        {
        p05=1; /*搖臂夾緊電磁閥關*/
        p01=1; /*停油泵*/
        }

        }
        }


        void delay(uchari)
        {
        uchar j;
        while(i--)
        {
        for(j=0;j125;j++)
        {;}
        }
        }


        評論


        技術專區(qū)

        關閉