Remote configuration and real-time communication between multiple PLCs using CAN-bus
2026-04-06 07:58:30··#1
Abstract: A network of up to dozens of small/medium-sized PLCs can be networked via the CAN-bus fieldbus to form an intelligent PLC network. Simultaneously, the main controller can remotely configure and control PLCs, and implement applications within the configuration environment. Keywords: Programmable Logic Controller (PLC); CAN-bus fieldbus; Virtual serial port; CAN232MB converter; PC-CAN interface card 1. PLC Characteristics and PLC Networks A Programmable Logic Controller (PLC) is a digital control dedicated electronic computer. It uses a modifiable program memory to store instructions and execute functions such as logic, sequential, timing, counting, and calculation. Through analog and digital input/output components, it controls various machines or work programs. For a long time, PLCs have been widely used in the field of automation control in various industries, providing highly reliable control applications for a wide variety of automated equipment. The tasks of a PLC system are relatively simple, and the amount of data to be transmitted is generally not large, so a common PLC system is a single-layer network structure. PLCs are generally used in small-scale automation applications, such as equipment control or control and interlocking of a small number of analog quantities. Small-scale centralized control environments are the ideal stage for PLCs to demonstrate their capabilities. Currently, only a few PLC models integrate Ethernet or CAN-bus communication interfaces, and these are relatively expensive. Common PLC models generally lack integrated communication functionality, making it inconvenient to build medium-sized control networks consisting of multiple PLCs. However, with the development of application technologies, there are often application scenarios where n PLCs need to collaborate to complete the comprehensive control of a system over a large area. In such cases, the traditional centralized control scheme using a single PLC becomes inadequate, and the need for PLC networks arises. This paper proposes a PLC network scheme based on the CAN-bus fieldbus, enabling remote configuration and data communication for multiple networked PLCs, and achieving good system performance with relatively low hardware costs. This scheme also fully leverages the communication characteristics of the CAN-bus fieldbus: real-time, reliable, high-speed, long-distance, and easy-to-maintain. This solution organically combines fieldbus technology and 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 main controller. 2. Several Methods of PLC Networking General-purpose PLCs typically provide 1-2 RS-232 or RS-485 standard communication ports for communication with other control devices or the main controller PC. These integrated communication ports support custom-defined communication protocols or Modbus protocols to achieve communication and configuration of PLC devices. Building a PLC network involves utilizing these communication ports on the PLC itself and expanding them into a CAN-bus fieldbus communication interface capable of networking with multiple devices and achieving multi-point communication. Depending on the main controller in the network, PLC networks can be divided into the following methods: • Multiple PLCs networked, each PLC having equal status, with the possibility of external HMI (Human Machine Interface) expansion. • Multiple PLCs networked, with one industrial PC acting as the main controller and operating interface. The following sections will describe the differences in application, hardware configuration, and software settings. 2.1 Multiple PLCs can be serially networked using an RS-232/RS-485 to CAN-bus gateway for signal conversion, giving each individual PLC a CAN-bus fieldbus communication interface. Multiple PLCs with CAN-bus fieldbus communication interfaces can be interconnected to form a PLC network. Each RS-232/RS-485 to CAN-bus gateway connected to a PLC unit can be assigned a unique device ID number, 11 or 29 bits long, used as the address of that PLC unit. When sending data, each networked PLC unit can be configured to automatically add the local gateway's device ID number to the data stream; similarly, when receiving data, each PLC unit can be configured to have the gateway check the device ID number in the data stream and automatically receive data that meets the requirements. In a PLC network constructed using the above method, all PLCs have equal status, and any PLC can actively initiate data communication. The CAN-bus gateway acts as a hardware arbitrator, ensuring that no data is lost in each 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. Simultaneously, this PLC network can also connect to HMIs with CAN-bus communication interfaces, or one PLC can connect to an HMI through another serial communication port. A PLC network established in this way is shown in Figure 1. [align=center]Figure 1 Multiple PLCs Serial Networking[/align] Compared to selecting PLC devices with integrated CAN-bus communication functionality, this method of building a PLC network offers more flexible system expansion capabilities and better cost-effectiveness. 2.2 Parallel Networking of Multiple PLCs and Industrial PCs Industrial PCs can deeply integrate with various software provided by PLC manufacturers to achieve more powerful functions, such as system configuration, human-machine interface, and configuration development, making them increasingly indispensable in the PLC field. Typically, an industrial PC communicates with a single PLC via a single serial port to achieve various extended functions; however, the communication distance and number of nodes are limited by the performance of the serial port itself. For example, the RS-232 standard can only achieve point-to-point communication, while the RS-485/422 standard can achieve communication up to 32 nodes, but the communication distance and anti-interference capabilities are relatively weak, which cannot meet the needs of multi-PLC network applications in actual industrial settings. Industrial PCs have built-in PC-CAN interface cards, enabling the establishment of one or more CAN-bus fieldbus networks. Through an RS-232/RS-485 to CAN-bus converter connected to the CAN-bus network, and with the aid 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. In other words, up to 2047 PLC devices can be connected to the same ordinary twisted-pair cable. Accessing the PLC devices connected to this CAN-bus network from the industrial PC is completely consistent with operating a standard serial port. This method fully utilizes the capabilities of the industrial PC and offers relatively high communication efficiency. The system structure for building a multi-PLC network using an industrial PC is shown in Figure 2. This method of establishing a PLC network offers high communication efficiency and flexible application, and is the mainstream direction for general PLC network construction. [align=center]Figure 2 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 that implement specific functions, some devices are also needed to establish a fieldbus CAN-bus network, mainly RS-232 to CAN-bus gateways, PC-CAN interface cards, etc. These devices will be briefly introduced below. 3.1 RS-232 to CAN-bus Gateway The CAN232MB converter is a commonly used RS-232 to CAN-bus gateway. The CAN232MB converter integrates one RS-232 channel and one CAN-bus channel, which can be easily connected to the RS-232 standard communication port of the PLC device, enabling the PLC device to communicate with the fieldbus CAN-bus network. The CAN232MB converter provides three working modes—transparent conversion, transparent conversion with identification, and Modbus protocol conversion—which can support PLC devices with different communication protocols. The CAN232MB converter's RS-232 channel supports multiple communication baud rates, ranging from 600bps to 115200bps. The CAN-bus channel supports 15 mainstream international standard communication baud rates, and also supports user-defined baud rates, ranging from 5Kbps to 1Mbps. The CAN232MB converter has a built-in 1024-byte data buffer; in normal operating mode, users can software-set the CAN-bus communication baud rate of the CAN232MB converter to be more than twice the RS-232 baud rate to ensure that the data buffer does not overflow during large-volume data transmission. Through PC configuration software, the CAN232MB converter can be assigned an independent 11-bit or 29-bit device ID number, which can be used as the address number for the PLC device connected to the gateway, and to label or identify the data streams in and out of the serial port. The CAN232MB converter meets industrial-grade temperature range (-40℃ to +85℃) and has built-in dual hardware watchdogs, enabling continuous operation in harsh environments. [align=center]Figure 3 CAN232MB Converter[/align] For PLC devices that only integrate RS-485/422 communication ports, an RS-485 to CAN-bus gateway can be selected; a similar product model is the CAN485MB converter, whose basic functions are the same as the CAN232MB converter. 3.2 PC-CAN Interface Card Industrial PCs can have a built-in or external PC-CAN interface card, enabling the industrial PC to have a fieldbus CAN-bus communication interface, thus becoming a major functional node in the CAN-bus network. Depending on the connection method with the PC, PC-CAN interface cards can be divided into many different types, common models include PCI-CAN interface cards, ISA-CAN interface cards, PC104-CAN interface cards, USBCAN interface cards, Ethernet to CAN interface cards, etc. Depending on the model, a single PC-CAN interface card can integrate 1 to 4 CAN-bus channels, and a single PC can connect to up to 8 PC-CAN interface cards, allowing a single PC to connect to multiple fieldbus CAN-bus networks. PC-CAN interface cards generally offer robust software support, including CAN-bus testing tools, multi-language API development examples (VC++, VB, Delphi, C++Builder), and OPC server software supporting configuration development, facilitating the development of specific applications for different product projects. Additionally, "virtual serial port server" software supporting networking between industrial PCs and multiple PLCs allows users to develop new practical applications without modifying existing PC software. Various models of PC-CAN interface cards are available to suit different application scenarios and parameter requirements. Figure 4 shows some commonly used PC-CAN interface cards. [align=center] Figure 4 Common PC-CAN Interface Card Models[/align] 3.3 Communication Accessories Communication cables are an important component of fieldbus CAN-bus networks. The appropriate selection of communication cables has a significant impact on the communication distance of a CAN-bus network. Using standard AWG18 (0.75 mm²) twisted-pair cable as the communication cable for a CAN-bus network generally ensures reliable communication over a distance of 1 km; using standard twisted-pair cable with a cross-sectional area of 1.5 mm² can achieve a communication distance of 6–7 km. Typically, as the communication distance increases, the cross-sectional area of the communication cable needs to be appropriately increased. When wiring a fieldbus CAN-bus network, attention must be paid to the connection of terminating resistors. A 120Ω terminating resistor must be connected to each of the farthest ends of the main line. Terminating resistors are not required for any other CAN-bus node devices on the main line. If a CANbridge is used to divide the network into multiple physically independent CAN-bus subnets, a 120Ω terminating resistor must also be connected to each of the farthest ends of each CAN-bus subnet. In addition, the branch lines of the CAN-bus network should not be too long. It is recommended that the length of each branch line connecting to the PLC device be less than 3 meters. To ensure a reliable connection, the branch lines should be soldered or tightly twisted to ensure that the equivalent impedance in the CAN-bus network does not exceed the allowable range. 4 PLC Network Software Configuration and Settings The RS-232 to CAN-bus gateway connecting the PLC devices needs to be configured with some operating parameters to ensure that each PLC device in the PLC network can operate normally. The configuration parameters include the gateway's operating mode, RS-232 communication baud rate, CAN-bus communication baud rate, device ID number, etc. We will take the construction of a PLC network with multiple PLC devices from OMRON as an example to explain in detail the configuration process of each function software. 4.1 Configuration of RS232 to CAN-bus Gateway Short-circuit the CFG pin and GND pin of the CAN232MB converter. The CAN232MB will then enter configuration mode. The operating parameters can be set through the PC configuration software on the accompanying CD. According to the RS-232 port data format of the OMRON PLC equipment, the CAN232MB converter should be configured according to the following steps: 1. Configure the gateway's data conversion mode, as shown in Figure 5. [align=center] Figure 5 Configuring the gateway's conversion mode[/align] The conversion mode is "bidirectional transparent conversion," which means that the received data from both communication interfaces is transmitted to the other channel without any modification. 2. Configure the gateway's serial communication format, as shown in Figure 6. [align=center] Figure 6 Configuring the gateway's serial communication parameters[/align] According to the PLC equipment's RS-232 parameters, set the baud rate parameter of the RS-232 channel; in the example, it is 9600bps, consistent with the PLC's operating parameters. 3. Configure the gateway's CAN communication parameters, as shown in Figure 7. [align=center]Figure 7 Configuring the Gateway's CAN-bus Communication Parameters[/align] The CAN channel baud rate mainly considers the maximum communication distance of the CAN-bus network; in addition, the CAN-bus communication baud rate of all devices in the CAN-bus network must be consistent, and also consistent with the baud rate setting of the PC-CAN interface card. The transmit identifier is set to the hexadecimal value 0x03, indicating that the CAN-bus standard message ID sent by the gateway is 0x03; the filter acceptance code is set to 0x03, indicating that the gateway can only receive standard messages with message ID 0x03. When using virtual serial port communication, these two settings must be the same. Note that the value 0x03 here is consistent with the virtual serial port number set in the next step of configuring the virtual serial port. That is, the virtual serial port number mapped to this gateway device must be COM3. Similarly, the virtual serial port number corresponding to the gateway device set to 0x04 is COM4, and so on. 4. After setting the parameters, click the "Write Configuration" button, as shown in Figure 8. [align=center]Figure 8 Successfully Writes Gateway Configuration Parameters[/align] Then, remove the short circuit between the CFG pin and the GND pin, and power on the CAN232MB converter again to make the configuration parameters take effect. The configuration of the gateway CAN232MB converter is now complete. 4.2 Virtual Serial Port Configuration In applications where multiple PLCs are networked in parallel with an industrial PC, the industrial PC can access each PLC device connected to the CAN-bus network using standard serial communication methods through virtual serial port server software. 4.2.1 Virtual Serial Port Server Software As the name suggests, a virtual serial port server allows you to create one or more virtual serial ports on a PC by running this software. These virtual serial ports operate just like real serial ports. The only difference is that within the software that calls the virtual serial port, the PC transmits the serial communication data to the CAN-bus network via a connected PC-CAN series interface card. Then, an RS-232 to CAN-bus gateway (such as a CAN232MB converter) connected to the CAN-bus network converts the CAN-bus data back into RS-232 serial data. This achieves a seamless and transparent connection between the PC and the remote serial port, making the operation and application of the remote virtual serial port appear no different from a local serial port. Generally, when upgrading a PC serial port program to operate a remote virtual serial port, almost no modifications are needed; only the serial port number used by the software needs to be changed. The software functions of the virtual serial port server are as follows: 1. Supports operating systems Win2000/XP/2003; 2. Can add up to 2047 virtual serial ports; 3. Can dynamically add devices mapped to any installed virtual serial port, and can also dynamically delete devices mapped to any virtual serial port; 4. Can save the current configuration to a file; 5. Can set server startup conditions (such as automatic startup on boot), and can also set the default configuration at startup. The application of the virtual serial port server is shown in Figure 9. [align=center] Figure 9 Virtual serial port server software for CAN[/align] 4.2.2 Virtual Serial Port Software Settings Because the serial communication format (7/2/1/Even) of OMRON series PLC devices is different from the serial communication format of ordinary PC software (8/1/1/None), the industrial control PC needs to run the virtual serial port server "ZVComCANMgr (for OMRON PLC)" software specifically for OMRON PLCs. Follow these steps to configure the virtual serial port server software on your PC: 1. Click the "File" menu and create a new configuration file named OMRON_PLC, as shown in Figure 10. [align=center] Figure 10 Creating a new configuration file[/align] 2. Create virtual serial ports, as shown in Figure 11. [align=center] Figure 11 Creating a virtual serial port[/align] When creating virtual serial ports, first select the number of virtual serial ports to create. In the drop-down box to the right of "Number of Virtual Serial Ports," select the number of virtual serial ports to create, with a value from 0 to 2047. Selecting 0 indicates no virtual serial ports will be created. As shown in Figure 11, a list value of "10" indicates that 10 virtual serial port devices will be created. After setting the "Number of Virtual Serial Ports," click the "Create Virtual Serial Port" button. The PC will automatically load the driver, completing the process of adding virtual serial port devices. At this point, the user can find these newly added virtual serial port devices in the computer's device list, as shown in Figure 12. [align=center]Figure 12 Newly created virtual serial port device in the device list[/align] 3. Map the port, as shown in Figure 13. After the virtual serial port is created, the virtual serial port number created by the PC will be displayed in the "Unmapped Serial Ports" list. At this time, click "Add" (to add a single virtual serial port) or "Batch Add" (to add all virtual serial ports) to bind the specified virtual serial port with the CAN-bus network and add it to the "Mapped Serial Ports" list. [align=center]Figure 13 Added to "Mapped Serial Ports"[/align] 4. Start the server, as shown in Figure 14. Start the virtual serial port server in the "Service" menu to enable the mapped virtual serial ports to communicate normally. [align=center]Figure 14 Start the virtual serial port server[/align] The startup parameters of the virtual serial port server can be set by the user for convenient daily management and operation of the system, as shown in Figure 15. [align=center]Figure 15 Setting Server System Parameters[/align] 4.2.3 Test PC for Virtual Serial Port After running the virtual serial port server, a set of virtual serial ports will appear in the device list; the virtual serial port numbers will generally start from COM3, and the specific number will depend on the PC's hardware configuration. You can use HyperTerminal software to test the communication of the newly created virtual serial ports. Connect the standard serial port of one test PC (identified as PC A) to the RS-232 port of the CAN232MB converter. On another test PC (identified as PC B) running the virtual serial port server software, establish a CAN-bus network and connect it to the CAN port of the CAN232MB converter. First, set up and start the virtual serial port server. The remote virtual serial port is tested using the following steps: First, open HyperTerminal software on both machine A and machine B, and set the properties of the connected serial port, such as setting the communication baud rate to 9600bps, data bits to 8, no parity, stop bits to 1, and no flow control; these parameters must be consistent with the configuration parameters of the CAN232MB converter. Second, perform a serial character transmission test. Type some characters in the HyperTerminal window on machine A, and you will see these characters appear in the HyperTerminal window on machine B. Conversely, type some characters in the HyperTerminal window on machine B, and the same characters will appear in the HyperTerminal window on machine A. [align=center]Figure 16 Serial character transmission test of the virtual serial port[/align] Third, perform a file transmission test. Click the "Send → Send File…" menu in the HyperTerminal software on machine A to send a specified file to machine B, and the file will be saved in the default directory on machine B; the reverse is also true. [align=center]Figure 17 Serial File Transmission Test via Virtual Serial Port[/align] For detailed information on virtual serial ports, please refer to the software help and technical document "Building a Virtual Serial Port in a CAN-bus Network" of the virtual serial port server. 5. Application Example In a practical oilfield control system, a medium-sized PLC network needs to be built using more than 32 PLCs. Each PLC controls a set of field devices at a working well site. The selected PLC model is the OMRON CPM2A series, which does not support CAN-bus fieldbus networks but integrates one RS-232 communication port. The maximum distance between a single PLC exceeds 10 km, but this oilfield control system requires real-time monitoring of each field PLC from the same main controller. Due to the large distance between the working points of each field PLC, it is impossible for the main controller PC to implement individual cable connections for each PLC device. Therefore, connecting all PLC devices via a CAN-bus fieldbus network to form a regional PLC network enables remote PLC maintenance and real-time data monitoring, significantly improving system management efficiency and effectively reducing network construction costs. The PLC devices at the well site integrate one RS-232 serial communication port, connected to the CAN-bus fieldbus network via a CAN232MB converter. The main controller PC has a built-in PC-CAN interface card, model PCI-9840, which allows the PC to become a node in the CAN-bus network, simultaneously managing four physically independent CAN-bus networks. 5.1 Relevant Concepts of CAN-bus Networks The topology of a fieldbus CAN-bus network generally uses a linear structure, as shown in Figure 18. All CAN-bus device nodes are connected to the CAN-bus network backbone via short branch lines; these branch lines should not be too long, generally less than 3–6 meters. If the CAN-bus network topology needs to be changed due to factors such as network cabling or geographical environment, it can be done using a CANbridge or CANHUB. [align=center]Figure 18 CAN-bus Network Topology[/align] In CAN-bus network cabling, attention must be paid to the connection of terminating resistors. A 120Ω terminating resistor must be connected to each of the farthest ends of the CAN-bus backbone; no terminating resistors are needed for any other CAN-bus nodes on the backbone. At a baud rate of 5Kbps, using ordinary twisted-pair cable with a cross-sectional area of Φ1.5 mm², the CAN-bus can achieve a communication distance of at least 6-7 km. Generally, as the communication distance increases, the cross-sectional area of the communication cable needs to be appropriately increased. The relationship between communication distance and baud rate is shown in Figure 19. [align=center]Figure 19 Relationship between Baud Rate and Communication Distance of CAN-bus Network[/align] As the number of CAN-bus nodes in the network increases, the maximum communication distance will decrease. When the number of nodes in the same CAN-bus network reaches 100, the maximum communication distance will decrease by at least 20%. By installing a CANbridge at a suitable location in the CAN-bus network, the communication distance of the CAN-bus network can be doubled, and the number of CAN-bus nodes connected can be doubled. 5.2 PLC Serial Communication Protocol The serial communication of OMRON's CPM series small and medium-sized PLCs uses the "command-response" communication method. The industrial control PC can communicate with the CPM series PLC through serial port programming. The process of the PC and PLC exchanging data once, that is, the total amount of data of the transmitted command and response, is called a frame. A frame can contain up to 131 data characters. OMRON PLCs use the HOSTLINK communication protocol. 5.2.1 HOSTLINK Command Frame Format The PC sends commands to the PLC according to the HOSTLINK command frame format. The HOSTLINK command frame is shown in Figure 20. [align=center] Figure 20 OMRON PLC Command Frame Format[/align] The HOSTLINK command frame specifications are as follows: ● The @ symbol must be placed at the beginning of each command; ● Node number, used to identify the node address of each PLC; ● Read/Write, specifies which register unit of the PLC, for example, when reading/writing the IR/SR area, its identification codes are set to RR and WR respectively, and when reading/writing the DM area, they are set to RD and WD respectively. ● FCS, sets a two-character frame check sequence code, which is an 8-bit data converted to 2 ASCII characters. This 8-bit data is the result of an XOR operation performed on all data from the beginning of the frame to the end of the text (i.e., before the FCS). ● Termination characters are set to "*" and carriage return, indicating the end of the command. The HOSTLINK command frame can be up to 131 characters long. A command of 132 characters or more must be divided into several frames. Command segments are delimited using carriage return delimiters (CHR $(13)). 5.2.2 HOSTLINK Response Frame Format The PLC will give a data response and send a HOSTLINK response frame for each correct command frame received, as shown in Figure 21. [align=center] Figure 21 OMRON PLC Response Frame Format[/align] The identification code and text depend on the host computer connection command received by the PLC. The end word indicates the status of the command completion (i.e., whether an error has occurred). When the length of the response frame exceeds 132 characters, it must be divided into several frames. The end word is the information in the response frame that indicates the PLC's response. For example, the end word code is 00 indicating normal completion, 13 indicating FCS error, 14 indicating format error, 15 indicating entry code data error, 18 indicating frame length error, A3 indicating termination due to FCS error during data transmission, and A8 indicating termination due to frame length error during data transmission. 5.3 Connection between PLC and CAN232MB Gateway The CPM series PLC integrates one RS-232 serial communication port, using a DB9 socket; the CAN232MB converter also integrates one RS-232 serial communication port, using a DB9 socket. The following connection method allows for the rapid fabrication of a communication cable connecting the CPM series PLC and the CAN232MB gateway; this cable can also be used for communication between a PC and an OMRON PLC. Materials required include two DB9 pin connectors, three thin wires, and a small amount of soldering tools. [align=center]Figure 22 DB9 Pin Connector and Pin Definitions[/align] Connect one end of the serial communication cable to the CAN232MB converter and the other end to the CPM series PLC. Note that the two DB9 ports on the communication cable are not interchangeable. A schematic diagram of the communication cable connection is shown in Figure 23. [align=center]Figure 23 PLC Communication Cable Pin Connection[/align] 5.4 CXP Software and PLC Communication CXP software is the integrated development environment for OMRON's CPM series PLCs. Here, we will test the established virtual serial port and verify the reliability of the PLC network by using the serial communication function of CXP software and the PLC. Open the CX-Programmer software and select a communication port. For example, select the serial port COM3 that was just established by the virtual serial port server software, as shown in Figure 24. [align=center]Figure 24 Selecting the PLC Communication Port in CXP Software[/align] Click the "Auto Online" item in the "PLC" menu, and the CXP software will automatically find the corresponding PLC type. Once a communication connection is successfully established with the PLC through COM3, you can perform programming, erasing, debugging, and other operations on the PLC; this is completely consistent with the operation method of using standard serial ports COM1 and COM2, as shown in Figure 25. [align=center]Figure 25 Remote Configuration of PLC via Virtual Serial Port[/align] 5.5 Connection between PLC and Gateway CAN485MB OMRON's CXP software can connect up to 32 CPM2A series PLC devices to a single RS-485 standard serial communication port; each PLC device needs to be pre-configured with a unique 5-bit address number to distinguish each PLC device in the RS-485 network. The RS-485 standard is a multi-point network communication method. As described above, a virtual serial port conforming to the RS-485 standard can be established through the gateway CAN485MB converter. The CPM2A series PLC can obtain an RS-485 standard communication port with the help of an RS-232 to RS-485 level converter. Multiple PLCs with preset address numbers can be networked via RS-485 serial communication and connected to a CAN485MB converter to form a PLC network with 1 to 32 nodes, a distance of 1 km, and RS-485 standard. The network structure is shown in Figure 26. [align=center]Figure 26 Small PLC Network Built with Gateway CAN485MB[/align] In the above way, the PLC network of the entire area can be built by multiple gateway CAN485MB converters, and each gateway CAN485MB converter can build a small PLC network with RS-485 standard. In this way, a large star PLC network can be formed. 5.6 PLC Network Configuration and Development Multiple virtual serial ports can be established through gateway CAN232MB converters or CAN485MB converters for connecting PLC devices. The operation mode of the virtual serial port is exactly the same as that of the PC standard serial port. Typical configuration environments (such as Kunlun Tongtai MCGS, KingView, etc.) can support the development of OMRON PLC devices via serial communication device drivers. If the configuration environment can support multiple PLC devices expanded via multiple serial ports, it can also support serial PLC networks built using virtual serial ports based on the CAN-bus fieldbus. It's important to note that serial PLC networks are built on the CAN-bus fieldbus, and each command/response frame requires a certain transmission time. For example, when the CAN-bus communication baud rate is set to 10Kbps, transmitting a 30-byte command frame requires at least approximately 60ms; adding the delay of the response frame, it takes approximately 150ms for any PLC in the network to complete one complete communication process with the industrial PC. This time is the communication cycle of a single PLC. Based on these parameters, when using a single CAN-bus fieldbus network to establish a PLC network consisting of 30 PLC devices, the industrial control PC would need approximately 30 times the communication cycle of a single PLC to actively query the status of all PLC devices. When developing PLC networks using a configuration environment, users must pay attention to network communication latency and set relevant timing parameters within the configuration environment; otherwise, the configuration environment may not function properly. We can improve the response speed of the PLC network through several methods. One solution is to increase the number of CAN-bus networks, thereby reducing the number of PLC devices in each CAN-bus network. Alternatively, increasing the communication baud rate of the CAN-bus network can achieve the same effect, at the cost of shortening the communication distance. 6. Conclusion The example presented in this article, "Network Control of Multiple PLCs via CAN-bus Fieldbus," has passed the operational testing of a real-world project, with a network length exceeding 7 km in the field. In actual system operation, the stability and anti-interference capabilities of the CAN-bus fieldbus were fully demonstrated. In this project, the existing PC control platform did not need to be changed; existing control equipment could be seamlessly embedded into the advanced fieldbus network to form a new generation of DCS distributed control system. This solution achieved a significant leap forward in field automation network performance with relatively low cost. This solution has a wide market and high application value in industries such as coal mine remote transmission, power communication, and oil extraction. [align=center] Figure 27 Small PLC Network in Karamay Oilfield[/align]