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

vios1161
級別: 略有小成
精華主題: 0
發帖數量: 190 個
工控威望: 308 點
下載積分: 670 分
在線時間: 210(小時)
注冊時間: 2016-07-30
最后登錄: 2025-03-31
查看vios1161的 主題 / 回貼
樓主  發表于: 2016-11-26 01:07
今天教的直接用 PC 程式來控制機臺 ( 臺灣丙級機電整合術科第一題 )
用 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重新編輯 ]
lyntechme
虛心做人,踏實做事
級別: 家園常客
精華主題: 0
發帖數量: 563 個
工控威望: 709 點
下載積分: 12711 分
在線時間: 256(小時)
注冊時間: 2012-03-31
最后登錄: 2023-06-04
查看lyntechme的 主題 / 回貼
1樓  發表于: 2017-02-21 18:35
這個資料不錯啊
 

主站蜘蛛池模板: 国产在线观看a | 欧美黄色免费网站 | 麻豆精品视频入口 | 欧美亚洲国产精品久久第一页 | 一区二区三区视频免费观看 | 国产一区二区三区久久 | 国产亚洲欧美日韩在线观看不卡 | 劲爆欧美色欧美 | 欧美精品一区二区三区视频 | 亚洲国产精品一区二区久久 | 91九色精品国产 | 国产狂喷白浆在线观看视频 | 黄色毛片前黄 | 国产91精品久久久久久久 | 在线观看 一区 | 国产精品视频观看 | 欧美性大片免费 | 五月天婷婷网亚洲综合在线 | 黑人日b | 韩国在线看免费观看高清 | 在线欧美69v免费观看视频 | 国产精品福利在线 | 国产成人h综合亚洲欧美在线 | 91久久老司机福利精品网 | 国产高清视频在线播放 | 99久久精品免费看国产麻豆 | 青青热久免费精品视频在首页 | 成人激情站 | 久久精品国产一区 | 成年人黄色在线观看 | 日韩欧美一区二区不卡看片 | 久久人体做爰大胆图片 | 国产nv精品你懂得 | 国产免费叼嘿网站免费 | 嘛豆传媒的短视频动漫 | 性潮高免费视频免费看 | 日韩一级黄色毛片 | 国产乳摇福利视频在线观看 | 亚洲码在线中文在线观看 | 国产特黄特色的大片观看免费视频 | 欧美黄色影视 |