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.
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.