EXTENDED PMC

Abstract: An extended programmable machine controller (PMC) which is disposed outside a numeric controller (1) and connected to a main body PMC inside the numeric controller (1). Switch control means (12) switches a ladder program (13) for controlling a mechanism portion B (62) and a ladder program B (14) for executing pseudo-wise the operation of the main body PMC (2). Accordingly, debugging or operation can be made by the extended PMC (10) alone using the ladder program B (14) even when the main body PMC (2) is not constituted.

Description: The present invention relates to an expanded programmable machine controller connected to a main body programmable machine controller (PMC) inside a numerical control apparatus, and more specifically, to an expanded programmable machine controller which can independently carry out a debugging, operations and the like while not connected to the main body PMC. A numerical control apparatus contains a programmable controller (PC) for controlling the mechanical units or devices of a machine tool, and the PC contained in the numerical control apparatus is referred to as a programmable machine controller (PMC). When a machine tool is complex, and units such as a pallet changer and the like are added to, for example, a machining center, the PMC in the numerical control apparatus must contain a sequence program and the like having a larger capacity and be able to carry out a processing at a higher speed to control these units. Further, when these mechanical units are selected as necessary, to constitute the machining center or the like, and the type of the units is increased, the pallet changer, for example, must be able to select the number of pallets required, and to satisfy such a requirement, it is necessary to modify the sequence program or the number of the I/O circuits and the like of the PMC contained in the numerical control apparatus. Nevertheless, it is very time-consuming to create or modify a sequence program for each arrangement of machine tools, and further, the development, debugging and the like of the sequence programs also take a very long time. To cope with this requirement, an expanded PMC (programmable machine controller) is employed and used for each mechanical unit to be controlled. The expanded PMC is disposed outside of a numerical control apparatus and controls only, for example, a mechanical unit such as a pallet changer and the like, and thus a machine tool not provided with a pallet changer need not include the expanded PMC. Note, in contrast to the expanded PMC, a PMC disposed inside of a numerical control apparatus is referred to as a main body PMC. Japanese Patent Application No. Hei 1-23505 filed by the applicant discloses an example of such an expanded PMC. Nevertheless, when the main body PMC is connected to the expanded PMC to form an entire system, conventionally the debugging of a system program for operating the system cannot be carried out unless the entire system has been completed. Therefore, to carry out the debugging of the expanded PMC, the main body PMC is also needed, and further, the debugging of the sequence program of the main body PMC must have been completed. If, however, the sequence program of the expanded PMC and the sequence program of the main body PMC can be independently developed, during the development of an actual machine tool, the period needed for developing a program can be shortened. Conversely, sometimes there is a need to debug the sequence program of a main body PMC after the sequence program of an expanded PMC has been completed. In general, a preferable developing process is that whereby the sequence program of main body PMC serving as a central PMC is debugged after the respective units have been debugged. Taking the above into consideration, an object of the present invention is to provide an expanded PMC which can independently carry out a debugging while not connected to a main body PMC. JP-A-58-178408 discloses a programmable controller having a simulating function in which output data is displayed on a console without outputting the signal as an external output signal. According to the present invention, there is provided an expanded programmable machine controller (PMC) connected to a main body programmable machine controller (PMC) inside a numerical control apparatus and disposed outside of the numerical control apparatus, the expanded PMC comprising: a first sequence program for controlling the equipment controlled by the expanded PMC; a second sequence program for a pseudo execution of the operation of the main body PMC; and, a switching control means for connecting the first sequence program and the second sequence program and alternately executing the first sequence program and the second sequence program in a test mode, and connecting the first sequence program to a first input/output circuit and the main body PMC and executing the first sequence program in a normal mode. When the main body PMC is not formed, the debugging or operations must be carried out by only the expanded PMC, and thus the second ladder program for executing the function of the main body PMC is pseudo-executed. More specifically, the second sequence program supplies an input/output signal to the first sequence program and receives same therefrom in place of the main body PMC, and operates as if the main body PMC existed when viewed from the first sequence program. More specifically, the first sequence program and the second sequence program are alternately executed to enable the expanded PMC to independently operate, and thus the sequence program can be debugged only by the expanded PMC. When the main body PMC has been formed, the second sequence program is not needed, and thus only the first sequence program is executed. In the drawings: Figure 1 is a block diagram of an expanded PMC of an embodiment according to the present invention; Figures 2(a) and (b) are diagrams showing the processing of a ladder program; Figure 3 is a time chart showing the execution of a ladder program in a test mode; Figure 4 is a detailed block diagram of an expanded PMC; Figure 5 is a flowchart of an embodiment of the present invention; and Figure 6 is a memory map of a ladder program and an I/O data. An embodiment of the present invention will be described below with reference to the drawings. Figure 1 is a block diagram of an expanded PMC of an embodiment according to the present invention. A numerical control apparatus (CNC) 1 is provided with a main body PMC (programmable machine controller) 2, which controls a mechanical unit A61 through an input/output circuit (I/O) 3. The mechanical unit A61 may be a basic mechanical unit such as a tool exchanger or the like of a machine tool, e.g., a machining center controlled by the CNC 1. An expanded PMC 10 is connected to the I/O 3, and an input/output circuit (I/O) 11 is connected to the I/O 3 to enable a signal to be exchanged between the main body PMC 2 and the expanded PMC 10. The expanded PMC 10 controls an additional mechanical unit B62, which is, for example, a mechanical unit such as a pallet changer or the like of the machining center. It can be determined whether or not the mechanical unit is provided, and further the number of pallets and the like can be selected. Therefore, when the mechanical unit B62 such as the pallet changer or the like is not added, the expanded PMC 10 is not needed. The mechanical unit B62 is controlled by a ladder program A13. More specifically, a signal from the limit switch or the like of the mechanical unit B62 is received through the I/O 11 and processed by the ladder program A13 to drive the hydraulic, pneumatic, or magnetic actuators or the like of the mechanical unit B62 for a control of same. Although not shown, the mechanical unit B62 includes a drive circuit which receives an output signal from the I/O 11 and drives these hydraulic, pneumatic, or magnetic actuators accordingly. In this example, the explanation is based on the use of a ladder program, created by a ladder type, as the sequence program. Further, a command from the CNC 1 is supplied from the main body PMC 2 to the ladder program A13 through the I/O 3 and I/O 11, and supplied from the I/O 11 to the mechanical unit B after having been subjected to a necessary processing. The command includes, for example, a selection command signal or the like for selecting a pallet changer. Conversely, a fault signal and the like of the mechanical unit B62 is read by the ladder program A13 through the I/O 11 and supplied to the main body PMC 2 through the I/Os 11 and 3. Nevertheless, this exchange of signals between the ladder program A13 and the main body PMC 2 is limited to the case wherein the ladder program of the main body PMC 2 has been completed and the CNC 1 exists. In an actual development process, however, sometimes there is a need to test the mechanical unit B62 before the CNC 1 or the ladder program of the main body PMC 2 has been completed. Further, it is generally desirable that the mechanical unit B62 be first completed and the ladder program A13 debugged, i.e., peripheral units completed, and then an overall test carried out by making the necessary connections to the CNC 1. Therefore, it is necessary to create and debug the ladder program A13, and to adjust the mechanical unit B62 and the like, by using only the expanded PMC 10 and mechanical unit B62 without using the CNC 1, and to achieve this object, a ladder program B14 is provided and connected to the ladder program A13, to exchange signals with the main body PMC 2. More specifically, the ladder program B14 executes the exchange of an I/O signal with the ladder program A13 originally executed by the main body PMC 2. Of course, the ladder program B14 does not need to execute all of the functions of the main body PMC 2, but only the exchange of the I/O signal with the ladder program A13, and further, the exchange of the I/O signal need not be always executed at the same timing as that of the main body PMC 2, and may be executed by using a not shown keyboard or the like of the CNC 1. For this purpose, a switching control means 12 is provided and when only the expanded PMC 10 is operated, i.e., in a test mode, the ladder program A13 is connected to the ladder program B14 to enable the mechanical unit B62 to be controlled by the ladder program A13 without using the CNC 1. Of course, when the expanded PMC 10 is connected to the CNC 1 and operated, the switching control means 12 connects the ladder program A13 to the I/O 11. Further, the ladder program A13 is connected to the mechanical unit B62 regardless of the operation of the switching control means 12. Figures 2(a) and (b) are diagrams showing the processing of a ladder program. As shown in Figure 2(a), when the expanded PMC 10 is connected to the main body PMC 2 (normal mode), only the ladder program A13 is repeatedly executed in the expanded PMC 10. Further, when the expanded PMC 10 is isolated from the CNC 1 and independently operated (test mode), the ladder program A13 is executed for one cycle and then the ladder program B14 is executed for one cycle, and these operations are repeated, as shown in Figure 2(b). The ladder program B14 prepares an I/O signal needed by the ladder program A13. Figure 3 is a time chart showing the execution of a ladder program in a test mode. As shown in the figure, the ladder program A13 and the ladder program B14 are alternately executed. The ladder program B13 pseudo-executes the operation of the main body PMC 2 executed when it is connected to the main body PMC 2 (in a normal mode). Figure 4 is a block diagram of hardware of the expanded PMC, wherein, the main body PMC 2 is connected to the expanded PMC 10 through the I/O 3. The expanded PMC 10 is arranged to use a processor 15 as the central part thereof, and the processor 15 controls the expanded PMC 10 by the ladder management program 16a stored in a ROM 16. When the main body PMC 2 is connected to the expanded PMC 10 (normal mode), a bank switching circuit 17 is connected to the right side as shown in the figure, and thus only the ladder program A13 is executed. A command signal and the like from the main body PMC 2 are supplied to an input circuit 11a through the I/O 3 and stored in a RAMC 21 as the DI data 24 of the ladder program A13 (LPA), and further, as a signal to the main body PMC 2, the DO data 25 of the ladder program A (LPA) 13 is supplied from a RAMD 22 to the main body PMC 2 through an output circuit 11b and the I/O 3. More specifically, the input signal of the ladder program A13 is the DI data 24 of the RAMC 21. This input data is read and subjected to a necessary processing, and an output signal is written into the RAMD 22 as the DO data 25 and supplied to the main body PMC 2 through the output circuit 11b and I/O 3. Note that the ladder program A13 is stored in a RAMA 18. Next, when the expanded PMC 10 is independently operated (test mode), first the bank switching circuit 17 is connected to the right side to execute the ladder program A13, and then the bank switching circuit 17 is switched to the left side to execute the ladder program B14, and these operations are repeated. Note that the ladder program B14 is stored in a RAMB 19. Since an I/O signal of the ladder program A13 is isolated from the main body PMC 2 in the test mode, it is supplied from the ladder program B14 . The DO data 27 of the ladder program B (LPB) 14 stored in the RAMF 20 is supplied to the RAMC 21 and serves as the DI data 24 of the ladder program A13, whereas the DO data 25 of the ladder program A13 is supplied to a RAME 23 and serves as the DI data 26 of the ladder program B14. The DI data 26 is processed by the ladder program B14, and the processing is carried out in the same manner as that of the main body PMC 2. Figure 5 is a flowchart of an embodiment of the present invention, wherein numerals prefixed with an "S" indicate the numbers of steps of the process. [S1] It is determined whether an operation is carried out in a test mode in which the expanded PMC 10 is independently operated; when executed in the test mode, the flow goes to step S2, and when executed in a normal mode, the flow goes to step S3. [S2] Since the operation is carried out in the test mode, the DO data 27 of the ladder program B (LPB) 14 in the RAMF20 is supplied to the RAMC 21. This DO data 27 serves as the DI data 24 of the ladder program A13. [S3] Since the operation is carried out in the normal mode, the DI from the main body PMC 2 is read from the input circuit 11a and written into the RAMC 21 to serve as the DI data 24 of the ladder program A (LPA) 13. [S4] The DI data 24 is read and the ladder program A13 is executed, and the output signal obtained as the result of the execution is written into the RAMD 22 as the DO data 25 of the ladder program A (LPA) 13. [S5] It is determined whether an operation is carried out in the test mode: when executed in the test mode, the flow goes to step S6 and when not executed in the test mode (normal mode), the flow goes to step S8. [S6] Since the operation is carried out in the test mode, the DO data 25 of the ladder program (LPA) 13 in the RAMD 22 is supplied to the RAME 23 and this data serves as the DI data 26 of the ladder program B (LPB) 14. [S7] The ladder program B14 is executed, and at this time, the DI data 26 is read and subjected to a necessary processing and the DO data 27 is written into the RAMF 20. [S8] Since the operation is carried out in the normal mode, the DO data 25 of the LPA in the RAMD 22 is output to the main body PMC 2 as the DO data, through the output circuit 11b, and the flow returns to step S3. The above processing is carried out by the processor 15 in accordance with the ladder management program 16a. As described above, when the operation is carried out in the normal mode, the ladder program A13 is executed while a signal is supplied to and received from the main body PMC 2. Further, when the expanded PMC 10 is independently operated, i.e., when the operation is carried out in the test mode, a processing is carried out while the ladder program A13 and ladder program B14 are alternately executed. Figure 6 is a memory map of a ladder program and an I/O data. A memory region ranges from an address 0000H to an address FFFFH. First, the region for the ladder management program 16a is set and then the ladder programs A13 and B14 are disposed at the same memory address and switched by the bank switching circuit 17. Next, the DI data 24 of the ladder program A (LPA) 13, the DO data 25 of the ladder program A (LPA) 13, the DI data 26 of the ladder program B (LPB) 14, and the DO data 27 of the ladder program B (LPB) 14 are disposed, in this order. Although the ladder program is used as the sequence program in the above description, an other type of sequence program using, e.g., a language such as PASCAL and the like, may be applied in the same manner. Further, although the main body PMC is connected to the expanded PMC by using the input/output circuit (I/O), a bus connection, serial transfer circuit or the like may be used. As described above, according to the present invention, since the switching control means and the sequence program for operating the main body PMC are provided, debugging can be carried out by only the expanded PMC, and thus operations such as the development of sequence programs and the adjustment of mechanical units can be separately carried out. Further, the process for debugging the entire system can be effectively carried out in such a manner that the sequence program of the main body PMC for controlling each expanded PMC is debugged after the sequence program of the each expanded PMC has been created and debugged and the mechanical units have been adjusted, whereby the development process as a whole can be shortened.

Claims: An expanded programmable machine controller (PMC,10) connected to a main body programmable machine controller (PMC,2) inside a numerical control apparatus (1) and disposed outside of the numerical control apparatus, the expanded PMC (10) comprising: a first sequence program (A,13) for controlling the equipment controlled by the expanded PMC (10); a second sequence program (B,14) for a pseudo execution of the operation of the main body PMC (2); and, a switching control means (12) for connecting the first sequence program (A) and the second sequence program (B) and alternately executing the first sequence program and the second sequence program in a test mode, and connecting the first sequence program (A) to a first input/output circuit (3) and the main body PMC (2) and executing the first sequence program in a normal mode. A PMC according to claim 1, wherein the main body PMC (2) is connected to the expanded PMC (10) by connecting the first input/output circuit (3) connected to the main body PMC (2) to a second input/output circuit (11) connected to the switching control means (12). A PMC according to claim 1 or claim 2, wherein the first and second sequence programs are arranged by a ladder program created by a ladder type.

Inventors: KOIKE ATSUSHI FANUC DAI-, SAKAGAMI AKIRA FANUC MANSION, YAMAUCHI TAKASHI FANUC MANSION, KOIKE, ATSUSHI, FANUC DAI-3, SAKAGAMI, AKIRA, FANUC MANSION, YAMAUCHI, TAKASHI, FANUC MANSION
Applicants: FANUC LTD, FANUC LTD.
Application year: 1991
Main classification: G05B19
IPC codes: G05B19