我想要代码打开modbus [英] I want the code to open modbus

查看:90
本文介绍了我想要代码打开modbus的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以告诉我打开modbus的c#代码



我尝试了什么:



private void btnConnect_Click(object sender,EventArgs e)

{

try

{

master = new Master(txtIPAddress.Text,502,true);

MessageBox.Show(建立连接);

}

catch(Exception ex)

{

MessageBox.Show(ex.Message);

}

}

Can anyone tell me the c# code to open the modbus

What I have tried:

private void btnConnect_Click(object sender, EventArgs e)
{
try
{
master = new Master(txtIPAddress.Text, 502, true);
MessageBox.Show("Connection established");
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}

推荐答案

Google是你的朋友:好好经常拜访他。他可以比在这里发布问题更快地回答问题......



快速搜索超过100,000次点击: c#代码打开modbus - Google搜索 [ ^ ]



将来,请尝试自己做至少基础研究,不要浪费你的时间或我们的时间。
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...

A very quick search gave over 100,000 hits: c# code to open the modbus - Google Search[^]

In future, please try to do at least basic research yourself, and not waste your time or ours.


看一下 NModbus 库: GitHub - NModbus / NModbus:NModbus是Modbus的C#实现协议。 [ ^ ]


这篇关于我想要代码打开modbus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆