思思久久96热在精品国产10-思思久久96热在精品国产免费-思思久久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重新編輯 ]
source08
級別: 網絡英雄
精華主題: 0
發帖數量: 543 個
工控威望: 6775 點
下載積分: 8306 分
在線時間: 212(小時)
注冊時間: 2011-03-01
最后登錄: 2025-01-04
查看source08的 主題 / 回貼
1樓  發表于: 2016-11-26 08:47
謝謝分享,學習了。

主站蜘蛛池模板: 国产在线观看网址在线视频| 国产精品人成人免费国产| 国产免费又粗又猛又爽视频国产| 黄色片在线看| 毛片18| 九九精品久久久久久噜噜中文| 毛毛片在线| 久久国产偷| 国产视频视频| 久草免费在线色站| 九九亚洲精品| 国产资源福利| 九九热精品在线视频| 狠狠操操操| 黄色片在线观看网站| 国产伦精品一区二区免费 | 久久一| 国产在线视频资源| 大陆高清自拍| 久久精品系列| 久久午夜视频| 好好的曰www视频在线观看| 国产午夜成人无码免费看| 大陆黄色a级片| 国产亚洲精品美女2020久久| 国产h视频在线观看| 国产一区二区视频免费| 国产第6页| 免费在线观看日韩| 久久精品国产精品青草| 波多野结衣在线网址| 久久久久久99精品| 久久99精品福利久久久| 国产成人h福利小视频在线观看| 久久久久成人精品免费播放动漫 | 国产在线98福利播放视频免费| 国产69久久精品成人看小说| 国产一国产a一级毛片| 精品剧情v欧美在线观看| 国产精选在线| 国产精品你懂得|