Mitsubishi Q series PLC communication practice developed by upper computer

Students who often follow our official account or open class (if not yet, click on a wave of follow in the upper left corner) should know that we often use Siemens PLC, in fact, we will talk about other brands of PLC, including Mitsubishi and Omron , Keyence, Panasonic, domestic Delta, Xinje, etc., the reason why Siemens PLC is used as an example is that most of the students use Siemens PLC, and Siemens has a relatively high market share. Furthermore, I think The development of the host computer, in fact, does not pay much attention to the PLC brand. If you have mastered the host computer development of Siemens PLC, other brands are similar, but there will be some differences in rules and storage areas. Today, I will take Mitsubishi Q series PLC as an example to tell you how to realize the communication between the host computer and it.

  1. PLC software installation and configuration

The programming software of Mitsubishi Q series PLC uses GX Works. You can download and install it by yourself. I won't go into details here. The following mainly introduces the configuration of PLC.

(1) After creating a new PLC project, click PLC parameters and select the built-in Ethernet port settings:

                                                                             Chart 1 Built-in Ethernet settings

(2) After completing the settings according to the above steps, click to open the settings and select the open method. For the Q series built-in Ethernet, choose the MC protocol here. Other types of PLC will be different. The local port number is set according to the actual situation. Two ports are used for connection. Actually, if there is only one connection, only one can be set.

                                                                                          Chart 2 Set the port number

(3) It is worth noting that when the setting is completed and the program is downloaded to the PLC, the PLC must be restarted! !

2. Communication platform test

(1) After completing the above configuration, you can use the Siketang communication test platform software developed by yourself to test, select Mitsubishi PLC in the navigation bar, then enter the correct IP address and port number, and select MCBinary in the protocol type.

                                                                                  Chart 3 Siketang communication test platform

(2) After the input is completed, click to establish connection. After the connection is established, the log column will show a successful connection prompt.

(3) In the reading and writing test, input the corresponding variable address and variable type to realize the communication read, write and test of related variables.

3. Project level application

The communication test platform is only used to test whether the communication is normal, and realize normal single-variable data reading and writing. But if it is project-level development, a more complete communication architecture is needed. Here I use the self-developed upper computer communication configuration integrated software (referred to as CMS configuration software).

(1) Right-click on the PLC device to select Mitsubishi PLC, and set the IP address, port number and other related parameters in the opened window:

                                                                                        Chart 4 Create PLC

(2) Under the PLC device, right-click to add a communication group, and fill in the corresponding storage area, starting address and length as needed:

                                                                                       Chart 5 Add communication group

(3) Under the communication group, configure the corresponding variables according to the actual situation, enter the start address and variable type, and the variable address will be automatically changed. Here you can enter the scale factor and offset for linear transformation:

                                                                                        Chart 6 Add variables

(4) For variable configuration, there will be an alarm archiving configuration in the lower left corner, which is mainly used to configure the alarm type, archiving method and setting limits of the variable:

(5) After completing the above configuration, you can click to save the configuration, and then click to start and run to realize real-time communication:

                                                                                       Chart 7 Real-time communication

(6) At the same time, it can be saved as a configuration file, and based on the configuration dll, configuration analysis and communication data analysis can be realized in a fast way, so that the communication framework of the entire project can be built.

4. Overall summary

This article mainly describes the communication configuration, communication configuration and project application of Mitsubishi Q series PLC. I hope it can give some help to students who want to develop Mitsubishi PLC projects. This set of ideas is also applicable to PLCs of other brands. We aim to save everyone's time in communication in development projects, and put more energy into project process development.

                                                                                    Public number: thinger_net

 

Guess you like

Origin blog.csdn.net/xiketangAndy/article/details/106150380