标题:如何读取松下PLC的应答如数据
只看楼主
wyw029
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2016-10-18
结帖率:0
 问题点数:0 回复次数:0 
如何读取松下PLC的应答如数据
            string sReg = DTaddr1.Substring(0, 1);//获取"D"
            string sA1 = DTaddr1.Substring(1, DTaddr1.Length - 1);
            int iLen = Convert.ToInt16(sA1);
            sA1 = sA1.PadLeft(4).Replace(" ", "0");
            string sAddr = sReg + sA1;//地址:D00001
            string outStr = "";
            outStr = "%01#RD" + sAddr;
            outStr = outStr + bcc(outStr) + "/r";
            COMM.Write(outStr);
执行完读取命令后,如何读PLC返回的数据呢,请指教!!!
2016-12-06 10:34



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-472031-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.048877 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved