Program compatible with all algorithms
Patent Information
- Application Number
- JP2023188976
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-11-04
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2043-11-04
AI Technical Summary
【0035】 本発明の効果は、処理の実行を行単位の処理データで行う、任意の行と列から成る複数の処理データで、各処理は、行単位で処理データの追加や削除を行うため、また、その行の処理データ以外に、次の行の先頭アドレスと前の行の先頭アドレスとをその行の処理データに加えるため、複数の処理データを行単位で混在させることができ、処理データを追加しても、他の処理にまたがることがない。つまり、追加できる領域を気にすることなく、アルゴリズムを容易に追加や削除することができる。
Smart Images

Figure 0007557598000001
Abstract
Description
[Technical Field]
[0001] The present invention relates to a system that uses a programmable logic controller (PLC) that can be programmed to support various algorithms, and a personal computer (PC) that can be programmed to support various algorithms. [Background technology]
[0002] Traditionally, production factories have used devices and equipment to automate production processes. Programmable logic controllers (PLCs) have been used as control devices to electrically control such devices and equipment, and in recent years, programmable logic controller (PLC) systems have been constructed and used by connecting programmable logic controllers (PLCs) with interfaces such as touch panels (TPs), external link I / O (I / O, Input / Output), various network devices, and personal computers (PCs) via various cables, complementing each other to form devices and equipment.
[0003] Among these, for example, Patent Document 1 (Patent Document 5,335,128) has been devised, which aims to easily change control programs when changing the order of processes or setting values in equipment that constitutes a plant. Other examples include Patent Document 2 (Patent Document 5,155,228), which aims to simplify and shorten engineering work, Patent Document 3 (Patent Document 6,023,266), which aims to provide a programmable logic controller (PLC) program management device that variably configures the size of memory blocks allocated to each user program, improves the utilization of unused space, and enables flexible program modification and addition, Patent Document 4 (Patent Application No. 7-78376), which aims to enable the rapid creation of programs suited to applications and their modification as needed in a robot control system, and Patent Document 5 (Patent Application No. 14-41125), which aims to reduce the design and creation costs of an operation scheduler that executes unit sequences. Furthermore, in relation to data structures, Patent Document 6 (Patent 4770694) has been devised, which aims to efficiently search within data having a data structure consisting of identification information made up of multiple components and information main body associated with the identification information, and Patent Document 7 (Patent 4884438) has been devised, which aims to efficiently compress XML (Extensible Markup Language) based documents using a data structure representing a hierarchical tree, such as content of a content type that can be associated with compression coding technology.
[0004] The idea in Patent Document 1 (Patent 5335128) is divided into an operation control circuit, a process control circuit, a main control circuit, and a process control circuit, but the operation circuit is a general automatic circuit, the process control circuit is a recipe selection circuit and a changeover circuit, the main control circuit is an initial setting circuit, and the process control circuit is a data setting screen control circuit, so there is not much difference from traditional design methods. In other words, it is nothing more than a plant version of the recipe control used in LCD and semiconductor manufacturing. In other words, it is nothing more than a changeover of an automatic process and does not support free process dispersion or convergence.
[0005] In the idea of Patent Document 2 (Patent 5155228), a template is created by pre-determining the form, but for forms that are not pre-determined, a template must be created as before. This difference is merely an attempt to shorten the work. It is the same as a subroutine or function block, except that it is called a template. This idea also does not support the free dispersion or convergence of processes.
[0006] In the invention of Patent Document 3 (Patent 6023266), by dividing consecutive memory into blocks of the desired size, such as N, 2N, or 4N, waste is reduced, but the blocks between N and 2N, or between 2N and 4N, etc., are still the same as before, and when a large amount of data is added, they span across each other, making it necessary to define new N, 2N, or 4N. Also, it does not support cases where the consecutive rows themselves are variable.
[0007] The invention of Patent Document 4 (Japanese Patent Application No. 7-78366) is a robot control system that uses a hierarchical structure rather than plant control, but even if a program can be selected using a hierarchical structure, it is only a partial advantage because robot control requires time to make fine adjustments to correspond to actual movements, and these adjustments are important. Also, like Patent Documents 1 and 2, this invention does not support the dispersion or convergence of free processes.
[0008] The idea in Patent Document 5 (Patent Application No. 14-41125) is mostly about plant control, but it attempts to keep development costs low by dividing the program into a unit sequence section that uses current programmable logic controller (PLC) units as units, and an operation scheduler section that uses current stepping circuits and sequential circuits as units, and a parameter buffer that describes the state of the units and operation scheduler, but it has drawbacks such as complex processing when the unit is constantly monitoring the process or when multiple units are involved at one point.
[0009] The idea in Patent Document 6 (Patent 4770694) is to efficiently search by matching identification information and indexes on a component-by-component basis, and the focus is on the speed of searching data structures, not on data structures for the scalability of the program itself.
[0010] The invention in Patent Document 7 (Patent 4884438) compensates for the shortcomings of conventional technology, and provides efficient compression technology for XML-based documents, document skipping capabilities, and a progressive structure, but is not a data structure for the extensibility of the program itself.
[0011] Conventionally, even in the case of plant or robot control, it has been customary to make the control dedicated to that device, that is, to manufacture it as a one-off item, except for a perfect replica device. For this reason, Patent Documents 1 to 5 focus on the field of control and are devised with consideration for versatility in that field, rather than general algorithms. Patent Documents 6 and 7 are devised for efficient search and compression using data structures. [Prior art documents] [Patent documents]
[0012] [Patent Document 1] Patent No. 5335128 [Patent Document 2] Patent No. 5155228 [Patent Document 3] Patent No. 6023266 [Patent Document 4] Patent application No. 7-78366 [Patent Document 5] Patent application No. 14-41125 [Patent Document 6] Patent No. 4770694 [Patent Document 7] Patent No. 4884438 Summary of the Invention [Problem to be solved by the invention]
[0013] The problem we are trying to solve is that there is a contradiction between being able to support all algorithms without changing the program by simply changing the processing data of each processing program, and setting up a storage area for each processing data. In other words, if an area is set up, an increase in processing data may cause it to span another processing area, making it impossible to support all algorithms. Furthermore, setting up a large area results in wasted memory space.
[0014] Furthermore, the problem to be solved is that when processing data consisting of an arbitrary number of rows and an arbitrary number of columns is executed row by row by a processing program, and if the processing content to be executed requires repetition or branching, the rows of processing data must be created in advance, taking into account the maximum number of repetitions.In other words, once the algorithm is determined, the maximum number of repetitions can be determined, but it is not possible to determine a maximum number of repetitions that can accommodate all algorithms.Similarly, it is not possible to determine the maximum number of maximums for processing in which the number of processing data changes row by row.In addition, memory that does not meet the maximum value becomes wasted memory area.
[0015] Another problem being addressed is the separate nature of the programmable logic controller (PLC), which writes programs to the PLC and supports various algorithms, and the engineering tool that writes the programs to the PLC and controls it. Furthermore, even the connection cables connecting the PLC to the engineering tool vary from manufacturer to manufacturer, making it difficult to quickly respond to changes. While attempts have been made to resolve this issue in recent years by incorporating a single software package into personal computers (PCs) and standardizing connection cables, these issues have also resulted in incompatible versions. Furthermore, some external touch panels (TPs) now offer the ability to add, change, and delete programs by adding additional memory, but this is merely an auxiliary function.
[0016] Furthermore, the problem to be solved is that in order to support various algorithms, programs tailored to individual algorithms must be created, and sometimes, as necessary, data and constants must be written into a programmable logic controller (PLC) to make the created program executable, which requires program files, data files, comment files, etc., and all of these must be managed every time an individual algorithm is created.
[0017] Furthermore, the problem to be solved is that even if the algorithm is the same, the command words and description methods differ depending on the manufacturer of the programmable logic controller (PLC), so it is necessary to understand the differences in the command words and description methods between manufacturers.
[0018] Furthermore, the problem to be solved is that when a program is added or deleted while it is being executed, the program automatically becomes larger or smaller when it is converted into a format that can be directly executed by the microprocessor (MPU, Micro Processing Unit), so the program may not run reliably depending on where the currently executing program is being executed.Even if the program is executed by watching the monitor, there is a time lag in the monitor itself, and the program may not run reliably, in other words, the size of the program is being changed.
[0019] Furthermore, the problem to be solved is that the number of characters in the comments managed in the comment file is generally fixed, and it is not easy to increase the number of characters in the comments. Furthermore, although it is possible to write comments in the microprocessor (MPU) of a programmable logic controller (PLC), there are limitations, and since comments must be written each time, it is easy to forget, which is troublesome.
[0020] Furthermore, the problem we are trying to solve is that the programs that differ for each manufacturer of programmable logic controllers (PLCs) are designed with program instructions based on microprocessor (MPU) assembly language, which is the closest to machine language among the programming languages that humans can use in practice. This makes it difficult for people to understand the program instructions based on numerical values such as addresses and instructions. As a result, various notes and comments are set at the expense of the format of separate files and the program capacity, but there is no common way of writing them, and the freedom of the programs can actually hinder understanding.
[0021] Another problem we aim to solve is that program creators have too much freedom, making it difficult to understand whether a coil or contact is physically determined, a replacement coil or contact, or a contact or coil that is only necessary for the program's internal connections. Furthermore, because all devices can be freely selected, program creators can use replacement coils or contacts, or choose different coils or contacts depending on the application, further complicating understanding. Furthermore, when a program is constructed hierarchically, the definition of the hierarchy becomes unclear, further complicating understanding. For example, interlock processing is sometimes not placed in the same hierarchy, and conversely, the same interlock processing is used in all hierarchies, resulting in complex programs that are difficult to understand. In other words, program creators can freely incorporate information into programs based on their own mood and thinking, which is one of the reasons why programs vary from program creator to program creator. This problem further develops, preventing complete modifications and changes when someone other than the program creator modifies or changes the program. Furthermore, because complete modifications and changes are not possible, forced additions are made, further complicating the program.
[0022] Furthermore, the problem to be solved is that in recent years, technological innovation has progressed and the role of electrical control has become greater, which has led to larger and more complex programs. As a result, machine designers and plant designers must communicate the intentions, key points, and ingenuity of the design to program designers, which takes a lot of time to get them to understand.
[0023] Furthermore, the problem to be solved is that in recent years, as programs have become larger and more complex, program designers often work together to design programs, spending a lot of time communicating the intentions, key points, and innovations of the design, which increases the probability that confidential information contained in the intentions, key points, and innovations will be leaked.
[0024] Furthermore, the problem to be solved is that the display devices controlled by touch panels (TP) or personal computers (PC) as interfaces have a variety of screen sizes, resolutions, specifications, and character sizes. Therefore, depending on the type of display device used, the character size, and the data control specifications, it is necessary to create many screens when creating a lot of data.
[0025] Another problem we are trying to solve is the inherent ease of program duplication, a characteristic of digital structures. In recent years, many programs have been distributed across multiple files, each with its own function. While changing only addresses and increasing the number of times a file is used improves the reliability of the program's file structure, from the perspective of machine and plant designers, the labor hours required to design the program differ from the labor hours required to actually design the program. This means that labor hours can vary significantly depending on whether the program is constructed by reading the controlled device's manual or whether the program is created once, resulting in higher costs. Furthermore, from the perspective of programmable logic controller (PLC) manufacturers, even if a reference program is modified or changed, it is difficult for those modifications or changes to be reflected. This means that accurate design costs cannot be determined. Another problem is that reference programs are not easily modified or changed.
[0026] Furthermore, the problem to be solved is that the manufacturing equipment that controls the connected devices and equipment is highly confidential, and in general factories, outsiders are prohibited from entering and the manufacturing equipment is not shown, so a manufacturing equipment manufacturer other than the one used for the original machine is used, and the design intent, key points, and ingenious parts are copied cheaply. Therefore, although a process to prohibit copying is carried out using a password, in general factories, because outsiders are prohibited from entering, the analysis process takes time and illegal copying is made. [Means for solving the problem]
[0027] The first aspect of the present invention is processing data of a program in which there are a plurality of pieces of processing data each consisting of an arbitrary number of rows and an arbitrary number of columns, and a microprocessor (MPU) or CPU executes processing according to a purpose based on the plurality of pieces of processing data, such as one row of one of the pieces of processing data, and then moves on to the next row and executes processing thereon, and when the rows run out, returns to the first row and continues executing processing, In addition to the processing data of that row, the start address of the next row and the start address of the previous row are added to the processing data of that row, Furthermore, if the number of data items in a row is variable, add the variable number of data items to the row's processing data. Furthermore, when the processing content for executing processing in one row requires repetition or branching, the data structure is characterized in that repetition data and processing data for the repeated or branched processing data are added to the processing data of that row.
[0028] The first aspect of the present invention is illustrated in Figures 4, 8 to 13, 16 to 20, 38 to 47, 57 and 58 as processing data, migration data, repetition data and number data, further showing the relationship between data structures.
[0029] The second aspect of the present invention is a program that causes a microprocessor (MPU) or a CPU to execute processing according to a purpose based on the data structure according to the first aspect of the present invention, and the processing data is For each row, the device data is compared and the result is executed by changing the ON / OFF state of the general-purpose bit. For each row, the state of the physically arranged input bits is taken in and executed by changing the ON / OFF state of the general-purpose bits. For each row, when the logical AND or OR of multiple general-purpose bits output from other processes becomes true, the logical processing data is replaced with ON / OFF of the general-purpose bit and executed. For each row, the processing state is handed over to other rows or rows of other processes by transitioning the ON state of the general-purpose bit based on the general-purpose bit output from other processes, and the processing data of the sequential step processing is transmitted and executed. For each row, the processing data of the device data calculation process, which performs calculations on the device data or device bits as specified by the calculation function of the microprocessor (MPU) or CPU, and For each row, the processing data of the output process is executed by changing the ON / OFF state of the physically arranged output bit of the general-purpose bit output from other processes. For each row, the data includes at least one of processing data for a timekeeping process that is executed by changing the ON / OFF state of a general-purpose bit over time, and processing data for a timekeeping process that is executed by changing the ON / OFF state of a general-purpose bit over time. To execute the above processing, the program replaces the selection required for the processing with the numerical value of the processing data, uses the address of the general-purpose bit as the processing data, and writes and uses the processing data to multiple modifier registers to execute the processing of that row, then moves on to the next row and executes the processing, and when the rows run out, returns to the first row and continues executing the processing.
[0030] The second aspect of the present invention is illustrated as ladder programs in FIGS. 23 to 34 and 48 to 54, as the overall configuration in FIGS. 55 and 56, and as all flowcharts in FIGS. 64 to 84.
[0031] The third aspect of the present invention is an interface processing program that uses a touch panel (TP) or a PC as an interface for manipulating each processing data of the program described in the second aspect of the present invention, and a display memory area for the part that displays each processing data described in the second aspect of the present invention is reserved in a microprocessor (MPU) or a CPU, to create, delete, add, or change the processing data, and is characterized in that the interface processing program is further included in the program on the touch panel (TP) or the PC side, or in the program described in the second aspect of the present invention.
[0032] A third aspect of the present invention is illustrated in FIG.
[0033] The fourth aspect of the present invention is an identification and initial processing program that performs identification processing when a power supply is turned on or reset, and controls and stabilizes the processing state to an initial state, and before the identification and initial processing program is written into a microprocessor (MPU) or CPU, unique physical specific data is written into the identification and initial processing program, and during the identification processing, the written data is compared with the unique physical specific data read out by the microprocessor (MPU) or CPU, and if they do not match, the identification and initial processing program changes the ON / OFF state of a general-purpose bit and transmits a prohibition instruction to each processing program described in the second aspect of the present invention, The program according to the second aspect of the present invention is characterized in that a program that does not execute each of the processes described in the second aspect of the present invention based on an instruction to prohibit the identification and initial processing program is incorporated into the program of each process.
[0034] A fourth aspect of the present invention is illustrated in FIG. [Effects of the Invention]
[0035] The effect of the present invention is that processing is performed on processing data in row units, and for multiple processing data consisting of any number of rows and columns, each processing adds or deletes processing data in row units, and since the starting address of the next row and the starting address of the previous row are added to the processing data of that row in addition to the processing data of that row, multiple processing data can be mixed in row units, and even if processing data is added, it will not overlap with other processing.In other words, algorithms can be easily added or deleted without worrying about the area that can be added.
[0036] Furthermore, in order to execute processing on a row-by-row basis and add or delete processing data on a row-by-row basis, the start address of the next row and the start address of the previous row are added to the processing data of that row. By adding a number of items to the processing data, it is no longer necessary to fix the size of the processing unit row, and a variable number of data items can be incorporated. Similarly, by adding repetitive data and the repetitive processing data to the processing data, a repetitive structure can be incorporated within the row. In other words, it is possible to accommodate further changes to the algorithm.
[0037] Furthermore, when building a program that reflects an algorithm, which is a procedure or calculation method for solving a problem, in a programmable logic controller (PLC), the program can be built or changed by changing the processing data without converting it into a program in a format that can be directly executed by the programmable logic controller's (PLC's) microprocessor (MPU).Therefore, if the programmable logic controller (PLC) is connected to an input display device such as an external touch panel (TP) or personal computer (PC) with a standard input screen via a connection cable, the program can be built or changed simply by changing the data on the standard input screen, no engineering tool is required. Also, even if a device does not have a standard input screen, depending on the manufacturer, there may be a function that allows you to change device data from the touch panel (TP), so you can make changes without needing an engineering tool.
[0038] Furthermore, since the method of constructing or modifying a program involves adding, deleting, or modifying only the processing data, program files are no longer necessary, making file management easier. However, depending on the manufacturer, some touch panels (TP) that are not engineering tools but are connected via a cable to input / display devices such as external touch panels (TP) or personal computers (PCs) have the function to read and write programs, but they have limitations such as the need for external memory, which can create new problems.
[0039] Furthermore, because each manufacturer of the programmable logic controller (PLC) that creates the program uses different command words and wording such as the format of the values used, the differences between each company can be absorbed. In other words, even if the equipment is from different manufacturers in the same factory, when it is connected to an input / display device such as an external touch panel (TP) or personal computer (PC) with a connection cable, the screen has the same structure, so the differences between each company are reduced.
[0040] Furthermore, even if you change, add, or delete something while the program is running, the microprocessor (MPU) of the programmable logic controller (PLC) does not convert it into a program in a directly executable format and write it, so there is no risk of accidentally deleting the initial settings of a repetitive structure (For~Next syntax) or accidentally entering the wrong address or label for a jump destination structure (subroutine call, unconditional jump, conditional jump, etc.), causing the program to stop. In other words, the program structure is not changed. However, depending on the manufacturer, syntax checking is also performed when converting a program into a format that can be executed directly by the microprocessor (MPU) of a programmable logic controller (PLC).However, even this processing can slip through, and depending on the usage method, it is necessary to uncheck this processing, which can sometimes cause the program to stop.
[0041] Furthermore, since comments are not managed in maximum number units, memory capacity for comments is not wasted. However, currently, many manufacturers have comment files separate from program files, so the manufacturer must change the comment structure. Furthermore, although it depends on the touch panel (TP) manufacturer, it is best to use the comments on the touch panel (TP). However, since comments on the touch panel (TP) cannot be written from the screen, the structure must also be changed.
[0042] Furthermore, by making comments device data, this idea alone consumes a lot of data memory, which is its biggest drawback. However, although comments can be written to the microprocessor (MPU) of a programmable logic controller (PLC), there are limitations, and it eliminates the need to write them each time, which is a hassle.
[0043] Furthermore, as a method of constructing or modifying a program, it uses only the processing data, and when connected to an input / display device such as an external touch panel (TP) or personal computer (PC) via a connection cable, it uses tables on the screen, making it easy to understand visually.
[0044] Furthermore, by using only the processing data as a method for constructing a program, a hierarchical structure is generally constructed when designing a program for a large device, and the hierarchical structure can be divided at the discretion of the program designer, preventing differences in the hierarchical structure depending on the person. Also, even if someone other than the program designer changes the program, the changes can be seen at a glance because the screen is in a table format.
[0045] Furthermore, with the advancement of technological innovation in recent years and the growing role of electrical control, programs have become larger, and mechanical and plant designers can no longer design them on the side. Instead, they have had to communicate the intent, key points, and ingenuity of the design to program designers with programming knowledge. However, if new employees with no programming knowledge within the same company as the mechanical and plant designers can input the data based on design flowcharts, time can be saved, the new employees can understand the equipment and devices, and confidential information will no longer be leaked.
[0046] Furthermore, by creating a display memory, it is possible to provide versatility, since display devices controlled by touch panels (TP) or personal computers (PC) have a variety of screen sizes, resolutions, specifications, and character sizes, and these vary depending on the type of display device used, the character size, and the specifications of the equipment and factory.
[0047] Furthermore, by having the unique physical specific data that a programmable logic controller (PLC) possesses and controlling from the program side whether or not the program will be executed by the programmable logic controller (PLC), it is possible to prevent the program from being executed without modifying it. When combined with the ability to control programs by data input, security permissions such as passwords regain their true meaning, and it is possible to protect the rights of programs even in spaces where manufacturing equipment is located and where outsiders can enter.
[0048] In other words, although it is a programmable logic controller (PLC), it is possible to create and change algorithms simply by changing the data, without changing the program, so in simple terms it can be called a datable logic controller (DLC) or datable controller (DC).
[0049] (Drawing Classification Explanation) Before providing a brief description of the drawings, the classification of the figures will be described, as the figures range from Figure 1 to Figure 115 and some figures span multiple drawings. 1 to 3 are basic diagrams of one general embodiment of the present invention. FIG. 4 is a memory tree diagram of one embodiment in accordance with the present invention. 5 to 54 are related drawings for driving two motors in one embodiment of the present invention. The detailed classification is further described below with two spaces inserted. 5 to 6 are basic diagrams for driving two motors in one embodiment according to the present invention. 7 to 13 are data diagrams related to the initial setting in one embodiment of the present invention. 14 to 20 are data diagrams related to each process for operating two motors in one embodiment of the present invention. 21 to 23 are ladder program circuit diagrams for input processing in one general embodiment according to the present invention. 24 to 27 are ladder program circuit diagrams of logic processing in one general embodiment according to the present invention. 28 to 30 are ladder program circuit diagrams of output processing in one general embodiment according to the present invention. 31 to 34 are ladder program circuit diagrams of a general embodiment of the timing process according to the present invention. FIG. 35 is a modified ladder program circuit diagram for driving two motors in one general embodiment according to the present invention. 36 to 47 are modified data diagrams relating to the processes for operating two motors in one embodiment of the present invention. 48 to 54 are ladder program circuit diagrams of a general embodiment of sequential step-by-step operations and processing according to the present invention. 55 to 62 are basic conceptual diagrams of one embodiment of the present invention. 63 to 84 are program flow charts of each process in one embodiment of the present invention. The detailed classification is further described below with two spaces inserted at the beginning. 63 to 66 are program flow charts of an embodiment of the present invention, including the initial setting, differential reset of the timing process, start of each process of the same structure, and differential reset of each of the same structure. 67 to 69 are program flow charts showing the start of execution of the first three processes for each number in one embodiment of the present invention. 70 to 73 are program flow charts relating to interface processing in one embodiment. 74 through 76 are program flow chart diagrams of logical processing relationships according to one embodiment. 77 to 79 are program flow charts relating to sequential step processing in one embodiment. FIG. 80 is a program flow chart diagram of the output process according to one embodiment. 81 to 84 are program flow charts relating to timing processing in one embodiment. 85 to 115 are data setting diagrams for all processes set up as a specific servo press device of one embodiment according to the present invention. The detailed classification is further described below with two spaces inserted at the beginning. 85 and 86 are data setting diagrams for input device data processing and device data calculation processing (input criteria) according to one embodiment. 87 and 88 are data setting diagrams for input processing according to one embodiment. Figures 89 through 100 are data setting diagrams of logical processes in one embodiment. FIG. 101 is a data setting diagram for sequential step work in one embodiment. 102 to 105 are data setting diagrams for sequential step processing in the origin return operation according to one embodiment. 106 and 107 are data setting diagrams for sequential step processing in press work according to one embodiment. 108 to 113 are data setting diagrams for device data calculation processing (output standard) according to one embodiment. 115 and 116 are data setting diagrams for output processing and timing processing in one embodiment. [Brief explanation of the drawings]
[0050] [Figure 1] 1 is a diagram of an electrical control system according to a general embodiment of the present invention; [Figure 2] FIG. 1 is a flowchart illustrating each program of a programmable logic controller (PLC) according to a general embodiment of the present invention, including the processes associated with the programs. [Figure 3] FIG. 2 is a diagram illustrating the relationship between programs in a general embodiment of the present invention. [Figure 4] 1 is a memory tree diagram of one embodiment in accordance with the present invention; [Figure 5] FIG. 1 is a ladder program circuit diagram for driving two motors in one general embodiment according to the present invention. [Figure 6] 1 is a generalized device memory map for driving two motors in one embodiment of the present invention. [Figure 7] FIG. 10 is a diagram of image data displayed on an interface in the initial setting in one embodiment of the present invention; [Figure 8] FIG. 2 is a detailed data diagram of the initial setting of the input process in one embodiment according to the present invention; [Figure 9] FIG. 2 is a detailed data diagram of the initial setting of a logical process in accordance with one embodiment of the present invention; [Figure 10] FIG. 2 is a detailed data diagram of the initial setting of the output process in one embodiment according to the present invention; [Figure 11] FIG. 2 is a detailed data diagram of the initial setting of the timing process in one embodiment according to the present invention; [Figure 12] FIG. 2 is a detailed data diagram of the initial setting of a sequential step work in one embodiment according to the present invention; [Figure 13]FIG. 2 is a detailed data diagram of the initial setting of the sequential stepping process in one embodiment according to the present invention; [Figure 14] FIG. 10 is an image of a general device data diagram displayed on the interface for each process to operate two motors in one embodiment of the present invention. [Figure 15] FIG. 10 is a detailed data diagram of the output processing for driving two motors in one embodiment according to the present invention. [Figure 16] 1 / 2 is a detailed data diagram of the logical processing for operating two motors in one embodiment according to the present invention. [Figure 17] FIG. 2 / 2 is a detailed data diagram of the logical processing for operating two motors in one embodiment according to the present invention. [Figure 18] FIG. 10 is a detailed data diagram of the output processing for driving two motors in one embodiment according to the present invention. [Figure 19] FIG. 1 / 2 is a detailed data diagram of a timing process for operating two motors in one embodiment of the present invention. [Figure 20] FIG. 2 / 2 is a detailed data diagram of a timing process for operating two motors in one embodiment of the present invention. [Figure 21] 1 / 3 is a circuit diagram of a ladder program for input processing according to one embodiment of the present invention. [Figure 22] 2 / 3 is a ladder program circuit diagram for input processing according to one embodiment of the present invention. [Figure 23] 3 / 3 is a ladder program circuit diagram for input processing according to one embodiment of the present invention. [Figure 24] 1 is a 1 / 4 diagram of a ladder program circuit for logic processing according to one embodiment of the present invention; [Figure 25] 2 / 4 is a ladder program circuit diagram of a logic process according to one embodiment of the present invention. [Figure 26] 3A and 3B are circuit diagrams 3 / 4 of a ladder program for logic processing according to one embodiment of the present invention. [Figure 27]4 / 4 is a ladder program circuit diagram of a logic process according to one embodiment of the present invention. [Figure 28] 1 / 3 is a ladder program circuit diagram for output processing in one embodiment according to the present invention. [Figure 29] 2 / 3 is a ladder program circuit diagram for output processing in one embodiment according to the present invention. [Figure 30] 3 / 3 is a ladder program circuit diagram for output processing in one embodiment according to the present invention. [Figure 31] 1 is a 1 / 4 diagram of a ladder program circuit for timing processing according to one embodiment of the present invention; [Figure 32] 2 / 4 is a ladder program circuit diagram of a timing process according to one embodiment of the present invention. [Figure 33] 3A and 3B are circuit diagrams 3 / 4 of a ladder program for timing processing according to one embodiment of the present invention. [Figure 34] 4 / 4 is a ladder program circuit diagram of a timing process according to one embodiment of the present invention. [Figure 35] FIG. 1 is a modified ladder program circuit diagram for driving two motors in a typical embodiment according to the present invention. [Figure 36] 1 / 2 shows image data displayed on the interface for each process with modified specifications for operating two motors in one embodiment of the present invention. [Figure 37] FIG. 2 / 2 shows image data displayed on the interface for each process with modified specifications for operating two motors in one embodiment of the present invention. [Figure 38] 1 / 2 is a detailed data diagram of the logical processing with modified specifications for operating two motors in one embodiment of the present invention. [Figure 39] FIG. 2 / 2 is a detailed data diagram of the logical processing with modified specifications for operating two motors in one embodiment of the present invention. [Figure 40]FIG. 10 is a detailed data diagram of a sequential step operation with modified specifications for operating two motors in one embodiment of the present invention. [Figure 41] FIG. 1 / 2 is a detailed data diagram of motor 1 operation in sequential step processing with modified specifications for operating two motors in one embodiment of the present invention. [Figure 42] FIG. 2 / 2 is a detailed data diagram of motor 1 operation in a sequential step process with modified specifications for operating two motors in one embodiment of the present invention. [Figure 43] FIG. 12 is a detailed data diagram 1 / 2 of the motor 2 operation of the sequential step processing with modified specifications for operating two motors in one embodiment of the present invention. [Figure 44] FIG. 2 / 2 is a detailed data diagram of motor 2 operation in a sequential step process with modified specifications for operating two motors in one embodiment of the present invention. [Figure 45] FIG. 10 is a detailed data diagram of the output processing with modified specifications for operating two motors in one embodiment according to the present invention. [Figure 46] 1 / 2 is a detailed data diagram of a timing process with modified specifications for operating two motors in one embodiment of the present invention. [Figure 47] FIG. 2 / 2 is a detailed data diagram of a timing process with modified specifications for operating two motors in one embodiment of the present invention. [Figure 48] This is a ladder program circuit diagram 1 / 7 of one embodiment of the present invention for sequential step-by-step work and processing. [Figure 49] This is a ladder program circuit diagram 2 / 7 of one embodiment of the present invention for sequential step-by-step work and processing. [Figure 50] This is a ladder program circuit diagram 3 / 7 of one embodiment of the present invention for sequential step-by-step work and processing. [Figure 51] This is a ladder program circuit diagram 4 / 7 of one embodiment of the present invention for sequential step-by-step work and processing. [Figure 52]This is a ladder program circuit diagram 5 / 7 of one embodiment of the present invention for sequential step-by-step work and processing. [Figure 53] 6 / 7 is a ladder program circuit diagram of one embodiment of the present invention for sequential step-by-step operation and processing. [Figure 54] This is a ladder program circuit diagram 7 / 7 of one embodiment of the present invention for sequential step-by-step work and processing. [Figure 55] 1 is a flowchart illustrating each program of a programmable logic controller (PLC) according to an embodiment of the present invention, including processes associated with the programs. [Figure 56] FIG. 2 is a relationship diagram of a main program, a general-purpose device, and a general-purpose device bit in accordance with one embodiment of the present invention; [Figure 57] FIG. 2 is a diagram illustrating the general-purpose device memory layout used by each program in one embodiment of the present invention. [Figure 58] FIG. 2 is a diagram illustrating a general-purpose device memory layout in which general-purpose device memories are rearranged for each process according to an embodiment of the present invention. [Figure 59] This is a diagram showing the relationship between the general-purpose device memory for a certain process and the general-purpose device memory for display in one embodiment of the present invention, when a touch panel (TP) is used and the touch panel (TP) has a function for changing the general-purpose device memory for each process. [Figure 60] FIG. 1 is a system relationship diagram between a programmable logic controller (PLC) and an engineering tool in one embodiment of the present invention, for identifying a programmable logic controller (PLC) that can execute the program and allowing the program to be executed only on that programmable logic controller (PLC). [Figure 61] FIG. 2 is a device data setting diagram illustrating a common initial setting according to one embodiment of the present invention; [Figure 62] FIG. 2 is a device data setting diagram illustrating the initial settings for each program in one embodiment of the present invention. [Figure 63]FIG. 2 is a program flow chart illustrating an initial execution type identification and initial processing start in accordance with one embodiment of the present invention; [Figure 64] FIG. 2 is a program flow chart of one embodiment of the present invention. [Figure 65] FIG. 10 is a program flowchart illustrating the start of scan execution type processes other than interface process, sequential step process, and timing process (each process has the same structure) in one embodiment of the present invention. [Figure 66] FIG. 10 is a program flowchart showing the start of a differentiation reset (OFF) process (each process has the same structure) other than the timing process in one embodiment of the present invention. [Figure 67] FIG. 10 is a program flowchart illustrating the process of starting the execution of processing for each number in the input device data processing according to an embodiment of the present invention; [Figure 68] FIG. 10 is a program flowchart showing the process of starting execution of processing for each number in the device data calculation process according to one embodiment of the present invention (both input and output standards have the same structure); [Figure 69] FIG. 10 is a program flowchart illustrating the start of processing for each number in the input process according to an embodiment of the present invention; [Figure 70] FIG. 10 is a program flow chart illustrating the start of a scan-execution-type interface process in one embodiment of the present invention; [Figure 71] FIG. 10 is a program flowchart illustrating the start of the number insertion process in the interface process according to one embodiment of the present invention; [Figure 72] FIG. 10 is a program flowchart illustrating the interface process and the start of the number deletion process in one embodiment of the present invention; [Figure 73] FIG. 10 is a program flowchart illustrating the start of the element number and size increase process in the interface process according to one embodiment of the present invention; [Figure 74] FIG. 10 is a program flowchart illustrating the start of execution of a logical process for each number in one embodiment of the present invention; [Figure 75] FIG. 10 is a program flow chart illustrating the execution of a general-purpose bit output process for each logical process number in accordance with one embodiment of the present invention; [Figure 76] FIG. 10 is a program flow chart illustrating the execution of a general-purpose bit non-output process for each logical process number in accordance with an embodiment of the present invention; [Figure 77] FIG. 10 is a program flow chart illustrating the start of a scan-execution-type sequential step process according to one embodiment of the present invention; [Figure 78] FIG. 10 is a program flowchart illustrating a process for starting a process for each process number of a currently running task in a sequential step process according to an embodiment of the present invention; [Figure 79] FIG. 10 is a program flowchart illustrating the start of execution of processing for each branch number in sequential step processing according to an embodiment of the present invention; [Figure 80] FIG. 10 is a program flowchart illustrating the process of starting the execution of the process for each number in the output process according to an embodiment of the present invention; [Figure 81] FIG. 4 is a program flowchart illustrating the start of a periodic timing process according to an embodiment of the present invention; [Figure 82] FIG. 10 is a program flowchart illustrating the start of execution of a process for each number in a timekeeping process according to an embodiment of the present invention; [Figure 83] FIG. 10 is a program flowchart illustrating the start of the flashing process for each number in the timing process according to an embodiment of the present invention; [Figure 84] FIG. 10 is a program flowchart illustrating the start of the execution of the ON delay process for each number in the timing process according to one embodiment of the present invention; [Figure 85] FIG. 10 is a diagram showing an image of a general device data setting screen displayed on an interface of an input device data processing, in which general device data is specifically set for a servo press device according to an embodiment of the present invention; [Figure 86]FIG. 10 is a diagram showing an image of general device data setting displayed on the interface of device data calculation processing (input criteria) in which general device data is specifically set for a servo press device according to one embodiment of the present invention. [Figure 87] FIG. 10 is an image of a general device data setting diagram displayed on the interface, numbered 1 to 32, of an input process in which general device data is specifically set for a servo press device according to one embodiment of the present invention. [Figure 88] FIG. 10 shows an image of general device data setting displayed on the interface, numbered from 33 to 50, of the input process in which general device data is specifically set for a servo press device according to one embodiment of the present invention. [Figure 89] FIG. 1 shows an image of a general-purpose device data setting diagram displayed on an interface for the first element group of setting elements, numbered 1 to 32, of logical processes in which general-purpose device data is specifically set for a servo press apparatus according to one embodiment of the present invention. [Figure 90] This is an image of a general-purpose device data setting diagram displayed on the interface for the logical processing, numbered 1 to 32, which is the second element group of setting elements, in which general-purpose device data is specifically set for a servo press apparatus according to one embodiment of the present invention. [Figure 91] This is an image of a general-purpose device data setting diagram displayed on the interface for the logical processing, numbered 1 to 32, which is the third element in the element group of setting elements, in which general-purpose device data is specifically set for a servo press apparatus according to one embodiment of the present invention. [Figure 92] This is an image of the general-purpose device data setting diagram displayed on the interface for the logical processing numbered 33 to 64, which is the first element in the element group of setting elements, in which general-purpose device data is specifically set for a servo press apparatus in one embodiment of the present invention. [Figure 93]This is an image of the general-purpose device data setting diagram displayed on the interface for the logical processing, numbered 33 to 64, which is the second element group of setting elements, in which general-purpose device data is specifically set for a servo press apparatus according to one embodiment of the present invention. [Figure 94] This is an image of the general-purpose device data setting diagram displayed on the interface for the logical processing, numbered 33 to 64, which is the third element group of setting elements, in which general-purpose device data is specifically set for a servo press apparatus according to one embodiment of the present invention. [Figure 95] This is an image of the general-purpose device data setting diagram displayed on the interface for the logical processing numbered 65 to 96, which is the first element in the element group of setting elements, in which general-purpose device data is specifically set for a servo press apparatus in one embodiment of the present invention. [Figure 96] This is an image of the general-purpose device data setting diagram displayed on the interface for the logical processing numbered 65 to 96, which is the second element group of setting elements, in which general-purpose device data is specifically set for a servo press apparatus according to one embodiment of the present invention. [Figure 97] This is an image of the general-purpose device data setting diagram displayed on the interface for the logical processing, numbered 65 to 96, which is the third element group of setting elements, in which general-purpose device data is specifically set for a servo press apparatus according to one embodiment of the present invention. [Figure 98] This is an image of the general-purpose device data setting diagram displayed on the interface for the logical processing numbered 97 to 111, which is the first element in the element group of setting elements, in which general-purpose device data is specifically set for a servo press apparatus in one embodiment of the present invention. [Figure 99] This is an image of the general-purpose device data setting diagram displayed on the interface for the logical processing, numbered 97 to 111, which is the second element group of setting elements, in which general-purpose device data is specifically set for a servo press apparatus according to one embodiment of the present invention. [Figure 100]This is an image of the general-purpose device data setting diagram displayed on the interface for the logical processing, numbered 97 to 111, which is the third element group of setting elements, in which general-purpose device data is specifically set for a servo press apparatus according to one embodiment of the present invention. [Figure 101] FIG. 10 is a diagram showing an image of general device data setting displayed on an interface for a sequential step operation in which general device data is specifically set for a servo press device according to an embodiment of the present invention; [Figure 102] This is an image of a general-purpose device data setting diagram displayed on the interface for the first element group of setting elements for sequential step processing in the origin return operation, in which the operation and general-purpose device data are specifically set for a servo press device in one embodiment of the present invention. [Figure 103] This is an image of a general-purpose device data setting diagram displayed on the interface for the second element group of setting elements for sequential step processing in the origin return operation, in which the operation and general-purpose device data are specifically set for a servo press device in one embodiment of the present invention. [Figure 104] This is an image of a general-purpose device data setting diagram displayed on the interface for the third element group of setting elements for sequential step processing in the origin return operation, in which the operation and general-purpose device data are specifically set for a servo press device in one embodiment of the present invention. [Figure 105] This is an image of a general-purpose device data setting diagram displayed on the interface for the fourth element group of setting elements for sequential step processing in the origin return operation, in which the operation and general-purpose device data are specifically set for a servo press device in one embodiment of the present invention. [Figure 106] This is an image of a general-purpose device data setting diagram displayed on the interface for the first element group of setting elements for sequential step processing in press work, in which work and general-purpose device data are specifically set for a servo press device in one embodiment of the present invention. [Figure 107]This is an image of a general-purpose device data setting diagram displayed on the interface, which is the second element in the set element group for sequential step processing in press work, in which work and general-purpose device data are specifically set for a servo press device in one embodiment of the present invention. [Figure 108] This is an image of the general-purpose device data setting diagram displayed on the interface for the first element group of setting elements, numbered 1 to 32, for the device data calculation processing (output standard) in which general-purpose device data is specifically set for a servo press apparatus according to one embodiment of the present invention. [Figure 109] This is an image of the general-purpose device data setting diagram displayed on the interface for the device data calculation processing (output standard) in which general-purpose device data is specifically set for a servo press apparatus according to one embodiment of the present invention, with the numbers from 1 to 32 being the second element in the set elements group. [Figure 110] This is an image of the general-purpose device data setting diagram displayed on the interface for the first element group of setting elements, numbered 33 to 64, for the device data calculation processing (output standard) in which general-purpose device data is specifically set for a servo press apparatus according to one embodiment of the present invention. [Figure 111] This is an image of the general-purpose device data setting diagram displayed on the interface for the device data calculation processing (output standard) in which general-purpose device data is specifically set for a servo press apparatus according to one embodiment of the present invention, which is the second element group of setting elements numbered 33 to 64. [Figure 112] This is an image of the general-purpose device data setting diagram displayed on the interface for the first element group of setting elements numbered 65 to 87 in the device data calculation processing (output standard) for a servo press apparatus according to one embodiment of the present invention, in which general-purpose device data is specifically set. [Figure 113]This is an image of the general-purpose device data setting diagram displayed on the interface for the second element group of setting elements, numbered 65 to 87, for the device data calculation processing (output standard) in which general-purpose device data is specifically set for a servo press apparatus according to one embodiment of the present invention. [Figure 114] FIG. 10 is a device data setting diagram of an output process in which device data is specifically set for a servo press device according to one embodiment of the present invention; [Figure 115] FIG. 10 is a device data setting diagram of a timing process in which device data is specifically set for a servo press device according to one embodiment of the present invention; DETAILED DESCRIPTION OF THE INVENTION
[0051] (Summary supplement 1) Typically, a program is created based on an algorithm, and then executed. If the execution result is negative, the program is corrected; if the execution result is positive, the program is no longer corrected, and finally, a program that continues to execute is completed. This invention realizes an algorithm by starting with an already created program, then setting data based on the algorithm into the program, completing it, executing it, and if the execution result is negative, changing the data; if the execution result is positive, changing the data is no longer necessary, and finally, completing the data that continues to execute. There are various composite algorithms, such as parallel algorithms, sequential algorithms, parallel and sequential algorithms, and sequential and parallel algorithms, and a data structure that can accommodate all of these was required, which is realized by the first invention of this invention. The first aspect of the present invention is a data system in which data consists of rows and columns. A program is executed based on one row of data. After the last row is executed, the program execution loops back to the beginning and repeats. To allow data with different execution purposes to be mixed row by row, the first address of the next line to be executed and the first address of the previously executed line (to delete the next line) are added to the data, enabling data with the same execution purpose to be searched and executed in the order in which they were arranged in rows. Furthermore, even when the number of data items in a row is variable or when repeated processing is performed within a row, this is achieved by adding the first address of the next line to be executed and the first address of the previously executed line (to delete the next line). However, when making a change, if the number of data items in the row decreases, a simple change is sufficient. However, if the number of data items increases, new space is required, and the first address of the previous line that specifies the new row must also be rewritten. Address rewriting can be performed automatically by a program or manually. Furthermore, unused, wasted space will inevitably be generated, but this can be dealt with by adding a memory cleaning program, etc. Based on my many years of experience building program software for programmable logic controllers (PLCs), as long as there is no need to rewrite it in a complicated manner, there should not be any significant waste.This allows us to extend any of the multiple processes on a row-by-row basis, which means we have gained new extensibility. In other words, this data structure is compatible with all algorithms.
[0052] (Summary supplement 2) In addition, when creating a program, the initial setting program is typically written from the beginning of the program area, followed by the algorithm-based processing program, and then, excluding subroutine processing, the output processing program is written last, and the program is declared complete. While the algorithm-based processing program is realized in the second aspect of the present invention, it is generally achieved by dividing the program into work items (e.g., manual, automatic, return to origin, etc.), and creating bits and devices within the program while giving connections and meaning to each process (e.g., step). In other words, it is comparable to the structured sequential step processing of the second aspect of the present invention. The reason for not generally structuring is that it is difficult to recognize the situation at a glance, making debugging difficult, and programs are not frequently changed. The second aspect of the present invention further includes input device data processing, input processing, logic processing, device data calculation processing, output processing, and timing processing, but these are generally not structured, and are only partially structured, with the results directly written in the required positions without converting them into unified bits. Because the results are not replaced with uniform bits, it may seem like there is no waste, but because it is not a simple replacement, it is also the biggest factor that makes programs complicated. For programmers, it is an important element that allows them to assign their own meaning to addresses, such as odd or even numbers, multiples of a sequence, or multiples of 10, and to make them play a supplementary role to restricted comments, but since the numbers themselves normally have no meaning, when handling them in an interface, displaying unrestricted comments on the numbers can help to better understand whether they are in line with the algorithm.
[0053] (Summary supplement 3) In recent systems using programmable logic controllers (PLCs), touch panels (TPs) or personal computers (PCs) (including engineering tools) are used as interfaces for humans to interact with the equipment, allowing them to set various data and change the actual addresses of the programmable logic controllers (PLCs). Typically, programmable logic controllers (PLCs), touch panels (TPs), or personal computers (PCs) (including engineering tools) are designed to be dedicated devices, eliminating the need for display memory. However, as in the present invention, which supports various algorithms and comes in various sizes for touch panels (TPs) and personal computers (PCs), the third aspect of the present invention is realized by using a memory buffer function and by modifying only a portion of a row to convert the row into complete processing data. Furthermore, providing a basic screen corresponding to the screen size for touch panels (TPs) together with the program of the present invention, or providing the program itself for personal computers (PCs) together with the program of the present invention, would further promote its widespread use.
[0054] (Summary supplement 4) Once you have this all-algorithm compatible program, there is no longer any need to create a new program. Therefore, if you copy it and transplant it into a different CPU, due to the nature of the factory, it is not possible to tell whether the CPU is running on the copy, so the fourth aspect of this invention is a device that prevents it from starting from the program side. This requires that the programmable logic controller (PLC) system has at least a general password system built in that prevents the program from being changed, and this will ensure that the fourth aspect of this invention will function reliably.
[0055] Hereinafter, an embodiment of the present invention will be described with reference to the accompanying drawings. (preconception) FIG. 1 is a diagram of a general electrical control system according to one embodiment. It can be said that all facilities and equipment, with the exception of those that use traditional wind or water power, are electrically controlled. Among these, control using rewritable computers is widespread. These computers include microcomputers, personal computers (PCs), and programmable logic controllers (PLCs), and their unique features are utilized to control equipment. However, with the rapid advances in technology in recent years, factors such as the emergence of optical fiber, faster CPUs, microprocessors (MPUs), and graphics processing units (GPUs), exponential increases in memory capacity, miniaturization of electronic components, multi-layering of circuit boards, and fine-machining technology for line widths are all contributing to the flattening of these features, making the boundaries between them increasingly blurred. Based on the above, Figure 1 shows a typical electrical control equipment diagram for one embodiment. The areas enclosed by dashed lines represent equipment or devices. A represents equipment or devices from Company A, B represents equipment or devices from Company B, C represents equipment or devices from Company C, D represents equipment or devices from Company D, and E represents equipment or devices from Company E. Each company is connected by a network indicated by a thick line (5). In large factories, the core network uses optical fiber, supporting high-speed, high-capacity communications. However, some networks are closed within the equipment or devices, and communication cables are not optical fiber but still use coaxial cables or multi-core cables. 1 represents a programmable logic controller (PLC), 2 represents a touch panel (TP), 3 represents a personal computer (PC), and 4 represents an engineering tool. Although it would be easier to manage the programmable logic controller (PLC) (1) and the touch panel (TP) (2) if they were made by the same manufacturer and model, this is not often the case. In addition, the personal computer (PC) in 3, the engineering tool in 4, and the touch panel (TP) in 2 are also interfaces (Man Interfaces).
[0056] (preconception) FIG. 2 is a flowchart illustrating each program of a programmable logic controller (PLC) and the processes associated with the programs in one general embodiment according to the present invention. There are not many differences between the programmable logic controllers (PLCs) of each company, and they have almost the same specifications and operations. The flowcharts, including each program and the processes associated with each program, are also almost the same. When the power is turned from OFF to ON or from STOP to RUN at 20 in Figure 2, the programmable logic controller (PLC) starts up. First, the program check process at 21 is performed. The I / O refresh 22 is performed, and the process moves to END process 1 23. Then, the initial execution type programs 25 created by the user are executed in the specified order, and the process moves to END process 2 24. Next, the I / O refresh 22 is performed, the process moves to END process 1 23, the scan execution type programs 26 created by the user are executed in the specified order, and the process moves to END process 2 24, and the process returns to before the I / O refresh 22, and is repeated until the power is changed from ON to OFF or from RUN to STOP. The reason why the END processing is divided into END processing 1 (23) and END processing 2 (24) is that some commands written in the program must be processed before the program is written. If there are no such commands, END processing 2 (24) alone is sufficient. The fixed-cycle execution type programs group 27 and the standby type programs group 28 are independent programs that are not executed sequentially. Fixed-cycle execution type programs are programs that are executed at regular intervals. Standby programs are executed each time they are called from a program. Note that on some models, there are also event execution type programs that are similar to standby programs and have a range of trigger elements. The dotted lines connecting them indicate that interrupts are inserted or calls are made within the normal repetition.
[0057] (preconception) FIG. 3 is a diagram showing the relationship between programs in a programmable logic controller (PLC) according to one general embodiment of the present invention. In Figure 3, the initial execution type programs (30) and the scan execution type programs (31) are separated by [END / FEND], but because they are continuous, they can be considered a single program. Some programmable logic controller (PLC) models have only one program, rather than being differentiated into the initial execution type program (30), scan execution type program (31), fixed-period execution type program (32), and standby program (33). Early programmable logic controllers (PLCs) only had a few types of fixed-period execution type programs, which were handled by fixed-period interrupt pointers. Specifically, an interrupt pointer was created, the circuitry of that pointer was activated periodically, and the [IRET] (interrupt return command) was used to return to normal processing. It is also possible to use a standby program as a subroutine with the pointer as the destination. Furthermore, when the power is changed from OFF to ON or from STOP to RUN, an initial execution type program that is executed only the first time can perform the same function by simply using a system flag that is turned ON for only the first scan, a conditional jump combined with a system flag that is turned OFF for only the first scan, and a pointer that is the destination of the unconditional jump. So why? The reason for grouping programs is to reuse them as assets, increase their reliability, reduce design man-hours, and make them easier for program creators and maintainers to understand. In this invention, programs are classified by processing, but this does not mean much to anyone who uses the programs other than the program creators, maintainers, and evaluators.
[0058] FIG. 4 is a memory tree diagram of one embodiment in accordance with the present invention. This is a memory tree diagram that is subdivided from left to right. The name of the memory changes depending on the perspective from which you view it. Figure 4 shows the memory names as seen from the programmable logic controller (PLC) in which the program of this invention is embedded. Memory is divided into memory within the PLC and memory outside the PLC (external memory). Meanwhile, memory within the PLC is divided into memory within the CPU and memory outside the CPU (each unit's buffer memory), both of which are divided into ROM (Read Only Memory) and RAM (Random Access Memory). Memory outside the CPU varies depending on the specifications of each unit, but both ROM and RAM serve as buffer memory for each unit. The ROM within the CPU is divided into program memory, which stores programs, and data memory. The RAM within the CPU is divided into seven sections: program cache memory, device memory, label memory, function memory, refresh memory, CPU buffer memory, and signal flow memory. This is a typical configuration. In Figure 4, the device memory is divided into 12 sections (device file memory, device link-related memory, device system-related memory, device timer / counter memory, device general-purpose memory, device latch bit memory, device link-related bit memory, device system-related bit memory, device timer / counter bit memory, device input bit memory, device output bit memory, and device general-purpose bit memory), but this may vary depending on each company's specifications. In addition, a part of the general-purpose device memory is allocated to the processing data, migration data, repetition data, and number data of this invention. In addition, the memory that can be addressed by the program is generally the buffer memory of each unit, the CPU buffer memory, and the device memory, and the other memory is memory that cannot be accessed from the program side.
[0059] FIG. 5 is a ladder program circuit diagram for driving two motors in one general embodiment according to the present invention. The input bits and output bits are the device input bit memory and device output bit memory in Figure 4, and their addresses are determined by hardware. The system bits are device system-related bit memories that are assigned by the manufacturer. The timer bits are device timer / counter bit memories, and the user can freely select their addresses. The device timer / counter memory corresponds to the device timer / counter bit memory, and stores the setting values. This program, designed to help understand the programmable logic controller (PLC) program itself and the purpose of this invention, is for operating two star-delta starting motors. Star-delta starting involves slowly starting the motors using a star connection, since large-capacity three-phase motors require a large starting current. After a certain period of time, the motors are switched to a low-current delta connection. Because two motors cannot be run simultaneously in star connection, the start switch is disabled while one motor is in star connection, preventing the other motor from star starting. Each motor also has a start indicator light that flashes every 0.5 seconds when running in star connection and lights up when the motor switches to delta connection. For small-scale control like the one above, it is common not to use a programmable logic controller (PLC) that can be configured with input / output units one after another, but to create a relay sequence circuit consisting of three relays and two timer relays for one motor, or to use a small programmable logic controller (PLC) with integrated input / output circuits.However, this configuration is used because it is assumed that another device will be added later and a general programmable logic controller (PLC) will be used to control that device. The ladder program circuit diagram in Figure 5 consists of only A contacts, B contacts, and coils, with the signal from the input unit being the input bit, the coil output by the output unit being the output bit, the timer built into the programmable logic controller (PLC) being the timer bit, and the one-second clock built into the programmable logic controller (PLC) being the one-second clock system bit. The PB1 input bit is the start switch for motor 1, the PB2 input bit is the stop switch for motor 1, the TH1 input bit is the thermal trip signal for motor 1, the PB3 input bit is the start switch for motor 2, the PB4 input bit is the stop switch for motor 2, the TH2 input bit is the thermal trip signal for motor 2, the EMS input bit is the emergency stop switch, the MC1 output bit coil is the coil that drives the star start for motor 1, the MC2 output bit coil is the coil that drives the delta start for motor 1, the PL1 output bit drives the starting indicator lamp for motor 1, the MC3 output bit coil is the coil that drives the star start for motor 2, the MC4 output bit coil is the coil that drives the delta start for motor 2, and the PL2 output bit drives the starting indicator lamp for motor 2.
[0060] Each block will be described in detail below. The MC1 output bit coil 50 becomes self-holding when the start switch is pressed, and continues to be self-held and activated when the stop switch is pressed, a thermal trip signal is input, an emergency stop is pressed, the switching time is being measured, or motor 2 is not being started. When the TM1 timer bit coil 51 continues to be driven by the star start, the TM1 timer bit coil starts measuring, and when the set time of 100 seconds is reached, the self-holding function is activated, and the self-holding function continues and the coil is activated unless the stop switch is pressed, a thermal trip signal is input, or the emergency stop switch is pressed. The MC1 output bit coil 52 is activated by delta activation in conjunction with the activation of the TM1 timer. The PL1 output bit coil (53) is repeatedly activated and deactivated every second during star activation, and remains activated during delta activation. The MC3 output bit coil 54 becomes self-holding when the start switch is pressed, and continues to be self-held and activated when the stop switch is pressed, a thermal trip signal is input, an emergency stop is pressed, the switching time is being measured, or motor 1 is not being started. When the TM2 timer coil 55 continues to operate in star start mode, the TM2 timer starts measuring, and when it reaches the set time of 150 seconds, it activates self-holding. If the stop switch is not pressed, a thermal trip signal is input, or the emergency stop switch is not pressed, the self-holding will continue and the timer will be activated. The MC4 output bit coil 56 is activated by delta activation in accordance with the activation of the TM2 timer bit coil. The PL2 output bit coil of 57 is repeatedly activated and deactivated every second during star activation, and remains activated during delta activation. The structural command END in 58 ends the program file.
[0061] In order to completely match the ladder program circuit diagram in Figure 5 for operating two motors using this invention, the data is required, and Figures 6 to 20 show the general-purpose device memory map, image data diagram of the initial settings, detailed data diagrams of each initial setting, image data diagrams of each process, and detailed data diagrams of each process for operating two motors. Since it can handle all algorithms, it is not limited to only operating two motors, but the ladder program circuit diagrams for input processing, logic processing, output processing, and timing processing used to operate two motors are shown in Figures 21 to 34.
[0062] FIG. 6 is a generic device memory map for driving two motors in one embodiment according to the present invention. The device general-purpose memory and device general-purpose bit memory shown in Figure 4 are used, and the device general-purpose memory areas are as follows: the initial screen processing settings are from 1800 to 1819, the input device data processing settings are from 1820 to 1839, the device data calculation processing settings are from 1840 to 1859, the input processing settings are from 1860 to 1879, the logic processing settings are from 1880 to 1899, the sequential stepping operation processing settings are from 1900 to 1939, the output processing settings are from 1940 to 1959, the timing processing settings are from 1960 to 1999, the program data area starts from 2000, and the device general-purpose bit memory areas are for general-purpose bits generated by the program, starting from 0. Note that the numerical values are addresses, are provisional, and are assumed to be set arbitrarily.
[0063] FIG. 7 is a diagram of image data displayed on the interface in the default setting in one embodiment of the present invention. Since touch panels (TP), engineering tools, and personal computers (PC) come in a variety of sizes, the interface displays an image data diagram that shows the initial settings for input processing, logic processing, output processing, and timing processing required to operate the two motors, as well as the modified sequential step work and the initial settings for sequential step processing. The numerical values are variables that can be changed, but the contents are mostly fixed values. 70 is initial setting (input processing) data, 71 is initial setting (logical processing) data, 72 is initial setting (output processing) data, 73 is initial setting (timing processing) data, 74 is initial setting (sequential step work) data, and 75 is initial setting (sequential step processing) data.
[0064] FIG. 8 is a detailed data diagram of the initial setting of the input processing in one embodiment according to the present invention. On the left side of the double vertical line, from top to bottom, the items TP / PC display, value, address, and memory type are all grouped together, and similarly below the double horizontal line, the items TP / PC display, value, address, and memory type are also listed. In Figure 7, the 70 initial setting (input processing) data shows the first input processing count to the right of the double vertical line. This count is not included in the 70 initial setting (input processing) data in Figure 7, but is listed at the beginning of the 140 input processing data in Figure 14. After the change, it is listed at the beginning of the 360 input processing data in Figure 36. The data below the double horizontal line is for each item, assigned in order starting from address 1860 in Figure 6. The second item to the right of the double vertical line does not have a TP / PC indication because it is automatically assigned by the program. Note that the memory types are listed as external, processing, and transfer. External refers to memory outside the PLC as shown in Figure 4, processing refers to the processing data (memory) in the general-purpose device memory as shown in Figure 4, and transfer refers to the transfer data (memory) in the general-purpose device memory as shown in Figure 4. Note that the first interval refers to the device selection size in Figure 14, 140, and the device selection size in Figure 15. The second and subsequent items in each figure correspond sequentially.
[0065] FIG. 9 is a detailed data diagram of the initialization of the logical process in one embodiment according to the present invention. On the left side of the double vertical line, from top to bottom, the items TP / PC display, value, address, and memory type are all grouped together, and similarly below the double horizontal line, the items TP / PC display, value, address, and memory type are also listed. In Figure 7, the first item to the right of the vertical double line, the number of logical processes, is not included in the 71 initial setting (logical processing) data in Figure 7. Instead, it is listed at the beginning of the 141 logical processing data in Figure 14. After the change, it is listed at the beginning of the 361 logical processing data in Figure 36. The data below the horizontal double line is for each item, assigned in order starting from address 1880 in Figure 6. The second item to the right of the vertical double line does not have a TP / PC indication because it is automatically assigned by the program. Note that the memory types are external, processing, transition, and repeat. External refers to memory outside the PLC as shown in Figure 4, processing refers to the processing data (memory) of the device general-purpose memory as shown in Figure 4, transition refers to the transition data (memory) of the device general-purpose memory as shown in Figure 4, and repeat data (memory) of the device general-purpose memory as shown in Figure 4. Note that the first interval refers to the size of the general-purpose bit address in Figure 14, 141, and the size of the general-purpose bit address in Figure 16. The second and subsequent figures in each diagram are also addressed in order.
[0066] FIG. 10 is a detailed data diagram of the initial setting of the output process in one embodiment according to the present invention. On the left side of the double vertical line, from top to bottom, the items TP / PC display, value, address, and memory type are all grouped together, and similarly below the double horizontal line, the items TP / PC display, value, address, and memory type are also listed. In Figure 7, the first item to the right of the double vertical line (72 Initial Setting (Output Processing) Data) is the output processing count, which is not included in the 72 Initial Setting (Output Processing) Data in Figure 7. Instead, it is listed at the beginning of the 142 Output Processing Data in Figure 14, and after the change, it is listed at the beginning of the 371 Output Processing Data in Figure 37. The data below the double horizontal line is for each item, assigned in order starting from address 1940 in Figure 6. The second item to the right of the double vertical line does not have a TP / PC indication because it is automatically assigned by the program. Note that the memory types are external, processing, and transfer. External refers to memory outside the PLC as shown in Figure 4, processing refers to the processing data (memory) in the device general-purpose memory as shown in Figure 4, and transfer refers to the transfer data (memory) in the device general-purpose memory as shown in Figure 4. Note that the first interval refers to the size of the ON bit address in 142 in Figure 14 and the size of the ON bit address in Figure 18. The second and subsequent items in each figure correspond sequentially.
[0067] FIG. 11 is a detailed data diagram of the initial setting of the timing process in one embodiment of the present invention. On the left side of the double vertical line, from top to bottom, the items TP / PC display, value, address, and memory type are all grouped together, and similarly below the double horizontal line, the items TP / PC display, value, address, and memory type are also listed. In Figure 7, the first item to the right of the double vertical line (73 Initial Setting (Timekeeping Processing) Data) is the number of times the clock processing is performed. This is not included in the 73 Initial Setting (Timekeeping Processing) Data in Figure 7, but is listed at the beginning of the 143 Clock Processing Data in Figure 14. After the change, it is listed at the beginning of the 372 Clock Processing Data in Figure 37. The data below the double horizontal line is for each item, assigned in order starting from address 1960 in Figure 6. The second item to the right of the double vertical line does not have a TP / PC indication because it is automatically assigned by the program. Note that the memory types are external, processing, and transition. External refers to memory outside the PLC as shown in Figure 4, processing refers to the processing data (memory) in the device general-purpose memory as shown in Figure 4, and transition refers to the transition data (memory) in the device general-purpose memory as shown in Figure 4. Note that the first interval refers to the control selection size in Figure 14, 143, and the control selection size in Figure 19. The second and subsequent items in each figure correspond sequentially.
[0068] FIG. 12 is a detailed data diagram of the initial setting of a sequential step work in one embodiment according to the present invention. On the left side of the double vertical line, from top to bottom, the items TP / PC display, value, address, and memory type are all grouped together, and similarly below the double horizontal line, the items TP / PC display, value, address, and memory type are also listed. In Figure 7, the 74 Initial Setting (Sequential Stepping) Data shows the sequential stepping task count, but this count is not included in the 74 Initial Setting (Sequential Stepping) Data. It is listed at the beginning of the 362 Sequential Stepping Task Data in Figure 36. The data for each item is below the horizontal double line, and is assigned sequentially starting from address 1900 in Figure 6. The second item to the right of the vertical double line does not have a TP / PC indication because it is automatically assigned by the program. The memory types listed are external, processing, and transfer. External refers to memory outside the PLC as shown in Figure 4, processing refers to the processing data (memory) in the device general-purpose memory as shown in Figure 4, and transfer refers to the transfer data (memory) in the device general-purpose memory as shown in Figure 4. The first interval refers to the size of the processing count in 362 in Figure 36 and the size of the processing count in Figure 40.
[0069] FIG. 13 is a detailed data diagram of the initial setting of the sequential stepping process in one embodiment according to the present invention. On the left side of the double vertical line, from top to bottom, the items TP / PC display, value, address, and memory type are all grouped together, and similarly below the double horizontal line, the items TP / PC display, value, address, and memory type are also listed. In Figure 7, this is the 75 initial setting (sequential step processing) data, but the first item to the right of the double vertical line, the number of sequential step operations, is not included in the 74 initial setting (sequential step processing) data in Figure 7, but is an item in each row of 362 sequential step processing in Figure 36, and is written either at the beginning of 363 sequential step processing data for motor 1 operation in Figure 36, or at the beginning of 370 sequential step processing data for motor 2 operation in Figure 37. Therefore, the value is arbitrary. The data for each item is below the double horizontal line, and is assigned in order from address 1911 listed in Figure 6. The second item to the right of the double vertical line does not have a TP / PC display because it is automatically assigned by the program. The memory types are shown as external, processing, transition, and repeat, but external refers to memory outside the PLC shown in Figure 4, processing refers to the processing data (memory) of the device general-purpose memory shown in Figure 4, transition refers to the transition data (memory) of the device general-purpose memory shown in Figure 4, and repeat refers to the repeat data (memory) of the device general-purpose memory shown in Figure 4. Note that the first interval refers to the size of the absolute condition bit address in Figures 36, 363 and 37, 370, and the size of the absolute condition bit address in Figures 41 and 43. The second and subsequent intervals in each figure also correspond sequentially.
[0070] FIG. 14 is an image generic device data diagram displayed on the interface for each process to operate two motors in one embodiment of the present invention. Touch panels (TP), engineering tools, and personal computers (PC) come in a variety of sizes, so the input, logic, output, and timing processes required to operate the two motors are displayed as image data diagrams on the interface. The values are variables and can be changed. 140 is input process data, 141 is logic process data, 142 is output process data, and 143 is timing process data. This device data was created in a programmable logic controller (PLC) in which the program of this invention is written, in order to completely match the ladder program circuit diagram for operating two motors in Figure 5. However, while the contacts in Figure 5 are configured as input / output devices, these have all been replaced with general-purpose bits to match. Normally, to realize an algorithm, a program like the one shown in Figure 5 is written into a programmable logic controller (PLC) to implement it, but in this invention, instead of creating a program to match the algorithm, device data is created to accommodate changing algorithms. To correspond to the ladder program circuit diagram for operating two motors in Figure 5, an equivalent circuit can be created by setting data for input processing, logic processing, output processing, and timing processing. Since device names vary from manufacturer to manufacturer, the device data in Figure 5 uses a programmable logic controller (PLC) manufactured by Mitsubishi Electric Corporation. Here, to make it identical to the ladder program in Figure 5, the input bit is set to X, the system bit to SM, and the output bit to Y.
[0071] FIG. 14 will be described in detail below with reference to FIG. The purpose of creating the input processing data in 140 is simply to define the input processing, which replaces various device bits with general-purpose bits on a one-to-one basis and outputs them. Figure 5 shows seven input bits and one system bit, but since only general-purpose bits can be used in other processing, a system bit that is always ON is added, making a total of nine. Here, the general-purpose bits replaced and output in the input processing range from 0 to 8 (in Mitsubishi Electric's programmable logic controller (PLC) the general-purpose device bit is M), but the numbers are meaningless and can be any value as long as they do not overlap. This is because the general-purpose device memory map in Figure 6 starts from 0. The order of the numbers indicates the order of creation, which also does not have any significant meaning. The intention of creating the logical processing data 141 is to output a general-purpose bit by activating or deactivating multiple consecutive logical ANDs or consecutive logical ORs only, and this is simply a definition. Specifically, in the circuit block of the MC1 output bit coil 50 in Figure 5, this circuit block can be divided into a part where the start switch (contact A) and the MC1 start coil contact (contact A) are continuously configured with a logical AND, a part where the stop switch (contact B), thermal trip signal (contact B), and emergency stop switch (contact B) are continuously configured with a logical OR, and a part where the motor 1 star-delta switching time coil contact (contact B) and the MC3 start coil contact (contact B) are continuously configured with a logical OR. These divided parts are further continuously configured with a logical OR, and the output of this general-purpose bit becomes the MC1 start coil. In this logical processing data, it is defined by No. 1 to 4, and the general-purpose bits to be output are 9 to 12 (in the programmable logic controller (PLC) manufactured by Mitsubishi Electric Corporation, the device is M), but since it is a group of blocks, regardless of this order, 9 to 12 are meaningless and can be any value as long as they do not overlap. Note that No. 1 to 4 of this logical processing data make up 50 in Figure 5, No. 5 and 6 make up 51 in Figure 5, No. 7 make up 52 in Figure 5, No. 8 make up 53 in Figure 5, No. 9 to 12 make up 54 in Figure 5, No. 13 and 14 make up 55 in Figure 5, No. 15 make up 56 in Figure 5, and No. 16 make up 57 in Figure 5. The intention behind creating the output processing data 142 is to simply define the output processing, which replaces general-purpose bits with bits for various devices on a one-to-one basis. It corresponds to the MC1 output bit coil 50, the MC2 output bit coil 52, the PL1 output bit coil 53, the MC3 output bit coil 54, the MC4 output bit coil 56, and the PL2 output bit coil 57 in Figure 5. The order is meaningless. The purpose of creating the timing processing data 143 is to delay a general-purpose bit and output it as another general-purpose bit, or to blink and output it as another general-purpose bit, so this is simply a definition of that. In Figure 5, this corresponds to the TM1 timer coil 51 with a setting of 100 seconds and the TM1 timer coil 55 with a setting of 150 seconds. Here, the general-purpose bits replaced and output by the timing processing are 25 and 26 (in the programmable logic controller (PLC) manufactured by Mitsubishi Electric Corporation, the device is M), but the numbers are meaningless and can be any value as long as they do not overlap. The order of the No.s is the order of creation, and this also does not have any significant meaning. However, since only two bits are used here, the order is simply reversed.
[0072] FIG. 15 is a detailed data diagram of the output processing for driving two motors in one embodiment according to the present invention. The left side of the double vertical lines is a group of TP / PC display, value, address, and memory type, sandwiched between double horizontal lines, and consists of five groups, excluding omitted sections. The top group has two items to the right of the double vertical lines: the number of input processes and their numerical values. The remaining four groups have 10 items to the right of the double vertical lines: No., blank, name, blank, blank, device selection, real address (10 / Hex), logic, general-purpose bit address (10 / Hex), and differentiation. Because the address structure is omitted, and to make it easier to understand, a table showing the start address and creation order for each of the five groups is attached below them, with each row containing four items: No., start address, number of words, and creation order. To explain in detail, the input processing data for No. 1 starts at address 2000, has 15 words, and is created first. The reason the start address is 2000 is because the program data area in Figure 6 starts at 2000 and was created first. The number of words varies depending on the name, and since a one-second clock requires six words, it is 15 words. The next input processing data, No. 2, created next, starts at address 2015, has 13 words, and is created second. The omitted data for No. 3 through No. 9 were created in the same way. This is the same as the input processing data 140 in Figure 15 and Figure 14. However, in Figure 15, No. 3 to No. 8 are omitted, and the items are simply listed with three spaces added. The TP / PC indication is not present because they are automatically assigned by the program. Note that the memory types shown are external, processing, number, and transfer, but external refers to memory outside the PLC as shown in Figure 4, processing refers to the processing data (memory) of the device general-purpose memory as shown in Figure 4, number refers to the number data (memory) of the device general-purpose memory as shown in Figure 4, and transfer refers to the transfer data (memory) of the device general-purpose memory as shown in Figure 4.
[0073] FIG. 16 is a detailed data diagram 1 / 2 of the logical processing for operating two motors in one embodiment according to the present invention. FIG. 17 is a detailed data diagram 2 / 2 of the logic process for operating two motors in one embodiment according to the present invention. In Figure 16, the left side of the double vertical lines is a group of TP / PC display, value, address, and memory type, from top to bottom, sandwiched between double horizontal lines, and consists of five groups, excluding those omitted. In Figure 17, the left side of the double vertical lines is a group of TP / PC display, value, address, and memory type, from top to bottom, sandwiched between double horizontal lines, and consists of four groups, excluding those omitted. The right side of the double vertical lines in the top group in Figure 16 consists of two items: the number of input processes and their numerical values. The right side of the double vertical lines in the remaining four groups in Figure 16 spans Figure 17 and consists of 15 items: No., space, name, space, space, general-purpose bit address (10 / Hex), differentiation, logic selection, number of elements, element 1-bit address (10 / Hex), logic, element 2-bit address (10 / Hex), logic, element 3-bit address (10 / Hex), and logic. Because the address structure is omitted in Figure 16 and to make it easier to understand, a table of the start addresses and creation order by number is attached below each of the five groups, with each row containing four items: number, start address, number of words, and creation order. More specifically, the logical processing data for No. 1 starts at address 2175, has 20 words, and is 10th in the creation order. The reason the start address is 2175 is because 2175 is the address after the last address, 2174, which is 9th in the creation order in Figure 15, and was created 10th. The number of words varies depending on the name, and MC1 requires 8 words for self-holding, so it is 20 words. The next output processing data, No. 2, created next, starts at address 2195, has 24 words, and is 11th in the creation order. The omitted data for No. 3 through No. 9 were created in a similar manner. Figure 17, which overlaps with Figure 16, is the same as the logical processing data 141 in Figure 14. However, in Figure 17, which overlaps with Figure 16, No. 3 to No. 15 have been omitted, and the items are simply listed with three spaces added. There is no TP / PC indication because they are automatically assigned by the program. Note that the memory types shown are external, number, processing, and transfer, but external refers to memory outside the PLC as shown in Figure 4, processing refers to the processing data (memory) of the device general-purpose memory as shown in Figure 4, number refers to the number data (memory) of the device general-purpose memory as shown in Figure 4, and transfer refers to the transfer data (memory) of the device general-purpose memory as shown in Figure 4.
[0074] FIG. 18 is a detailed data diagram of the output processing for driving two motors in one embodiment according to the present invention. The left side of the double vertical lines consists of five groups, from top to bottom: TP / PC display, value, address, and memory type, sandwiched between double horizontal lines. Excluding omitted sections, the top group consists of two items to the right of the double vertical lines: the number of output processes and their numerical values. The remaining four groups consist of 11 items to the right of the double vertical lines: No., blank, name, blank, blank, ON bit address (10 / Hex), logic, OFF bit address (10 / Hex), logic, device selection, and actual address (10 / Hex). Because the address structure is omitted, and to make it easier to understand, a table of the start address and creation order for each number is attached below the five groups, with each row containing four items: number, start address, number of words, and creation order. Specifically, the output processing data for No. 1 starts at address 2597, has 23 words, and is 28th in the creation order. The reason the start address is 2597 is because in Figure 20, which overlaps with Figure 19, the address after the last address, 2596, which is 27th in the creation order, is 2597, making it the 28th to be created. The number of words varies depending on the name; Motor 1 Start Start (MC1) requires 13 words, so it is 23 words. The next output processing data, No. 2, created, starts at address 2620, has 23 words, and is 29th in the creation order. The omitted data for No. 3 through No. 9 were created in the same way. This is the same as the output processing data 142 in Figure 18 and Figure 14. However, in Figure 15, No. 3 to No. 5 have been omitted, and only three spaces have been added to the items. The TP / PC indication is omitted because these are automatically assigned by the program. Note that the memory types shown are external, processing, number, and transfer, but external refers to memory outside the PLC as shown in Figure 4, processing refers to the processing data (memory) in the device general-purpose memory as shown in Figure 4, number refers to the number data (memory) in the device general-purpose memory as shown in Figure 4, and transfer refers to the transfer data (memory) in the device general-purpose memory as shown in Figure 4.
[0075] FIG. 19 is a detailed data diagram 1 / 2 of the timing process for operating two motors in one embodiment according to the present invention. FIG. 20 is a detailed data diagram 2 / 2 of the timing process for operating two motors in one embodiment according to the present invention. In Figure 19, the left side of the double vertical lines is a group of TP / PC display, value, address, and memory type, from top to bottom, sandwiched between double horizontal lines, and consists of four groups, excluding those omitted. In Figure 20, the left side of the double vertical lines is a group of TP / PC display, value, address, and memory type, from top to bottom, sandwiched between double horizontal lines, and consists of three groups, excluding those omitted. The right side of the double vertical lines in the top group in Figure 19 consists of two items: the number of timing processes and their numerical value. The right side of the double vertical lines in the remaining three groups in Figure 19 spans Figure 20 and consists of 16 items: No., blank, name, blank, blank, control selection, start bit address (10 / Hex), logic, count stop bit address (10 / Hex), logic, flashing ON time, flashing interval time, elapsed time, general-purpose bit address (10 / Hex), and differentiation. To make the address structure easier to understand in Figure 19, a table showing the start address and creation order for each number is attached below the four groups, with each row containing four items: number, start address, number of words, and creation order. More specifically, the timing processing data for No. 1 starts at 2539, has 29 words, and is 26th in the creation order. The reason the start address is 2539 is because 2539 is the address after the last address, 2538, which is the 25th in the creation order in Figure 17, and was created 26th. The number of words varies depending on the name, and since Motor 1 star-delta switching time requires 14 words, it is 29 words. The next timing processing data, No. 2, created has a start address of 2568, has 29 words, and is 27th in the creation order. Figure 20, which overlaps with Figure 19, is the same as the timing processing data 142 in Figure 14. However, the only difference is that the item has three spaces added. There is no TP / PC indication because it is automatically assigned by the program. The memory types shown are external, number, processing, and transfer, but external refers to memory outside the PLC as shown in Figure 4, processing refers to the processing data (memory) of the device general-purpose memory as shown in Figure 4, number refers to the number data (memory) of the device general-purpose memory as shown in Figure 4, and transfer refers to the transfer data (memory) of the device general-purpose memory as shown in Figure 4.
[0076] (Basic concept) Before explaining the programs in FIGS. 21 to 34 and FIGS. 48 to 54, we will explain the essential modifier registers (denoted as modifier R in each figure) and repeat instructions. Modifier registers are a function that can modify each device data or device bit and change its address. To explain with a specific example, if there is an A contact of X0 (input devices are called X in Mitsubishi Electric's programmable logic controllers (PLCs)) with a modifier register, setting the value of the modifier register to 0 will make it the A contact of X0, and setting the value to 8 will make it the A contact of X8. This modifier register function is a basic function built in by programmable logic controller (PLC) manufacturers, regardless of the number that can be used simultaneously. The repeat instruction is a function that repeats a group of instructions between a repeat instruction and a repeat completion instruction a specified number of times. When combined with a modifier register, it eliminates the need to write many programs, reducing the size of the program description, but it has the disadvantage of being difficult to debug because it is constantly changing. This repeat instruction and the repeat structure, which is a structure that performs another repeat within a repeat, are basic functions built into programmable logic controller (PLC) manufacturers, regardless of the number.
[0077] FIG. 21 is a first / third ladder program circuit diagram for input processing according to one embodiment of the present invention. FIG. 22 is a ladder program circuit diagram 2 / 3 for input processing in one embodiment according to the present invention. FIG. 23 is a ladder program circuit diagram 3 / 3 for input processing in one embodiment according to the present invention. In other words, Figures 21 to 23 are a series of ladder program circuit diagrams for input processing. This ladder program circuit diagram uses program instructions from a programmable logic controller (PLC) manufactured by Mitsubishi Electric Corporation, and is structured so that processing is performed for each number while changing the address with a modifier register, and repeats the process for the number of processes with a repeat instruction. Blocks 210 to 212 are pre-processing before processing, and blocks 214 to 233 perform the processing. Blocks 235 to 238, 239 to 23B, and 23C to 23F are three subroutine programs. Each block will be described in detail below. The transition command GOEND in 210 transitions to the END of this input processing program without performing this input processing if the execution permission contact determined in the identification and initial processing program is not activated, or if the number of input processing determined by the user is 0. The call command CALL in 211 calls and executes the differential reset process. Here, all the differentials are set to "none," so the process is not executed. The transfer command MOV of 212 transfers the start address of the input processing data determined by the identification and initialization program to the general-purpose device 1 . The repeat command (1) FOR 213 is paired with the repeat command (1) NEXT 233, and repeats the same number of times as the number of input processes. The call instruction CALL 214 calls and executes the addition process of the number. The calculation instruction + (addition) in 215 adds the interval to the next number address of the input processing described in the identification and initial processing program to the general-purpose device 1 defined in 212 and stores the result in the modification register 20. The transfer command MOV in 216 transfers the general-purpose device qualified by the qualification register 20 to the general-purpose device 2 . The calculation instruction + (addition) of 217 adds the interval to the device selection address of the input process, which is written in the identification and initial processing program, to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV in 218 transfers the general-purpose device qualified by qualification register 20 to qualification register 4. The calculation instruction + (addition) of 219 adds the interval to the real address of the input processing described in the identification and initial processing program to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV in 21A transfers the general-purpose device qualified by the qualification register 20 to the qualification register 1. The calculation instruction + (addition) in 21B adds the interval until the logical selection when the input processing is activated, which is written in the identification and initial processing program, to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV in 21C transfers the general-purpose device qualified by qualification register 20 to qualification register 5. The calculation instruction + (addition) of 21D adds the interval to the general-purpose bit address of the input processing described in the identification and initial processing program to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV in 21E transfers the general-purpose device qualified by qualification register 20 to qualification register 2. The calculation instruction + (addition) of 21F adds the interval until differentiation of the input processing described in the identification and initial processing program to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV in 21G transfers the general-purpose device qualified by qualification register 20 to qualification register 3. 220 is the input-only auxiliary general-purpose bit 1 coil, which outputs the activation or deactivation level of the input bit, general-purpose bit, link bit, latch bit, and system bit when the device is selected. Note that the data is written in words, with 1 representing the input bit, 2 representing the general-purpose bit, 3 representing the link bit, 4 representing the latch bit, and 5 representing the system bit. The logic of the bits is also written in words, with 1 representing positive logic and 2 representing negative logic. The call command CALL in 221 calls a subroutine to output the bit-decomposed device and each unit memory at a level. Although it is not used here, the input-only auxiliary general-purpose bit 2 is activated or deactivated and returned. If the input-only auxiliary general-purpose bit 1 or input-only auxiliary general-purpose bit 2 is activated by the SET calculation instruction 222, the general-purpose bit modified by the modification register 2 is activated. This is the final output of this input processing. In the calculation command SET of 223, if differentiation is "yes", the input differentiation prohibition general-purpose bit is set at the same time as the final output. Differentiation is also expressed in words, with 1 being "no" and 2 being "yes". If differentiation is "yes", the calculation instruction FIFW of 224 writes the modification register 2 into the output differentiation table following the calculation instruction SET of 72 . In the calculation instruction RST of 230, if the input-only auxiliary general-purpose bit 1 and the input-only auxiliary general-purpose bit 2 are inactivated and the input differentiation prohibition general-purpose bit is activated or differentiation is "none", the input differentiation prohibition general-purpose bit is reset (inactivated). This is the final output of this input processing. The calculation instruction RST in 231 simply deactivates the input-only auxiliary general-purpose bit 1 and the input-only auxiliary general-purpose bit 2, resetting the general-purpose bits modified by the modification register. 71 and this are the final outputs of this input processing. In preparation for repetition, the transfer command MOV at 232 transfers the general-purpose device 2 to the general-purpose device 1. This changes the value of each modifier register at the next No. when repetition occurs. The repeat command (1) NEXT 233 is paired with the repeat command (1) FOR, and returns to the repeat command (1) FOR and repeats the commands thereafter until the number of repetitions is exceeded. The structural command FEND in 234 ends the program for this output process. The pointer for the number addition process 235 is the call destination for the call instruction CALL 214 . The arithmetic instruction + (addition) in 236 adds 1 to the general-purpose device 1 and stores it in the modifier register 20. The calculation instruction + (addition) of 237 adds modifier register 20 to the general-purpose device with modifier register 20 and stores it in general-purpose device 1. The call is completed by the call back instruction RET at 238, and the process proceeds to the next call instruction at 214. The differential reset processing pointer 239 is the call destination for the call instruction CALL 211 . The subroutine program group for differential reset processing in 23A is not shown because differential differentiation is "none" for all Nos. However, it is only necessary to use the calculation command FIFR, put the read data into the modification register, and reset the general-purpose bit modified by the modification register. The call is completed by the call back instruction RET at 23B, and the process proceeds to the next call instruction at 211. The device resolution bit processing pointer in 23C is for the call instruction CALL in 221. The subroutine programs for device decomposition bit processing in 23D are omitted because they do not use device decomposition bits, but by making extensive use of movement commands, it is possible to create input-only auxiliary general-purpose bits 2 with many classifications. The call is completed by the call back instruction RET at 23E, and the process proceeds to the next call instruction at 221. The structural command END on 23F ends the program file.
[0078] FIG. 24 is a ladder program circuit diagram 1 / 4 of a logic processing according to one embodiment of the present invention. FIG. 25 is a ladder program circuit diagram 2 / 4 of a logic processing according to one embodiment of the present invention. FIG. 26 is a ladder program circuit diagram 3 / 4 of a logic processing according to one embodiment of the present invention. FIG. 27 is a ladder program circuit diagram 4 / 4 of a logic process according to one embodiment of the present invention. In other words, Figures 24 to 27 are a series of ladder program circuit diagrams for logic processing. This ladder program circuit diagram uses program instructions from a Mitsubishi Electric programmable logic controller (PLC). It processes each element of a number while changing addresses with a modifier register. It repeats the process for the number of elements with a repeat instruction. Once the number of elements has been repeated, it repeats the process for the number of operations. While the logical product repeats all operations to determine output, the logical sum stops the repetition and outputs if even one operation is successful. Blocks 240 to 242 are preprocessing, and blocks 244 to 265 perform the actual processing. Blocks 267 to 26N, 270 to 273, and 274 to 277 are three subroutine programs. Each block will be described in detail below. In the transition command GOEND of 240, if the execution permission contact determined in the identification and initial processing program is not activated, or if the number of logical processes determined by the user is 0, this logical process is not performed and the program transitions to the END of this logical processing program. The call command CALL in 241 calls and executes the differential reset process. Here, all the differentials are set to "none," so the process is not executed. The transfer command MOV of 242 transfers the start address of the logical processing data determined by the identification and initial processing program to the general-purpose device 1. The repeat instruction (1) FOR 243 is paired with the repeat instruction (1) NEXT 265, and here, the number of repetitions is the number of logical processes. The call instruction CALL in 244 calls and executes the addition process of the number. The calculation instruction + (addition) in 245 adds the interval to the next number address of the logical processing described in the identification and initial processing program to the general-purpose device 1 defined in 242, and stores the result in the modification register 20. The transfer instruction MOV in 246 transfers the general-purpose device qualified by the qualification register 20 to the general-purpose device 2 . The calculation instruction + (addition) of 247 adds the interval to the general-purpose bit address of the logical processing described in the identification and initial processing program to the modification register 20 and stores the result in the modification register 20. In the transfer instruction MOV of 248, the general-purpose device modified by the modifier register 20 is transferred to the modifier register 1. The calculation instruction + (addition) of 249 adds the interval to differentiation of the logical processing described in the identification and initial processing program to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV in 24A transfers the general-purpose device qualified by qualification register 20 to qualification register 2. The calculation instruction + (addition) of 24B adds the interval to the logic selection of the logic processing described in the identification and initial processing program to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV in 24C transfers the general-purpose device qualified by qualification register 20 to qualification register 4. The calculation instruction + (addition) of 24D adds the interval up to the number of elements of the logical processing described in the identification and initial processing program to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV in 24E transfers the general-purpose device qualified by qualification register 20 to qualification register 5. The calculation instruction + (addition) of 24F adds the interval up to the element 1 bit address of the logical processing described in the identification and initial processing program to the modification register 20 and stores it in the general-purpose device 7. The calculation instruction + (addition) of 24G adds the interval to the logic of element 1 of the logical processing described in the identification and initial processing program to general-purpose device 7 and stores it in general-purpose device 8. The 24H arithmetic instruction + (addition) adds the element 1-bit address interval and the logic interval of the logical processing described in the identification and initial processing program, and stores the result in the general-purpose device 3. The transfer command MOV in 24J transfers 0 to general-purpose device 4. The 24K transfer command MOV transfers 0 to general-purpose device 5. The repeat instruction (2) FOR 250 is paired with the repeat instruction (2) NEXT 262, and in this case, repeats are performed for the value of the general-purpose device modified by the modifying register 5. The calculation instruction * (multiplication) in 251 multiplies the result of calculation in 24H by general-purpose device 4 and stores it in general-purpose device 6. The calculation instruction + (addition) of 252 adds the general-purpose device 6 calculated in 251 to the general-purpose device 7 calculated in 24F and stores the result in the modifying register 20. In the transfer instruction MOV in 253, the general-purpose device modified by the modifier register 20 is transferred to the modifier register 3. The calculation instruction + (addition) of 254 adds the general-purpose device 6 calculated in 251 to the general-purpose device 8 calculated in 24G and stores the result in the modifying register 20. The transfer instruction MOV in 255 transfers the general-purpose device qualified by qualification register 20 to qualification register 6. The calculation instruction INC of 256 selects logical AND, and in the logic of the element, when the element is activated, 1 is added to the general-purpose device 5. The call instruction CALL in 257 selects the logical product, and calls the output processing subroutine when the element is activated with the element logic for all element numbers. The move command CJ at 258 selects the logical product and, in the logic of the element, moves to the repeat position pointer at 260 when the element is activated. The transfer instruction MOV of 259 selects the logical product, and transfers 0 to the general-purpose device 5 when the element is deactivated in the element logic. The call instruction CALL in 25A selects a logical product, and when the element is deactivated in the element logic, a subroutine for non-output processing is called. The repeat command BREAK in 25B selects a logical product, and when the element is deactivated in the element logic, the repeat is abandoned and the repeat completion position pointer is moved to. The call command CALL in 25C selects a logical sum and calls the output processing subroutine when the element is activated in the element logic. The repeat command BREAK in 25D selects a logical sum, and when an element is activated in the element logic, the repeat is abandoned and the repeat completion pointer is shifted to. The call instruction CALL in 25E selects a logical sum, and when the element is deactivated in the element logic, a subroutine for non-output processing is called. The repeat position pointer 260 is the destination of the move command CJ 258 . In preparation for repetition, the calculation instruction INC of 261 adds 1 to the general-purpose device 4. This changes the value of each modifier register of the next element when repetition occurs. The repeat command (2) NEXT 262 is paired with the repeat command (2) FOR, and returns to the repeat command (2) FOR and repeats the subsequent commands until the number of repetitions is exceeded. The repeat completion position pointer 263 is the destination of the repeat instruction BREAK 25D of 25B. In preparation for repetition, the transfer command MOV in H.264 transfers general-purpose device 2 to general-purpose device 1. As a result, when repetition occurs, the values of each modifier register of the next No. are changed. The repeat command (1) NEXT 265 is paired with the repeat command (1) FOR, and returns to the repeat command (1) FOR and repeats the commands thereafter until the number of repetitions is exceeded. The structural command FEND in 266 terminates the program for this logical processing. The output processing pointer 267 is the call destination for the call instruction CALL 257 and 25C. The operation instruction SET in 268 sets (activates) the logical auxiliary general-purpose bit when differentiation is "none". The move command CJ of 269 moves the level output pointer if differentiation is "none". The SET operation instruction in 26A sets (activates) the general-purpose bit modified by the modification register 1 if differentiation is "enabled" and the logical differentiation prohibition general-purpose bit is not activated. This is the final output of this logical processing. If differentiation is "yes" and the logical differentiation prohibition general-purpose bit is not activated, the calculation instruction SET in 26B sets (activates) the logical differentiation prohibition general-purpose bit following the calculation instruction SET in 26A. If differentiation is "yes" and the logical differentiation prohibition general-purpose bit is not activated, the calculation instruction FIFW of 26C writes the qualification register 2 into the logical differentiation table following the calculation instruction SET of 26B. The move command CJ in 26D moves the call completion pointer if differentiation is "yes". The non-output processing pointer 26E is the call destination for the call instruction CALL 25A and 25E. The calculation instruction RST in 26F resets (deactivates) the logic auxiliary general-purpose bit if differentiation is "none". The move command CJ in 26G moves the level output pointer if differentiation is "none". The calculation command RST at 26H resets (deactivates) the logical differentiation prohibition general-purpose bit if differentiation is "enabled." The move instruction CJ in 26J, following the calculation instruction RST, moves to the call completion pointer in 26M. The level output processing pointer in 26K is the destination for the move instruction CJ in 269 and 26G. The general-purpose bit coil 26L, which is modified by the modification register 1, outputs at a level according to the logical auxiliary general-purpose bit. This is the final output at the level of this logical processing. The call completion pointer in 26M is the destination for the move instruction CJ in 25D and 26J. The call is completed by the call back instruction RET at 26N, and the process proceeds to the next call instruction corresponding to 257, 25C, 25A, or 25E. The pointer for the number addition process 270 is the call destination for the call instruction CALL 244 . The arithmetic instruction + (addition) in 271 adds 1 to the general-purpose device 1 and stores it in the modifier register 20. The calculation instruction + (addition) in 272 adds modifier register 20 to the general-purpose device with modifier register 20 and stores it in general-purpose device 1. The call is completed by the call back instruction RET at 273, and the process proceeds to the next call instruction at 244. The differential reset processing pointer 274 is the call destination for the call instruction CALL 241 . The subroutine program group for differential reset processing 275 is not described because differential differentiation is "none" for all Nos. However, it is only necessary to use the calculation command FIFR, put the read data into the modification register, and reset the general-purpose bit modified by the modification register. 276 is a callback instruction RET, which completes the call and moves to the next call instruction of 241. The structural command END in 277 ends the program file.
[0079] FIG. 28 is a ladder program circuit diagram 1 / 3 for output processing in one embodiment according to the present invention. FIG. 29 is a ladder program circuit diagram 2 / 3 for output processing in one embodiment according to the present invention. FIG. 30 is a ladder program circuit diagram 3 / 3 for output processing in one embodiment according to the present invention. In other words, Figures 28 to 30 are a series of ladder program circuit diagrams for output processing. This ladder program circuit diagram uses program instructions from a programmable logic controller (PLC) manufactured by Mitsubishi Electric Corporation, and is structured so that processing is performed for each number while changing the address with a modifier register, and the repeat instruction is used to repeat the process for the number of times required. Blocks 280 and 281 are pre-processing before processing, and blocks 283 to 300 perform the processing. 303 to 305 and 306 to 308 are two subroutine programs. Each block will be described in detail below. The transition command GOEND in 280 does not perform this output processing and transitions to the END of this output processing program if the execution permission contact determined by the identification and initial processing program and the number of output processing determined by the user are 0. The transfer command MOV 281 transfers the start address of the output processing data, which was determined by the identification and initialization program, to the general-purpose device 1 . The repeat command (1) FOR 282 is paired with the repeat command (1) NEXT 301, and in this case, the number of repetitions is the number of output processes. The call instruction CALL in 283 calls and executes the addition process of a number. The calculation instruction + (addition) of 284 adds the interval to the next address number to the general-purpose device 1 defined in 281 and stores the result in the modification register 20. The transfer instruction MOV in 285 transfers the general-purpose device modified by the modifying register 20 to the general-purpose device 2. In 286, the calculation instruction + (addition) adds the interval to the ON bit address to the modification register 20 and stores the result in the modification register 20. In the transfer instruction MOV of 287, the general-purpose device modified by the modifier register 20 is transferred to the modifier register 1. The calculation instruction + (addition) in 288 adds the interval to the logic of the ON bit to the modification register 20 and stores the result in the modification register 20. In the transfer instruction MOV of 289, the general-purpose device modified by the modifier register 20 is transferred to the modifier register 4. The calculation instruction + (addition) in 28A adds the interval to the logic of the OFF bit to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV in 28B transfers the general-purpose device qualified by qualification register 20 to qualification register 2. The calculation instruction + (addition) in 28C adds the interval to the logic of the OFF bit to the modification register 20 and stores the result in the modification register 20. In 28D, the transfer instruction MOV transfers the general-purpose device qualified by qualification register 20 to qualification register 5. The calculation instruction + (addition) in 28E adds the interval to the device selection to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV at 28F transfers the general-purpose device qualified by qualification register 20 to qualification register 6. In 28G, the calculation instruction + (addition) adds the distance to the real address to the modification register 20 and stores the result in the modification register 20. The transfer command MOV at 28H transfers the general-purpose device qualified by qualification register 20 to qualification register 3. The calculation instruction SET in 290 sets (activates) the output bit modified by Modification Register 3 selected by device selection when the general-purpose bit modified by Modification Register 1 is activated according to the logic of the ON bit. The SET calculation instruction 291 sets (activates) the general-purpose bit modified by Modification Register 3 selected in the device selection if the general-purpose bit modified by Modification Register 1 is activated according to the logic of the ON bit. The SET calculation instruction 292 sets (activates) the link bit selected in device selection and modified by Modification Register 3 if the general-purpose bit modified by Modification Register 1 is activated according to the logic of the ON bit. The calculation instruction SET in 293 sets (activates) the latch bit selected in device selection and modified by Modification Register 3 if the general-purpose bit modified by Modification Register 1 is activated according to the logic of the ON bit. The calculation instruction SET in 294 sets (activates) the system bit modified by Modification Register 3 selected in the device selection if the general-purpose bit modified by Modification Register 1 is activated according to the logic of the ON bit. The call command CALL in 295 calls a subroutine to set (activate) each decomposition value that is modified by the bit decomposition of the device or each unit memory modified by the modifier register 3. It is not used here. The calculation instruction RST in 296 resets (deactivates) the output bit selected in device selection and modified by Modification Register 3 if the general-purpose bit modified by Modification Register 2 is activated according to the logic of the OFF bit. The calculation instruction RST in 297 resets (deactivates) the general-purpose bit modified by Modification Register 3 selected in the device selection if the general-purpose bit modified by Modification Register 2 is activated according to the logic of the OFF bit. The calculation instruction RST in 298 resets (deactivates) the link bit selected in device selection and modified by Modification Register 3 if the general-purpose bit modified by Modification Register 2 is activated according to the logic of the OFF bit. The calculation instruction RST in 299 resets (deactivates) the latch bit selected in device selection and modified by Modification Register 3 if the general-purpose bit modified by Modification Register 2 is activated according to the logic of the OFF bit. The calculation instruction RST in 29A resets (deactivates) the system bit selected in device selection and modified by Modification Register 3 if the general-purpose bit modified by Modification Register 2 is activated according to the logic of the OFF bit. The call command CALL in 29B calls a subroutine to reset (deactivate) each decomposition value that is modified by the modification register 3, which is obtained by bit-decomposing the device and bit-decomposing each unit memory. It is not used here. The transfer command MOV in 300 transfers data from general-purpose device 2 to general-purpose device 1. The repeat command (1) NEXT 301 is paired with the repeat command (1) FOR, and repeats from the repeat command (1) FOR until the number of repetitions is exceeded. The structural command FEND in 302 ends the program for this output process. The pointer for the number addition process 303 is the call destination for the call instruction CALL 283 . The calculation instruction + (addition) in 304 adds 1 to the general-purpose device 1 and stores it in the modifier register 20 . The calculation instruction + (addition) of 305 adds the modifier register 20 to the general-purpose device with modifier register 20 and stores it in the general-purpose device 1. The call is completed by the call back instruction RET at 306, and the process proceeds to the next call instruction at 283. The device resolution bit set processing pointer 307 is for the call instruction CALL 295 . The subroutine programs for device disassembly bit setting processing in 308 are omitted because they do not use device disassembly bits, but it is possible to set bits for each device in many classifications by making extensive use of movement commands. The callback instruction RET at 309 completes the call, and the process moves to the next call instruction at 295. The device resolution bit reset processing pointer at 30A is for the call instruction CALL at 29B. The subroutine program group for device disassembly bit reset processing in 30B is omitted because it does not use device disassembly bits, but it is possible to reset the bits of each device in many classifications by making extensive use of movement commands. The call is completed by the call back instruction RET at 30C, and the process proceeds to the next call instruction at 29B. The structural command END in 30D ends the program file.
[0080] FIG. 31 is a circuit diagram 1 / 4 of a ladder program for counting processing according to one embodiment of the present invention. FIG. 32 is a ladder program circuit diagram 2 / 4 for counting processing according to one embodiment of the present invention. FIG. 33 is a circuit diagram 3 / 4 of a ladder program for counting processing according to one embodiment of the present invention. FIG. 34 is a ladder program circuit diagram 4 / 4 for counting processing according to one embodiment of the present invention. In other words, Figures 31 to 34 are a series of ladder program circuit diagrams for counting processing. This ladder program circuit diagram uses program instructions from a programmable logic controller (PLC) manufactured by Mitsubishi Electric Corporation, and is structured so that processing is performed for each number while changing the address with a modifier register, and repeats the process for the number of processes with a repeat instruction. Blocks 310 and 311 are pre-processing before processing, and blocks 313 to 332 perform the processing. Blocks 334 to 337, 338 to 33B, and 340 to 348 are three subroutine programs. Below is a detailed explanation of each block. Note that this program is not a scan execution type program, but rather a fixed-cycle program. Normally, Mitsubishi Electric programmable logic controllers (PLCs) use timers, but as they are not compatible with repetitive commands, a fixed-cycle program of 100 mmsec (0.1 seconds) is used to measure time. However, there are timers that measure in 1 mmsec (0.001 seconds), but this is rarely used and a fixed cycle of 0.001 seconds is not very meaningful, so we have deliberately not created one. Each block will be described in detail below. The transition command GOEND in 310 transitions to the END of the counting processing program without performing the counting processing if the execution permission contact determined by the identification and initial processing program and the counting processing number determined by the user are 0. The transfer command MOV of 311 transfers the start address of the time count processing data determined by the identification and initialization program to the general-purpose device 1 . The repeat command (1) FOR 312 is paired with the repeat command (1) NEXT 332, and in this case, the number of repetitions is the number of times counted. The call instruction CALL in 313 calls and executes the addition process of the number. The calculation instruction + (addition) in 314 adds the interval to the next address number to the general-purpose device 1 defined in 311 and stores the result in the modification register 20. The transfer command MOV in 315 transfers the general-purpose device qualified by the qualification register 20 to the general-purpose device 2 . The calculation instruction + (addition) of 316 adds the interval to the control selection to the modification register 20 and stores the result in the modification register 20. In the transfer instruction MOV of 317, the general-purpose device modified by the modifier register 20 is transferred to the modifier register 9. The calculation instruction + (addition) of 318 adds the interval to the activation bit address to the modification register 20 and stores the result in the modification register 20. In the transfer instruction MOV of 319, the general-purpose device modified by the modifier register 20 is transferred to the modifier register 1. The calculation instruction + (addition) in 31A adds the interval to the logic of the activation bit to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV in 31B transfers the general-purpose device qualified by qualification register 20 to qualification register 10. The calculation instruction + (addition) of 31C adds the interval to the count stop bit address to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV in 31D transfers the general-purpose device qualified by qualification register 20 to qualification register 2. The calculation instruction + (addition) in 31E adds the interval to the logic of the count stop bit to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV at 31F transfers the general-purpose device modified by modifier register 20 to modifier register 11. The calculation instruction + (addition) in 31G adds the interval to the start address of the blinking ON time to the modification register 20 and stores the result in the modification register 20. The transfer command MOV at 31H transfers the general-purpose device qualified by qualification register 20 to qualification register 3. The calculation instruction + (addition) of 31J adds the interval up to the address of the blinking interval time to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV at 31K transfers the general-purpose device qualified by qualification register 20 to qualification register 4. The calculation instruction + (addition) in 320 adds the interval to the address of the delay time to the modification register 20 and stores the result in the modification register 20. In the transfer instruction MOV of 321, the general-purpose device modified by the modifier register 20 is transferred to the modifier register 5. The calculation instruction + (addition) in 322 adds the interval up to the address of the elapsed time to the modification register 20 and stores the result in the modification register 20. In the transfer instruction MOV of 323, the general-purpose device modified by the modifier register 20 is transferred to the modifier register 6. The calculation instruction + (addition) in 324 adds the interval to the general-purpose bit address to the modification register 20 and stores the result in the modification register 20. In the transfer instruction MOV of 325, the general-purpose device modified by the modifier register 20 is transferred to the modifier register 7. The calculation instruction + (addition) in 326 adds the interval to the differential division to the modification register 20 and stores the result in the modification register 20. In the transfer instruction MOV of 327, the general-purpose device modified by the modifier register 20 is transferred to the modifier register 12. The calculation instruction + (addition) in 328 adds the interval to the address of the differentiation prohibition bit to the modification register 20 and stores the result in the modification register 20. In the transfer instruction MOV of 329, the general-purpose device modified by the modifier register 20 is transferred to the modifier register 8. The calculation instruction RST in 32A resets (deactivates) the general-purpose bit modified by modifier register 8 according to the logic of the activation bit if the general-purpose bit modified by modifier register 1 is inactivated and the differentiation prohibition bit is activated. The calculation instruction RST in 32B resets (deactivates) the general-purpose bit modified by modifier register 7 if the general-purpose bit modified by modifier register 1 is inactivated and the general-purpose bit is activated according to the logic of the activation bit. The 32C transfer command MOV follows the logic of the activation bit, and if the general-purpose bit modified by modifier register 1 is inactive and the elapsed time is not 0, it transfers 0 to the general-purpose device modified by modifier register 7. The move instruction CJ in 32D moves to the repeat completion pointer when the general-purpose bit modified by the modification register 1 is deactivated according to the logic of the activation bit. The INC operation instruction in 32E adds 1 to the general-purpose device modified by modifier register 6 if the general-purpose bit modified by modifier register 1 is activated according to the logic of the start bit, and if the general-purpose bit modified by modifier register 11 is deactivated according to the logic of the stop bit. The call command CALL in 32F activates the general-purpose bit modified by modifier register 1 according to the logic of the start bit, and deactivates the general-purpose bit modified by modifier register 11 according to the logic of the stop bit. If blinking processing is selected, the blinking processing subroutine is called. The call instruction CALL in 32G activates the general-purpose bit modified by modifier register 1 according to the logic of the start bit, and deactivates the general-purpose bit modified by modifier register 11 according to the logic of the stop bit. If ON delay processing is selected, the ON delay processing subroutine is called. The repeat completion position pointer 330 is the destination of the move command CJ 32D. In preparation for repetition, the transfer command MOV in 331 transfers the general-purpose device 2 to the general-purpose device 1. This changes the value of each modifier register in the next No. when repetition occurs. The repeat instruction (1) NEXT 332 is paired with the repeat instruction (1) FOR, and returns to the repeat instruction (1) FOR and repeats the instructions thereafter until the number of repetitions is exceeded. The structural command FEND in 333 ends the program for this logical processing. The pointer for the number addition process 334 is the call destination for the call instruction CALL 313 . The arithmetic instruction + (addition) in 335 adds 1 to the general-purpose device 1 and stores it in the modifier register 20. The calculation instruction + (addition) of 336 adds the modifier register 20 to the general-purpose device with modifier register 20 and stores it in the general-purpose device 1. The call is completed by the call back instruction RET at 337, and the process proceeds to the next call instruction at 313. The blink process pointer of 338 is the call destination for the call instruction CALL of 32F. The general-purpose bit coil 339, which is modified by the modification register 7, is activated if the elapsed time is smaller than the blinking interval time and smaller than the blinking ON time. This is the final output by the blinking selection. The transfer command MOV in 33A transfers 0 to the general-purpose device modified by the modification register 6 if the elapsed time exceeds the blink interval time. The call is completed by the call back instruction RET at 33B, and the process proceeds to the next call instruction at 32F. The ON delay processing pointer 340 is the call destination for the call instruction CALL 32G. The general-purpose bit coil 341, which is modified by the modification register 7, is activated if the elapsed time exceeds the delay time and no differentiation is performed. This is the final output by the blinking selection. The calculation instruction SET in 342 sets (activates) the general-purpose bit modified by the modification register 7 when the elapsed time exceeds the delay time, differentiation is "enabled", and the logical differentiation prohibition general-purpose bit is not activated. This is the final output by the blinking selection. The calculation instruction FIFW in 343 writes the modification register 7 to the time-counting differential table following the calculation instruction SET in 342 if the elapsed time exceeds the delay time, differentiation is "yes", and the logical differentiation prohibition general-purpose bit is not activated. If the elapsed time exceeds the delay time, differentiation is "yes", and the logical differentiation prohibition general-purpose bit is not activated, the calculation instruction FIFW of 344 further writes the constant 2 into the time-counting differentiation table following the calculation instruction FIFW of 343. The calculation instruction SET in 345 sets (activates) the general-purpose bit modified by the modification register 12 following the calculation instruction FIFW in 33C when the elapsed time exceeds the delay time, differentiation is "yes", and the logical differentiation prohibition general-purpose bit is not activated. The transfer command MOV in 346 transfers the general-purpose device qualified by qualification register 5 to the general-purpose device qualified by qualification register 6 when the elapsed time reaches the upper limit value. The call is completed by the call back instruction RET at 347, and the process moves to the next call instruction at 32G. The structural command END in 348 ends the program file.
[0081] In order to make it equivalent to the ladder program of Fig. 5, it is realized by using only the input processing ladder program, logic processing ladder program, output processing ladder program, and timing processing ladder program of the program of the present invention and setting the corresponding data. Here, the data corresponding to the input device data processing ladder program and device data calculation processing ladder program required to support all algorithms can also be created with a structure similar to the input processing ladder program of Figs. 21 to 23, the logic processing ladder program of Figs. 24 to 27, the output processing ladder program of Figs. 28 to 30, and the timing processing ladder program of Figs. 31 to 34. Both programs are structured to process each No. one at a time, and repeat the process the number of times using a repeat command. The input device data processing program compares data and uses the results to activate a bit. If a bit is activated, the device data calculation processing program executes a command set selected by the PLC manufacturer, and processes by changing the device data and bits. The bits and device data are processed using a modifier register that has address data set.
[0082] (concept) Here, we will provide further explanation of the common structure and definition of each process, comparing it with a general program. Typical programs began as CPU machine code, essentially assembly language, which corresponded one-to-one to machine code that computers could interpret directly. To meet the needs of programmers and users, they gradually evolved into higher-level languages. Current programmable logic controller (PLC) programs are high-level languages that combine powerful relay sequence circuits with assembly language. In other words, the ability to structure programs, use interrupt programs frequently, and manage multiple programs is for the convenience of programmers and users; from the CPU's perspective, everything appears as a single program. The program in this invention is also composed of nine core processing programs and three derivative programs, but it can also be created as a single program or, conversely, can be subdivided. Furthermore, programmable logic controllers (PLCs) often cater to programmers' needs rather than users'. Therefore, assets such as faster CPUs and cheaper memory have been diverted to structuring programs for programmers, and the focus has shifted to unifying and consolidating programs solely for programmers, further increasing programmer freedom. This invention aims to unify and consolidate programs themselves, not programmers. This is achieved by replacing programmable logic controller (PLC) definitions and allocation specifications, or specifications from flowcharts, with multiple data. The programmable logic controller (PLC) definitions and allocation specifications include the I / O order, counting method, and symbolic names of device bits, which are physically determined by each manufacturer of the programmable logic controller (PLC). The flowchart specifications also include whether the activation bit, as explained above, is positive or negative logic. In addition, multiple data can be specified by bits using a modifier register, so they can be replaced with bit address data, or cases can be distinguished by numerical values, so unification and consolidation can be achieved by selecting symbol names for device data and device bits, selecting positive / negative logic, selecting operations, etc., and replacing them with numerical values. The above is converted into numerical values and processed in the order of processing. Processing in the order of processing means that when the input part is activated, it is activated or a calculation is performed and output. The input part has three forms: bits, device bits with defined or assigned values, and judgments based on device data comparison, all of which can be modified using modifier registers. The output part is a calculation that separates bits that can be modified using modifier registers and those that are replaced with numerical values. Although the calculations often require separation, most of them are rarely used, so a more ideal program can be created by selecting and discarding the current calculation instructions.
[0083] FIG. 35 is a modified ladder program circuit diagram for driving two motors in one general embodiment according to the present invention. Figure 35 is a modified ladder program circuit diagram from Figure 5. The modified specifications are that when starting motor 1 and then motor 2, or when starting motor 2 and then motor 1, once either motor has started, the other motor cannot be started until the blinking stops. This change was made because it was inefficient, as the operator had to be present until the blinking stopped. Another additional change was made to delay the star-delta switching time for both motors by another 10 seconds. The ladder program circuit diagram in Figure 35 consists of only A contacts, B contacts, and a coil, and uses the input bit for the signal from the input unit, the output bit for the coil that outputs from the output unit, a general-purpose bit built into the programmable logic controller (PLC), and a timer, with the built-in 1-second clock as the 1-second clock system bit. Apart from using the general-purpose bit, each component (PB, MC, etc.) is the same as in Figure 5. Note that 2 seconds does not exist as a system bit, so the general-purpose bit is used with a 2-second clock and a self-holding procedure.
[0084] Each block will be described in detail below. The TM1 timer coil, set to 1 second at 350, starts timing when the TM2 timer is not activated, and is activated when the set time of 1 second is reached. The TM2 timer coil 351, which is set to 1 second, starts counting when the TM1 timer is activated, and is activated when the set time of 1 second is reached. The M1 general-purpose bit coil 352 is activated when the TM1 timer is not activated, thus creating a 2-second clock. The M2 general-purpose bit coil 353 becomes self-holding when the start switch is pressed while the motor 1 is neither in star start nor delta start, and the self-holding continues and becomes activated unless the stop switch is pressed, a thermal trip signal is input, or the emergency stop is pressed. The M3 general-purpose bit coil 354 is self-holding, continues, and is activated when the M2 general-purpose bit is activated and the motor 2 is not in start-up. The TM3 timer coil of 355, set to 110 seconds, is activated when the M2 general-purpose bit is activated and motor 2 is not in start-up, self-holding is activated, measurement begins, and the timer is activated when the set time of 110 seconds is reached. The M4 general-purpose bit coil 356 becomes self-holding when the start switch is pressed while motor 2 is neither in star start nor delta start, and the self-holding continues and becomes activated unless the stop switch is pressed, a thermal trip signal is input, or the emergency stop is pressed. The M5 general-purpose bit coil 357 is self-holding, continues, and is activated when the M4 general-purpose bit is activated and the motor 1 is not in start-up. The TM4 timer coil 358, set to 160 seconds, is activated when the M5 general-purpose bit is activated and motor 1 is not in start-up, self-holding is activated, measurement begins, and the timer is activated when the set time of 160 seconds is reached. The MC1 output bit coil at 359 is activated when the M3 general purpose bit is activated and the TM3 general purpose timer is inactive. The MC2 output bit coil at 35A is activated when the TM3 timer is activated. The PL1 output bit coil of 35B repeats activation and deactivation every two seconds when the M2 general-purpose bit is activated and the MC1 output bit and MC2 output bit are deactivated, and repeats activation and deactivation every second when the MC1 output bit is activated, or activates when the MC2 output bit is activated. In the 35C, the MC3 output bit coil is activated when the M5 general-purpose bit is activated and the TM4 general-purpose timer is inactive. The MC4 output bit coil of the 35D is activated when the TM4 timer is activated. When the PL2 output bit coil and M4 general-purpose bit of the 35E are activated and the MC3 output bit and MC4 output bit are deactivated, they are activated and deactivated every two seconds. When the MC3 output bit is activated, they are activated and deactivated every second, or they are activated when the TM4 timer is activated. The 35E is essentially the same structure as the 35B, except that the motor has been changed from 1 to 2. However, in this example, the timer that activates the MC is chosen instead of the MC output, since the movement will be the same. This is an example of how the creator's choices affect the structure.
[0085] FIG. 36 shows image data diagram 1 / 2 displayed on the interface for each process with modified specifications for operating two motors in one embodiment of the present invention. FIG. 37 shows image data diagram 2 / 2 displayed on the interface for each process with modified specifications for operating two motors in one embodiment of the present invention. In other words, Figures 36 and 37 are image data diagrams displayed on an interface to operate two motors with an added procedure. However, rather than the image data displayed on the interface in Figure 14, which is equivalent to the program in Figure 5, the part where a procedure is added can of course be created equivalently, but in order to help people understand sequential step processing, we have chosen to use image data displayed on an interface realized with sequential step processing. Since it is not created equivalent to Figure 6, we will clearly state the procedure for creating new data to realize the specifications, including the specifications added in Figure 35, and provide a detailed explanation while comparing it with the new design of a normal programmable logic controller (PLC) program. When designing a new programmable logic controller (PLC) program, the hardware circuit (electrical connection circuit diagram) is determined before the program is designed, so the first thing to do is to create comments for each input / output address bit. This invention also begins by creating part of the input and output processing. We say "part of the output processing" because when creating new data, the ON bit address and OFF bit address of the output processing are not known until the design is complete, so we call it the input part. The input processing data 360 in Figure 36 is exactly the same as the input processing data 140 in Figure 14. Note that since No. 1 and No. 2 of the input processing data are assumed to use a programmable logic controller (PLC) manufactured by Mitsubishi Electric Corporation, they are system bits (SM for device selection), and No. 3 to No. 9 are input bits (X for device selection). The general-purpose bit 360 can also be determined at this point. As explained in the detailed explanation of Figure 14, the general-purpose device bit for a programmable logic controller (PLC) manufactured by Mitsubishi Electric Corporation is M, which is set to 0 to 8 here. This number is meaningless and can be any value as long as it does not overlap. The order of No. is the order of creation, and this also does not have any significant meaning. Therefore, the number can be determined by the data creation system (engineering tool, touch panel (TP), personal computer (PC)), or it can be determined manually, but essentially the data creation system should automatically determine an available address. Similarly, the output processing data 371 in FIG. 37 is the same as the output processing data 142 in FIG. 14 in terms of device selection and real address in the output portion. At this stage, all settings of the input processing data 360 have been completed, and the output portion of the output processing data 371 has been completed, and no other data has been set. Furthermore, in the case of programmable logic controllers (PLCs) other than those manufactured by Mitsubishi Electric Corporation, some devices may not be able to distinguish between input bits, output bits, or system bits depending on the device selection, and some may even treat everything as 16-bit data (because it is broken down into bits for use). In such cases, care must be taken to add the function to the "name" associated with the number to indicate the role of the bit. Next, we move on to the core part, which is the design of the specifications. Generally, the specifications are analyzed, and once the analysis is complete, comments are created for the general-purpose device bits, and the program is constructed while further drafting the specifications using these comments as a reference. Here, the specifications are analyzed in the same way, but next, the sequential step work data for 362 is set. After analyzing the specifications, we see that the basic task is to operate two motors, so the number of sequential step work is set to 2, and the names associated with the numbers are set to "Motor 1 work" and "Motor 2 work." Next, stepwise sequential processing data for the motor 1 operation is set in 363. According to the specifications, there are three processes: start acceptance by pressing the start switch, initial start by starting with star connection, and switching by starting with delta connection. Also, since each process simply moves to the next No., all branch numbers linked to No. are set to 1, and the names are set to "Motor 1 start acceptance," "Motor 1 initial start," and "Motor 1 switching." Next, set the branch 1 general-purpose bit address and branch 1 reset bit address linked to No. Here, the branch 1 general-purpose bit address is set to 9, 10, or 11, which are the numbers following the input process, and the branch 1 reset bit address is set to the previous No. except for No. 1. There is no meaning to these numbers, and they can be any value as long as they do not overlap, but the branch 1 reset bit address must be the address before the transition. At this stage, the setting of the input processing data (360) is completed, the setting of the sequential step work data (362) is completed, the output part data of the output processing data (371) is completed, and the output part data of the sequential step processing data of the motor 1 work (363) is completed. Next, trigger bits such as absolute condition bit, start bit, start condition bit, branch condition bit, and branch permission bit are constructed for each No. of the sequential step processing data for motor 1 work 363. Since there is no branching, the branch condition bit and branch permission bit for each No. are all set to 1 so that they do nothing and are always ON. Next, analyzing the absolute condition bits for this process reveals three elements: the stop switch is not pressed, the thermal is not tripped, and the emergency stop switch is not pressed. Therefore, the logical processing data of 361 is used. At this stage, the general-purpose bit address for the logical processing data of 361 can be determined, so the number 12, which is the continuation of the sequential step processing for Motor 1 operation, is used. This number also has no meaning, and any value can be used as long as it does not overlap. Next, analyzing the start bits for each No., the start bit for No. 1 is set to 2 because it is the start switch from the input processing. The start bit for No. 2 indicates that Motor 2 is not star-connected, and cannot be determined at this time. The start bit for No. 3, according to the specifications, starts 110 seconds after Motor 1 is star-connected, so the timing processing data of 372 is used. At this stage, the general-purpose bit address for the timing processing data of 372 can be determined, so the number 13, which is the continuation of the logical processing, is used. This number also has no meaning and can be any value as long as it does not overlap. The start bit for the timing processing data (372) is set to 10, which is the initial start bit for Motor 1 in the sequential step processing of Motor 1 work (363). Since the measurement does not stop, the count stop bit is set to always ON using negative logic. The control selection for No. 1 is ON delay. Returning to the continuation of the construction of the trigger bit for the sequential step processing data of Motor 1 work (363), we analyze the start condition bit for each No. 1. Since Motor 1 is not started in star connection, nor is it started in delta connection, the start condition bit for No. 1 uses the logical processing data (361) with two elements. At this stage, the general-purpose bit address for the logical processing data (361) can be determined, so we set it to 14, the number following the timing processing. This number also has no meaning and can be any value as long as it does not overlap. Furthermore, with the above settings, the ON bit addresses and OFF bit addresses of No. 1 and No. 2 of the reserved input portion of the output processing data 371 can be set to 10 and 11 of the sequential step processing data of the motor 1 operation 363. To summarize up to this stage, the input processing data (360) is completed, the sequential step work data (362) is completed, the logical processing data (361) of data No. 1 and No. 2 is completed, the output processing data (371) of the output part data and the input part data (No. 1 and No. 2) is completed, and the sequential step processing data (373) of all data except No. 2, whose activation condition is that motor 2 is not started in star connection, is completed. Next, to complete the control specifications for Motor 1, we must build the lamp control. Since there is only one lamp, the difference is expressed by its lighting or blinking time. The specification states that a 2-second blink indicates that the switch has been accepted, a 1-second blink indicates that the motor is being driven by a star connection, and a lit lamp indicates that the motor is being driven by a delta connection. Therefore, we will handle this by building logical processing data 361. Also, although there is a 2-second clock system bit, we will deliberately use the blinking control of the timing processing. As there are three ways to light the lamp, they will be set to No. 3 to No. 5 in the logical processing data of 361, No. 3 is the start indication of MC1, and the general-purpose bit address is set to the next 15. The number of elements is 2, and 10 and 0 are set for motor 1 initial start and the 1-second clock. No. 4 is the motor 1 start acceptance indication, and the general-purpose bit address is set to the next 16. The number of elements is 2, and 9 and a new 18 are set for motor 1 start acceptance and the newly created 2-second clock. The newly created 2-second clock is set to No. 2 in the timing processing data of 372, and the start bit is set to always ON with positive logic, and the count stop bit is set to always ON with negative logic, and blinking control is enabled, and the blink ON time and blink interval time are set. At this stage, the input processing data 360 is complete, the logical processing data 361 is complete from No. 1 to No. 5, the sequential step work data 362 is complete, the sequential step processing data for motor 1 work 363 is complete except for the start bit address No. 2, the output processing data 371 is complete except for the input part settings No. 4 to No. 6, and the timing processing data 372 is complete for No. 1 and No. 2. Finally, set up Motor 2 with the same specifications as Motor 1. That is, the sequential step processing data for the motor 2 operation 370 is set. According to the specifications, the motor consists of three processes: start acceptance by pressing the start switch, initial start by star connection, and switching by delta connection. Since each process simply transitions to the next number, all branch numbers associated with the numbers are set to 1, and the names are set to "Motor 2 start acceptance," "Motor 2 initial start," and "Motor 2 switching." Next, the branch 1 general-purpose bit addresses and branch 1 reset bit addresses associated with the numbers are set. Here, the branch 1 general-purpose bit addresses are set to 19, 20, and 21, which are the continuation numbers of the timing process, and the branch 1 reset bit addresses are set to the previous numbers except for No. 1. These numbers are also meaningless and can be any value as long as they do not overlap; however, the branch 1 reset bit address must be the address before the transition. Here, the start condition for No. 2 in the sequential step processing data for Motor 1 operation 363 is set to 20. At this stage, the setting of the input processing data (360) is complete, the setting of the sequential step work data (362) is also complete, the sequential step processing data for motor 1 work (363) is also complete, output processing data No. 1 to No. 3 (371) are complete, output data No. 4 to No. 6 are complete, and timing processing data No. 1 and No. 2 (372) are complete. Next, trigger bits such as absolute condition bit, start bit, start condition bit, branch condition bit, and branch permission bit are constructed for each No. of the sequential step processing data for motor 2 work 370. Since there is no branching, the branch condition bit and branch permission bit for each No. are all set to 1 so that they do nothing and are always ON. Next, analyzing the absolute condition bits for this process reveals three elements: the stop switch is not pressed, the thermal is not tripped, and the emergency stop switch is not pressed. Therefore, the logical processing data 361 is used. At this stage, the general-purpose bit address for the logical processing data 361 can be determined, so it is set to 22, the continuation number for the sequential step processing of Motor 2 operation 370. This number also has no meaning, and any value can be used as long as it does not overlap. Next, analyzing the start bits for each No., the start bit for No. 1 is set to 6 because it is a start switch from the input processing. The start bit for No. 2 is set to 10 because Motor 1 is not star-connected. The start bit for No. 3, according to the specifications, starts 160 seconds after Motor 2 is star-connected, so the timing processing data 372 is used. At this stage, the general-purpose bit address for the timing processing data 372 can be determined, so it is set to 23, the continuation number for the logical processing. This number also has no meaning and can be any value as long as it does not overlap. The start bit for the timing processing data (372) is set to 20, which corresponds to the initial start of motor 2 in the sequential step processing of motor 2 work (370). Since the measurement is not stopped, the count stop bit is set to always ON using negative logic. The control selection for No. 3 is ON delay. Returning to the continuation of the construction of the trigger bit for the sequential step processing data of motor 2 work (370), we analyze the start condition bit for each No. Therefore, the start condition bit for No. 1 uses the logical processing data (361) with two elements, since motor 2 is not started in star connection, nor is it started in delta connection either. At this stage, the general-purpose bit address for the logical processing data (361) can be determined, so we set it to 24, which corresponds to the continuation of the timing processing. This number also has no meaning and can be any value as long as it does not overlap. Furthermore, with the above settings, the ON bit addresses and OFF bit addresses of No. 4 and No. 5 in the reserved input portion of the output processing data 371 can be set to 20 and 21 of the sequential step processing data of the motor 2 operation 370. To summarize up to this stage, the input processing data (360) is completed, the logical processing data (361) data No. 1 to No. 7 is completed, the sequential step work data (362) is completed, the sequential step processing data for motor 1 work (363) is completed, the sequential step processing data for motor 2 work (370) is completed except for No. 2, whose activation condition is that motor 2 is not started in star connection, the output part data and input part data No. 1 to No. 5 for output processing data (371) are completed, and the timing processing data (372) is completed. Next, to complete the control specifications for Motor 2, we must build the lamp control. Since there is only one lamp, the difference is expressed by the lighting or blinking time. The specification is that blinking for 2 seconds indicates that the switch is accepted, blinking for 1 second indicates that the motor is driven by a star connection, and lighting indicates that the motor is driven by a delta connection. Therefore, we will deal with this by building logical processing data 361. There are three ways to light the lamp, so we will set it to No. 8 to No. 10 in the logical processing data of 361. No. 8 is the start indication of MC3, and the general-purpose bit address is set to the next 25. There are two elements, and the motor 2 initial start, 1-second clock, are set to 20 and 0. No. 9 is the motor 2 start acceptance indication, and the general-purpose bit address is set to the next 26. There are two elements, and the motor 2 start acceptance, 2-second clock, are set to 19 and 18. This completes the setting of all processing data. The processing data is set using address values, but since numerical values are difficult for people to understand intuitively, names may be used as symbols when creating the data.
[0086] FIG. 38 is a detailed data diagram 1 / 2 of the logical processing with modified specifications for operating two motors in one embodiment according to the present invention. FIG. 39 is a detailed data diagram 2 / 2 of the logical processing with modified specifications for operating two motors in one embodiment according to the present invention. In Figure 38, the left side of the double vertical lines is a group of TP / PC display, value, address, and memory type, from top to bottom, sandwiched between double horizontal lines, and consists of five groups, excluding those omitted. In Figure 39, the left side of the double vertical lines is a group of TP / PC display, value, address, and memory type, from top to bottom, sandwiched between double horizontal lines, and consists of four groups, excluding those omitted. The right side of the double vertical lines in the top group in Figure 38 consists of two items: the number of input processes and their numerical values. The right side of the double vertical lines in the remaining four groups in Figure 38 spans Figure 39 and consists of 15 items: No., blank, name, blank, blank, general-purpose bit address (10 / Hex), differentiation, logic selection, number of elements, element 1-bit address (10 / Hex), logic, element 2-bit address (10 / Hex), logic, element 3-bit address (10 / Hex), and logic. Because the address structure is omitted in Figure 38 and to make it easier to understand, a table of the start address and change order by number is attached below each of the five groups, with each row containing four items: number, start address, number of words, and change order. Specifically, the logical processing data for No. 1 starts at address 2759, has 22 words, and is third in the change order. The reason the start address is 2759 is because 2759 is the address after the last address, 2758, which is second in the change order in Figure 40, and was changed to third. The number of words varies depending on the name, so the motor 1 absolute condition requires eight words, making it 22 words. The next motor 1 activation condition, No. 2, created starts at address 2195, has 24 words, and is seventh in the change order. The reason the start address is 2195 is because the number of words in the previously created row did not increase, so no new area was required. Note that the 20 words from 2175, which were used previously, are unused. The omitted items No. 3 to No. 9 were also created in the same way. Figure 39, which overlaps with Figure 38, is the same as the logical processing data 361 in Figure 36. However, in Figure 39, which overlaps with Figure 38, No. 3 to No. 9 have been omitted, and the items are simply listed with three spaces added. There is no TP / PC indication because they are automatically assigned by the program. Note that the memory types shown are external, number, processing, and transfer, but external refers to memory outside the PLC as shown in Figure 4, processing refers to the processing data (memory) of the device general-purpose memory as shown in Figure 4, number refers to the number data (memory) of the device general-purpose memory as shown in Figure 4, and transfer refers to the transfer data (memory) of the device general-purpose memory as shown in Figure 4.
[0087] FIG. 40 is a detailed data diagram of a sequential stepping operation with modified specifications for operating two motors in one embodiment according to the present invention. The left side of the double vertical lines is a group of four items, from top to bottom: TP / PC display, value, address, and memory type, sandwiched between double horizontal lines. The top group has two items to the right of the double vertical lines: the number of sequential step operations and their numerical values. The remaining three groups have 10 items to the right of the double vertical lines: No., blank, name, blank, blank, number of operations, blank. To make the address structure easier to understand, a table of the start address and change order for each number is attached below the four groups, with each row consisting of four items: number, start address, number of words, and change order. More specifically, the sequential step operation data No. 1 starts at a start address of 2735, has 11 words, and is the first to be created. The reason the start address is 2735 is because the last row created previously in Figure 18 is output processing data No. 6, and the address after the last address, 2734, is 2735, making it the first to be created. The number of words varies depending on the name, and since motor 1 operation requires six words, it is 11 words. The sequential step operation data No. 2 created next starts at a start address of 2747, has 11 words, and is second to be created in the change order. This is the same as the sequential step operation data 362 in Figure 36, as shown in Figure 40. Note that in Figure 15, the item is simply written with four spaces added. The TP / PC indication is not present because it is automatically assigned by the program. Note that the memory types are displayed as external, processing, number, and transfer, but external refers to memory outside the PLC as shown in Figure 4, processing refers to the processing data (memory) of the device general-purpose memory as shown in Figure 4, number refers to the number data (memory) of the device general-purpose memory as shown in Figure 4, and transfer refers to the transfer data (memory) of the device general-purpose memory as shown in Figure 4.
[0088] FIG. 41 is a detailed data diagram 1 / 2 of motor 1 operation in sequential step processing with modified specifications for operating two motors in one embodiment according to the present invention. FIG. 42 is a detailed data diagram 2 / 2 of motor 1 operation in sequential step processing with modified specifications for operating two motors in one embodiment according to the present invention. In Figure 41, the left side of the double vertical lines is a group of TP / PC display, value, address, and memory type from the top, sandwiched between double horizontal lines, and consists of five groups excluding those omitted. In Figure 42, the left side of the double vertical lines is a group of TP / PC display, value, address, and memory type from the top, sandwiched between double horizontal lines, and consists of four groups excluding those omitted. The right side of the double vertical lines in the top group in Figure 41 consists of two items: the number of sequential stepping processes and their numerical values. The remaining four groups in Figure 41, to the right of the double vertical lines, span across Figure 42 and consist of 18 items: No., blank, name, blank, blank, absolute condition bit address (10 / Hex), logic, activation bit address (10 / Hex), logic, activation condition bit address (10 / Hex), logic, number of branches, branch 1 condition bit address (10 / Hex), logic, branch 1 enable bit address (10 / Hex), logic, branch 1 general purpose bit address (10 / Hex), branch 1 reset bit address (10 / Hex). To make the address structure easier to understand in Figure 41, a table of the start address and change order for each number is attached below the five groups, with each row containing four items: number, start address, number of words, and change order. More specifically, the sequential step processing data for No. 1 starts at 2781, has 25 words, and is fifth in the change order. The reason the start address is 2781 is because 2781 is the address next to the last address, 2780, which is third in the change order in Figures 38 and 39. The fourth address in the change order is No. 1 in Figure 41, which is fifth because it is a change with the same address. The number of words varies depending on the name, so the motor 1 start reception requires eight words, making it 25 words. The next created motor 1 initial start, No. 2, starts at 2806, has 25 words, and is sixth in the change order. The reason the start address is 2781 is because it is a continuation of No. 1. The next created motor 1 switch, No. 3, starts at address 2831, has 23 words, and is 8th in the change order. The reason why the start address is 2831 is that No. 2 in Figures 38 and 39, which is 7th in the change order, is the 8th change because it is the same address. Figure 42, which overlaps with Figure 41, is the same as the sequential step processing data 363 in Figure 36. Note that in Figure 42, which overlaps with Figure 41, the items are simply written with three spaces added. There is no TP / PC indication because they are automatically assigned by the program. Note that the memory types are displayed as external, number, processing, and transition, but external refers to memory outside the PLC as shown in Figure 4, processing refers to the processing data (memory) of the device general-purpose memory as shown in Figure 4, number refers to the number data (memory) of the device general-purpose memory as shown in Figure 4, and transition refers to the transition data (memory) of the device general-purpose memory as shown in Figure 4.
[0089] FIG. 43 is a detailed data diagram 1 / 2 of the motor 2 operation of sequential step processing with modified specifications for operating two motors in one embodiment according to the present invention. FIG. 44 is a detailed data diagram 2 / 2 of motor 2 operation in sequential step processing with modified specifications for operating two motors in one embodiment according to the present invention. In Figure 43, the left side of the double vertical lines is a group of TP / PC display, value, address, and memory type from the top, sandwiched between double horizontal lines, and consists of five groups excluding those omitted. In Figure 44, the left side of the double vertical lines is a group of TP / PC display, value, address, and memory type from the top, sandwiched between double horizontal lines, and consists of four groups excluding those omitted. The right side of the double vertical lines in the top group in Figure 43 consists of two items: the number of sequential stepping processes and their numerical values. The remaining four groups in Figure 43, to the right of the double vertical lines, span across Figure 44 and consist of 18 items: No., blank, name, blank, blank, absolute condition bit address (10 / Hex), logic, activation bit address (10 / Hex), logic, activation condition bit address (10 / Hex), logic, number of branches, branch 1 condition bit address (10 / Hex), logic, branch 1 enable bit address (10 / Hex), logic, branch 1 general purpose bit address (10 / Hex), branch 1 reset bit address (10 / Hex). To make the address structure easier to understand in Figure 43, a table of start addresses and change orders by number is attached below each of the five groups, with each row containing four items: number, start address, number of words, and change order. More specifically, the sequential step processing data for No. 1 starts at 2876, has 25 words, and is 11th in the change order. The reason the start address is 2876 is because 2876 is the address after the last address, 2875, which is 9th in the change order in Figures 38 and 39. The 10th change order is No. 2 in Figure 46, which is 11th because it is a change with the same address. The number of words varies depending on the name, so the motor 2 start reception requires 8 words, making it 25 words. The next created motor 2 initial start, No. 2, starts at 2901, has 25 words, and is 12th in the change order. The start address is 2901 because it is a continuation of No. 1. The next created motor 2 switch, No. 3, starts at address 2926, has 23 words, and is 14th in the change order. The reason why the start address is 2926 is that No. 7 in Figures 38 and 39, which is 13th in the change order, is a change with the same address, so it is 14th. Figure 44, which overlaps with Figure 43, is the same as the sequential step processing data 370 in Figure 37. Note that in Figure 44, which overlaps with Figure 43, the items are simply written with three spaces added. The TP / PC indication is not present because they are automatically assigned by the program. Note that the memory types are displayed as external, number, processing, and transition, but external refers to memory outside the PLC as shown in Figure 4, processing refers to the processing data (memory) of the device general-purpose memory as shown in Figure 4, number refers to the number data (memory) of the device general-purpose memory as shown in Figure 4, and transition refers to the transition data (memory) of the device general-purpose memory as shown in Figure 4.
[0090] FIG. 45 is a detailed data diagram of the output processing with modified specifications for operating two motors in one embodiment according to the present invention. The left side of the double vertical lines consists of five groups, from top to bottom: TP / PC display, value, address, and memory type, sandwiched between double horizontal lines. Excluding omitted sections, the top group consists of two items to the right of the double vertical lines: the number of output processes and their numerical values. The remaining four groups consist of 11 items to the right of the double vertical lines: No., blank, name, blank, blank, ON bit address (10 / Hex), logic, OFF bit address (10 / Hex), logic, device selection, and actual address (10 / Hex). Because this has been omitted, and to make the address structure easier to understand, a table of the start addresses and change order by number is attached below the five groups, with each row containing four items: No., start address, number of words, and creation order. Explaining in detail, the output processing data for No. 1 starts with a start address of 2597, has 23 words, and is 22nd in the change order. The reason why the start address is 2597 is because all the addresses and names, including those below in Figure 18, are the same. This is the same as the output processing data 371 in Figure 37, as shown in Figure 45. However, in Figure 45, No. 3 to No. 5 have been omitted, and only three spaces have been added to the items. The TP / PC indication is omitted because these are automatically assigned by the program. The memory types shown are external, processing, number, and transfer, but external refers to memory outside the PLC as shown in Figure 4, processing refers to the processing data (memory) in the device general-purpose memory as shown in Figure 4, number refers to the number data (memory) in the device general-purpose memory as shown in Figure 4, and transfer refers to the transfer data (memory) in the device general-purpose memory as shown in Figure 4.
[0091] FIG. 46 is a detailed data diagram 1 / 2 of a timing process with modified specifications for operating two motors in one embodiment according to the present invention. FIG. 47 is a detailed data diagram 2 / 2 of a timing process with modified specifications for operating two motors in one embodiment according to the present invention. In Figure 46, the left side of the double vertical lines is a group of TP / PC display, value, address, and memory type, from top to bottom, sandwiched between double horizontal lines, and consists of four groups, excluding those omitted. In Figure 47, the left side of the double vertical lines is a group of TP / PC display, value, address, and memory type, from top to bottom, sandwiched between double horizontal lines, and consists of three groups, excluding those omitted. The right side of the double vertical lines in the top group in Figure 46 consists of two items: the number of timing processes and their numerical value. The right side of the double vertical lines in the remaining three groups in Figure 46 spans Figure 47 and consists of 16 items: No., blank, name, blank, blank, control selection, start bit address (10 / Hex), logic, count stop bit address (10 / Hex), logic, flashing ON time, flashing interval time, elapsed time, general-purpose bit address (10 / Hex), and differentiation. To make the address structure easier to understand in Figure 46, a table of the start address and change order by number is attached below each of the four groups, with each row containing four items: number, start address, number of words, and change order. Specifically, the clock processing data for No. 1 starts at 2539, has 29 words, and is fourth in the change order. The reason the start address is 2539 is because it uses the same address as when it was created. The same is true for No. 2, which is the tenth in the change order. The clock processing data for No. 3 starts at 2949, has 21 words, and is sixteenth in the creation order. The reason the start address is 2949 is because the last address of the 14th change order in Figures 43 and 44 is 2948, and the next is 2949. Furthermore, the fifteenth change order in Figure 38 uses the address at the time of creation. Figure 47, which overlaps with Figure 46, is the same as the timing processing data 372 in Figure 37. However, the only difference is that the item has three spaces added. There is no TP / PC indication because it is automatically assigned by the program. The memory types shown are external, number, processing, and transfer, but external refers to memory outside the PLC as shown in Figure 4, processing refers to the processing data (memory) of the device general-purpose memory as shown in Figure 4, number refers to the number data (memory) of the device general-purpose memory as shown in Figure 4, and transfer refers to the transfer data (memory) of the device general-purpose memory as shown in Figure 4.
[0092] FIG. 48 is a ladder program circuit diagram 1 / 7 of a sequential step-by-step operation / processing according to one embodiment of the present invention. FIG. 49 is a ladder program circuit diagram 2 / 7 of a sequential step-by-step operation / processing according to one embodiment of the present invention. FIG. 50 is a ladder program circuit diagram 3 / 7 of a sequential step-by-step operation / processing according to one embodiment of the present invention. FIG. 51 is a ladder program circuit diagram 4 / 7 of a sequential step-by-step operation / processing according to one embodiment of the present invention. FIG. 52 is a ladder program circuit diagram 5 / 7 of a sequential step-by-step operation / processing according to one embodiment of the present invention. FIG. 53 is a ladder program circuit diagram 6 / 7 of a sequential step-by-step operation / processing according to one embodiment of the present invention. FIG. 54 is a ladder program circuit diagram 7 / 7 of a sequential step-by-step operation / processing according to one embodiment of the present invention. In other words, Figures 48 and 49 are circuit diagrams of a series of ladder programs for sequential step processing. This ladder program circuit diagram uses program instructions from a Mitsubishi Electric programmable logic controller (PLC). While changing addresses with a modifier register, processing is performed for each branch of each task number and each process number. Repeat instructions are used to repeat the process for the number of branches. Once the branch count is reached, the process count is repeated for the number of processes. Once the process count is reached, the process count is repeated for the number of tasks. Blocks 480 and 481 are preprocessing blocks, and blocks 483 through 54B perform the processing. Blocks 520 through 54F, 540 through 543, 544 through 547, and 548 through 54C are four subroutine programs. Each block will be described in detail below. The transition command GOEND in 480 does not perform the sequential step processing and transitions to the END of the sequential step processing program if the execution permission contact determined by the identification and initial processing program and the number of sequential step operations determined by the user are 0. The transfer command MOV of 481 transfers the start address of the sequential step operation data determined by the identification and initial processing program to the general-purpose device 1. The repeat command (1) FOR at 482 is paired with the repeat command (1) NEXT at 51B, and here, the number of repetitions is the number of sequential step operations. The call instruction CALL in 483 calls and executes the addition process 1 of the number. The calculation instruction + (addition) in 484 adds the interval to the next operation number address to the general-purpose device 1 and stores it in the modification register 20. The transfer instruction MOV in 485 transfers the general-purpose device modified by the modifying register 20 to the general-purpose device 2. In the 486, the arithmetic instruction + (addition) adds the interval up to the processing number to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV of 487 transfers the general-purpose device modified by the modifying register 20 to the general-purpose device 3. The calculation instruction + (addition) of 488 adds the interval to the start address of the processing number to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV in 489 transfers the general-purpose device qualified by the qualification register 20 to the general-purpose device 4 . The transfer command MOV in 48A transfers data from general-purpose device 4 to general-purpose device 6. The repeat instruction (2) FOR at 48B is paired with the repeat instruction (2) NEXT at 517, and here, repeats are performed the number of times equal to the number of sequential step processing. The call instruction CALL in 48C calls and executes the number addition process 2. In 48D, the calculation instruction + adds the interval to the next processing number address to the general-purpose device 4 and stores it in the modification register 20. The transfer instruction MOV at 48E transfers the general-purpose device with the modifier register 20 to the general-purpose device 5. In 48F, the calculation instruction + adds the distance to the absolute condition bit address to the modification register 20 and stores the result in the modification register 20. The transfer instruction MOV at 48G transfers a general-purpose device with modifier register 20 to modifier register 1. The calculation instruction + at 48H adds the interval to the logic of the absolute condition to the modifier register 20 and stores the result in the modifier register 20. The transfer instruction MOV in 48J transfers a general-purpose device with modifier register 20 to modifier register 9. In the calculation instruction + of 490, the interval to the activation bit address is added to the modification register 20 and stored in the modification register 20. In 491, the transfer instruction MOV transfers a general-purpose device with modifier register 20 to modifier register 2. In the calculation instruction + of 492, the interval to the logic of the activation bit is added to the modification register 20 and stored in the modification register 20. In the transfer instruction MOV of 493, a general-purpose device with modifier register 20 is transferred to modifier register 10. In the calculation instruction 494, the interval to the activation condition bit address is added to the modification register 20 and stored in the modification register 20. In 495, the transfer instruction MOV transfers a general-purpose device with modifier register 20 to modifier register 3. In the calculation instruction + of 496, the interval to the logic of the activation condition bit is added to the modification register 20 and stored in the modification register 20. In 497, the transfer instruction MOV transfers a general-purpose device with modifier register 20 to modifier register 11. In the calculation instruction + of 498, the interval up to the branch number is added to the modifier register 20 and stored in the modifier register 20. In 499, the transfer instruction MOV transfers a general-purpose device with modifier register 20 to modifier register 4. In the calculation instruction + of 49A, the interval of the branch 1 condition bit address is added to the qualification register 20 and stored in the general-purpose device 10. In 49B, the operation instruction + adds the logical interval of the branch 1 condition bit to the general-purpose device 10 and stores it in the general-purpose device 11. In 49C, the arithmetic instruction + adds the branch 1 permission bit address interval to the general-purpose device 11 and stores it in the general-purpose device 12. In 49D, the operation instruction + adds the logical interval of the branch 1 permission bit to the general-purpose device 12 and stores it in the general-purpose device 13. In 49E, the operation instruction + adds the interval of the branch 1 general-purpose bit address to the general-purpose device 13 and stores it in the general-purpose device 14. At 49F, the arithmetic instruction + adds the branch 1 reset bit address interval to the general-purpose device 14 and stores it in the general-purpose device 15. In 49G, the arithmetic instruction + adds the intervals of both the branch 1 condition bit address and logic and stores them in the general-purpose device 7. At 49H, the arithmetic instruction + adds the branch 1 permission bit address interval to the general-purpose device 7 and stores it in the general-purpose device 7. In 49J, the operation instruction + adds the logical interval of the branch 1 permission bit to the general-purpose device 7 and stores it in the general-purpose device 7. The 49K calculation instruction + adds the branch 1 general-purpose bit address interval to general-purpose device 7 and stores it in general-purpose device 7. In 49L, the arithmetic instruction + adds the branch 1 reset bit address interval to the general-purpose device 7 and stores it in the general-purpose device 7. The transfer command MOV at 49M transfers 0 to general-purpose device 8. The repeat instruction (3) FOR of 500 is paired with the repeat instruction (3) NEXT of 513, and in this case, the number of repetitions is the number of general-purpose devices with modifier register 4. In the calculation instruction * of 501, general-purpose device 7 is multiplied by general-purpose device 8 and the result is stored in general-purpose device 7. In the calculation instruction + of 502 , the general-purpose device 9 is added to the general-purpose device 10 and the result is stored in the modifier register 20 . The transfer instruction MOV in 503 transfers the general-purpose device with the modifier register 20 to the modifier register 5. In the calculation instruction + of 504 , the general-purpose device 7 is added to the general-purpose device 9 and the result is stored in the modifier register 20 . The transfer instruction MOV in 505 transfers the general-purpose device with the qualifier register 20 to the qualifier register 12. In the calculation instruction + of 506 , the general-purpose device 7 is added to the general-purpose device 10 and the result is stored in the modifier register 20 . The transfer instruction MOV in 507 transfers a general-purpose device with modifier register 20 to modifier register 6. In the calculation instruction + of 508, the general-purpose device 7 is added to the general-purpose device 11 and the result is stored in the modifier register 20. The transfer instruction MOV in 509 transfers the general-purpose device with the modifier register 20 to the modifier register 13. In 50A, the calculation instruction + adds the general-purpose device 7 to the general-purpose device 12 and stores the result in the modifier register 20. The transfer instruction MOV in 50B transfers the general-purpose device with modifier register 20 to modifier register 7. In 50C, the calculation instruction + adds the general-purpose device 7 to the general-purpose device 13 and stores the result in the modifier register 20. The transfer instruction MOV in 50D transfers a general-purpose device with modifier register 20 to modifier register 8. The call instruction CALL at 50E calls the subroutine for resetting all general-purpose bits at 520 if the general-purpose bits modified by the modification register 1 are inactivated according to the logic of the absolute condition bits. The SET operation instruction in 50F follows the logic of the absolute condition bit, and if the general-purpose bit modified by the modification register 1 is inactivated, the general-purpose bit during order discarding is set (activated). The repeat instruction BREAK of 50G follows the logic of the absolute condition bit, and if the general-purpose bit modified by the modification register 1 is inactivated, it discards the repeat instruction (3) and moves to the repeat completion position 1 pointer. The calculation instruction RST of 510 activates the general-purpose bit modified by the qualification register 1 according to the logic of the absolute condition bit, and activates the general-purpose bit modified by the qualification register 2 according to the logic of the activation bit, and activates the general-purpose bit modified by the qualification register 3 according to the logic of the activation condition bit, and When the general-purpose bit modified by the qualifier register 5 is activated according to the logic of the branch condition bit, and when the general-purpose bit modified by the qualifier register 6 is activated according to the logic of the branch permission bit, the general-purpose bit with the qualifier R8 is reset. The calculation instruction SET of 511 activates the general-purpose bit modified by the qualification register 1 according to the logic of the absolute condition bit, and activates the general-purpose bit modified by the qualification register 2 according to the logic of the activation bit, and activates the general-purpose bit modified by the qualification register 3 according to the logic of the activation condition bit, and When the general-purpose bit modified by the Qualification Register 5 is activated according to the logic of the branch condition bit, and when the general-purpose bit modified by the Qualification Register 6 is activated according to the logic of the branch permission bit, the general-purpose bit with the Qualification Register 7 is set. The calculation instruction INC at 512 adds 1 to the general-purpose device 6. This changes the value of each modifier register for the next branch when repeating. The repeat command (3) NEXT 513 is paired with the repeat command (3) FOR, and returns to the repeat command (3) FOR and repeats the subsequent commands until the number of repetitions is exceeded. The repeat completion position 1 pointer 514 is the destination of the repeat instruction BREAK 50G. If the general-purpose bit during order discarding is activated, the repeat instruction BREAK of 515 discards the repeat instruction (2) and moves to the repeat completion position 2 pointer. The transfer command MOV in 516 transfers data from general-purpose device 4 to general-purpose device 3 . The repeat command (2) NEXT in 517 is paired with the repeat command (2) FOR, and returns to the repeat command (2) FOR and repeats the subsequent commands until the number of repetitions is exceeded. The repeat completion position 2 pointer 518 is the destination of the repeat instruction BREAK 515 . The calculation instruction RST in 519 resets (deactivates) the general-purpose bit during order discarding if the general-purpose bit during order discarding is activated. The transfer command MOV in 51A transfers data from general-purpose device 2 to general-purpose device 1. The repeat command (1) NEXT in 51B is paired with the repeat command (1) FOR, and returns to the repeat command (1) FOR and repeats the commands thereafter until the number of repetitions is exceeded. The structural command FEND of 51C ends this sequential step processing program. The all-purpose bit reset processing pointer 520 is the call destination for the call instruction CALL 50E. The transfer command MOV in 521 transfers the general-purpose device 1 to the general-purpose device 20 . The transfer instruction MOV in 522 transfers the general-purpose device with the qualification register 20 to the general-purpose device 14 . The repeat instruction (4) FOR of 523 is paired with the repeat instruction (4) NEXT of 53E, and here, repeats are performed for the number of sequential step processing. The call instruction CALL at 524 calls and executes the number addition process 3. In the calculation instruction + of 525, the interval to the next processing number address is added to the general-purpose device 16 and stored in the modification register 20. The transfer instruction MOV in 526 transfers the general-purpose device with the qualification register 20 to the general-purpose device 17 . In the calculation instruction + of 527, the interval to the absolute condition bit address is added to the modification register 20 and stored in the modification register 20. In the calculation instruction + of 528, the interval to the logic of the absolute condition is added to the modification register 20 and stored in the modification register 20. In the calculation instruction + of 529, the interval to the activation bit address is added to the modification register 20 and stored in the modification register 20. In the calculation instruction + of 52A, the interval to the logic of the activation bit is added to the modification register 20 and stored in the modification register 20. In 52B, the calculation instruction + adds the interval to the activation condition bit address to the modification register 20 and stores the result in the modification register 20. In the calculation instruction + of 52C, the interval to the logic of the activation condition bit is added to the modification register 20 and stored in the modification register 20. In the calculation instruction + of 52D, the interval up to the branch number is added to the modifier register 20 and stored in the modifier register 20. The transfer instruction MOV at 52E transfers a general-purpose device with modifier register 20 to modifier register 4. In the calculation instruction + at 52F, the interval of the branch 1 condition bit address is added to the qualification register 20 and stored in the general-purpose device 10. In the arithmetic instruction + of 52G, the logical interval of the branch 1 condition bit is added to the general-purpose device 10 and stored in the general-purpose device 11. At 52H, the arithmetic instruction + adds the branch 1 permission bit address interval to the general-purpose device 11 and stores it in the general-purpose device 12. In the calculation instruction + of 52J, the logical interval of the branch 1 permission bit is added to the general-purpose device 12 and stored in the general-purpose device 13. The 52K calculation instruction + adds the branch 1 general-purpose bit address interval to the general-purpose device 13 and stores it in the general-purpose device 14. In 52L, the arithmetic instruction + adds the branch 1 reset bit address interval to the general-purpose device 14 and stores it in the general-purpose device 15. In the calculation instruction + of 530, the intervals of both the branch 1 condition bit address and logic are added and stored in the general-purpose device 7. In the calculation instruction + of 531, the interval of the branch 1 permission bit address is added to the general-purpose device 7 and stored in the general-purpose device 7. In the calculation instruction + of 532, the logical interval of the branch 1 permission bit is added to the general-purpose device 7 and stored in the general-purpose device 7. In the calculation instruction + of 533, the interval of the branch 1 general-purpose bit address is added to the general-purpose device 7 and stored in the general-purpose device 7. In the calculation instruction + of 534, the interval of the branch 1 reset bit address is added to the general-purpose device 7 and stored in the general-purpose device 7. The transfer command MOV in 535 transfers 0 to the general-purpose device 8. The repeat instruction (5) FOR at 536 is paired with the repeat instruction (5) NEXT at 53E, and in this case, the number of repetitions is the number of general-purpose devices with modifier register 4. In the calculation instruction * of 537, general-purpose device 7 is multiplied by general-purpose device 8 and the result is stored in general-purpose device 9. In the calculation instruction + of 538, the general-purpose device 9 is added to the general-purpose device 10 and the result is stored in the modifier register 20. The transfer instruction MOV in 539 transfers a general-purpose device with modifier register 20 to modifier register 7. The calculation instruction RST in 53A resets (deactivates) the general-purpose bit with modifier register 7. In preparation for repetition, the calculation instruction INC at 53B adds 1 to the general-purpose device 8. This changes the value of the next branch number when repetition occurs. The repeat command (5) NEXT in 53C is paired with the repeat command (5) FOR, and returns to the repeat command (5) FOR and repeats the commands that follow it until the number of repetitions is exceeded. In preparation for repetition, the transfer command MOV at 53D transfers the general-purpose device 17 to the general-purpose device 16. This changes the value of each modifier register in the next No. when repetition occurs. The repeat instruction (4) NEXT in 53E is paired with the repeat instruction (4) FOR, and returns to the repeat instruction (4) FOR and repeats the instructions thereafter until the number of repetitions is exceeded. The call is completed by the call back instruction RET at 53F, and the process proceeds to the next call instruction at 50E. The pointer 540 for the number addition process 1 is the call destination for the call instruction CALL 483 . The arithmetic instruction + (addition) in 541 adds 1 to the general-purpose device 1 and stores it in the modifier register 20. The calculation instruction + (addition) in 542 adds modifier register 20 to the general-purpose device with modifier register 20 and stores it in general-purpose device 1. The call is completed by the call back instruction RET at 543, and the process proceeds to the next call instruction at 483. The pointer 2 for the number addition process 544 is the call destination for the call instruction CALL 48C. The arithmetic instruction + (addition) of 545 adds 1 to the general-purpose device 4 and stores it in the modifier register 20. The calculation instruction + (addition) of 546 adds the modifier register 20 to the general-purpose device with modifier register 20 and stores it in the general-purpose device 4. The call is completed by the call back instruction RET at 547, and the process moves to the next call instruction at 48C. The pointer 548 for the number addition process 3 is the call destination for the call instruction CALL 524 . The arithmetic instruction + (addition) of 549 adds 1 to the general-purpose device 16 and stores it in the modifier register 20. The calculation instruction + (addition) of 54A adds the modifier register 20 to the general-purpose device with modifier register 20 and stores it in the general-purpose device 16. The call is completed by a call back instruction RET at 54B, and the process proceeds to the next call instruction at 524. The structural command END in 54C ends the program file.
[0093] (concept) In this sequential step processing, data can be freely set, so the processing can be largely left to the discretion of the data creator, but here we will explain the flow chart and the work and processing. Flowcharts created to control equipment and devices represent each step in a process, a characteristic of dynamic systems, or each means, procedure, or operation used to find a solution to a problem, using boxes containing the contents. The flow is represented by lines and arrows between the boxes, or by distributing the lines and arrows, or by being composed of multiple flowcharts. They can express simple to complex processes and algorithms. Each step in a process, a characteristic of dynamic systems, is a process step in process control. Furthermore, dynamic systems are systems that take time to return a certain result or do not reach a certain result at all. Each means, procedure, or operation used to find a solution to a problem is a function that converts some input into an output. Specifically, this could be a sensor turning on, a set speed being reached, or a set temperature being reached. In this idea, multiple flowcharts created to control devices and equipment are replaced with a structure (task) that controls the processes. In other words, to control devices and equipment, there may be multiple independent flowcharts or flowcharts that affect other flowcharts, so multiple processes are managed under the name of tasks. Specifically, in the sequential step task data 362 in Figure 36, there is a relationship where each is independent but influences the other, such as No. 1 motor 1 task and No. 2 motor 2 task. In addition, each step of a process, each means, procedure, and operation in a flowchart created to control a device or equipment is replaced with a series of multiple data linked to the order of processing in sequential step processing. In other words, sequential step processing data treats a series of multiple data linked to the order of processing as a single unit, and by repeating processing with a series of multiple data linked to the order of processing as a single unit, it corresponds to an increase or decrease in the number of each step of a process, and the number of means, procedures, and operations in the flowchart. In addition, the branching and diverging flows of flowcharts created to control devices and equipment are replaced by the number of branches and the corresponding items. Flowcharts created to control devices and equipment may have different destinations depending on decisions and conditions, or may have additional destinations depending on decisions and conditions, and may even transition to external flowcharts. Considering the above scenarios, transitions cannot be made solely within the flow chart itself; the status of the other flow chart must be taken into account. Therefore, a branch permission bit is provided in the item for each branch. Specifically, when transfer devices with the same structure are lined up in succession, if the previous device is not in the receiving position, the subsequent device must be stopped. While a single step or procedure is generally executed within a single flow chart, this is not completely prohibited and is left to the creator's discretion. The contents of the boxes in the flowchart are all derived from bit address data and selection data. This is also made up of bits created by external processing. Selection data is data that indicates whether a bit is activated by positive logic or negative logic, and is determined by a predetermined numerical value. Furthermore, when a series of trigger bits, such as absolute condition bit, activation bit, activation condition bit, branch condition bit, and branch permission bit, modified by a modifier register in which the address data of the bit is set based on the selection data, are activated, the bit modified by the modifier register in which the address data of the bit is set is activated, and the bit modified by the modifier register in which the address data of the bit of No, which caused the No that activated the bit to be monitored, is deactivated. In other words, the activation of the bit indicates how far each step or procedure of the process has been completed, and it remains activated until the series of trigger bits currently being monitored are activated. By using the above substitutions and others, all algorithms are replaced with changes in data.
[0094] FIG. 55 is a flow chart diagram of a programmable logic controller (PLC) according to one embodiment of the present invention. In 550 of Figure 55, when the power is turned from OFF to ON or from STOP to RUN, the programmable logic controller (PLC) starts up. First, a program check process is performed in 551. Next, an I / O refresh is performed in 552, and the process moves to END process 1 in 553. The identification and initial processing programs are performed in the specified order in 555, and the process moves to END process 2 in 554. Next, an I / O refresh is performed in 552, and the process moves to END process 1 in 553. The differential reset processing program for timing processing in 556, the input device data processing program in 557, the device data calculation processing (input reference) program in 558, the input processing program in 559, the interface processing program in 55A, the logic processing program in 55B, the sequential step processing program in 55C, the device data calculation processing (output reference) program in 55D, and the output processing program in 55E are performed in the specified order, and the process moves to END process 2 in 554, and the process returns to before the I / O refresh in 552, and is repeated until the power is changed from ON to OFF or from RUN to STOP. In other words, the 25 initial execution type programs in the flowchart of FIG. 2 have been combined into a single identification and initial processing program of the initial execution type program 555, the 26 scan execution type programs have been combined into 10 programs, namely, the 556 differential reset processing program for timing processing, the 557 input device data processing program, the 558 device data calculation processing (input reference) program, the 559 input processing program, the 55A interface processing program, the 55B logic processing program, the 55C sequential step processing program, the 55D device data calculation processing (output reference) program, and the 55E output processing program, the 27 fixed cycle execution type programs have been combined into a single timing processing program 55F, and without using the 28 standby type programs, an algorithm function equivalent to that of the flowchart of FIG. 2 has been obtained. All algorithms can be constructed using the above alone, but programs can be added if you want to apply previously created and proven program assets or to handle complex arithmetic calculations, etc., but the insertion position is important. When adding an initial execution type program, it should be inserted either between END processing 1 of 553 and the identification and initialization processing program of 555 before the repetition, or between the identification and initialization processing program of 555 and the I / O refresh of 552, depending on whether it affects or is affected by this invention, the identification and initialization processing program of 555. Also, when adding a scan execution type program, it should be inserted between END processing 1 of 553 and END processing 2 of 554 within the repetition, but it can also be inserted anywhere from the differential reset processing program of the timing processing of 556 to the output processing program of 55E, but care must be taken to see how it will affect or be affected by this invention. In particular, the program from the differential reset processing program of the timekeeping process 556 to the interface processing program 55A processes what comes in, while the program from the logic processing program 55B to the output processing program 55E processes what comes out, so careful attention is required. Note that once a program is inserted, it is no longer a general-purpose program but a custom-made program, so great care is required. Before explaining why the differential reset processing program for the timing process (556) is the first program in this invention, let us first explain differential processing. Differentiation is a method of command or output. Typically, when a condition is met, a command continues to be executed or output. This is also called level output, and when the condition is no longer met, the command or output stops. Differentiation changes this behavior so that, even if repeated, the command is executed or output for only one scan. Furthermore, even if the condition continues to be met, once a command is executed or output, it will not be executed or output again until the condition is no longer met. This method of command or output is called differential processing and is widely used. In this invention, we intentionally avoid differential processing of commands for simplicity or because conditions can be replaced with differential processing. Furthermore, it must be explained that only timing processing programs that control output by measuring time are fixed-cycle execution type programs. Programmable logic controllers (PLCs) have existing timers, but many of these timers do not operate correctly with the repeating structure of programs that use numbers as units, so fixed-cycle execution type programs are used by counting using fixed cycles as units. There is no problem if the output is at a level, but if it is differentiated, in a scan execution type program, there is a risk of missing data depending on the time of one scan and the interval of the fixed cycle, so as a scan execution type program outside of fixed-cycle execution programs, the pulse width is differentiated to be more than one scan but less than two scans, rather than one scan. There is no particular reason why the differential reset processing program for timing processing is at the beginning of the scan execution type program of this invention, but the differential processing that occurs in other scan execution type programs is processed at the beginning after one scan, so it is simply placed in a similar position. The input device data processing program, which compares device data, the device data calculation processing (input reference) program that executes calculation instructions, and the input processing program in the first half sandwiched between the scan execution type program, do not pose a major problem as long as they do not exceed the logic processing program, sequential step processing program, device data calculation processing (output reference) program, and output processing program in the second half that determine the output. However, since the first half of the program is likely to use the results of the programs before it, the order of input device data processing program, device data calculation processing (input reference) program, and input processing program is used, but if you are prepared for a delay of one scan, this will not pose a major problem. The same applies to the second half of the program. In this invention, the program can be made to support all algorithms by simply changing the device data through the construction of a conventional program without changing the existing programmable logic controller (PLC), but when a manufacturer of programmable logic controllers (PLCs) constructs this invention, in order to eliminate the risk of changes, the program may be lowered to a level similar to I / O fresh processing or END processing that cannot be accessed by the person creating the program.Furthermore, the concept of a program may be eliminated altogether, and a datable logic controller (DLC) may be made.
[0095] FIG. 56 is a relationship diagram of the main programs in one embodiment of the present invention. The main programs are essential programs for realizing various algorithms, and include an input processing program 561 that is constrained by input processing device data 560 set on the touch panel (TP) screen, a logic processing program 563 that is constrained by logic processing device data 562 set on the touch panel (TP) screen, a sequential step processing program 565 that is constrained by sequential step processing device data 564 set on the touch panel (TP) screen, an output processing program 567 that is constrained by output processing device data 566 set on the touch panel (TP) screen, and a program 568 that is constrained by output processing device data 567 set on the touch panel (TP) screen. The eight programs are: input device data processing program 569, which is constrained by input device data processing device data 568; timing processing program 56B, which is constrained by timing processing device data 56A, which is set on the touch panel (TP) screen; device data calculation processing (input reference) program 56D, which is constrained by device data calculation (input reference) device data 56C, which is set on the touch panel (TP) screen; and device data calculation processing (output reference) program 56F, which is constrained by device data calculation (output reference) device data 56E, which is set on the touch panel (TP) screen. The dashed lines and their arrows indicate the direction in which general-purpose device bits (general-purpose bits) are generated and consumed, and the thick dashed lines and their arrows indicate the direction in which general-purpose device data is generated and consumed. With shifted timing, the output device bits and output device data protruding from the left square are ultimately released to complete various algorithms. The touch panel (TP) screen is controlled by interface processing.
[0096] FIG. 57 is a diagram showing the device memory layout used by each program in one embodiment of the present invention. 570 is a representative device memory area of a physical memory area. Device memory has different device types for each manufacturer, but we will use a representative device. The area from the beginning of the physical device memory area to the first starting address of the device data used in process 1 in 572 is the initial constant area 571 and touch panel display area. From here on, the first and second data groups of device data used in process 1 from the first starting address of device data used in process 1 in 572 to the first starting address of device data used in process 2 in 573, the first and second data groups of device data used in process 2 from the first starting address of device data used in process 2 in 573 to the first starting address of device data used in process 3 in 574, the first and second data groups of device data used in process 2 from the first starting address of device data used in process 3 in 574 to the first starting address of device data used in process 4 in 575, the first and second data groups of device data used in process 4 from the first starting address of device data used in process 4 in 575 to the first starting address of device data used in process 5 in 576, and the first starting address of device data used in process 5 in 576 to the first starting address of device data used in process 5 in 577 the first and second data groups of device data used in process 5 up to the first starting address of device data used in process 6 of 57A, the first data group of device data used in process 6 from the first starting address of device data used in process 6 of 577 up to the first starting address of device data used in process 578, etc., the first data group of device data used in process n of 579 from the first starting address of device data used in process n of 579 up to the third starting address of device data used in process 1 of 57A, the third data group of device data used in process 1 from the third starting address of device data used in process 1 of 57A up to the third starting address of device data used in process 2 of 57B,The third data group of device data used in process 2 of 57B from the third starting address of the device data used in process 3 of 57C, the third data group of device data used in process 3 of 57C from the third starting address of the device data used in process 3 of 57C to the second starting address of the device data used in process 6 of 57D, the second data group of device data used in process 6 of 57D from the second starting address of the device data used in process 4 of 57E, the third data group of device data used in process 4 of 57E from the third starting address of the device data used in process 4 of 57F to the second starting address of the device data used in process ... of 57F, the second data group of device data used in process ... of 57G from the third starting address of the device data used in process 5 of 57G to the third starting address of the device data used in process n of 57H the third data group of device data used in processing 5 from the second starting address of device data used in processing n of 57H to the third starting address of device data used in processing … of 57J; the third data group of device data used in processing n from the third starting address of device data used in processing … of 57J to the third starting address of device data used in processing 6 of 57K; the third data group of device data used in processing 6 from the third starting address of device data used in processing 6 of 57K to the third starting address of device data used in processing n of 57L; the third and …th data group of device data used in processing n from the third starting address of device data used in processing n of 57L to the …th starting address of device data used in processing 6 of 57M; the …th data group of device data used in processing 6 from the …th starting address of device data used in processing 6 of 57M to the …th starting address of device data used in processing 4 of 57NThe …th data group of device data used in process 4 of 57N from the …th starting address of the device data used in process 2 of 57P, the …th data group of device data used in process 2 of 57P from the …th starting address of the device data used in process 3 of 57Q, the …th data group of device data used in process 3 of 57Q from the …th starting address of the device data used in process 3 of 57R, the …th data group of device data used in process … of 57R from the …th starting address of the device data used in process 1 of 57S, the …th data group of device data used in process 1 of 57S from the …th starting address of the device data used in process 5 of 57T, the …th data group of device data used in process n of 57U from the …th starting address of the device data used in process 5 of 57T ...th data group of device data used in processing 5 up to the nth starting address of device data, the nth data group of device data used in processing n from the nth starting address of device data used in processing n of 57U to the nth starting address of device data used in processing ... of 57V, the nth data group of device data used in processing n from the nth starting address of device data used in processing ... of 57V to the nth starting address of device data used in processing 6 of 57W, the nth data group of device data used in processing 6 from the nth starting address of device data used in processing 6 of 57W to the nth starting address of device data used in processing 5 of 57X, the nth data group of device data used in processing 5 from the nth starting address of device data used in processing 5 of 57X to the nth starting address of device data used in processing 4 of 57Y, the nth data group of device data used in processing 4 from the nth starting address of device data used in processing 4 of 57Y to the nth starting address of device data used in processing 3 of 57Z,The nth data group of device data used in process 3 of 57Z from the nth starting address of device data used in process 2 of 57a to the nth starting address of device data used in process 2 of 57a, the nth data group of device data used in process 2 of 57a from the nth starting address of device data used in process 2 of 57a to the nth starting address of device data used in process 1 of 57b, and the nth data group of device data used in process 1 of 57b from the nth starting address of device data used in process 1 of 57b to the starting address of unused device memory area of 57c are used. This order is the order of creation, meaning that they were created in this order. In other words, even if the exact same device is created in a different order, the order will not be the same, so this order is meaningless. However, even if the size of each process number is not constant, the device memory can be densely packed, but for each process number, the return address value of the previous number and the destination address value of the next number must be elements.
[0097] If the device memory area for that number becomes smaller, there is no problem, but if the device memory area for that number becomes larger, a new area must be created, which results in a large gap. Therefore, a measure is required to create a program to fill in the gaps when the equipment or device is down.
[0098] FIG. 58 is a device memory layout diagram in which the device memory is rearranged for each process according to one embodiment of the present invention. Figure 58 shows the device memory allocation diagram used in each program in Figure 57, rearranged by process. This arrangement is important for executing each processing program row by row. 580 is process 1, 581 is the element group of process 1, 582 is the order of process 1, 583 is the device data group of process 1, 584 is process 2, 585 is the element group of process 2, 586 is the order of process 2, 587 is the device data group of process 2, 588 is process 3, 589 is the element group of process 3, 58A is the element group of process 3, 58B is the device data group of process 3, 58C is process 4, 58D is the element group of process 4, 58E is the order of process 4, 58F is the device data group of process 4, 58G is process 5, 58H is the element group for process 5, 58J is the order of process 5, 58K is the device data group for process 5, 58L is process 6, 58M is the element group for process 6, 58N is the order of process 6, 58P is the device data group for process 6, 58Q is process..., 58R is the element group for process..., 58S is the order of process..., 58T is the device data group for process..., 58U is process n, 58V is the element group for process n, 58W is the order of process n, and 58X is the device data group for process n. To rearrange device memory for each process, the initial setting data for each process stores the first address value, and for each process number, the return address value for the previous number and the destination address value for the next number are stored. From a programming perspective, this allows for easy access to the desired element, rather than rearranging the elements. The order and rules of the elements are also important, and initial setting data and comments must be stored as rules. For elements whose size varies, such as character strings, the number of words used is set as a separate element. Furthermore, for elements whose number of elements varies, such as the number of elements (number of consecutive elements) in logical sums and products, the number of words used is set as a separate element. In the case of logical sums and products, which are shown as examples, the address and logic (positive or negative logic) are increased by two elements at a time. As another example, the number of branches in sequential step processing is also increased by six elements: the branch condition bit address and its logic (positive logic or negative logic), the branch permission bit address and its logic (positive logic or negative logic), the branch general-purpose bit address, and the branch reset bit address.
[0099] (concept) Further explanation will be given based on the detailed explanation of Figures 57 and 58. Generally, memory is something that stores data, but some have a power failure retention function and some do not, and they are also classified by function and area, such as program memory and device memory. The memory of this device is a device memory that can store data and can be retained during a power failure, and stores processed data. Processing data is processing data used to realize steps and algorithms. When processing is performed based on processing data with multiple items, it is replaced by the next processing data with multiple items in a modifier register, and further processing is performed until the processing data is exhausted. When it is exhausted, the process returns to the beginning and repeats. If there are multiple processing data for different processes that repeat this series of processes, the number of processing data to be processed will differ for each process, and the processing data for different processes cannot be arranged in the next free memory area. Generally, this is done by allocating memory space for each process and arranging multiple processing data at equal intervals. Not only does this result in a lot of unused space and waste, but it is also not possible to exceed the area determined by prediction. Therefore, as data other than processing data having multiple items, the starting address of the processing data having multiple items to be executed next and the starting address of the processing data having multiple items executed previously are added as migration data to the processing data having multiple items for each process, and the migration data is corrected when processing data is added or changed or deleted beyond the area, so that not only can processing data having multiple items that contain a mixture of different processes be continuously arranged in memory, but also only multiple data having multiple items that perform the same process can be sequentially extracted from the mixed processing data based on the starting address of the migration data. Furthermore, when processing data with multiple items and data other than migration data is repeated within that processing, adding the number of repetitions as repeat data not only allows the data to be continuously arranged in memory even if the number of data in one processing and the next processing differs, but also makes it possible to extract the data sequentially based on the start address of the migration data.Incidentally, data is generally arranged by providing a memory area with the maximum number of repetitions for each processing.
[0100] Figure 59 is a diagram showing the relationship between the device memory of a certain process and the display device memory when a touch panel (TP) is used in one embodiment of the present invention and the touch panel (TP) has a function for changing the device memory for each process. In recent years, in factories, physical switches, lamps, and digital switches are being replaced with touch panels (TPs) as interfaces, except for safety-related areas, due to their reduced wiring labor and physical size. Touch panels, which began to spread during this period, were initially considered large input / output devices, and programmable logic controller (PLC) programmers were expected to handle touch panel operations. Recently, touch panels (TPs) are no longer considered large input / output devices; some even have the functionality to create and modify PLC programs. However, touch panels also vary in size and resolution, and some factories even display the manufacturer's logo, creating unique screen data for each device. This is the opposite of the purpose of this invention, which is why we present a method for doing so. In Figure 59, 590 is a device memory group obtained by rearranging the device memory of a certain process. 591 is a group of numbers that can be displayed on the touch panel (TP), which is assumed to be 15 lines here, although it is a temporary measure. In other words, the maximum number of lines for that model is 15 lines. 592 is a display device data group on the device data group side of a certain process, 593 is a number variable group for the touch panel (TP), 594 is a display device data group on the touch panel (TP) side, 595 is a number as an element on the touch panel (TP) side, and 596 is a group of elements that can be displayed on the touch panel (TP), which is assumed to be two elements here, although it is a temporary measure. In other words, the maximum number of elements for that model is two elements. Assuming that the maximum possible model is selected, in Figure 59, what is currently displayed on the display touch panel (TP) is the number variable group for touch panel (TP) 593, which displays values from 7 to 21. In other words, the value of D01-00 is 7, the value of D02-00 is 8, the value of D03-00 is 9, the value of D04-00 is 10, the value of D05-00 is 11, the value of D06-00 is 12, the value of D07-00 is 13, the value of D08-00 is 14, the value of D09-00 is 15, the value of D10-00 is 16, the value of D11-00 is 17, the value of D12-00 is 18, the value of D13-00 is 19, the value of D14-00 is 20, and the value of D15-00 is 21.Furthermore, for the element group that can be displayed on the 86 touch panel (TP), D01-02 corresponding to 1-72 displays the value of 1-72, D01-03 corresponding to 1-73 displays the value of 1-73, D02-02 corresponding to 1-82 displays the value of 1-82, D02-03 corresponding to 1-83 displays the value of 1-83, D03-02 corresponding to 1-92 displays the value of 1-92, D03-03 corresponding to 1-93 displays the value of 1-93, D04-02 corresponding to 1-102 displays the value of 1-102, and D05-02 corresponding to 1-103 displays the value of 1-104. The value of 1-103 in D04-03 corresponds to 103, the value of 1-112 in D05-02 corresponds to 1-112, the value of 1-113 in D05-03 corresponds to 1-113, the value of 1-122 in D06-02 corresponds to 1-122, the value of 1-122 in D06-03 corresponds to 1-123, the value of 1-123 in D07-02 corresponds to 1-132, the value of 1-132 in D07-03 corresponds to 1-133, the value of 1-133 in D08-02 corresponds to 1-142 The value of 2 is 1-143 for D08-03, the value of 1-143 for D09-02, the value of 1-152 for D09-03, the value of 1-153 for D09-03, the value of 1-153 for D10-02, the value of 1-162 for D10-03, the value of 1-163 for D10-02, the value of 1-163 for D11-02, the value of 1-172 for D11-03, the value of 1-173 for D11-03, the value of 1-173 for D12- The value of 1-182 is displayed in D12-02 corresponding to 1-183, the value of 1-183 is displayed in D12-03 corresponding to 1-183, the value of 1-192 is displayed in D13-02 corresponding to 1-192, the value of 1-193 is displayed in D13-03 corresponding to 1-193, the value of 1-202 is displayed in D14-02 corresponding to 1-202, the value of 1-203 is displayed in D14-03 corresponding to 1-203, the value of 1-212 is displayed in D15-02 corresponding to 1-212, and the value of 1-213 is displayed in D15-03 corresponding to 1-213. When the up transition switch and the down transition switch are used to move in the direction of the up arrow or the down arrow, the device data of the display device data group on the device data group side of a certain process at 592 changes, and therefore the corresponding device data is updated with the number variable group for the touch panel (TP) at 593, the display device data group on the touch panel (TP) side at 594, and the device data of the element group that can be displayed on the touch panel (TP) at 596. When the right transition switch and the left transition switch are used to move in the direction of the right arrow or the left arrow, the corresponding device data is updated with the device data of the element group that can be displayed on the touch panel (TP) at 596. For models that do not meet the maximum number of rows or elements, a group of actual number variables for the touch panel (TP) and a group of actual elements that can be displayed on the touch panel (TP) can be set in addition to the group of number variables for the touch panel (TP) 593 and the group of elements that can be displayed on the touch panel (TP) 596, and the elements can be moved within the group of number variables for the touch panel (TP) 593 and the group of elements that can be displayed on the touch panel (TP) 596, and when the upper or lower limit is reached, the device data for each required group is updated. The touch panel (TP) mentioned here is used as an interface.
[0101] This device uses a single program to change data, so it must be compatible with a variety of devices and equipment. One of its features is that it has a display memory for each process. This is because when creating a screen, all addresses must be entered for displaying numerical values and comments. Also, this is because memory is managed using transitional data and repeated data, a feature of this invention. In other words, it is because it is not known how much data will be used. The mechanism is simple, and when the display memory is rewritten, the corresponding data is also rewritten. By using this method, the number of screens can be consolidated.
[0102] FIG. 60 is a system relationship diagram of a programmable logic controller (PLC) and an engineering tool in one embodiment of the present invention, which identifies a programmable logic controller (PLC) that can execute the program and allows it to be executed only on that programmable logic controller (PLC). In FIG. 60, 600 is an engineering tool, 601 is a network, 602 is a programmable logic controller (PLC) A, 603 is a programmable logic controller (PLC) B, 604 is a programmable logic controller (PLC) C, 605 is a programmable logic controller (PLC) D, 606 is a programmable logic controller (PLC) n, 607 is a project file for programmable logic controller (PLC) A, 608 is a project file for programmable logic controller (PLC) B, 609 is a project file for programmable logic controller (PLC) C, 60A is a project file for programmable logic controller (PLC) D, and 60B is a project file for programmable logic controller (PLC) n. In Fig. 60, the engineering tool 600 contains a project file for programmable logic controller (PLC) A 607, a project file for programmable logic controller (PLC) B 608, a project file for programmable logic controller (PLC) C 609, a project file for programmable logic controller (PLC) D 60A, and a project file for programmable logic controller (PLC) n 60B. Note that a project file is a data group made up of multiple programs and parameters that describe the contents for controlling the algorithms for operating the programmable logic controllers (PLCs). Furthermore, it is unclear whether this was done via the network 601 or was there from the beginning, but the project file for programmable logic controller (PLC) A 607 has been written to programmable logic controller (PLC) A 602, the project file for programmable logic controller (PLC) B 608 has been written to programmable logic controller (PLC) B 603, the project file for programmable logic controller (PLC) C 609 has been written to programmable logic controller (PLC) C 604, the project file for programmable logic controller (PLC) D 60A has been written to programmable logic controller (PLC) D 605, and the project file for programmable logic controller (PLC) n 60B has been written to programmable logic controller (PLC) n 606. The project file for programmable logic controller (PLC) A, designated 607, contains an identification program labeled A of the present invention, programs 1 through n of the present invention, and user-created user programs 1 and 2 through nA. The project file for programmable logic controller (PLC) B, designated 608, contains an identification program labeled B of the present invention, programs 1 through n of the present invention, and user-created user programs 3 and 4 through nB. The project file for programmable logic controller (PLC) C, designated 609, contains user-created user programs 5 and 6 through nC. The project file for programmable logic controller (PLC) D, designated 60A, contains an identification program labeled D of the present invention, programs 1 through n of the present invention. The project file for programmable logic controller (PLC) n, designated 60B, contains an identification program labeled D of the present invention, programs 1 through n of the present invention, and user-created user programs 1 and 2 through nA. In the above state, the unique data read by programmable logic controller (PLC) A 602 matches the data written in the identification program, so both the programs of this invention and the user programs run. Since the unique data read by programmable logic controller (PLC) B 603 does not match the data written in the identification program, the programs of this invention do not run, and only the user programs run. Since programmable logic controller (PLC) C 604 does not have the programs of this invention, only the user programs run. Since the unique data read by programmable logic controller (PLC) D 605 matches the data written in the identification program, the program group of this invention runs, but the user program group does not run because it does not exist. Since the unique data read by programmable logic controller (PLC) n 603 does not match the data written in the identification program, the program group of this invention does not run, and only the user program group runs. In this situation, it is presumed that the person using the 600 engineering tool can read and write the programs of this invention, but at the very least, they lack the editing privileges to view or change the programs they have read. This is because, in order to operate all the programmable logic controllers (PLCs), it is easy to operate them by rewriting the identification details written in the identification program of each programmable logic controller's (PLC) project file using the 600 engineering tool. Since interests differ depending on the position, it is difficult to say for sure, but for this invention, authority and identification processing are important factors.
[0103] The mechanism is simple: at the beginning of the program, the one and only physical unique data possessed by the microprocessor (MPU) is read from the program side, and if it does not match the data compared in the program, it moves to the END of the program and terminates the program. The one and only physical unique data possessed by the microprocessor (MPU) generally means a serial number, but when using a LAN (Local Area Network), it can also be a MAC address (Media Access Control address), or it can be any arbitrary value. When creating a program for this invention, specific data must be written into the program either as constants or as initial data. This process alone makes it no different from a typical, individually created program. Who will create the final version of the program for this invention? To whom will the program be sold? Who will create the data for the program? Who will verify that the equipment or devices running the program for this invention function according to specifications? Who will use the equipment or devices running the program for this invention? Since access to production sites such as factories is prohibited, malicious individuals can easily imitate this invention, as long as it is made public in this specification. However, if the program cannot be analyzed, the mixing of legitimate and counterfeit programs can be prevented simply by using purchase history, etc.
[0104] FIG. 61 is a device data setting diagram illustrating common initial settings in one embodiment of the present invention. Reference numeral 610 in Figure 61 denotes a common initial data group. Figure 61 shows two items: the number of programs and the start address of the initial device data. As described in Figure 3, the number of programs can be affected by the model, and also varies depending on who creates the device and for what purpose. In this common initial setting, it is necessary to include free space in advance so that items can be added in case of unforeseen circumstances.
[0105] FIG. 62 is a device data setting diagram showing the initial settings for each program in one embodiment according to the present invention. In Figure 62, 620 is the initial data group for each process. This corresponds to the number of programs set in Figure 61. In Figure 57, 571 is the initial constant area and touch panel display area, but this is the same structure as that in Figure 57, where each process number is built into the device memory. In other words, by adding destination and return addresses to the initial settings for each program order, rather than numbers, it is possible to easily accommodate changes.
[0106] FIG. 63 is a program flow diagram of an initial execution type identification and initial processing initiation in one embodiment in accordance with the present invention. When the process proceeds to "Identification and initial processing" at 555 in FIG. 55, the process proceeds to "Identification of initial execution type and start of initial processing" at 630 in FIG. 63, where identification and initial processing are started. First, "reset (turn OFF) execution permission flag" 631, then "read identification data written in CPU" 632, and then select "compare read identification data with written identification data" 633. If the selection result is "match", the process proceeds to "Set execution permission flag (ON)" at 634, and if the comparison result is "mismatch", the process proceeds to "Identify initial execution type and end initial processing" at 637, where the identification and initial processing are completed. When "Compare the read identification data with the listed identification data" is selected at 633 and the selection result is "Match", "Set execution permission flag (turn ON)" at 634 is performed, "Reset input display device connection flag (turn OFF)" at 635 is performed, "Read initial values of each program" at 636 is performed, and the process moves to "Identification of initial execution type and completion of initial processing" at 637, and the identification and initial processing are completed.
[0107] Further explanation will be given based on the above program flowchart. This "identification of initial execution type and initial processing" is executed only once when the power is turned from OFF to ON or from STOP to RUN, so it does two things. One is the identification processing from "resetting (turning OFF) the execution permission flag" in 631 to "setting (turning ON) the execution permission flag" in 634. The other is the general preparation, which is the initial processing of all processing. Identification processing is a process that allows a program to be executed only on a specific CPU. Since programs can be easily duplicated, they can be executed in the same way on different CPUs. In other words, by simply changing the data, all algorithms can be constructed. By duplicating and using this program, there is no need to create programs that correspond to the algorithms of each device or piece of equipment, as is commonly done. Here, a bit called an "execution permission flag" is created to realize the identification process. However, it is too fragile to make a decision based solely on whether the execution permission flag is on or off. This is because it is easy to imagine what will happen if you look closely at the monitor. To make it more robust, instead of using the execution permission flag, it would be possible to compare the identification data read in for each process with the recorded identification data, but this requires only a few words, which can be a bit time-consuming. It is also possible to add more complex processing, such as applying a prime number table. 635 "Reset (turn OFF) the input / display device connection flag", which is to deliberately reset (turn OFF) the bit set from the touch panel (TP) and to observe whether the touch panel (TP) is set (turn ON). The reading of the initial values of each program in 636 is a general reading. It can also be done at the beginning of each process.
[0108] FIG. 64 is a program flow chart illustrating the start of a process for resetting (turning OFF) the differentiation of the timing process for a scan execution type in one embodiment of the present invention. When the process proceeds to "Reset process of differentiation of timing process" at 556 in Figure 55, it moves to "Start of reset (turn OFF) process of differentiation of timing process for scan execution type" at 640 in Figure 64, and the reset (turn OFF) process of differentiation of timing process is started. First, the user selects "Whether or not there is a number of data items in the table data" in 641. If the selection result is "Yes", the process moves to "Prohibit interruption of periodic program" at 642, and if the selection result is "No", the process moves to "End of reset (turn OFF) process of differentiation of timing process for scan execution type" at 64D, and the process of resetting (turning OFF) the differentiation of timing process is ended. Select "Whether there is a data count in the table data" in 641, and if the selection result is "Yes", perform "Disable interrupts of the fixed-cycle program" in 642, perform "Calculate the number of checks from the number of data in the table data" in 643, perform "Initialize the number of checks currently being executed" in 644, and select "Compare the number of checks and the number of checks currently being executed" in 645. If the selection result is "less than," the process moves to 646, "Read from table data to qualification register" and "Read scan counter value from table data," and if the selection result is "greater than or equal to," the process moves to 64C, "Allow periodic program interrupts." When "Compare the number of checks with the number of checks currently being executed" in 645 is selected and the selection result is "greater than or equal to," "Permit interruption of periodic program" in 64C is performed, and the process moves to "End of reset (turn OFF) process of differentiation of timing process for scan execution type" in 64D, and the reset (turn OFF) process of differentiation of timing process is completed. Select "Compare the number of checks with the number of checks currently being executed" in 645, and if the comparison result is "less than", perform "Read from table data to qualification register" in 646 and "Read scan counter value from table data", and select "Scan counter value is" in 647. If the selection result is "1 or less", the process moves to "Reset (turn OFF) the general-purpose device bit modified by the modification register" at 648, and if the selection result is "2 or more", the process moves to "Change the scan counter value to 1" at 649. When "Scan counter value is" is selected in 647 and the selection result is "2 or more", "Change scan counter value to 1" in 649 is performed, and "Write modifier register to table data" and "Write scan counter value to table data" in 64A are performed, and then the process is merged again and repeated, so the process moves to "Change scan counter value to 1" in 649. Select "Scan counter value is" in 647, and if the selection result is "1 or less", perform "Reset (turn OFF) the general-purpose device bit modified by the modifying register" in 648, perform "Add 1 to the number of checks currently being executed" in 64B, and then merge again and repeat, moving on to "Compare the number of checks and the number of checks currently being executed" in 645.
[0109] Further explanation will be given based on the above program flowchart. This "processing for resetting (turning OFF) differentiation of timing processing for scan execution type" is a program for dealing with differentiation performed in the "timing processing" of a program of fixed cycle execution type. Differentiating bits, differentially capturing contacts, and differentiating instructions are examples of output methods, capture methods, and instruction execution methods. Specifically, the execution of scan-execution-type programs is a repetition of scan-execution-type programs, with each execution being called one scan. In other words, differentiation is a form of executing only one scan. Differentiating bits means outputting a bit for only one scan, differentially capturing contacts means capturing a contact for only one scan, and differentiating instructions means executing an instruction for only one scan. However, since one scan of a fixed-cycle execution-type program is the next cycle, unlike scan-execution-type programs, if the fixed-cycle time of a fixed-cycle execution-type program is shorter than one scan of a scan-execution-type program, it will be interrupted multiple times within one scan of the scan-execution-type program. Differentiating a fixed-cycle execution-type program does not guarantee one scan of a scan-execution-type program, so scan-execution-type programs may miss some data. To address this issue, the differentiation is reset (turned OFF) in scan-execution-type programs. In this program, it is turned on for a maximum of two scans. Incidentally, in a scan execution type program, differentiation can be achieved by setting a bit as differentiation and then resetting that bit in the next scan, i.e., by reversing the order of setting and resetting. To better understand program flowcharts, we need to explain table data. Table data is a data group in which certain devices are lined up, and it is a structure consisting of a data group in which the number of items in the table data is listed at the beginning and the data itself is stored after the number. There are also instructions available that add to the number each time data is written, and subtract from the number each time data is read. The details of each symbol are as follows: The selection of "Whether or not there is data number in table data" in 641 checks whether the first digit of the table data is 0 or not, and determines whether differentiation has been performed. The "prohibition of periodic program interrupts" in 642 is performed because the table data is changed during the reset process of the differential timing process, and if a differential is created during the timing process of the periodic program, the table data becomes unstable. The "calculation of the number of checks from the number of data in the table data" in 643, the "initialization of the number of checks currently being executed" in 644, the "comparison of the number of checks with the number of checks currently being executed" in 645, and the "addition of 1 to the number of checks currently being executed" in 64B are carried out taking into consideration the case where differentiation occurs at the same time. 643 "Calculation of the number of checks from the number of data in the table data" is because when differentiation occurs, two pieces of data, the address and the scan counter, and the address value and the number of checks, are written into the data table, and when differentiation occurs, the number increases by an even number. "Initialize the number of checks currently being executed" in 644 is always executed before repeating the process, in order to compare the number of checks with the number of checks currently being executed. Selecting "Compare the number of checks with the number of checks currently being executed" in 645 is the final decision to exit this process. "Reading from table data to a modification register" and "Reading a scan counter value from table data" in 646 are transfers of an address value and a check count using table data. The reason for selecting "Scan counter value" in 647 is to check how many scans have been performed, since differentiation and scanning are closely related. 648 "Reset (turn OFF) general-purpose device bits modified by a modifying register" resets (turns OFF) in one scan, making the level output appear differentiated. 649's "Change scan counter value to 1" sets the scan counter value to 1 as it is set to 2, indicating that the scan has passed once. Since it is not the time to process "Write modifier register to table data" and "Write scan counter value to table data" in 64A, the data table is written again, including the changed scan counter. "Add 1 to the number of checks currently being executed" in 64B is performed to make it possible to compare the number of checks and the number of checks currently being executed. The 64C's "Enable periodic program interrupts" restores periodic program interrupts because this process does not change the data table.
[0110] FIG. 65 is a program flowchart of the start of scan execution type processes other than interface process, sequential step process, and timing process (each process has the same structure) in one embodiment according to the present invention. In the program flowchart of Figure 65, when the program proceeds to "input device data processing" 557, "device data calculation processing (input basis)" 558, "input processing" 559, "logical processing" 55B, "device data calculation processing (output basis)" 55D, and "output processing" 55E in Figure 55, it moves to "processing other than interface processing, sequential stepping processing, and timing processing" 650 in Figure 65, and processing other than interface processing, sequential stepping processing, and timing processing begins. First, the user selects whether the execution permission flag is ON or OFF in 651. If the selection result is "ON", the process moves to 652 to select "Whether to perform that process"; if the selection result is "OFF", the process moves to 658 to "End scan execution type processing other than interface processing, sequential step processing, and timing processing", and ends scan execution type processing other than interface processing, sequential step processing, and timing processing. Select "Whether to perform this process" in 652, and if the selection result is "No", proceed to "End scan execution type processing other than interface processing, sequential step processing, and timing processing" in 658, and end scan execution type processing other than interface processing, sequential step processing, and timing processing. If the selection result is "Yes", "initialize the processing number of the processing currently being executed" is performed in 653, "reset (turn OFF) the differentiation of the processing" is performed in 654, and "compare the processing number number of the processing with the processing number currently being executed" is selected in 655. If the selection result is "less than", the process proceeds to "Execute processing for each number of that processing" at 656, and if the selection result is "greater than or equal to", the process proceeds to "End processing other than interface processing, sequential stepping processing, and timing processing" at 657, where processing other than interface processing, sequential stepping processing, and timing processing is ended. In addition, since differentiation is not performed in the output process, the "differentiation reset (turning OFF) process" in 654 is not performed in the output process, and the process moves to "comparison of the process number of that process with the process number currently being executed" in 655. When "Compare the process number of that process with the process number currently being executed" is selected in 655 and the selection result is "less than", "Execute process for each number of that process" in 656 is performed, "Add 1 to the process number of that process currently being executed" in 657 is performed, and then the processes are joined again and repeated, so the process moves to "Compare the process number of that process with the process number currently being executed" in 655.
[0111] Further explanation will be given based on the above program flowchart. This program flowchart is the processing that occurs when proceeding to "Input device data processing" 557, "Device data calculation processing (input standard)" 558, "Input processing" 559, "Logic processing" 55B, "Device data calculation processing (output standard)" 55D, and "Output processing" 55E in Figure 55, so they are not performed simultaneously, but since the processing from 653 to 656 differs for each process being executed, six processes with the same structure are created and performed. Note that, although it is a matter of preference, since the processes are not performed simultaneously, it is also possible to structure them by adding data that identifies each process and identifying that process by the data that identifies each process. This program flowchart offers a glimpse into the features of the present invention. The currently executing process number is changed by "adding 1 to the currently executing process number of that process" in 656, while "executing each process number of that process" in 655 is repeated. The loop is terminated by "comparing the process number number of that process with the currently executing process number" in 654. The important processes in the program of the present invention ("input device data processing," "device data calculation processing (input reference)," "input processing," "logic processing," "sequential step processing," "device data calculation processing (output reference)," "output processing," and "timing processing") are all executed while changing their numbers, and the loop is terminated when the number reaches its upper limit. In other words, by changing the number of repetitions, the program can easily accommodate additions and deletions, and is structured to accommodate the construction of any algorithm. The details of each symbol are as follows: The "execution permission flag is ON or OFF" in 651 is only checked once when the power is turned from OFF to ON or from STOP to RUN, but this process is enabled depending on whether "execution permission flag is reset (turned OFF)" in 351 and "execution permission flag is set (turned ON)" in 354 in FIG. The "presence or absence of data for that processing" in 652 is done to shorten the time required for one scan. "Initialize the currently executing process number of that process" in 653 is always performed before repeating the process, since it compares the process number with the currently executing process number. The "resetting (turning OFF) the differentiation of that process" in 654 is processed at the beginning to delay it by one scan. Selecting 655 "Compare the process number of that process with the process number currently being executed" is the final decision to exit this process. "Execute the process for each number of the process" in 656 clearly indicates that the process will proceed to the detailed program flowchart for each process and each number. The "add 1 to the process number of the process currently being executed" in 657 is performed to establish a comparison between the process number and the process number currently being executed.
[0112] FIG. 66 is a program flowchart of the start of differentiation reset (OFF) processing (each processing has the same structure) other than the timing processing in one embodiment of the present invention. In the program flowchart of Figure 66, when it progresses to "Reset (turn OFF) processing of differentiation for that processing" at 654 in Figure 65, it moves to "Start of reset (turn OFF) processing of differentiation other than timing processing" at 660 in Figure 66 for each processing, and starts reset (turn OFF) processing of differentiation other than timing processing. First, the user selects "Whether or not there is a data count for table data for that processing" in 661. If the selection result is "Yes", the process proceeds to 662 "Read the processing from the table data to the modification register", and if the selection result is "No", the process proceeds to 664 "End of differential reset (turn OFF) processing other than timing processing", and the differential reset (turn OFF) processing other than timing processing is completed. Select "Whether there is a data count in the table data for that process" in 661, and if the confirmation result is "Yes", "Read from the table data for that process to the modification register" in 662, and then "Reset (turn OFF) the general-purpose device bit modified by the modification register" in 663, and then merge again and repeat, so the process moves to the selection of "Whether there is a data count in the table data for that process" in 661.
[0113] Further explanation will be given based on the above program flowchart. This process is paired with "device data processing," "input processing," and "logical processing," which differentiate each process other than the timing process for each number, and because each table data is different, three processes with the same structure are required. Note that, although it is a matter of preference, since the processes are not performed simultaneously, it is also possible to structure them by adding data that identifies each process and identifying that process using the data that identifies each process. Also, this processing is not a scan execution type program, but rather a part of a program, but is a simplification of the "Reset processing of differential of scan execution type timing processing" in Figure 64. In other words, "Whether there is data count in table data" in 641 in Figure 64 is the same as "Whether there is data count in table data for that processing" in 661 in Figure 66, "Read from table data to modifier register" in 646 in Figure 64 is the same as "Read from table data to modifier register for that processing" in 662 in Figure 66, and "Reset (turn OFF) general-purpose device bit modified by modifier register" in 648 in Figure 64 is the same as "Reset (turn OFF) general-purpose device bit modified by modifier register" in 663 in Figure 66, with only the arrows being slightly different, with the other processing being deleted. The details of each symbol are as follows: The selection of "Whether or not there is a data count in the table data for that processing" in 661 checks whether the beginning of the table data for that processing is 0 or not, and determines whether differentiation has been performed. As shown in Figure 64, table data is a data group in which certain devices are lined up, and the first part of the data is the number of items in the table data, and the part following the number is a data group in which the data is stored. There are also instructions available that add to the number each time data is written and subtract from the number each time data is read. The "reading of the processing from the table data to the modification register" in 662 is the passing of an address using the table data and the subtraction of the number of table data. 663 "Reset (turn OFF) the general-purpose device bit modified by the modification register" is to reset (turn OFF) in one scan, making the level output appear differentiated.
[0114] FIG. 67 is a program flow chart illustrating the start of execution of processing for each number in input device data processing according to one embodiment of the present invention. When proceeding from "input device data processing" 558 in Figure 55 to "execution of processing by number of that processing" 376 in Figure 37, where each processing has the same structure, it moves to "start of execution of input device data processing by number" 670 in Figure 67, and execution of input device data processing by number is started. First, in 671, "sequentially track the currently executing processing number from the initial value of the start address of this program and extract the start address of the number", then in 672, "extract the address of each element for the number of elements from the start address of the number", then in 673, "determine the type, comparison symbol, source and destination devices for comparison, and whether or not differentiation is performed from the element value", "write the element value of the source address to modification register 1", "write the element value of the destination address to modification register 2", "write the element value of the general-purpose bit address to modification register 3", "write the address of the differentiation prohibition bit determined from the start address of the number to modification register 4", and then in 674, "modify using modification register 1 and compare the determined source device with the determined destination device modified using modification register 2" is selected. If the selection result is "established", the process moves to "Whether or not to differentiate" at 675, and if the selection result is "not established", the process moves to "Do not output the general-purpose bit modified by the modification register 3 at the level" at 679. Select "Compare the comparison source of the device modified by the modification register 1 and determined with the comparison destination of the device modified by the modification register 2" in 674, and if the selection result is "Not established", select "Do not output the general-purpose bit modified by the modification register 3 at a level" in 679, and select "Is the differentiation prohibition bit modified by the modification register 4 established?" in 67A. If the selection result is "YES", the process proceeds to 67B "Reset (turn OFF) the differentiation prohibition bit modified by modification register 4", and if the selection result is "NO", the process proceeds to 67C "End execution of input device data processing by number", and the execution of input device data processing by number is ended. Select "Is the differentiation prohibition bit modified by modification register 4 set?" at 67A, and if the selection result is "Not set", proceed to "End execution of input device data processing by number" at 67C, and end execution of input device data processing by number. Select "Compare the comparison source of the device determined by modifying with the modification register 1 with the comparison destination of the device determined by modifying with the modification register 2" in 674, and when the selection result is "established", select "Whether to differentiate or not" in 675. If the selection result is "yes", the process proceeds to 676 "Is the differential differentiation prohibition bit modified by the modification register 4 not established?", and if the selection result is "no", the process proceeds to 678 "Output the general-purpose bit modified by the modification register 3 at a level". Select "Whether to differentiate" in 675, and when the selection result is "No", execute "678" "Output the general-purpose bit modified by the modification register 3 at the level", and proceed to "End execution of input device data processing by number" in 67C, thereby ending execution of input device data processing by number. "Whether or not differentiation is performed" is selected in 675, and if the selection result is "yes", a selection is made in 676 as to whether or not "the differentiation prohibition bit modified by the modification register 4 is not established". If the selection result is "not established", the process proceeds to 677 "Set (turn ON) the general-purpose bit modified by modification register 3", "Write modification register 3 to table data", and "Set (turn ON) the differential differentiation prohibition bit modified by modification register 4", and if the selection result is "established", the process proceeds to 67C "End execution of input device data processing for each number", and the execution of input device data processing for each number is terminated. Select "Is the differential differentiation prohibition bit modified by modification register 4 not established?" at 676, and if the selection result is "not established", perform "Set (turn ON) the general-purpose bit modified by modification register 3" at 677, perform "Write modification register 3 to table data", and "Set (turn ON) the differential differentiation prohibition bit modified by modification register 4", and proceed to "End execution of input device data processing by number" at 67C, and end execution of input device data processing by number.
[0115] Further explanation will be given based on the above program flowchart. This "input device data processing" is a program that only handles comparison processing of device data. It only performs judgments such as "equal," "inequality," "greater than or equal to," "less than or equal to," "exceeds," and outputs the results in general-purpose bits. Naturally, since numbers have types, judgments must be made for each type, and since there are also devices and constants, judgments must be written for each of these, and they must be modified with modifier registers, so at first glance it may seem complex and difficult to judge the content, but the nature of the program is such that once it is determined, it will be repeated, so its reliability improves immediately. In normal programs, these blocks are only created intentionally, and are usually written where necessary. As a result, in some places they are "more than" and in other places they are "excessive," which can lead to bugs. Also, because there is a large amount of description, the description of what will ultimately happen is often hidden, and even when repeated, the shapes are different, making it difficult to read, which can also lead to bugs. The details of each symbol are as follows: The "extraction of the starting address of the number by tracing the initial value from the starting address of this program for the processing number currently being executed in sequence" in 671 proceeds from "identification and initial processing" in 555 of Fig. 55 to "start of identification and initial processing" in 630 of Fig. 63, and the value written in the starting address of the input device data processing read in "reading initial values of each program" in 636 is written to the modification register, the device data modified by the modification register becomes the next destination, and by repeating this the number of times specified by the number, the starting address of the number can be extracted. The "extraction of the address of each element for the number of elements from the starting address of the number" in 672 proceeds from "identification and initial processing" in 555 of Fig. 55 to "start of identification and initial processing" in 630 of Fig. 63, and is performed using the position of each element read in "reading the initial value of each program" in 636 and the starting address of the number extracted in "sequentially tracing the number of processing numbers currently being executed from the starting address of this program as the initial value and extracting the starting address of the number" in 671. The steps 673 "determine the type, comparison symbol, source and destination devices, and whether or not differentiation is required from the element value," "write the element value of the source address to modification register 1," "write the element value of the destination address to modification register 2," "write the element value of the general-purpose bit address to modification register 3," and "write the address of the differentiation prohibition bit determined from the starting address of the number to modification register 4" are preliminary preparations for the step 674 "compare the source device modified using modification register 1 and determined with the destination device modified using modification register 2 and determined." The selection of 674 "modify with modifier register 1 and compare the comparison source of the determined device with the comparison destination of the determined device modified with modifier register 2" is made in order to perform output based on the result of this selection. The "Differential or Non-Differential" selection in 675 determines whether the final general-purpose bit output is differentiated. The selection of 676 "Is the differential differentiation prohibition bit modified by the modification register 4 not established?" is because in the case of differential differentiation, when the condition is established, it turns ON for only one scan, but this bit continues to be ON until the condition is no longer established. 677's "Set (turn ON) the general-purpose bit modified by Modification Register 3", "Write Modification Register 3 to the table data", and "Set (turn ON) the differentiation prohibition bit modified by Modification Register 4" are the final outputs of differentiation when the conditions are met. The "general-purpose bit modified by the modification register 3 is output at a level" in 678 is the final output when no differentiation is performed. The "general-purpose bit modified by the modification register 3 is not output by level" in 679 is a non-output process when the condition is not met. The selection of "Is the differential differentiation prohibition bit modified by the modification register 4 set?" in 67A selects initialization of the differential differentiation prohibition bit. "Reset (turn OFF) the differential differentiation prohibition bit modified by the modification register 4" in 67B initializes the differential differentiation prohibition bit.
[0116] FIG. 68 is a program flowchart showing the start of execution of processing for each number (both input and output standards have the same structure) of device data calculation processing in one embodiment according to the present invention. In Figure 55, where both the input and output standards are identical, 558 "Device data calculation processing (input standard)" and 55D "Device data calculation processing (output standard)" proceed to 656 "Execution of processing for each number of that processing" in Figure 65 (same structure for each processing), and then proceed to 680 "Start execution of processing for each number of device data calculation processing" in Figure 68, where execution of device data calculation processing for each number is started. First, in 681, "sequentially trace the currently executing processing numbers from the initial value of the first address of this program to extract the first address of the number", then in 682, "extract the addresses of each element for the number of elements from the first address of the number", then in 683, "determine the logic of the activation bit from the element value" and "write the element value of the activation bit address to modification register 1", and then in 684, "according to the logic of the activation bit, is the activation bit modified by modification register 1 established?" is selected. If the selection result is "true", the process proceeds to 685 "Determine the type, operation command, and number of operands from the element value", "Determine the device corresponding to each operand", and "Write the element values of the address corresponding to each operand in order starting from modifier register 2", and if the selection result is "false", the process proceeds to 687 "End execution of device data operation processing for each number", and the execution of device data operation processing for each number is ended. A selection is made in 684 as to whether "according to the logic of the activation bit, the activation bit modified by modification register 1 is established," and if the selection result is "established," then in 685 "type, operation command, and number of operands are determined from the element value," "a device corresponding to each operand is determined," and "element values of the address corresponding to each operand are written in order starting from modification register 2," and then in 686 "each operand modified by modification register 2 onwards is executed with the determined operation command having only the number of operands," and the process proceeds to 687 "end execution of device data operation processing for each number," thereby ending execution of device data operation processing for each number.
[0117] Further explanation will be given based on the above program flowchart. This "Device Data Calculation Processing (Input-Based, Output-Based)" is a program that handles only instruction processing. Since this processing is a step forward from "Device Data Calculation Processing (Input-Based)" 558 and "Device Data Calculation Processing (Output-Based)" 55D in Figure 55, they are not performed simultaneously. However, since the processing from 681 to 686 differs for each processing being executed, two identically structured processes are required. The division into input-based and output-based is due to the fact that input-based programs are created to use the results of processing in other processing, and output-based programs are created to use the results of other processing. While each programmable logic controller (PLC) manufacturer uses different instruction words, all manufacturers perform the same operations. There are 200 to 300 types available. Some manufacturers call these "sources" and "destinations," but the maximum number of operands is around seven. Simply put, around 2,800 case distinctions would be required, but since there are very few programs with seven operands, around 400 case distinctions are sufficient. Also, when device selection is included, the number of cases increases, but it is still within the range that can be handled adequately. Incidentally, while the number of command words from each company is increasing, based on my many years of experience building programmable logic controller (PLC) software, I can't help but feel that specifying command words that are rarely used is pointless. Furthermore, while it is a matter of preference, since input-based processing and output-based processing are not performed simultaneously, it is possible to structure the processing by adding data specifying input-based processing and output-based processing, and specifying the processing using data specifying input-based processing and output-based processing. The details of each symbol are as follows: The "extraction of the starting address of the number by tracing the initial value from the starting address of this program for the processing number currently being executed in sequence" in 681 proceeds from "identification and initial processing" in 555 of Fig. 55 to "start of identification and initial processing" in 630 of Fig. 63, and the value written in the starting address of the input device data processing read in "reading initial values of each program" in 636 is written to the modification register, the device data modified by the modification register becomes the next destination, and by repeating this the number of times specified by the number, the starting address of the number can be extracted. The "extraction of the address of each element for the number of elements from the starting address of the number" in 682 proceeds from "identification and initial processing" in 555 of Fig. 55 to "start of identification and initial processing" in 630 of Fig. 63, and is performed using the position of each element read in "reading the initial value of each program" in 636 and the starting address of the number extracted in "sequentially tracing the number of processing numbers currently being executed from the starting address of this program as the initial value and extracting the starting address of the number" in 681. The "determine the logic of the activation bit from the element value" and "write the element value of the activation bit address to the modification register 1" in 683 are performed as advance preparations such as selecting "whether the activation bit modified by the modification register 1 is established according to the logic of the activation bit" in 684. 684, "According to the logic of the activation ...
Claims
1. A program for use in a programmable logic controller (PLC) comprising a CPU, a first memory, and a second memory, the CPU reading first data, which is data stored in the first memory and has a structure corresponding to data arranged in a matrix format for each process of controlling an apparatus, and in which each row includes a next row address, which is the address of the row to be read next after the row, as one column of data, rewriting second data, which is data stored in a second memory and specifies the operation of the apparatus, according to the first data read, reading the rewritten second data from the second memory, and controlling an apparatus according to the second data read, the program being read by the CPU and instructing the CPU to: reading the first data line by line, and when all the lines to be read are exhausted, returning to the first line and repeating the reading; using the next row address to read column data of a row whose address is indicated by the next row address after reading of the column data of the row including the next row address is completed.
2. The first data has column data in one row that is to be repeatedly read by the CPU arranged for the number of repetitions, and the number of repetitions is included as a single piece of column data in the column preceding the column data for the number of repetitions, and each row of the first data further includes, as a single piece of column data, a previous row address that is the address of a row that should be read prior to the row that should be read next to that row, The program causes the CPU to 2. The program according to claim 1, which executes the following: when making a change to increase the number of repetitions in response to an external instruction, all column data of the row to be changed is copied to a starting address that is the next address to the last address used as the first data in the first memory, and after the change is completed, the previous row address of the row to which the change was made is used to change the next row address of the row to which reading should be completed one before the row to which the change was made, to the address of the row to which the change was made.
3. The first data has a different number of words in the same column between at least two rows, and the number of words in the same column is included as one column data in the column preceding the same column in each row, and each row of the first data further includes, as one column data, a previous row address which is the address of a row that should be read before the row that should be read next to that row, The program causes the CPU to 3. The program according to claim 1 or 2, which executes the following: when making a change to increase the number of words in response to an external instruction, all column data of the row to be changed is copied to a starting address that is the next address to the last address used as the first data in the first memory, and after the change is completed, the previous row address of the row to which the change was made is used to change the next row address of the row to which reading should be completed one before the row to which the change was made, to the address of the row to which the change was made.
4. Each row of the first data further includes, as one column data, a previous row address which is an address of a row to be read one row before the row to be read next to the row; The program causes the CPU to 2. The program according to claim 1, further comprising: a program for executing, in response to an external instruction, when deleting a line including the previous row address, the program using the previous row address to change a next row address of an address of a line indicated by the previous row address to a next row address of the line to be deleted.
5. Each row of the first data further includes, as one column data, a previous row address which is an address of a row to be read one row before the row to be read next to the row; The program causes the CPU to 4. The program according to claim 3, further comprising: a program for executing, in response to an external instruction, when deleting a line including the previous row address, the program using the previous row address to change a next row address of an address of a line indicated by the previous row address to a next row address of the line to be deleted.
6. Each row of the first data further includes, as one column data, a previous row address which is an address of a row to be read one row before the row to be read next to the row; The program causes the CPU to 2. The program according to claim 1, further comprising: when adding a new row in response to an external instruction, setting a top address of the row to be added to the address next to a last address used as the first data in the first memory, changing a next row address of the row to be added to a next row address of a row to be read that is to be completed before the row to be added, and using the previous row address to change the next row address of the row to be read that is to be completed before the row to be added to the address of the row to be added.
7. Each row of the first data further includes, as one column data, a previous row address which is an address of a row to be read one row before the row to be read next to the row; The program causes the CPU to 4. The program according to claim 3, further comprising: when adding a new row in response to an external instruction, a start address of the row to be added is set to the address next to the last address used as the first data in the first memory; a next row address of the row to be added is changed to a next row address of a row to be read that is to be completed before the row to be added; and the previous row address is used to change the next row address of the row to be read that is to be completed before the row to be added to the address of the row to be added.
8. The second data includes device data, the device data includes device bits, the device bits include general-purpose bits, input bits, and output bits; The program causes the CPU to an input device data process for comparing the device data for each row across all rows of the first data and changing the ON / OFF state of a generic bit according to the result of the comparison; an input process for changing an ON / OFF state of a general-purpose bit according to a state of the input bit for each row of the first data; a logical process for replacing a general-purpose bit with ON / OFF when a logical AND or OR of a plurality of general-purpose bits output from another process becomes true for each row across all rows of the first data; a sequential stepping process for transferring and transmitting an execution state of a process to another row or a row of another process by shifting ON of a generic bit output from another process for each row of all rows of the first data; a device data calculation process for performing a calculation on device data or device bits for each row of all rows of the first data in accordance with a calculation function defined for the CPU; The program according to claim 1 or 2, characterized in that it executes an output process that changes the ON / OFF state of an output bit by a general-purpose bit output from another process, for each row of the first data.
9. The second data includes device data, the device data includes device bits, the device bits include general-purpose bits, input bits, and output bits; The program causes the CPU to an input device data process for comparing the device data for each row across all rows of the first data and changing the ON / OFF state of a generic bit according to the result of the comparison; an input process for changing an ON / OFF state of a general-purpose bit according to a state of the input bit for each row of the first data; a logical process for replacing a general-purpose bit with ON / OFF when a logical AND or OR of a plurality of general-purpose bits output from another process becomes true for each row across all rows of the first data; a sequential stepping process for transferring and transmitting an execution state of a process to another row or a row of another process by shifting ON of a generic bit output from another process for each row of all rows of the first data; a device data calculation process for performing a calculation on device data or device bits for each row of all rows of the first data in accordance with a calculation function defined for the CPU; and an output process for changing the ON / OFF state of an output bit by a general-purpose bit output from another process, for each row of the first data.
10. The second data includes device data, the device data includes device bits, the device bits include generic bits; The program causes the CPU to The program according to claim 1 or 2, characterized in that a timing process is repeatedly executed at regular time intervals for each row of the first data, the timing process changing the ON / OFF state of a general-purpose bit depending on a general-purpose bit output from another process and the passage of time.
11. The second data includes device data, the device data includes device bits, the device bits include generic bits; The program causes the CPU to The program according to claim 3, characterized in that a timing process is repeatedly executed at regular time intervals for each row of the first data, the timing process changing the ON / OFF state of a general-purpose bit depending on a general-purpose bit output from another process and the passage of time.
Citation Information
Patent Citations
JP1973084438A
Banzai
JP1976055228A
Method of producing panel battery
JP1978035128A
Controller for alternating current elevator
JP1985023266A
Controller for industrial machine
JP1994095714A
