Click here to Skip to main content
15,889,931 members
Please Sign up or sign in to vote.
3.78/5 (6 votes)
See more:
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
Posted

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.

:)

 
Share this answer
 
Do you know about NMODBUS [^]?
:)
 
Share this answer
 


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900