CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Problem in Modbus RTU Rs485 Communication

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
veerabahu



Joined: 20 Aug 2013
Posts: 16

View user's profile Send private message

Problem in Modbus RTU Rs485 Communication
PostPosted: Wed Aug 21, 2013 7:37 am     Reply with quote

The details which is given below is the Polling and Response Data From My Controller.The data which is Highlighted in Bold is the
Expected data(01 03 | 06 00 0A 00 0B 00 0C). Before that Expected Data i got some Junk Data ( FF FF FF F9 F5 69). How to avoid that.



Write data

00000000: 01 03 00 00 00 03 05 CB

Read data

00000000: FF FF FF F9 F5 69 01 03 | 06 00 0A 00 0B 00 0C C8
00000010: B3
Ttelmah



Joined: 11 Mar 2010
Posts: 19499

View user's profile Send private message

PostPosted: Wed Aug 21, 2013 8:05 am     Reply with quote

Describe your bus layout.
Is there anything biasing the bus to 'off' when it is not driven?.
Look at:

<http://www.control.com/1026208408/index_html>

I'd suspect you are getting the 'false starts' described here.

Modbus leaves whether this is needed up to the user. Some RS485 receivers are designed so an undriven bus is seen as idle. Chips like the ISL32496 don't require any biasing to avoid false triggers, but for most chips biasing is needed. Look at the Texas note about this:

<www.ti.com/lit/an/slyt324/slyt324.pdf>

Best Wishes
veerabahu



Joined: 20 Aug 2013
Posts: 16

View user's profile Send private message

PostPosted: Thu Aug 22, 2013 10:47 pm     Reply with quote

Dear Ttelmah

Thanks for your reply. I have gone through both the links which you have given. I understood about false start. I included biasing resistors in A and B pin of RS485. i.e 680ohms pullup to A and 680ohms pulldown to B. But it didnt work. I'm getting the same response.

One more thing I need to clarify. For checking I have taken out my RS485 IC from circuit and i sent a polling command. For that I'm getting response as F9 FF FF FF F9 F5 69. How is it possible? Without Max IC why am I getting this value? Is it is echo problem or any other reason ? Pls give some clue.

Thanks in advance
Ttelmah



Joined: 11 Mar 2010
Posts: 19499

View user's profile Send private message

PostPosted: Fri Aug 23, 2013 1:47 am     Reply with quote

Without the chip, the RX line into the PIC is floating. Hence triggers....

Generally, if you are turning 'off' the receive part of the driver at any point, you must have a pull up resistor on the RX input of the PIC, otherwise noise will be seen as false triggers.

Best Wishes
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group