Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

Problem of interface 8051 with device via Modbus RTU

Status
Not open for further replies.

elhamifard

Newbie level 1
Joined
Jul 13, 2013
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
19
Hi all..I'm new to edaboard forum.I need help regarding MODBUS RTU
I can't make correct interface between 8051(AT89S51) with flow processor device via modbus.
I wrote a small code with Keil software to generate RTU modbus protocol for 8051,
although transfer data from 8051 to device is ok but receive data is not ok, because for example
when microcontroller poll command to change kilogram unit of device to gram unit, device change unit correctly;
but response frame is shown on LCD is not ok; why!?
poll frame is: 01 06 00 83h 00 3ch 78h 33h
response frame have to be: 01 06 00 83h 00 3ch 78h 33h
but in best condition(when baudrate=4800, scon=40h)
response frame is: 01 00 83h 00 3ch 78h 33h
also according to attached code this interface is checked for three different poll command.
the schematic is attached too.
it's citable, interface between PC and flow processor with
1)simply_modbus software and 2)VB6 program {if DTREnable=true} is tested and that's working fine.
Regards.

- - - Updated - - -

Hi all..I'm new to edaboard forum.I need help regarding MODBUS RTU
I can't make correct interface between 8051(AT89S51) with flow processor device via modbus.
I wrote a small code with Keil software to generate RTU modbus protocol for 8051,
although transfer data from 8051 to device is ok but receive data is not ok, because for example
when microcontroller poll command to change kilogram unit of device to gram unit, device change unit correctly;
but response frame is shown on LCD is not ok; why!?
poll frame is: 01 06 00 83h 00 3ch 78h 33h
response frame have to be: 01 06 00 83h 00 3ch 78h 33h
but in best condition(when baudrate=4800, scon=40h)
response frame is: 01 00 83h 00 3ch 78h 33h
also according to attached code this interface is checked for three different poll command.
the schematic is attached too.
it's citable, interface between PC and flow processor with
1)simply_modbus software and 2)VB6 program {if DTREnable=true} is tested and that's working fine.
Regards.
 

Attachments

  • Shematic.pdf
    190.3 KB · Views: 195
  • 8051_Modbus_RTU.txt
    2.6 KB · Views: 123
  • 8051_Modbus_RTU.txt
    2.6 KB · Views: 85
  • Shematic.pdf
    190.3 KB · Views: 105

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top