??? 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. |