Click here to Skip to main content
11,490,408 members (35,716 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NETCF .NET
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 14-Jul-09 13:51pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.

Smile | :)

  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Do you know about NMODBUS [^]?
Smile | :)
  Permalink  
  Print Answers RSS
0 Sergey Alexandrovich Kryukov 520
1 Andy Lanng 233
2 Sascha Lefèvre 210
3 OriginalGriff 188
4 Maciej Los 160
0 Sergey Alexandrovich Kryukov 9,713
1 OriginalGriff 8,475
2 Sascha Lefèvre 3,544
3 Maciej Los 3,106
4 Richard Deeming 2,370


Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 22 Dec 2009
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100