C#2008中的Modbus TCP [英] Modbus TCP in C# 2008

查看:627
本文介绍了C#2008中的Modbus TCP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对C#还是很陌生,曾在C#XNA游戏工作室和VB.Net 2008中工作,但具有非常基础的知识.我在汽车上工作制造业的电气工程师,并希望使用C#和Modbus TCP协议来扩展我的编程技能.

请问您能推荐任何解释C#.net 2008中ModbusTCP协议的书吗?

您是否有指向任何源代码或类的链接,可以使我入门.在这里尝试了一个但无法编译,出现以下错误.

错误1找不到类型或名称空间名称"ModbusTCP"(您是否缺少using指令或程序集引用?)C:\ Users \ Martin \ Downloads \ Modbus_TCP_class_demo \ ModbusSampleCommon \ frmStart.cs 8 7 ModbusTester

错误2找不到类型或名称空间名称"ModbusTCP"(您丢失了吗?使用指令还是程序集引用?)C:\ Users \ Martin \ Downloads \ Modbus_TCP_class_demo \ ModbusSampleCommon \ frmStart.cs 14 11 ModbusTester

谢谢-Martin

I''m fairly new to C#, have worked with the C# XNA gaming studio and VB.Net 2008 but have very basic knowledge. I work in the car & manufacturing industry as an electrical engineer and am looking to broaden my programming skills using C# and the Modbus TCP protocol.

Can you please recommend any books that explain the ModbusTCP protocol in C#.net 2008.

Do you have any links to any source code or classes that could get me started. Tried one off here but can''t get it to compile, I get the following errors.

Error 1 The type or namespace name ''ModbusTCP'' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Martin\Downloads\Modbus_TCP_class_demo\ModbusSampleCommon\frmStart.cs 8 7 ModbusTester

Error 2 The type or namespace name ''ModbusTCP'' could not be found (are you missing a using directive or an assembly reference?) C:\Users\Martin\Downloads\Modbus_TCP_class_demo\ModbusSampleCommon\frmStart.cs 14 11 ModbusTester

Thanks - Martin

推荐答案



在使用某些托管DLL中的类之前,通常需要两个步骤:

1.添加对您的项目的引用;在Visual Studio中,右键单击您的项目,选择添加引用",稍等片刻,找到所需的程序集文件,然后继续.

2.在每个要引用该程序集类的源文件中,添加一个"using someNamespace;".声明,为您提供方便. (奇怪的程序员会告诉您您可以跳过它,并始终使用完全限定的类名.)

就这样.

:)

Hi,

there are typically two steps required before you can use classes from some managed DLL:

1. add a reference to your project; in Visual Studio, right-click your project, choose Add Reference,
wait a while, locate the assembly file of interest, and go.

2. in each source file going to refer the classes of that assembly, add a "using someNamespace;" statement for your convenience. (The odd programmer will tell you you could skip that and always use fully qualified class names).

That''s it.

:)


您了解NMODBUS [ ^ ]吗?
:)
Do you know about NMODBUS [^]?
:)


这篇关于C#2008中的Modbus TCP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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