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

vios1161
級別: 略有小成
精華主題: 0
發帖數量: 190 個
工控威望: 308 點
下載積分: 675 分
在線時間: 210(小時)
注冊時間: 2016-07-30
最后登錄: 2024-11-20
查看vios1161的 主題 / 回貼
樓主  發表于: 2016-11-26 01:07
今天教的直接用 PC 程式來控制機臺 ( 臺灣丙級機電整合術科第一題 )
用 PC 來程式…真的不方便,還是 Ladder 比較容易。
附上程式
PCtoPLC.rar (73 K) 下载次数:210
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重新編輯 ]
往事如風
科技改變制造
級別: 網絡英雄

精華主題: 0
發帖數量: 11355 個
工控威望: 18733 點
下載積分: 12589 分
在線時間: 2705(小時)
注冊時間: 2013-01-31
最后登錄: 2025-01-02
查看往事如風的 主題 / 回貼
1樓  發表于: 2016-11-26 17:04
學習了,謝謝分享
三人行者必有我師 ,擇其善者而從之

主站蜘蛛池模板: 久久91亚洲人成电影网站| 精精国产www视频在线观看免费| 欧美视频一区二区三区在线观看 | 停停五月天| 中文第一页| 国产成人18黄网站免费网站| 精品久久成人免费第三区| 99久久精品国产自免费| 伊人色院成人蜜桃视频| 黄视频日本| 欧美黑人vs亚裔videos| 一级黄色免费| 成年人黄色一级片| 国产精品一在线观看| 精品国产欧美另类一区| 日本高清免费zzzzzzzz| www.爱色| 可以免费观看一级毛片黄a| 国内黄色精品| 黄色一级片观看| 国产在线精品一区二区三区| 一级性视频| 日本在线播放一区| 免费国产一级特黄aa大| 国产精品夜间视频香蕉| 成人午夜免费剧场| 欧美日韩国产手机在线观看视频| 91精品综合久久久久m3u8| 中文字幕日韩高清| 亚洲国产精品aa在线看| 国产毛片一级| 黄色网页在线观看| 国产不卡毛片| 久久性视频| 亚洲精品不卡视频| 一级特黄国产高清毛片97看片 | 不卡黄色| 在线视频 一区二区| 国内精品999| 国产一级性生活片| 国模大胆偷拍在线视频|