Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/24/07 01:57
Read: times


 
Msg Score: +1
 +1 Good Answer/Helpful
#144921 - You have a calculator!
Responding to: ???'s previous message
It's a matter of simple math to calculate whether you can poll 32 devices for a 16bit variable in 2 seconds.

Firstly, what is the baud rate? Let's say 19200 baud - 1920 chars/second or 520uS/char

Next look at the packet sizes for the request/response

request - 8 bytes + 4char space for Modbus RTU (actually 3.5)
response - 7 bytes + 4 char space

= 23 bytes * 520uS/byte = about 12mS per request/response transaction assuming the slave responds immediately.

12mS * 32 = 384mS. Well within your 2 second requirement. The slaves don't need to respond immediately - we have around 50mS per poll to spare.

If you were to use Modbus ASCII, the amount of chars at least doubles but we don't have the 4 char space requirement.

request: 17 chars (confirmed)
response: 15 chars (guessed)
= 16mS per transaction.


Can it be done? The numbers tell the story.

The baud rate could be lowered to 9600.
But it is always good to have some headroom - you can poll each slave for a number of 16 bit registers and still have time to spare.

The benefits of using Modbus:
open standard
supported by many software/hardware vendors
well known
easy migration to Modbus TCP/IP - use a module like the Advantech ADAM 4572 which allows you to use standard networking - fibre,WiFI etc

Downsides:
none really....




*disclaimer* This was a quick calculation and the data presented may not be accurate - do your research to confirm.


List of 46 messages in thread
TopicAuthorDate
MCS-51 and RS485            01/01/70 00:00      
   Specifics?            01/01/70 00:00      
   not enough clear            01/01/70 00:00      
   RS485 code at code library didn't work's            01/01/70 00:00      
   .ASM or .C code nevermind            01/01/70 00:00      
      But what do you need it to do?            01/01/70 00:00      
         485 master slave            01/01/70 00:00      
            I did            01/01/70 00:00      
               RS-485 master/slave code.            01/01/70 00:00      
                  Try Modbus            01/01/70 00:00      
                     Oops sorry,Must using uart with another mode.            01/01/70 00:00      
   RS-485 code            01/01/70 00:00      
      Full duplex?            01/01/70 00:00      
         Full duplex ...the reasons            01/01/70 00:00      
            That's not a reason!            01/01/70 00:00      
            Technically            01/01/70 00:00      
               another reason            01/01/70 00:00      
                  maybe You need Ethernet?            01/01/70 00:00      
                     Another issue...            01/01/70 00:00      
                  wrong? not really, but wasteful            01/01/70 00:00      
                  another reason 2            01/01/70 00:00      
                     there is no 'same time'            01/01/70 00:00      
                        OK there wasn't same but....            01/01/70 00:00      
                           Asynchronous?            01/01/70 00:00      
                           if I understand what you are saying            01/01/70 00:00      
                              Something like this            01/01/70 00:00      
                                 Modbus            01/01/70 00:00      
                                    swicth to modbus            01/01/70 00:00      
                                       Sample code            01/01/70 00:00      
                                    References            01/01/70 00:00      
                                 collisions            01/01/70 00:00      
   try 30 baud            01/01/70 00:00      
   Before jumping to pool named as "modbus"            01/01/70 00:00      
      You have a calculator!            01/01/70 00:00      
         what a waste of bandwith            01/01/70 00:00      
            Tradeoff            01/01/70 00:00      
               There is overhead you can save with no ill effect            01/01/70 00:00      
                  The point is...            01/01/70 00:00      
                     modbus exist does not make it pantyhose            01/01/70 00:00      
                        For a beginner...            01/01/70 00:00      
   Getting wet with modbus by drag from Russel            01/01/70 00:00      
   AT89S8252 and AT89S52            01/01/70 00:00      
      Nope!            01/01/70 00:00      
         AT89S5X with 24LC02            01/01/70 00:00      
            Lot of work??            01/01/70 00:00      
            Quoting previous posts            01/01/70 00:00      

Back to Subject List