Click here to Skip to main content
15,888,454 members
Articles / Programming Languages / XML
Tip/Trick

Modbus TCP class

Rate me:
Please Sign up or sign in to vote.
4.89/5 (84 votes)
23 May 2014CPOL 1.7M   60.4K   154   171
A Modbus TCP class.

The project has moved to GIT

https://github.com/stephan1827/modbusTCP

Please download and ask questions from there.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Systems Engineer
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionModbus says error: Illegal function! Pin
xeroxvrey6-Feb-12 5:57
xeroxvrey6-Feb-12 5:57 
AnswerRe: Modbus says error: Illegal function! Pin
Stephan Stricker6-Feb-12 6:07
Stephan Stricker6-Feb-12 6:07 
GeneralRe: Modbus says error: Illegal function! Pin
xeroxvrey6-Feb-12 10:27
xeroxvrey6-Feb-12 10:27 
QuestionModbus TCP Class not working Pin
Joseph Frippiat23-Jan-12 1:50
Joseph Frippiat23-Jan-12 1:50 
AnswerRe: Modbus TCP Class not working Pin
Stephan Stricker23-Jan-12 1:56
Stephan Stricker23-Jan-12 1:56 
GeneralRe: Modbus TCP Class not working Pin
Joseph Frippiat23-Jan-12 2:13
Joseph Frippiat23-Jan-12 2:13 
GeneralRe: Modbus TCP Class not working Pin
Joseph Frippiat23-Jan-12 22:24
Joseph Frippiat23-Jan-12 22:24 
QuestionCould you help me Pin
Dantty27-Dec-11 4:42
Dantty27-Dec-11 4:42 
Hello.

I am Miguel, i am writting to ask about the ModbusTCP class.

I took several days trying to enterder your code.
When I put the IP of the device thtan i want to connect. The grpData grpExchange activated (visible = true), which means it was possible to communicate with the device. It's true.? ..

But when I put the address of the device, such as 400001, and give to the function read input register or holding register, in the textbox fields ... still nothing appears empty ...


I use a traditional SCADA demo to test the connection to the device and it is successful ... I think the problem is not the device


Could you please help me to understand what is happening.?
BugTCP Network Bug Pin
Dread_Sharp16-Nov-11 21:20
Dread_Sharp16-Nov-11 21:20 
GeneralRe: TCP Network Bug Pin
Member 841032817-Nov-11 2:07
Member 841032817-Nov-11 2:07 
GeneralRe: TCP Network Bug Pin
Dread_Sharp17-Nov-11 3:43
Dread_Sharp17-Nov-11 3:43 
QuestionNo connection could be made because the target machine actively refused it Pin
ChiWaiLam6-Oct-11 1:00
ChiWaiLam6-Oct-11 1:00 
AnswerRe: No connection could be made because the target machine actively refused it Pin
Member 841032817-Nov-11 2:09
Member 841032817-Nov-11 2:09 
QuestionMODBUS TCP Server in ASP.net Pin
arulchris8-Sep-11 21:50
arulchris8-Sep-11 21:50 
GeneralHelp with address mapping Pin
sandeepbaynes17-May-11 19:17
sandeepbaynes17-May-11 19:17 
Questionnewbie interested in Modbus TCP/IP Pin
autocatch3-May-11 16:27
autocatch3-May-11 16:27 
AnswerRe: newbie interested in Modbus TCP/IP Pin
Stephan Stricker4-May-11 8:36
Stephan Stricker4-May-11 8:36 
GeneralRe: newbie interested in Modbus TCP/IP Pin
autocatch4-May-11 13:30
autocatch4-May-11 13:30 
GeneralBig Bug Pin
Dread_Sharp29-Mar-11 3:36
Dread_Sharp29-Mar-11 3:36 
GeneralRe: Big Bug PinPopular
Stephan Stricker6-Apr-11 5:05
Stephan Stricker6-Apr-11 5:05 
GeneralMy vote of 5 Pin
JongchanAhn24-Mar-11 22:26
JongchanAhn24-Mar-11 22:26 
GeneralRe: My vote of 5 Pin
Entrase11-Dec-15 22:11
Entrase11-Dec-15 22:11 
Generalconnection lost error Pin
ttusharbb23-Jan-11 18:28
ttusharbb23-Jan-11 18:28 
Generalerror Pin
ttusharbb23-Jan-11 1:08
ttusharbb23-Jan-11 1:08 
GeneralRe: error Pin
Dread_Sharp29-Mar-11 3:22
Dread_Sharp29-Mar-11 3:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.