Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Modbus RTU interfacing with 8051

Status
Not open for further replies.

Briez

Member level 5
Joined
Nov 30, 2012
Messages
83
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Activity points
1,835
Help Required,

I want to make interfacing of Modbus RTU to the 8051 via rs232. I am new to this project, so please anyone help me.....
I have made serial communication hardware and simple code for communication of 8051 to PC hyper-terminal. Now i want to make C code for 8051 to communicate with MODBUS RTU protocol...... Can anyone please help me to write code...

Thanks In Advance...
 

Briez

Member level 5
Joined
Nov 30, 2012
Messages
83
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Activity points
1,835
I am Using MicroVision Keil V3......... For 8051
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,869
Helped
14,124
Reputation
28,505
Reaction score
12,807
Trophy points
1,393
Location
Bochum, Germany
Activity points
277,823
I guess, you'll want to read the documents Modbus_Application_Protocol and Modbus_over_serial_line from modbus.org.

Needless to say that there are tons of MODBUS example codes on the internet. But it might be reasonable to write your own code from the scratch. It's easy and will give you a better understanding.
 

Briez

Member level 5
Joined
Nov 30, 2012
Messages
83
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Activity points
1,835
->I want to interface Microcontroller 8051 with AC drive via RS-485 Protocol. And i didn't get reply when i am sending request to Drive.. I had made a Packet frame used to request to get response from drive.....

->I want to show only decimal data Stored in Holding Register of Drive on my 16x2 LCD attached to 8051.

-> Please help me . .
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,869
Helped
14,124
Reputation
28,505
Reaction score
12,807
Trophy points
1,393
Location
Bochum, Germany
Activity points
277,823
And i didn't get reply when i am sending request to Drive
There are many possible reasons. I suggest to check your MODBUS packet against a test tool, e.g. ModbusView http://www.oceancontrols.com.au/OCS-001.html

I want to show only decimal data Stored in Holding Register of Drive on my 16x2 LCD attached to 8051
The problem isn't particularly related to MODBUS, I think.
 

Briez

Member level 5
Joined
Nov 30, 2012
Messages
83
Helped
4
Reputation
8
Reaction score
4
Trophy points
1,288
Activity points
1,835
Hello FvM,
Right now i am using simply modbus 7.0, and i am making request frame as made by it.. totally right but still response didn't come... !!
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,869
Helped
14,124
Reputation
28,505
Reaction score
12,807
Trophy points
1,393
Location
Bochum, Germany
Activity points
277,823
Either your PC MODBUS interface is wrong or you misunderstand the required MODBUS setup of your drive (address, supported register numbers, baud rate, framing, bus wiring).
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top