15,607,524 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View Python questions
View Javascript questions
View C++ questions
View Java questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Use my saved
content filters
Ask a Question
All
Questions
All
Unanswered
FAQ
Modbus TCP in C# 2008
Please
Sign up or sign in
to vote.
3.78/5 (6 votes)
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 12:51pm
Martin Larratt
Add a Solution
2
solutions
Top Rated
Most Recent
Please
Sign up or sign in
to vote.
Solution 1
Accept Solution
Reject 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.
:)
Permalink
Share this answer
Posted
15-Jul-09 2:58am
Luc Pattyn
Please
Sign up or sign in
to vote.
Solution 2
Accept Solution
Reject Solution
Do you know about
NMODBUS
[
^
]?
:)
Permalink
Share this answer
Posted
22-Dec-09 3:08am
CPallini
Add a Solution
Add your solution here
B
I
U
S
small
BIG
code
Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
var
<
>
&
link
[^]
encode
untab
case
indent
outdent
OK
Paste as
Strip HTML
Encode HTML
Paste as-is
Code block
Quoted Text
Best guess
To display as
Treat my content as plain text, not as HTML
Preview
0
…
Existing Members
Sign in to your account
...or Join us
Download, Vote, Comment, Publish.
Your Email
Password
Forgot your password?
Your Email
This email is in use. Do you need your
password
?
Optional Password
I have read and agree to the
Terms of Service
and
Privacy Policy
Please subscribe me to the CodeProject newsletters
Submit your solution!
When answering a question please:
Read the question carefully.
Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
If a question is poorly phrased then either ask for clarification, ignore it, or
edit the question
and fix the problem. Insults are not welcome.
Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Top Experts
Last 24hrs
This month
OriginalGriff
120
Chris Copeland
75
merano99
40
Richard MacCutchan
38
Maciej Los
30
OriginalGriff
2,216
Richard MacCutchan
983
Graeme_Grant
640
Dave Kreskowiak
621
CHill60
275
Related Questions
Modbus TCP master send messages
PC PLC communication modbus TCP IP slave
Modbus TCP server
How I get free modbus TCP / IP library that I can use it in C ++ builder
Modbus RTU Protocol Master Implementation
How do I monitor internet access & notify to a PLC via modbus
How to read string using MODBUS TCP (communicating to PLC)
Raspberry pico-w TCP query
Application program which convert tcp/ip protocol or modbus to dnp3 protocol
Is it possible to implement Modbus Server?
CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900