Abstract : This paper proposes a low-cost and compact interface scheme for communication between an FX2 series PLC and a PC, and discusses its hardware and software design concepts. The interface device operates reliably in control room and laboratory environments. Keywords : PC, communication interface, programmable controller (PLC). As a high-performance control device, PLCs are increasingly widely used in distributed systems. In this control method, the PC system is an important component. PLCs can communicate with PCs in various ways, such as directly using existing configuration monitoring software. However, for small-scale control systems, finding a high-performance, cost-effective communication method is of significant practical importance. This paper describes the implementation of communication between the FX2 programmable controller manufactured by Mitsubishi Corporation of Japan and a PC from both hardware and software perspectives. 1 Hardware Description of the Communication Device A channel between the PLC and the PC allows them to complement each other's functionalities. The PLC is convenient and reliable for control, while the PC has strong capabilities in graphic display, data processing, report printing, and Chinese display. Therefore, various PLC manufacturers have developed interface modules for communication between their various PLC models and PCs. Mitsubishi developed the FX-232AW interface module for communication between FX2 series PLCs and computers. Other interface modules include the AJ71E71 for Ethernet connection, the AJ71M51-S1 for MAP network connection, and the AJ71M51M1 for FAIS MAP network connection. Different communication methods have different costs and applicable ranges. This article introduces a method for communicating with a PLC via a PC's RS-232 port. The FX2 series PLC's programming interface uses the RS-422 standard, while the computer's serial port uses the RS-232 standard. Therefore, the interface circuit for PLC-computer communication must convert the RS-422 standard to the RS-232 standard. RS-232 and RS-422 standards differ in signal transmission and logic voltages. RS-232 uses a single-ended receiver and a single-ended transmitter, transmitting information with only one signal line. The logic "1" (-3 to -15V) and "0" (+3 to +15V) are determined by the voltage level on that signal line relative to the common ground level. RS-422 is a balanced transmission standard, meaning it uses both end-to-end transmission and reception, determining the logic state based on the potential difference between the two transmission lines. An RS-422 circuit consists of a transmitter, a balanced connection cable, a cable termination load, and a receiver. It converts logic levels and potential differences (+2V represents "0", -2V represents "1") through a balanced transmitter and a differential receiver. The MAX202 from Maxim Integrated is used for level conversion between RS-232 and TTL. The MAX202 has internal voltage multiplier and conversion circuits, requiring only a +5V power supply, making it very convenient to use. The MAX490 is used for conversion between RS-485 and TTL. Each MAX490 chip has a transmitter/receiver pair. Since communication uses full-duplex mode, two MAX490 chips are required, along with only four external capacitors. The PLC's RS-422 interface uses a DB-25 connector, while PCs typically use a DB-9 connector. Shorting the RS and CS pins of the RS-232 interface ensures the PLC is always ready for data transmission from the computer. This means the computer can send data to the PLC at any time. However, due to the cross-connection of DR and ER pins, the computer must wait for the PLC to become ready before receiving data. 2. Software Description of the Communication Device 2.1 Communication Protocol between FX2 Series PLC and Computer The communication between the FX2 series PLC and the computer uses the RS-232 standard, with a fixed transmission rate of 9600bps and even parity. Data is sent and received in frames. A multi-character frame consists of five parts as shown in the figure. The checksum is obtained by adding the ASCII codes (hexadecimal numbers) of the characters between the command codes ETX and taking the lowest two digits of the sum. STX and ETX represent the start and end markers of the character frame, respectively. Communication between the FX2 series and the computer is based on the host issuing an initial command, to which the PLC responds. There are four commands: 0, 1, 7, and 8. The host computer reads, writes, and forcibly sets bits on the PLC. The host computer coordinates the communication response with the PLC through ENQ, ACK, and NAK. 2.2 Communication Process The communication program between the host and the PLC is written in Bland C. First, the COM1 port must be initialized with a baud rate of 9600bps, even parity, and seven valid data bits. When the computer receives the ACK response character from the PLC, data communication can begin. The computer can read, write, and force ON/OFF operations on various software devices within the PLC. Except for the PLC's timer and counter settings which are constants, and the data in the file register, all digital inputs and outputs, as well as all software devices of the FX2 series PLC, are transparent to the computer. The multi-character frame format during operation is shown in Figure 3. However, different operations differ in the "multiple characters" field. For example, when the computer reads from PLC software devices Y20-Y37, the device address table shows 00A2, and 2 bytes of data are read. If the transmitted command is incorrect, the PLC returns a NAK signal, indicating the operation has failed and needs to be repeated. To ensure accurate communication between the host computer and the PLC, the host computer must also perform calibration according to the communication protocol. If the received information is incorrect, it must be reread. If it fails after three attempts, an error message is displayed. The above programming can be easily implemented using C language. The host computer can also write data to the PLC and perform single-point strong proximity set and reset. This solution is reliable, cost-effective, and compact for operation in high-speed control and laboratory environments. However, for long communication distances and harsh environments, opto-isolation and other measures are required.