1. 首页
  2. 编程语言
  3. C#
  4. WinTcpS7_Smart V35

WinTcpS7_Smart V35

上传者: 2019-03-29 07:53:55上传 RAR文件 999.63KB 热度 50次
西门子 S7 200 Smart TCP 通讯控制 short re = 0; string restr = ""; re = PLC.EntLink(txtLocalIP.Text.Trim(), Convert.ToUInt16(txtLocalPort.Text), txtRemoteIP.Text.Trim(), Convert.ToUInt16(txtRemotePort.Text), Convert.ToUInt16(0), Convert.ToUInt16(2), "DEMO", ref Handle1); txtReLink.Text = re.ToString( ); if (re == 0) { EntLink = true; MessageBox.Show("PLC联接成功!"); } else { EntLink = false; MessageBox.Show("PLC联接失败: " + restr); } ); if (re == 0) { EntLink = true; MessageBox.Show("PLC联接成功!"); } else { EntLink = false; MessageBox.Show("PLC联接失败: " + restr); }
用户评论