东京热无码人妻系列综合网站_国产精品性色一区二区三区_网站大全免费网站_又爽又黄无遮拦成人网站_黄色影院免费观看_奇米影视在线观看

vios1161
級別: 略有小成
精華主題: 0
發帖數量: 190 個
工控威望: 308 點
下載積分: 670 分
在線時間: 210(小時)
注冊時間: 2016-07-30
最后登錄: 2025-05-06
查看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重新編輯 ]
vios1161
級別: 略有小成
精華主題: 0
發帖數量: 190 個
工控威望: 308 點
下載積分: 670 分
在線時間: 210(小時)
注冊時間: 2016-07-30
最后登錄: 2025-05-06
查看vios1161的 主題 / 回貼
1樓  發表于: 2016-11-28 22:46
沒學過…不知道怎用
現在老師準備教 Labview ... 真的拉一拉就好,不用太花時間搞程式語法

引用
引用第3樓oyiwiw于2016-11-28 19:50發表的  :
用C#寫的吧,現在用三菱通訊的MX COMPENT軟件很方便,里面有很多函數。

主站蜘蛛池模板: 中文无码精品视频在线看 | 国产成人精品视频免费 | 好大好爽快点深一点羞羞 | 竹内纱里奈国内精品一区 | 成人毛片免费在线观看 | 亚洲影院在线播放 | 国产一级在线观看视频 | 韩国av在线播放 | av网页在线播放 | 涩涩屋av | av蓝导航精品导航 | 91综合久久婷婷久久 | 人人澡超碰碰一区二区三区不卡 | 亚洲AV综合一区二区在线观看 | 久久99国产综合精品 | 久久9999久久 | 三级国产三级在线 | 色视频网站在线 | 精品国产31久久久久久 | 精品中文字幕一区二区三区av | 久久久久久久久久久久久久久久久久久 | 国产a一级无码毛片一区二区三区 | 欧美精品偷拍 | 黄一区二区三区 | 国语对白做受69按摩 | 丰满少妇大力进入 | 91极品18禁国产在线播放 | 精品人妻伦一二三区久久 | 日韩免费视频中文字幕 | 亚洲天堂AV在线 | 国产在线一二区 | 大伊香蕉精品一区视频在线 | 国产女人成人精品a区 | 最新久久精品 | 久久婷婷丁香五月综合五 | 91色免费视频 | 99精品免费久久久久久久久日本 | 99视频在线精品免费观看2 | 国产乱人伦精品一区二区在线观看 | 久久2| 国色天香一区二区 |