99久久国产综合精品女不卡-99久久好看一级毛片-99久久精品99999久久-99久久精品费精品国产-99久久精品费精品国产一区二

vios1161
級(jí)別: 略有小成
精華主題: 0
發(fā)帖數(shù)量: 190 個(gè)
工控威望: 308 點(diǎn)
下載積分: 670 分
在線時(shí)間: 210(小時(shí))
注冊(cè)時(shí)間: 2016-07-30
最后登錄: 2025-03-31
查看vios1161的 主題 / 回貼
樓主  發(fā)表于: 2016-11-26 01:07
今天教的直接用 PC 程式來控制機(jī)臺(tái) ( 臺(tái)灣丙級(jí)機(jī)電整合術(shù)科第一題 )
用 PC 來程式…真的不方便,還是 Ladder 比較容易。
附上程式
PCtoPLC.rar (73 K) 下载次数:213
private void timerAuto_Tick(object sender, EventArgs e)
        {
            int a1 = X0[0];
            int a0 = X0[1];
            int s0 = X0[2];
            int s1 = X0[3];
            int p0 = X0[4];
            int p1 = X0[5];
            int p2 = X0[6];
            int COS2 = X1[3];
            int COS1 = X1[4];
            int PB1 = X1[5];
            int ST = X1[6];
            int EMS = X1[7];
            int A = Y0[0];
            int R1 = Y0[2];
            int R2 = Y0[4];
            int R3 = Y0[5];
            int BF = Y0[6];
            int BB = Y0[7];
            int RL = Y1[5];
            int YL = Y1[6];
            int GL = Y1[7];
            switch (StepN0 )
            {
                case 1:
                    RL = 0; // Y15 紅燈滅
                    if (a0 == 1 && p0  == 1)
                    {
                        
                        GL = 1; // Y17 綠燈亮

                        if (COS1  == 1 && COS2 ==1 && ST ==1) // COS1 & COS2 & ST
                        {
                            StepN0 = 2;
                            TAuto = 0;
                        }
                    }
                    break;
                case 2:
                    TAuto =TAuto +1;
                    if (TAuto == 10)
                    {
                        R1 = 1;
                        GL = 0;
                        if (s0 == 1)
                        {
                            StepN0 = 3;
                            TAuto = 0;
                        }
                    }
                    break;
                case 3:
                    
                    TAuto =TAuto +1;
                    if(TAuto ==20 && s1 ==1)
                    {
                        StepN0 =4;
                    }
                    break;
                case 4:
                    R1 =0;
                    if (R1 ==0)
                    {
                        A = 1;
                    }
                    
                    if(a1 ==1)
                    {
                        BF = 1;
                        TAuto = TAuto + 1;
                            if (TAuto  == 20)
                            {
                        StepN0 =5;
                            }

                    }
                    break;
                case 5:
                    A  = 0;
                    if(a0==1)
                    {
                        R2=1;
                        if (p1 ==1)
                        {

                            TAuto = 0;
                            StepN0 = 6;
                        }
                    }
                    
                    break;
                case 6:
                    R2 = 0;
                    if(COS2 ==1)
                    {
                        TAuto = 0;
                        StepN0 = 7;
                    }
                    if (COS2 == 0 && ST==1)
                    {
                        TAuto = 0;
                        StepN0 = 7;
                    }
                    break;
                case 7:
                    BF = 0;
                    BB = 1;
                    TAuto = TAuto + 1;
                            if (TAuto  == 10)
                            {
                                R3 = 1;
                                if(p0 ==1)
                                {
                                    StepN0 = 8;
                                    TAuto = 0;
                                }
                            }
                            break;
                case 8:
                            R3 = 0;
                            TAuto = TAuto + 1;

                            if (TAuto == 10)
                            {
                                StepN0 = 1;
                            }
                            break;
            }

        
[ 此帖被vios1161在2016-11-26 15:39重新編輯 ]
碎心斷劍
每天給自己一個(gè)微笑,快樂幸福少不了
級(jí)別: 家園常客
精華主題: 0
發(fā)帖數(shù)量: 173 個(gè)
工控威望: 947 點(diǎn)
下載積分: 676 分
在線時(shí)間: 69(小時(shí))
注冊(cè)時(shí)間: 2011-08-31
最后登錄: 2024-12-01
查看碎心斷劍的 主題 / 回貼
1樓  發(fā)表于: 2017-02-21 19:40
好東西謝謝樓主分享希望多多分享哦
每天給自己一個(gè)微笑,快樂幸福少不了!呵呵……

主站蜘蛛池模板: 又爽又黄又无遮挡的视频在线观看 | 欧美精品blacked中文字幕 | 国产亚洲精品美女 | 成人开心激情 | 五月天爱爱激情视频在线观看 | 制服丝袜国产在线 | 国产a∨一区二区三区香蕉小说 | 欧美激情片网站 | 巨大巨粗巨长 黑人长吊视频 | 91精品国产自产91精品 | 一区二区三区久久精品 | 国产91网站在线观看免费 | 亚洲欧美日韩综合在线播放 | 国产精品自拍亚洲 | 小明永久免费大陆在线观看 | 成人一a毛片免费视频 | 国产v在线在线观看羞羞答答 | 制服丝袜中文字幕在线 | 免费在线a | 手机看片在线精品观看 | 国产日韩欧美一区二区三区在线 | 视频1区 | 国产亚洲欧美日韩综合另类 | 欧美一区二区高清 | 性短视频在线观看免费不卡流畅 | c看欧美激情毛片 | 国产91免费视频 | 精品视频 九九九 | 在线视频不卡国产在线视频不卡 | 欧美伦理一区 | 国产精品久久久久毛片 | 高清黄色一级片 | 在线观看的黄色 | 黄片毛片在线观看 | 国产精品日韩欧美久久综合 | 最新香蕉97超级碰碰碰碰碰久 | 玖玖这里只有精品 | 久久国产精品超级碰碰热 | 欧美一级毛片国产一级毛片 | 国产精品视频一区二区三区w | 尤物在线观看网站 |