如何读取松下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返回的数据呢,请指教!!!