PC and Mitsubishi Q series PLC communication connection display “can not communicate with PLC”

1 If you use a USB cable, not WIN7 and above, you need to install the driver. And select USB communication in the communication settings.
2 If you use serial communication, you can ensure that the line hardware is no problem. Set the correct port to make sure the port is not occupied. And from the system you can see which COM port your converter uses, do not try. If there is no problem, you can try to lower the baud rate. Sometimes the line quality is not good and high-speed communication will not communicate.

What is the Ethernet communication data format of Mitsubishi Q series PLC and host computer?

The host computer can use the special configuration software, or you can use VB or VC to write the monitoring interface yourself. If you use the dedicated configuration software, the communication part is already integrated, and if you use VB, VC write interface needs to use Mitsubishi. The software package communicates.
The realization of the channel between the PLC and the PC can make the complementary functions of the two are insufficient. The PLC is convenient and reliable for control, and the PC has strong aspects in graphic display, data processing, printing reports and Chinese display. Features. Therefore, various PLC manufacturers have developed interface modules for communication between various types of PLCs and PCs of the company. The FX-232AW interface module developed by Mitsubishi Corporation is used for communication between FX2 series PLC and computer. There is also an interface module AJ71E71 connected to the Ethernet, an interface module AJ71M51-S1 connected to the MAP network, an interface module AJ71M51M1 connected to the FAIS MAP network, and the like. Different communication methods have different cost prices and different scopes of application. Here, an implementation method of communicating with the PLC through the RS-232 port of the PC is introduced.
The programming interface of the FX2 series PLC adopts the RS-422 standard, and the serial port of the computer adopts the RS-232 standard. Therefore, as an interface circuit for realizing PLC computer communication, the RS-422 standard must be converted to the RS-232 standard.
The RS-232 and RS-422 standards are different in signal transmission and logical power averaging.
RS-232 uses a single-ended receiver and a single-ended transmitter to transmit information using only one signal line, and determines the logic “1” based on the level of the signal line relative to the common signal ground level ( -3 to -15V) and “0” (+3 to +15V);
The RS-422 standard is a standard for transmission in a balanced manner, that is, double-ended transmission and double-ended reception, and the logic state is determined according to the potential difference between the two transmission lines. The RS-422 circuit consists of a transmitter, balanced connection cable, cable termination load and receiver. It converts between logic level and potential difference through a balanced transmitter and a differential receiver (+2V for “0” and -2V for “1”).
MAXIM’s MAX202 is used to achieve level shifting between RS-232 and TTL. The MAX202 has a voltage multiplying circuit and a conversion circuit inside. It only needs a +5V power supply to work. It is very convenient to use. The MAX490 is used to convert between RS-485 and TTL. Each MAX490 has a pair of transmitters/receivers. Since the communication uses full-duplex mode, two MAX490s are required, and only four external capacitors are required.
The PLC’s RS-422 interface is mated to the DB-25 connector, while the PC is typically a DB-9 connector. The hardware circuit diagram is shown in Figure 1.
The RS-232 RS and CS are shorted, so that the PLC is always in the ready state for sending data to the computer. In other words, the computer can send data to the PLC at any time. Since the DR and ER are cross-connected, it is necessary to wait until the PLC is ready for receiving data from the computer.
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 adopts the RS-232 standard, and the transmission rate is fixed at 9600 bps, and the parity bit is evenly verified. The data format is shown in Figure 2. Data is sent and received in units of frames. A multi-character frame consists of five parts shown by force, where the sum check value is the ASCII code (hexadecimal number) of the character between the command code ETX, and the lowest two digits of the sum obtained. . STX and ETX represent the start and end flags of the character frame, respectively.
The communication between the FX2 series and the computer is based on the initial command issued by the host, and the PLC communicates in a way that responds to it. There are four commands of 0, 1, 7, and 8. The upper computer realizes reading and writing and forcing the PLC. Through the ENQ, ACK and NAK, the host computer coordinates the communication response with the PLC.
2.2 Communication process
The communication program between the host and the PLC is written by Bland C. First, the COM1 port must be initialized, the baud rate is 9600 bps, the parity bit is evenly verified, and seven bits of valid data. The initialization detection process of communication is shown in FIG. 4. When the computer receives the response character ACK from the PLC, it can enter the data communication. The timing diagram of the communication is shown in Figure 5.
The computer can read, write, and force ON/OFF operations on each soft device in the PLC. Except when the setting value of the timer and counter of the PLC is constant, and the data in the file register, all the digital inputs, outputs and software devices of the FX2 series PLC are transparent to the computer. The format of the multi-character frame in its operation is as shown in FIG. However, different operations differ in the “multiple characters” item. For example, the computer reads the software devices Y20 to Y37 of the PLC, checks the device address table as 00A2, and reads 2-byte data. The state is shown in Figure 6 (a), the command format issued by the host is shown in Figure 6 (b), and the information returned by the PLC is shown in Figure 6 (c).
If there is an error in the transmitted command, the PLC returns the NAK signal. This operation fails and is re-executed.
In order to ensure the communication between the host and the PLC is accurate, the host computer must also perform the calibration according to the communication protocol. If the received information is incorrect, re-read it. If it is still not repeated 3 times, an error message is displayed.
The above programming is easy to implement using C language.
The host can also write data to the PLC for a single point of strong set and reset.
For the operation under the control and laboratory environment, the scheme runs reliably, cost-effective, and small in size, but for the long communication distance and the harsh environment, it is necessary to add photoelectric isolation and other measures.