RS-485 packet length

General discussion on mikroPascal.
Post Reply
Author
Message
jkjoy
Posts: 29
Joined: 23 May 2012 05:19

RS-485 packet length

#1 Post by jkjoy » 23 May 2012 05:43

Hi all,

In my project Im using a master and 4 slaves(no. may increase). Master polls all the slaves and all slaves replies its status. Baud rate is 19600.
I have two queries:
1)How long should master wait for a slave to respond, to raise a communication fault (2 byte data transfer)? What I mean to know is the packet length.
2)Does the master/slave need to transmit the same data again to ensure good communication? If so how many times?

Thanks

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: RS-485 packet length

#2 Post by janko.kaljevic » 23 May 2012 12:26

Hello,

Master calculates CRC for message that will be sent. This is checked on Slave side, and thus user knows if the transmit was successful.
Please check Help file for received message format.

Best regards.

jkjoy
Posts: 29
Joined: 23 May 2012 05:19

Re: RS-485 packet length

#3 Post by jkjoy » 23 May 2012 13:33

Thanks for your reply.

I checked help file. But how many bytes are used for CRC?

Im repeating my previous 2nd query. If the master sends a frame, how can i ensure that the slave will receive it? Shall I send the same frame again and again till I get a reply from the slave, Or only once?

Thanks

jkjoy
Posts: 29
Joined: 23 May 2012 05:19

Re: RS-485 packet length

#4 Post by jkjoy » 24 May 2012 05:03

janko.kaljevic wrote:Hello,

Master calculates CRC for message that will be sent. This is checked on Slave side, and thus user knows if the transmit was successful.
Please check Help file for received message format.

Best regards.

Thanks for the reply.

My 2nd question was, do I need to transmit the frame again to ensure proper reception? Or how can I make sure the receiver receives the data?

User avatar
janko.kaljevic
Posts: 3565
Joined: 16 Jun 2011 13:48

Re: RS-485 packet length

#5 Post by janko.kaljevic » 24 May 2012 11:36

Hello,

In Help file we have explained how CRC is calculated. Also there is no need to send each message twice.
Just check if the CRC is OK and then request for new data or repeat sending.
This part really depends on your project requirements and you should make this choice.

Best regards.

Post Reply

Return to “mikroPascal General”