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

Insufficient data received error in modbus

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



Joined: 04 Nov 2012
Posts: 15

View user's profile Send private message

Insufficient data received error in modbus
PostPosted: Thu Jul 24, 2014 5:12 am     Reply with quote

Hi,

I have a monitor which is programmed as modbus slave (RTU).

When I am connecting single device and checking the RS485 communication using Modbus poll and RS232 to RS 485 converter, it works fine. But when I connect another similar device in loop at that time it gives insufficient data byte error and CRC error.

I am using CCS compiler of version 4.119 and modbus_slave example.
For single device there is no problem but it gives error when I add another device. Please find attached text file.

Please advice what could be the problem.

Thanks,
Paddy
Quote:
000000-Tx:04 03 00 00 00 20 44 47
000001-Tx:04 03 00 00 00 20 44 47
000002-Rx:04 03 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 24 53
000003-Tx:04 03 00 00 00 20 44 47
000004-Tx:04 03 00 00 00 20 44 47
000005-Tx:04 03 00 00 00 20 44 47
000006-Rx:04 03 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 24 53
000007-Tx:04 03 00 00 00 20 44 47
000008-Rx:04 03 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 24 53
000009-Tx:04 03 00 00 00 20 44 47
000010-Tx:04 03 00 00 00 20 44 47
000011-Rx:04 03 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 24 53
000012-Tx:04 03 00 00 00 20 44 47
000013-Rx:04 03 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 24 53
000014-Tx:04 03 00 00 00 20 44 47
000015-Tx:04 03 00 00 00 20 44 47
000016-Tx:04 03 00 00 00 20 44 47
000017-Rx:04 03 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 24 53
000018-Tx:04 03 00 00 00 20 44 47
000019-Tx:04 03 00 00 00 20 44 47
000020-Rx:04 03 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 24 53
000021-Tx:04 03 00 00 00 20 44 47
000022-Rx:04 03 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 24 53
000023-Tx:04 03 00 00 00 20 44 47
000024-Rx:70
000025-Tx:04 03 00 00 00 20 44 47 /// Received the data when connected another device in the loop.
000026-Rx:5F FF FF FF BF 77 71 00
000027-Tx:04 03 00 00 00 20 44 47
000028-Rx:5F FF FF FF BF 77 71 00
000029-Tx:04 03 00 00 00 20 44 47
000030-Rx:5F FF FF FF BF 77 71 00
000031-Tx:04 03 00 00 00 20 44 47
000032-Rx:5F FF FF FF BF 77 71 00
000033-Tx:04 03 00 00 00 20 44 47
000034-Rx:5F FF FF FF BF 77 71 00
000035-Tx:04 03 00 00 00 20 44 47
000036-Rx:5F FF FF FF BF 77 71 00
000037-Tx:04 03 00 00 00 20 44 47
000038-Rx:5F FF FF FF BF 77 71 00
000039-Tx:04 03 00 00 00 20 44 47
000040-Rx:5F FF FF FF BF 77 71 00
000041-Tx:04 03 00 00 00 20 44 47
000042-Rx:5F FF FF FF BF 77 71 00
000043-Tx:04 03 00 00 00 20 44 47
000044-Rx:5F FF FF FF BF 77 71 00
000045-Tx:04 03 00 00 00 20 44 47
000046-Rx:5F FF FF FF BF 77 71 00 //// Removed the loop and connected single device
000047-Tx:04 03 00 00 00 20 44 47
000048-Rx:04 03 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 14 00 28 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01 24 53
000049-Tx:04 03 00 00 00 20 44 47
000050-Tx:04 03 00 00 00 20 44 47

[/quote]
RF_Developer



Joined: 07 Feb 2011
Posts: 839

View user's profile Send private message

PostPosted: Thu Jul 24, 2014 7:18 am     Reply with quote

I am not sure what you mean by "loop". RS485 is multidrop, there is no "loop".

There is unlikely to be a software problem, as it works in one hardware configuration and not in another. The problem must be related to the hardware.

The problem may be incorrect termination or incorrect bias, or possibly incorrect bus topology.

The bus must only have terminations at the ends, not somewhere in the middle.

The bus should be biased at one point only. Additional bias resistors may work, but performance may be poor and unreliable. Mistakenly biasing the lines the wrong way round is also a hard problem to diagnose and may well work in one configuration but not others.

There should not be any branches of the bus. It should go from one end (terminated, and possibly biased) to each intermediate device in turn and on to the far end, which should be terminated but not biased.

So, check all your RS485 bus wiring, terminations and biasing.
paddy



Joined: 04 Nov 2012
Posts: 15

View user's profile Send private message

PostPosted: Fri Jul 25, 2014 3:49 am     Reply with quote

Hi,

I am sorry for using wrong term. I mean to say multidrop connection. The problem was occurring because of improper voltage (reverse voltage i.e. VCC is connected to GND and vice versa) to bias resistors.

Thanks for your support!!

Regards,
Paddy
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