Modbus timing!

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi guys..
I see a lot information about modbus & avr but can someone make a clear drawing of timing.
I try to understand but no get all.
Mode RTU and send data from uart
is it 1,5 char time after each byte? 3,5 ? why?
I run modpoll and get message but do not make the same frame.
Thierry

Thierry Pottier

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There is no delay after sending each byte! You need to ensure you have a 3.5char delay after sending but that is really only necessary for the receive code. Why? How do you know when you've got a receive packet? The receive packet is framed by the timeout.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK tk a lot.
I have a project to make a bridge between echellon neuro chip / modbus. (AVR will read data for echellon and sendt to modbus / modus to echellon)
I have some modbus unit (& can run with jtag) & test the message with modpoll
When I send the message form echellon I see data is corrupt but the data is right if I see with hyperterminal.
That means at I have a problem with echelon and reduce what I must looking for!
Thierry

Thierry Pottier

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Thierry

Have you seen this site
http://www.freemodbus.org/index.php

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

tks Yes I have download SW example.
Thierry

Thierry Pottier

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The 3.5 character idle time was specified years ago as a way of making the job of a slave controller easier, it basically works like this.
1. Controller recieves a byte, if it matches it's station number, the controller recieves the message and responds. If not it goes to sleep, untill the line goes IDLE again.

This also means, that a slave that watches a RS485 line can happily sleep while the MASTER and any other SLAVE chat, hence saving CPU cycles that would have been wasted checking if the byte recieved matches this station's SLAVE ID.

Conrad Braam - www.softcircuitry.blogspot.com - www.plcsimulator.org
Always start off poorly, that way when you finally figure it out, you can get a few surprise hits in.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes I See.
My problem is follow:
I send en message from Echelon neuron chip and the slave do not accept this message.
I send the same message with modpoll that is ok.
I have some timing problem to RS232 frame.
I am working to find why.
But hyperterminal accept both message and show the same value.
Thierry

Thierry Pottier

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

I send en message from Echelon neuron chip and the slave do not accept this message.

Do you have a well-proven checksum routine?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes. I use the same message that modpoll (and work). I get answer with modpoll but not with my application. (odpoll is a SW to send modbus with pc).
Thierry

Thierry Pottier