DISABLE ADBLOCK

ADBlock is blocking some content on the site

ADBlock errore
Results found: 

Question

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

Solution

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.

:)

If you like, leave us your opinion

Was the article helpful and is it translated correctly?

OTHER TIPS

Do you know about NMODBUS [^]?
:)

Licensed under: CC-BY-SA with attribution
Not affiliated with CodeProject