Author Topic: Modbus  (Read 6543 times)

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Modbus
« on: February 22, 2011, 11:39:43 PM »
Hi. If I have a MD888 as a master, a laptop running Excel link to extract data from the master, master sending and collecting data from 2 slaves 888, will the system be fast? if slave 2 needs to depend on data from slave 1 to run, is it the best way to route the data from slave 2 to master then master to slave 1 in order to run? Or is there other ways?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Modbus
« Reply #1 on: February 23, 2011, 02:57:34 AM »
The speed is always limited to the slowest link in your system. Whether it is fast enough will depend on your application's specific need and we can't say whether it is "fast.

The two slave PLCs may be able to interact using a separate serial link. Eg. Each PLC can have their RS232 converted to RS485 and link to the master. The two slave PLCs can still connect their COMM3 RS485 together and exchange data without going through the master. That is certainly faster than letting the master route the data between the slave.

Email: support@triplc.com
Tel: 1-877-TRI-PLCS

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:Modbus
« Reply #2 on: February 23, 2011, 06:28:01 AM »
Hi. Does it mean I should connect Auto485 to both slave PLC comm 1 and link it to Master comm 3 to communicate while the 2 slave PLC will communicate using comm 3? So Master PLC will do a readmodbus(3,1,1) in order to get the data?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Modbus
« Reply #3 on: February 23, 2011, 03:14:19 PM »
Yes, you can set it up that way.

The master PLC will read from two different slaves using two different IDs. While the two slaves can talk to each other using their own private RS485 bus.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:Modbus
« Reply #4 on: February 23, 2011, 04:32:09 PM »
Hi. Thanks for the advice. Do I need to factor in anything when programing the slaves to talk to each other?

What if I have 4 slaves? Slave 1 need to read and write data from slave 2. Slave 2 need to read and write data from slave 3 and slave 1. Slave 3 need to read and write data to slave 1 and 2. Slave 4 will need to read and write data to slave 3. What can I do in this case in order to make it a more robust and efficient system?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Modbus
« Reply #5 on: February 24, 2011, 05:09:43 AM »
Best to move to an FMD or Nano-10 PLC and connect them to Ethernet. Each PLC can then make connection to any other PLC as master (client) and at the same time can be a slave (server) that accepts connection from any other PLC. i.e. Peer-to-peer connection is possible.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:Modbus
« Reply #6 on: February 24, 2011, 07:41:40 AM »
Will the ethernet connection be slower than RS485?


support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Modbus
« Reply #7 on: February 24, 2011, 03:41:57 PM »
If you are only making a single connection between PLCs on a wired LAN then the connection is always there and it is much faster than RS485. But if you need to connect, send a command and response, then disconnect and connect to another PLC, and the PLCs are connected via the Internet then it depends on the reliability of your network. Delays in network traffic can slow down communication.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:Modbus
« Reply #8 on: February 25, 2011, 09:44:22 AM »
So if slave 1 is getting and writing data from  and to slave 2 by RS485, but Master is trying to get and write data to slave 1 by RS485 of Master and RS232 of slave 1, what will happen? Slave 1 will complete the program before giving information to Master?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3171
    • View Profile
    • Internet Programmable PLCs
Re:Modbus
« Reply #9 on: February 25, 2011, 09:28:56 PM »
If Slave #1 is in the midst of executing READMODBUS/WRITEMODBUS command via COMM3 then it usually completes the command before responding to incoming command from its COMM1 port. If it is waiting in a while loop for some other events then it could respond to incoming command from RS232 port just before it goes back to the beginning of WHILE or FOR..NEXT block.
« Last Edit: February 25, 2011, 09:30:58 PM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS