What is master and slave in PLC?

Views : 100
Update time : 2019-04-07 11:52:58
PLC master - slave modbus communication mode is also known as 1: N communication mode, this is a communication method adopted on the PLC communication network. There are IV stations on the PLC subnet of the bus structure, there is only one master station, and the others are slaves. For this reason, the master-slave bus communication method is also called 1:N communication mode.
  1. Working principle
The master-slave bus communication mode uses centralized access control technology to allocate bus usage rights. Usually, a polling table is configured in the primary station, that is, a slave ordering sequence table, the primary station inquires about the secondary station according to the order of the polling table to see if it uses the bus, thereby achieving the purpose of allocating the right to use the bus.
  1. Real-time guarantee
In order to ensure real-time performance, the polling table is required to contain no less than one slave station number, so that during periodic polling, each slave station has at least one opportunity to obtain bus usage rights in one cycle, thereby ensuring each station’s basic real-time. For stations with higher real-time requirements, you can have the slave number appear several times in the polling table, thus giving the station a higher communication priority in a static manner. In some master-slave buses, the polling table method is combined with the interrupt method, so that the emergency task can be interrupted by interrupting the normal periodic polling, and the priority service is obtained, which is to give a higher priority to the urgent task by dynamic.
  1. Communication method
There are two basic data transmission modes in the master-slave bus communication mode. One is to allow only master-slave communication, the slave-slave communication is not allowed, the slave station and the slave station are to exchange data, and must be transited through the master station; The other is to allow both master-slave communication and slave-slave communication to obtain master-slave communication from the slave, and then arrange communication between itself and other slaves (ie, slave to slave). The so-called master-slave multi-machine communication means that the information sent by the master can be transmitted to each slave or the specified slave, and the information of each slave can only be sent to the master. The host receives the transmitted data by using the query mode, and the slave receives the transmitted data by using the interrupt mode.