Share this

Implementation of a CAN bus-based multi-PLC networking system in a textile factory

2026-04-06 05:10:13 · · #1
1. Introduction Currently, most common PLC models do not integrate CAN-bus communication interfaces, making it difficult to implement multi-PLC control networks based on CAN bus. With the development of application technologies, industries often require n PLCs to collaboratively complete the integrated control of a system. In such cases, the original centralized control scheme using a single PLC becomes inadequate, leading to the need for integrated PLC network engineering. This paper proposes a PLC network scheme based on CAN-bus, enabling remote configuration and data communication for multiple networked PLCs, and achieving good system performance with relatively low hardware costs. This scheme not only fully utilizes the communication characteristics of CAN-bus—real-time, reliable, high-speed, long-distance, and easy to maintain—but also organically combines fieldbus technology with centralized control technology. The networked PLC network can form a high-performance DCS system; users can remotely monitor and change the program or status of any networked PLC from the same master controller (PC). 2. Two Methods for Building a PLC Network General-purpose PLCs typically provide 1-2 RS-232 or RS-485 communication ports for communication with other control devices. These ports support limited communication protocols, enabling communication and configuration of PLC devices. This project utilizes the PLC's own communication ports to expand it into a network capable of connecting multiple devices, realizing a multi-PLC network based on the fieldbus CAN-bus. Depending on the main controller in the network, PLC networks can be categorized as follows: Multiple PLCs networked, each with equal status, allowing for external HMI (Human Machine Interface) expansion; Multiple PLCs networked, with one industrial PC acting as the main controller and operating interface. This paper focuses on two networking methods based on RS-232 or RS-485 communication ports. 2.1 PLC Serial Networking: Signal conversion via an RS-232/RS-485 to CAN-bus gateway enables the PLC to have a CAN-bus communication interface. Multiple PLCs with CAN-bus communication interfaces can be interconnected to form a PLC network. Each RS-232/RS-485 to CAN-Bus gateway connecting to a PLC unit can be assigned a unique device ID, 11 or 29 bits long, used as the address of that PLC unit. In a PLC network built using this method, any PLC can initiate data communication, with the CAN-Bus gateway acting as a hardware arbitrator to ensure no data loss during communication. The number of PLCs in the network is unlimited; hundreds or even thousands of PLCs can be connected to the same fieldbus CAN-Bus network. Furthermore, HMIs with CAN-Bus communication interfaces can be connected to the PLC network. 2.2 Parallel Networking of Multiple PLCs and Industrial PCs Industrial PCs with built-in PCI-CAN cards (such as Advantech's PCI1680, Zhou Ligong's PCI5110, etc.) can form a CAN-bus network. Through an RS-232/RS-485 to CAN-bus converter connected to the gateway in the CAN-bus network, and with the help of the CAN-bus network's accompanying "virtual serial port" software, up to 2047 standard serial communication ports can be established, thus connecting up to 2047 serial networks. That is, up to 2047 PLC devices can be connected on a single ordinary twisted-pair cable. The industrial PC accesses the PLC devices connected to the CAN-bus network in a manner completely consistent with operating a standard serial port. This method can fully utilize the capabilities of the industrial PC, has relatively high communication efficiency, and is the mainstream direction for general PLC network construction. This paper adopts this scheme to build a PLC network. The system structure is shown in Figure 1. [align=center] [img=397,492]http://www.ca800.com/uploadfile/maga/plc2008-7/jjf-1.jpg[/img] Figure 1. Parallel Networking of Multiple PLCs and Industrial PCs[/align] 3. Hardware Composition and Connection of PLC Network To establish a PLC network, in addition to the PLC devices, it is also necessary to establish a fieldbus CAN-bus network, mainly including RS-232 to CAN-bus gateways, PCI-CAN interface cards, etc. RS-232 to CAN-bus converters can easily connect to the RS-232 standard communication port of the PLC device, enabling the PLC device to communicate with the fieldbus CAN-bus network. The converter uses the Modbus protocol for conversion, supporting PLC devices with different communication protocols. For PLC devices that only integrate RS-485/422 communication ports, an RS-485 to CAN-bus converter can be selected. Readers can design their own RS-232 to CAN converters and RS-485 to CAN converters, or purchase readily available products such as Advantech's Adam modules and Zhou Ligong's intelligent conversion modules. Inserting a PCI-CAN interface card into an industrial PC enables it to have a fieldbus CAN-bus communication interface, thus becoming a key functional node in a CAN-bus network. Depending on the connection method with the PC, PC-CAN interface cards come in many different types, common models including PCI-CAN, ISA-CAN, PC104-CAN, USB-CAN, and Ethernet-to-CAN interface cards. PCI-CAN interface cards typically provide CAN-bus testing tools, API development examples, and OPC server software. Using "virtual serial port server" software, serial communication-based software projects can be developed to build CAN bus-based PLC networks. 4. Mitsubishi-Siemens CAN Network Integration Case 4.1 Principle Design In the dyeing and printing control system of a certain dyeing and printing plant, there are two Swiss Busey 5V flatbed screen printing machines, three Taiwan Chi Cheng flatbed screen printing machines, two Japanese Tosho flatbed screen printing machines, and two German MBK rotary screen printing machines. The main controllers of these devices are Siemens S7-200 and Mitsubishi FX series PLCs. In order to enable the dyeing and printing control system of the dyeing and printing plant to be monitored and controlled by a single PLC, and to collect and control the field device signals by a single PLC, since the working points of each field PLC are far apart, it is impossible for the industrial control PC to connect each PLC device with a separate cable. Therefore, the PLC devices are connected through a fieldbus CAN-bus network to form a regional PLC network, thereby realizing remote PLC maintenance and real-time data monitoring, which can not only greatly improve the management efficiency of the system, but also effectively reduce the network construction cost. Each flatbed screen printing machine PLC integrates one RS-4852 serial communication port, which is connected to the fieldbus CAN-bus network via a CAN-to-RS-485 converter. The industrial PC has a built-in PCI-CAN interface card, model PCI-1680, which can make the industrial PC a node in the CAN-bus network and manage nine flatbed screen printing machines at the same time. The serial communication protocol of the PLC is implemented differently by different manufacturers. This paper takes the S7-200 used in this project as an example to illustrate its communication method. The S7-200 series PLC is equipped with an RS-485 standard serial interface, which can realize the following four network connections: (1) SIMATI S7-200 network (PPI protocol); (2) User programmable interface protocol (free port mode) adopts programmable free port communication mode (free port mode); (3) PROFIBUS-DP network. 4.2 System Communication This project adopts the free port communication mode. The special registers and related bits related to the free port mode are as follows: (1) Control word register SMB30: The communication mode of the S7-200 PLC is set by SMB30. When mm=01, the PLC works in free port mode. (2) Communication receive character buffer SMB2: SMB2 is a transient register used to store the current character received in the free port communication mode. The user should take the contents from here in the next step and control the received characters one by one from SMB2 into the receive buffer through programming. (3) Communication verification result flag SMB3.0: The PLC verifies the received data according to the parity check method specified by SMB30. If there is an error in the verification, the PLC automatically sets SMB3.0 to 1. SMB3.0=0 indicates that the parity check is correct. Based on this flag, it is possible to decide whether to discard the current information. In case of an error, this error bit can be sent to the other party to request a retransmission. (4) Operating mode flag sm0.7: S7-200 series PLCs can only communicate in freeport mode when in run mode, and can only communicate in PPI mode when in stop mode. When the PLC is in run mode, sm0.7=1, otherwise sm0.7=0. Therefore, the freeport communication can be turned on or off by judging the status of sm0.7. (5) Transmitter null flag sm4.5 and transmit/receive instructions: S7-200 PLCs have dedicated transmit instructions: xmt table port. Table is the number of bytes of data to be transmitted, i.e., the data length, with a maximum of 225; port specifies the communication port, which must be 0 in freeport mode. When transmitting data, the special memory bit sm4.5=0, and when the transmission is completed, sm4.5=1. Therefore, the post-transmission processing can be performed by judging the status of sm4.5, or it can be handled directly by the transmit interrupt. CPU215 and CPU216 also provide receive control instructions: RCV, Table, Port, in conjunction with SMB86, SMB94, SMB186, and SMB194 registers, to change (initialize or terminate) the received information. During PLC serial communication program execution, at the beginning of each scan cycle, the status of SM0.7 is checked. If the PLC is in run mode (SM0.7=1), the free port mode is enabled and other relevant parameters such as baud rate and parity are set; otherwise, the free port mode is disabled. 5. Conclusion This paper introduces the implementation of a multi-PLC networking system based on the CAN bus. In actual system operation, the stability and anti-interference capabilities of the CAN-bus fieldbus are fully demonstrated. Engineering projects do not need to change the original field device control platform; existing control equipment can be seamlessly embedded into an advanced fieldbus network to form a new generation of textile automation integrated network system, providing a field information automation platform for textile engineering MES and ERP. The solution achieves a significant leap in field automation network performance with relatively low cost. It has excellent application prospects.
Read next

Questions about the principle of thyristor phase-shifting soft starter

Abstract : Thyristor phase-shifting AC voltage regulation circuits cannot be applied to the starting and running of asyn...

Articles 2026-02-22