With the continuous improvement of automation and mechanization in our country, industrial robots have been widely used in the field of mechanical manufacturing, and industrial robot controllers are becoming more and more standardized, and their openness has gradually increased. Soft PLC system is one of the most important components of industrial robots, which conforms to the work of logical control and bus communication. Under this background, this paper will focus on the software development of soft PLC system based on industrial robot controller. With the use of industrial robots, mechanical manufacturing has gradually formed a smooth and automated pipeline, which can maintain high precision for a long time even in harsh environments. As the core component of industrial robots, the research of soft PLC system is the key to improve the controller of industrial robots and achieve effective control of industrial robots. Therefore, this paper will explore the software development of soft PLC system for industrial robot controller from the aspects of communication interface, task management and so on under the overall idea of software development of soft PLC system. The software of the soft PLC running system designed in this paper is mainly responsible for translating the relevant programs given by the programming system, and generating the soft PLC object file from it, which can effectively control the corresponding logic, so as to realize the control of the robot’s trajectory [1]. Soft PLC running system software designed and developed by itself will directly interpret the target files of soft PLC through industrial robot controller, and enter into operation management and human-computer interaction module through communication interface. Operators control the robot motion system by using HMI touch panel, thus effectively realizing the industrial robot. Motion and logic control ensure that industrial robots can operate normally as required. According to the real-time or not, the tasks in the soft PLC operation system can be divided into real-time and non-real-time tasks. The task module of the former mainly includes virtual machine, robot control, I/O and servo interface driving tasks, while the task module of the latter mainly includes operation management, communication interface and human-computer interaction tasks. Simply speaking, in the non-real-time task module, we need to complete various tasks, including file management and download, software running status display, target file parsing and so on. In the real-time task module, we need to complete a series of operations, including controlling the trajectory of industrial robots, refreshing servo data and controlling I/O devices. Soft PLC running system for industrial robot controller requires very high real-time performance. Therefore, when trying to design and develop soft PLC running system, thermostatic element this paper chooses to use HSHARED to share memory in order to realize the free interaction of data information between any tasks. In the shared I/O data mapping area, the interface driving task and the execution cycle of the soft PLC virtual machine are set to 4ms and 8ms, respectively, so that the virtual machine can read and write I/O data accurately [2].
In the shared servo data service area, the interface driving task is also 4ms execution cycle, which is used to facilitate the virtual machine to read and write servo data accurately.
In the design of communication between soft PLC virtual machine and robot control task, data interaction interface and communication interface are selected as shared memory and Xenomai event. PLCRC shared memory will help soft PLC virtual machine transfer the specific position information of each joint axis of industrial robot to robot control task module and I/O input unit. Then the interpolation value of the position of the robot to be controlled is calculated. After that, the shared memory directly transfers the calculated interpolation to the task of the soft PLC virtual machine. In the software of soft PLC operation system, task management function is mainly responsible for completing new tasks, deleting tasks or task startup.
In the soft PLC operation system designed and developed in this paper, after the initialization of task management module, operators need to set the control signal service function, and create and start human-computer interaction tasks on this basis, and then need to enter the soft PLC target file reading. If the name of the file is empty, it will be read again, and vice versa, the target file will need to be verified to determine whether it is normal. If the soft PLC target file is normal, it needs to load the target file, and I/O, servo configuration generation. From this, the task model of soft PLC is constructed. According to the generated I/O and servo configuration, the shared data image area will be created, and the corresponding modules will be dynamically inserted, thus creating a soft PLC virtual machine task, which will be set up as a pending state and then re-entered into the next cycle. The start-stop and termination signals in soft PLC tasks will be responded by the control signal service functions set in the task management module. When the pause signal is received, the task management module will use the control signal service function to suspend the task settings of the soft PLC virtual machine in the task management module, and if the termination signal is received, the task will be terminated directly by using the function. In order to realize that the software of the soft PLC running system can periodically interpret and execute the target tasks, this paper attempts to use Xenomai Native API to develop the system software, and use its functions to scan periodically. After initializing the virtual machine, the task execution cycle of the virtual machine is set to 8 ms, and the function is used to scan periodically. After that, a single scan is performed. Then the interpolation event is sent by calling the related function again, and the function call is made again, waiting for the end of the scan cycle to prepare for the second scan execution. Line [3]. But in the single scan execution, I/O image data need to be replicated in the I/O temporary memory area, and the actual position values of the axes in the servo image area need to be replicated in the shared memory of PLCRC. If the PC exceeds the code segment at this time, it is necessary to modify the variable segment of the soft PLC object file immediately, then copy the data of I/O temporary memory area in the I/O image area, and copy the interpolation value of the location originally located in the PLCRC shared memory in the servo image area. But if the PC code is in the code segment, the instruction decoding and execution are needed, and the program counter PC is modified, and then the PC is judged again whether the PC exceeds the code segment. In this way, the PC has gone beyond the code segment and can go directly to the next step. In a word, this paper focuses on the analysis and research of the software development of the operation system of the soft PLC system. By dividing the soft PLC system into virtual machine task, control task, interface driving task and many other task modules, the communication interface, task management and virtual machine task of the soft PLC system are developed and designed. This paper designs a software development scheme of soft PLC operation system, hoping to provide necessary reference for relevant researchers and developers.