WO2011080945A1 - プログラム作成支援装置 - Google Patents

プログラム作成支援装置 Download PDF

Info

Publication number
WO2011080945A1
WO2011080945A1 PCT/JP2010/064244 JP2010064244W WO2011080945A1 WO 2011080945 A1 WO2011080945 A1 WO 2011080945A1 JP 2010064244 W JP2010064244 W JP 2010064244W WO 2011080945 A1 WO2011080945 A1 WO 2011080945A1
Authority
WO
WIPO (PCT)
Prior art keywords
program
component
code
reuse
parameter
Prior art date
Application number
PCT/JP2010/064244
Other languages
English (en)
French (fr)
Inventor
勘 仲井
佐藤 智典
中村 直樹
安井 照昌
啓文 甲斐
大西 宏明
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to DE112010005023.6T priority Critical patent/DE112010005023B4/de
Priority to CN201080053863.5A priority patent/CN102640112B/zh
Priority to US13/503,747 priority patent/US8843885B2/en
Priority to JP2011547356A priority patent/JP5506822B2/ja
Priority to TW099137909A priority patent/TWI464558B/zh
Publication of WO2011080945A1 publication Critical patent/WO2011080945A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0426Programming the control sequence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Definitions

  • the present invention relates to a program creation support device, and more particularly to a creation support device for a measurement monitoring control program executed by an industrial controller or a microcomputer.
  • programmable controller Programmable Controller: PC
  • motion controller Motion Controller: MC
  • numerical controller Node Controller: NC
  • inspection controller display
  • display Graphic Industrial controllers
  • Languages used in the measurement monitoring control program executed by the industrial controller include languages conforming to the IEC61131-3 standard with a ladder as a representative example, and languages dedicated to the controller.
  • C language and assembly language are mentioned as a language of the measurement monitoring control program when using a microcomputer instead of an industrial controller.
  • the PC executes a measurement monitoring control program (hereinafter referred to as “program”) to grasp the state of the measurement monitoring control target and to instruct an operation.
  • the program is created using a predetermined program creation support device (for example, a ladder creation support device), and is mainly described using variables, devices, and numerical values.
  • “Device” here refers to a device in which input / output between a PC and a measurement monitoring control target connected to the PC is assigned to a memory address of the PC, and a memory address used internally by the PC.
  • a PC corresponding to the program creation support apparatus (ladder creation support apparatus) of Non-Patent Document 1 below, an input device is assigned an X device, an output assignment is a Y device, and internally used bit data (internal Device characters are determined in advance according to the data type, such as M) for relay) and D device or R device for internally used word data (register).
  • the address of each device is expressed in hexadecimal for the X device and Y device, and in decimal for the M device, D device, and R device.
  • the variable indicates the device.
  • this variable is called a “label” and is assigned to a specific device at the time of compilation.
  • the assignment of labels to devices may be specified directly by the program writer, or may be assigned automatically at compile time.
  • Characters that can be used as labels are characters other than predetermined characters such as device characters.
  • K in decimal representation or a symbol H in hexadecimal representation is added to the beginning of each numerical value.
  • K25 represents a decimal value “25”.
  • the program creation support device is generally provided as a software tool that operates on a personal computer (hereinafter referred to as “personal computer”) and supports editing of a program for the PC to measure, monitor, and control the facility. Is connected to a personal computer, and the program edited by the personal computer (or the execution code obtained by compiling it) is transferred to the personal computer. It has a function to monitor.
  • GOT display
  • the program can be edited and the status can be monitored from the GOT that is always connected to the PC.
  • the specifications and programs of the equipment to be measured, monitored and controlled are electronically converted into data by being described using a software tool that runs on a personal computer. Since there is no correlation, the measurement monitoring control program is manually created using a program creation support device based on the specifications. Therefore, a great deal of labor was required to create a program that allowed the functions described in the specifications to operate without any problems.
  • a program creation support apparatus that can configure a program from a plurality of POUs while reusing a POU that matches the specifications of the equipment by converting a frequently used program as a program module (Program Organization Unit; POU).
  • POU Program Organization Unit
  • the programming language is a ladder
  • the POU corresponds to a subroutine or function block (Function Block; FB)
  • the programming language is a structured text (Structured Text; ST) or C language
  • the POU corresponds to a subroutine or a function.
  • program creation support apparatus having a macro function that allows an arbitrary program pattern made up of a plurality of program parts to be registered with a name (macro name) registered and called up and reused (macro diversion) when creating the program. is there.
  • program creation support apparatus that can reuse program parts in this way, the effort for creating a program is reduced.
  • the program is created manually after the creator, that is, a human being, understands the specification description of the measurement monitoring control target.
  • the program creation effort can be reduced to some extent by reusing program parts.
  • the program parts are selected, It is difficult to determine how to combine them, and it is desirable to further reduce the labor.
  • the program creation support apparatus includes a program component that includes at least one program element, and generates a program according to the setting content by the user setting the content of the reuse parameter corresponding to each program element.
  • a program element for generating a program in which a plurality of elements corresponding to each parameter are combined is included.
  • the present invention it is possible to define a program part so as to more directly match the specifications related to the measurement monitoring control of equipment, and to create a program so as to match the specifications, It reduces the labor of selection and the design related to the combination of these program parts, and can greatly reduce the labor of creating a program that operates without any deficiencies in the functions described in the specifications.
  • FIG. 2 is a diagram illustrating a hardware configuration of a program creation support device according to Embodiment 1.
  • FIG. 3 is a diagram illustrating a software configuration of a program creation support device according to Embodiment 1.
  • FIG. 6 is a diagram showing an example of a program part definition screen of the program creation support apparatus according to Embodiment 1.
  • FIG. 10 is a diagram for explaining an element to which a symbol “*” included in a program part according to the first embodiment is given.
  • FIG. 10 is a diagram for explaining an element to which a symbol “+” included in a program component according to the first embodiment is assigned.
  • 4 is a flowchart illustrating a procedure for defining a program component according to the first embodiment.
  • FIG. 6 is a flowchart illustrating an example of a change in a procedure for defining a program component according to the first embodiment. 6 is a diagram showing an example of a program component reuse screen according to Embodiment 1.
  • FIG. 3 is a flowchart illustrating a method for generating a program for reusing a program component according to the first embodiment.
  • FIG. 6 is a diagram showing an example of a program component reuse screen according to Embodiment 1.
  • FIG. It is a figure which shows the spindle orientation processing program produced
  • FIG. It is a figure which shows an example of the attached information file of the program which the program creation assistance apparatus which concerns on Embodiment 1 produces
  • 5 is a flowchart showing a method for generating an auxiliary information file according to the first embodiment.
  • FIG. 10 is a diagram illustrating a software configuration of a program creation support device according to a second embodiment.
  • FIG. 10 is a diagram showing an example of a program element component definition screen according to the second embodiment.
  • FIG. 10 is a diagram showing an example of a program part definition screen according to the second embodiment.
  • FIG. 10 is a diagram showing an example of a program component reuse screen according to the second embodiment.
  • FIG. 10 is a diagram illustrating an example of a program element component reuse screen attached to a program component reuse screen according to the second embodiment.
  • FIG. 10 is a diagram illustrating an example of a program element component reuse screen attached to a program component reuse screen according to the second embodiment.
  • FIG. 10 is a diagram showing a program generated by reusing an M code completion processing program component according to the second embodiment.
  • FIG. 10 is a diagram illustrating a software configuration of a program creation support device according to a third embodiment.
  • 12 is a flowchart illustrating a procedure for defining a program hierarchy component according to the third embodiment.
  • FIG. 20 is a diagram showing an example of a program hierarchy component definition screen according to the third embodiment.
  • FIG. 20 is a diagram showing an example of a program hierarchy component definition screen according to the third embodiment.
  • FIG. 20 is a diagram showing an example of a program part definition screen according to the third embodiment.
  • FIG. 10 is a diagram illustrating an example of a hierarchical component reuse screen according to the third embodiment. It is a figure which shows the cutting override setting switch program produced
  • FIG. It is a figure which shows an example of the cutting override setting switch.
  • 12 is a flowchart illustrating a method for generating a program for reusing program hierarchy components according to the third embodiment.
  • FIG. 6 is a diagram showing an example of a program component reuse screen according to Embodiment 1.
  • FIG. 10 is a block diagram illustrating a configuration of a machine tool according to a fourth embodiment.
  • FIG. 10 is a diagram illustrating a software configuration of a program creation support device according to a fourth embodiment. It is a figure which shows the setting in the specification of a device. It is a figure which shows the setting in the specification of an operation panel. It is a figure which shows the setting in the specification of an operation panel. It is a figure which shows the setting in the specification of an operation panel. It is a figure which shows the setting in the specification of an operation panel. It is a figure which shows the setting in the specification of M code
  • FIG. 10 is a diagram showing a mode inversion processing program component according to a fourth embodiment.
  • FIG. 10 is a mode inversion processing program component according to a fourth embodiment.
  • FIG. 10 is a diagram showing an M code decoding processing program component according to a fourth embodiment.
  • FIG. 20 is a diagram showing an AND condition processing program component according to the fourth embodiment. It is a figure which shows the operation panel process program produced by the mode inversion function production
  • a ladder program creation method will be described as an example of a measurement monitoring control program creation method that defines and reuses program parts.
  • FIG. 1 is a diagram illustrating a hardware configuration of a program creation support apparatus according to the first embodiment.
  • the program creation support apparatus 1 includes a microprocessor 2, a display unit 3, an input unit 4, and a storage unit 5.
  • the specification description of the equipment that is the object of measurement monitoring control and the measurement monitoring control program (hereinafter “program”) are stored in the storage unit 5 as files.
  • the display unit 3 can display various information of the program creation support apparatus 1. For example, when the user inputs equipment specifications to the program creation support apparatus 1 using the input unit 4, the input items are displayed on the display unit 3. Various operation screens to be described later are displayed on the display unit 3.
  • the microprocessor 2 executes a program generation process based on the specifications of the facility input by the user and stored in the storage unit 5.
  • FIG. 2 is a diagram showing a functional block configuration (software block configuration) of the program creation support apparatus 1. Each functional block shown in FIG. 2 is realized by controlling each hardware shown in FIG. 1 by software executed by the microprocessor 2.
  • the program creation support apparatus 1 defines a program editing unit 6 that edits a program based on a user operation (program editing), and a reusable program component 10 based on a user operation (program component definition input).
  • a program component definition unit 12 and a program component holding unit 11 that stores the program component 10 defined by the program component definition unit 12 are provided.
  • the program part 10 includes a reuse parameter 14 set at the time of reuse, and the program part 10 can take various forms according to the setting contents (details will be described later).
  • the program editing unit 6 can output the edited program 8 and, if necessary, an associated information file 9 (for example, a comment explaining the contents of the device).
  • an associated information file 9 for example, a comment explaining the contents of the device.
  • the program part definition unit 12 may be defined as a device different from the program creation support apparatus 1.
  • FIG. 3 is an example of an operation screen display (program component definition screen) when the user defines the program component 10 using the program component definition unit 12.
  • an example of defining a program part for a self-holding process often used in a ladder program is shown.
  • the program part definition screen (ladder part definition screen) shown in FIG. 3 is an icon display area in which icons used to create a ladder diagram are displayed in order from the top, and a ladder diagram of the program part is displayed by operating those icons.
  • a program editing area for editing, a parameter definition area for defining reusable parameters for program parts, and a program part name input area for entering the name of the created program part are arranged. ing.
  • the icon display area includes general contacts such as contacts (a contact “-
  • icons with “*” and “+” symbols attached thereto are provided. Icons with “*” and “+” symbols correspond to aggregates (collections) composed of one or more program elements, and icons with “*” are as shown in FIG.
  • a program element corresponds to a relay string that is AND-connected
  • the program editing area is an area where the ladder diagram can be edited by operating the above various icons, and may have the same configuration as the program editing screen (ladder editing screen) provided in the conventional ladder program creation support device.
  • the parameter definition area is an area for defining a reuse parameter to be set when reusing a program part.
  • FIG. 6 is a flowchart showing a procedure for creating a program part according to the present embodiment. A procedure for creating a program part will be described with reference to FIG. Here, as shown in FIG. 3, the case of creating a self-holding program part is illustrated.
  • a reuse parameter to be assigned to each element of a program part is defined as a part variable used for describing the program part (S11). This is performed by the user setting a reuse parameter in the parameter definition area of the program component definition screen.
  • a reuse parameter of No. 1 is defined as a reuse parameter of No. 1
  • 2 is defined as a reuse parameter of No. 2
  • No. 2 is defined.
  • a component variable VB3 is defined as the third reuse parameter.
  • program comments and jump labels may be prepared as reuse parameters for program parts. They may be defined as reuse parameters that each program component has.
  • a comment character string related to the generated program is set. For example, a program comment with a "start" character string at the beginning at the beginning of the program to be generated, and a program comment with a "end” character string at the beginning at the end of the program.
  • the program comment is handled as a statement, and when “main spindle normal rotation” is set as the program comment, the comment is described in the generated program as shown in FIGS. 7 is a ladder diagram format program, and FIG. 8 is an instruction list format program.
  • the jump label (program pointer) as a reuse parameter indicates the position of the program when the program generated by the reuse of the program part is subjected to jump (call) processing from another program.
  • a label is set.
  • the program pointer is treated as a kind of device.
  • P3 is set as the program pointer, the program pointer is described in the generated program as shown in FIG. 7 (ladder diagram format) and FIG. 8 (instruction list format).
  • a return (RET) instruction for returning to the jump source may be attached to the end of the program having the program pointer.
  • devices or variables are assigned as parameters of each element such as contacts, but for each element of program parts, devices or variables (labels) are used as parameters, or reuse parameters Assign the defined component variable.
  • a component variable For an element to which a component variable is assigned, when a program component is reused, the user needs to specify a device or variable (label) to be applied to the element. An element to which a device or a variable (label) is assigned is applied as it is when the program part is reused.
  • the element (collection) marked with “*” or “+” can specify the number of contacts included in it by the number of parameters set when reusing the program part.
  • one part variable is assigned to the collection without assigning a device or variable (label).
  • the ladder program for self-holding processing has one self-holding relay, a normal a contact and coil are used for the self-holding relay.
  • various structures are conceivable for the holding command condition (ON condition) relay and the holding cancellation condition (OFF condition) relay.
  • ON condition ON condition
  • OFF condition holding cancellation condition
  • FIG. 3 it is assumed that a program component for self-holding processing that can be reused for creating a program for exclusive selection processing or M-code function processing is defined.
  • a relay string (elements marked with “*”). That is, the contact a with “*” is used as the ON condition relay train, and the contact b with “*” is used as the OFF condition relay train.
  • the component variable VB1 defined as the reuse parameter of No. 1 is assigned, and No.
  • the component variable VB2 defined as the reuse parameter of No. 2 is assigned.
  • the component variable VB3 defined as the reuse parameter 3 is assigned. This can be determined from the correspondence between the program edit area display and the parameter definition area display on the program part definition screen, but the user can see the correspondence at a glance in the “Explanation” column of the parameter definition area.
  • a comment (character string) describing the element to which the reuse parameter is assigned can be input as shown in FIG.
  • a name is given to the program part (S13). This is performed by the user inputting a character string in the program component name input area of the program component definition screen. In the example of FIG. 3, the name “self-holding process” is given to the created program part. Thus, the creation of the program part is completed.
  • a program part program (ladder diagram) is first described using undefined variables (S21), and then undefined variables are extracted from the described program (S22).
  • the extracted undefined variable may be defined as a reuse parameter (component variable) (S23), and the program component name may be assigned (S24).
  • Extraction of undefined variables and definition as reusable parameters (component variables) may be performed by the user inputting predetermined items in the parameter definition area, or variables defined by the program component definition unit 12 You may do this by searching.
  • the method may be arbitrary.
  • FIG. 10 shows an example of an operation screen display (program component reuse screen) when the program creation support apparatus 1 automatically generates a program by reusing a program component.
  • This figure shows a case where the self-holding processing program component defined as shown in FIG. 3 is reused.
  • This program part reuse screen includes a program part name display area for displaying the name of the program part to be reused, a parameter application area for inputting parameters such as devices and variables (labels) to be applied to the reuse parameter, It has.
  • the program part reuse screen may be provided with a program display area for displaying the structure of the selected program part and the number (No.) of the reuse parameter assigned to each element as shown in FIG. Good. In this case, the user can easily grasp the structure of the program component to be reused and the correspondence between each element and the reuse parameter.
  • the program part name display area not only displays the name of the program part to be reused, but also has a function as a selection menu for selecting one to be reused from a plurality of already defined program parts.
  • the user inputs parameters to be applied to reuse parameters in the parameter application area.
  • two or more parameters can be listed and input for the reuse parameter for which “*” or “+” is displayed in the “Enumeration” column.
  • a comment (character string) about a program to be generated can be input as a program comment as a reuse parameter.
  • the program creation support device 1 replaces the ON condition relay string VB1 with one a contact M3 and the OFF condition relay string VB2 with two b contacts M4 and M19 in the ladder diagram shown in FIG.
  • the ladder program obtained by replacing the self-holding relay VB3 with the relay VB3 and adding the program pointer P3, the return instruction (RET), and the program comments “start main spindle normal rotation” and “end main spindle normal rotation”, that is, FIG. Generate the ladder diagram shown in.
  • the program shown in FIG. 8 describing it in the instruction list format may be generated (the ladder diagram of FIG. 7 and the instruction list of FIG. 8 are equivalent).
  • FIG. 11 is a flowchart of the generation method.
  • a case where the ladder program shown in FIG. 7 is generated is taken as an example.
  • the program creation support apparatus 1 first sets a character string in the program comment of the reuse parameter. Whether or not is checked (S31). If a character string is set in the program comment, the program comment with “start” added at the beginning is output (S32). In the case of FIG. 10, since the character string “spindle forward rotation” is set in the program comment, “start spindle forward rotation” with “start” added thereto is output as the program comment.
  • the elements constituting the program are extracted in the order of the program structure of the program parts (S35), and the following processing is performed for each of the extracted elements.
  • the device or variable (label) is output as is ( S42).
  • the above steps are performed for all elements of the program part to be reused (S43).
  • the first element in the program part defined in FIG. 3 is an AND string “-
  • One reuse parameter VB1 is defined.
  • M3 is set as one reuse parameter, and in this case, one a contact M3 is output (S38).
  • the second element is OR-coupled to the first element (VB1).
  • This is an a contact in which a reuse parameter VB3 of 3 is defined and neither “*” nor “+” is attached. No. Since Y1898 is set in the reuse parameter 3, the a contact Y1898 is output at a position where the OR contact with the previously output a contact M3 is performed (S41).
  • the third element is ANDed with the first element (VB1) and the second element (VB3).
  • This is an AND string (-
  • the last (fourth) element is ANDed with the third element (VB3), and No. 3 is a coil (-()-) in which a reuse parameter VB3 of 3 is defined. No. Since Y1898 is set in the reuse parameter 3, the coil Y1898 is output at a position where AND connection is made with the previously output b contacts M4 and M19 (S41).
  • the program (the ladder in FIG. 7) obtained by applying the parameters set in the program component reuse screen (FIG. 10) to the program component reuse parameters defined in the program component definition screen (FIG. 3).
  • the diagram or the instruction list of FIG. 8) is automatically created.
  • the devices M3, M4, M19, and Y1898 are all OFF.
  • the a contact M3, which is a self-holding holding command condition (ON condition) relay is turned ON, the a contact Y1898 is turned ON. Thereafter, even if the a contact M3 is turned OFF, the a contact Y1898 is kept ON.
  • the ON state of the a contact Y1898 is continued until one of the b contacts M4 and M19 which are holding cancel condition (OFF condition) relays is turned ON.
  • the a contact Y1898 returns to OFF (that is, self-holding is canceled).
  • the program creation support apparatus 1 of the present embodiment can generate various forms of programs from one program component by changing the contents of the reuse parameter set on the program component reuse screen. For example, when reusing the program part of the self-holding process defined as shown in FIG. 3 as described above, if the contents of the reuse parameter are set as shown in FIG. 12 on the program part reuse screen, the ladder shown in FIG. A program can be generated.
  • the devices M19, XC18, M3, M4, and Y189E are all OFF. If both the a contact M19 and XC18 which are ON condition relays are turned on, the a contact Y189E is turned on. Thereafter, even if the a contacts M19 and XC18 are turned off, the a contact Y189E is kept on. The ON state of the a contact Y189E is continued until one of the b contacts M3 and M4 which are OFF condition relays is turned ON. When either of the b contacts M3, M4 is turned ON, the a contact Y189E returns to OFF (that is, self-holding is canceled).
  • the program creation support device 1 can output the created program 8 and the associated information file 9 associated therewith.
  • the attached information file 9 for example, the contents of devices or variables (labels) reused in the generated program (devices or variables (labels) in which reuse parameters are defined by program parts) are described. A comment is described.
  • the attached information file may be created by the user operating the program creation support apparatus 1 or may be automatically generated.
  • FIG. 14 is a flowchart showing an automatic creation method of an attached information file in which comments explaining the contents of a device or variable (label) reused in a generated program are described.
  • the program creation support device 1 When the program creation support device 1 generates a program by reusing program parts, the parameters applied to the reuse parameters from among them (in the example of FIG. 10, “spindle normal rotation”, P3, M3, M4, M19, Y1898) are extracted in order (S51), and it is confirmed whether the parameter is a device or a variable (label) (S52). If the parameter is a device (M3, M4, M19, Y1898) or a variable (label), the program part name and a character string of “description” corresponding to the parameter are combined, and the device or variable ( (Label) is output as a comment (S53). These steps are repeated until all the parameters applied to the reuse parameters are extracted (S54). The attached information file is automatically generated by the above process.
  • the program creation support apparatus 1 can generate the attached information file as shown in FIG. 15 together with the program of FIG. 7 or FIG.
  • the program creation support apparatus 1 is characterized by including a program part definition unit 12 capable of defining such program parts.
  • the design effort for selecting and combining program parts to create a program that matches the specification description is reduced, and the effort required to create a program with all the functions described in the specification is greatly reduced. it can.
  • program component component having a structure that is independently formed as a program
  • program component POU program component having a structure that is independently formed as a program
  • contacts, commands, and coils can be the most basic program element parts that cannot be disassembled any further.
  • the contacts, commands, and coils can be components of programs and program parts, and are also components of program element parts.
  • a program element part can be a component of a program and a program part, or a component of another program element part.
  • FIG. 16 is a diagram showing a functional block configuration (software block configuration) of the program creation support apparatus 1 according to the second embodiment.
  • the program creation support apparatus 1 further includes a program element component definition unit 15 for defining a program element component 17 with respect to the configuration of the first embodiment (FIG. 2).
  • the defined program element component 17 is stored in the program component holding unit 11.
  • the program element component 17 has a reuse parameter 18 that is set when it is reused.
  • FIG. 16 shows a configuration in which the program component definition unit 12 and the program element component definition unit 15 are built in the program creation support device 1, but they may be external devices.
  • FIG. 17 is a diagram illustrating an example of an operation screen display (program element component definition screen) when the user defines the program element component 17 using the program element component definition unit 15.
  • program element component definition screen program element component definition screen
  • FIG. 17 an example of defining a program element part (AND condition processing program element part) described in a ladder diagram format is shown.
  • the program element part definition screen (ladder element part definition screen) has a configuration similar to the program part definition screen (ladder part definition screen) shown in FIG.
  • the program element component definition screen in order from the top, displays the icon display area that displays the icons used to create the ladder diagram, and edits the ladder diagram of the program element component by operating those icons.
  • a program element part (- ⁇ -) and an icon attached with “*” or “+” are arranged.
  • the symbol “*” indicates a column of program element components that are AND-connected, and the symbol “+” indicates a column of program element components that are OR-connected.
  • the program editing area is an area where the ladder diagram can be edited by operating the above various icons, and may have the same configuration as the program editing screen (ladder editing screen) provided in the conventional ladder program creation support device.
  • the program element parts alone are not formed as a program, unlike the program editing area shown in FIG. 3, there is no left bus bar and right bus bar, and the internal structure of one element constituting the ladder diagram is edited. It has a form.
  • the parameter definition area is an area for defining reusable parameters to be set when reusing program element parts, and predetermined items are input by the user.
  • the procedure for defining program element parts is the same as the procedure for defining program parts shown in FIG. 6 or FIG.
  • FIG. 17 shows an example in which the program element component is configured by one a contact (a relay train in which the a contact is AND-coupled) to which “*” is given.
  • No. A component variable VB1 defined as one reuse parameter is assigned, and an explanatory note “AND condition relay string” is attached to the component variable VB1.
  • the name “AND condition processing” is given to the program element part.
  • program element part definition screen use the program element part icons (“- ⁇ -”, “- ⁇ -+”, and “- ⁇ -*”) to construct a ladder diagram that includes other program element parts.
  • program element part icons (“- ⁇ -”, “- ⁇ -+”, and “- ⁇ -*”) to construct a ladder diagram that includes other program element parts.
  • a program element part that reuses another program element part can be defined.
  • FIG. 18 is an example of a program part definition screen of the program creation support apparatus 1 according to the present embodiment. Similar to that shown in FIG. 3, an icon display area, a program editing area, a parameter definition area, and a program part name input area are arranged in order from the top.
  • a program element part (- ⁇ -) and an icon attached with “*” or “+” are arranged. The user can create a program part that reuses the program element part by operating this icon.
  • the parameter definition area is an area where the user inputs predetermined items when creating a program part.
  • a “element component type” column is provided for specifying the type of the program component component.
  • the user operates the “element part type” field to select and specify one to be used from among the already defined program element parts.
  • a program part formed by AND-connecting an OR-connected sequence of program element parts (- ⁇ -+) and a coil (-()-) is defined.
  • a part variable VE1 defined as one reuse parameter is assigned, and “AND condition processing” (that is, the program element part defined in FIG. 17) is set as the type of the program element part of the part variable VE1 in the parameter definition area. It is specified. Further, here, an explanatory note “OR condition (AND condition processing program element part string)” is set by the user.
  • the above coil is given the YC1E, which is an output device that means the completion of the M code, instead of the component variable defined as the reuse parameter.
  • the device YC1E is always described. Note that it is not permitted to assign a device or a variable (label) to a program element component used as a program component, and it is necessary to always add a component variable of a reuse parameter.
  • program element parts used to define program parts it is possible to list and specify the types of program element parts. In this case, among the listed types, a program component that can reuse any program element component is defined.
  • the type of program element part for the program element part (part variable assigned to) used for defining the program part.
  • the type of program element part there is no restriction on the type of program element part, and a program part that can reuse any program element part is defined.
  • a program element component needs to be applied to a component variable for which the type of program component component is not specified and is assigned to the program component component when the program component is reused.
  • a program component is reused for a part variable in which the type of a program element part is not specified and assigned to a contact, a command, or a coil icon, as in the first embodiment.
  • Devices and variables (labels) need to be applied.
  • FIG. 19 shows an example of an operation screen display (program component reuse screen) when the program creation support apparatus 1 automatically generates a program by reusing a program component. This figure shows a case where the M code completion processing program component defined as shown in FIG. 18 is reused.
  • the program component reuse screen (FIG. 19) displays the type of program element component included in the program component as compared with the program component reuse screen (FIG. 10) according to the first embodiment.
  • a column of “element component type” and buttons of “add row” and “delete row” are added.
  • the M code completion processing program component shown in FIG. 18 includes a program element component whose type is “AND condition processing”, in the example of FIG. “AND condition processing” is displayed in the “type” column of one reuse parameter, and the corresponding explanatory note “OR condition (AND condition processing program element part string)” is displayed in the “description” column. .
  • the type is displayed on the program part reuse screen (FIG. 19). Is designated and selected by the user.
  • a program element part may include a plurality of reused elements, it is difficult to set reuse parameters only with the screen as shown in FIG. Therefore, when a program part to be reused includes a program element part, in the “reuse parameter” column of the program element part on the program part reuse screen, there is another parameter for setting the reuse parameter of the program element part.
  • a button for expanding the screen hereinafter referred to as “expand button”. The user can open a screen (program element component reuse screen) for setting a reuse parameter for a program element component by pressing this expansion button.
  • buttons “Add Line” and “Delete Line” are displayed on the program part reuse screen as shown in FIG.
  • the add row button increases the number of program element parts that make up the collection.
  • a column for setting a reuse parameter for program element parts is increased by one line in the parameter application area (expanded). One more button). You can delete one line by pressing the delete line button.
  • the M code completion processing program part (FIG. 18) is a collection in which AND condition processing program element parts are OR-coupled (“+” is displayed in the “Enumeration” column). And the collection is No. Is associated with one reuse parameter.
  • the user wants to OR a plurality of AND condition processing program element parts in the program to be created, the user presses a line addition button to add a line to the parameter application area.
  • FIG. 19 shows an example in which two AND condition processing program element parts are ORed.
  • FIG. 20 shows an example in which the device M3 is applied to the reuse parameter of the first AND condition processing program element part.
  • the type is displayed in the “element part type” column (no type is set or a plurality of types are set). If so, use that field to select the desired type).
  • an expansion button is also displayed in the “reuse parameter” field, so that a reuse parameter of another program element component can be set.
  • the “element part type” field is blank and no expansion button is displayed.
  • FIG. 21 shows an example in which the device M3 is applied to the reuse parameter of the first AND condition processing program element part.
  • FIG. 21 shows an example in which the devices M19 and X188E are listed and applied to the reuse parameter of the second AND condition processing program element part.
  • FIG. 22 shows the result of setting the respective reuse parameters as shown in FIG. 19, FIG. 20, and FIG. 21, and causing the program creation support apparatus 1 to generate the program.
  • the program element part VE1 includes AND condition processing program element part M3 set in FIG. 20 and AND condition processing program element part M19, set in FIG. A program replaced with an OR connection with X188E is generated by the program creation support apparatus 1.
  • the program creation support apparatus 1 is characterized by including a program part definition unit 12 capable of defining such program parts.
  • the design effort for selecting and combining program parts to create a program that matches the specification description is reduced, and the effort required to create a program with all the functions described in the specification is greatly reduced. it can.
  • program hierarchy component a larger program component formed by combining a plurality of specific program components
  • FIG. 23 is a diagram showing a functional block configuration (software block configuration) of the program creation support apparatus 1 according to the third embodiment.
  • the program creation support apparatus 1 further includes a program hierarchy component definition unit 19 for defining a program hierarchy component 21 with respect to the configuration of the second embodiment (FIG. 16).
  • the defined program hierarchy component 21 is stored in the program component holding unit 11.
  • the program hierarchy component 21 includes a reuse parameter 22 that is set when the program hierarchy component 21 is reused.
  • the program component definition unit 12 shows a configuration in which the program component definition unit 12, the program element component definition unit 15, and the program hierarchy component definition unit 19 are built in the program creation support apparatus 1, they may be external devices. .
  • FIG. 24 is a flowchart showing a procedure for defining the program hierarchy component 19.
  • FIG. 25 and FIG. 26 are examples of operation screen display (program hierarchy component definition screen) when defining a program hierarchy component using the program hierarchy component definition unit 19.
  • operation screen display program hierarchy component definition screen
  • FIG. 25 and FIG. 26 are examples of operation screen display (program hierarchy component definition screen) when defining a program hierarchy component using the program hierarchy component definition unit 19.
  • the example of the screen which defines the program hierarchy component which performs the process of exclusive selection numerical value setting by the ladder diagram format is shown.
  • This program hierarchy component definition screen (ladder hierarchy component definition screen) is for defining a program component setting area for setting program components to be included in a program hierarchy component to be created and a program hierarchy component reuse parameter in order from the top
  • the parameter definition area and the program hierarchy part name input area for inputting the name of the program hierarchy part are arranged.
  • the program part setting area further includes a program part order setting area for setting the arrangement of program parts in the program hierarchy part, and a parameter for applying a predetermined parameter to a reuse parameter of each program part constituting the program hierarchy part. It consists of application areas.
  • a reuse parameter set when reusing a program hierarchy component is defined as a component variable used for the description of the program hierarchy component (S61).
  • a component variable VB to be assigned to a command relay of the exclusive selection numerical value setting program (a contact point to which the component variable VB1 as the reuse parameter in FIG. 27 is given) is defined.
  • a component variable VK to be assigned to a numerical value (variable VK2 in FIG. 27) set by a numerical value setting processing instruction (MOV) is defined.
  • MOV numerical value setting processing instruction
  • a component variable VM is set as an internal local variable (internal relay).
  • a component variable VD to be assigned to a numerical setting destination register (variable VD3 in FIG. 27) is defined.
  • the “enumeration” check box in the parameter definition area is used to set whether or not parameters can be enumerated and set for the reuse parameter.
  • the reuse parameters 1 to 3 are defined as parameters that can be set by listing parameters.
  • Program hierarchy parts are generated by reusing predetermined program parts for the number of listed parameters.
  • a program comment and a program pointer may be prepared as a reuse parameter of the program hierarchy part.
  • the program parts to be reused in the program hierarchy parts and their order are selected (S62).
  • the program parts selected in this step are reused in the order selected.
  • a list of defined program parts is displayed in the box on the right side of the program part order setting area, and one of the list is selected and a selection button (“ ⁇ ”) is selected. Press to add it to the ladder diagram in the box on the left. If one of the program parts displayed in the left box (ladder diagram) is selected and the delete button is pressed, the program part can be deleted from the ladder diagram. Furthermore, when one of the program parts displayed in the left box is selected and the up / down movement buttons (arrow buttons “ ⁇ ” and “ ⁇ ”) are pressed, the order of the program parts can be changed.
  • a self-holding process program part is selected from the list of program parts and added to the ladder diagram, and further, a numerical value setting process program part is selected, and the self-holding process program of the ladder diagram is selected.
  • the example added after the part is shown.
  • a program hierarchy component that can generate a program that reuses the self-holding processing program component and the numerical value setting processing program component in this order is defined.
  • the program hierarchy component can generate a program that repeatedly reuses the self-holding processing program component and the numerical value setting processing program component by the number of the enumerated parameters. .
  • the part variable defined as the reuse parameter in the program hierarchy part is applied to the reuse parameter of the program part included in the program hierarchy part (S63).
  • the part variable defined as the reuse parameter in the program hierarchy part is applied to the reuse parameter of the program part included in the program hierarchy part (S63).
  • FIGS. 25 and 26 when a program part in the left box (ladder diagram) of the program part order setting area is selected, a list of reuse parameters of the selected program part is displayed in the parameter application area below it. Is displayed.
  • a self-holding processing program part is selected in the left box of the program part order setting area, and a list of reuse parameters is displayed in the parameter application area.
  • the self-holding processing program part No. 1 for the reuse parameter (VB1 in FIG. 3).
  • No. 1 of the self-holding processing program part is applied by applying the reusable parameter VB with the symbol “@” (VB @). 2 for the reuse parameter (VB2 in FIG. 3).
  • No. 1 of the self-holding processing program part is applied by applying the reusable parameter VB with the symbol “@!” (VB @!). 3 for the reuse parameter (VB3 in FIG. 3).
  • the one with the symbol “@” attached to the reuse parameter VM 3 (VM @) is applied.
  • a numerical value setting processing program part is selected in the left box of the program part order setting area, and a list of reuse parameters is displayed in the parameter application area.
  • the numerical setting processing program part No. 1 for the reuse parameter (VB1 in FIG. 27).
  • No. 3 of the numerical value setting processing program part is applied by applying the one with the symbol “@” (VM @) to the reuse parameter VM 3.
  • 2 reuse parameter (VK2 in FIG. 27)
  • the program hierarchy part No. No. 2 of the numerical value setting processing program part is applied by applying the one with the symbol “@” (VK @) to the reuse parameter VK of No. 2.
  • 3 reuse parameter (VD3 in FIG. 27) the program hierarchy part No.
  • the reuse parameter VD of 4 is applied.
  • the symbol “@” indicates that the listed parameters are sequentially applied one by one when the program components in the program hierarchy component are repeatedly reused by the number of listed parameters.
  • the symbol “@!” Enumerates all parameters other than those applied based on the symbol “@” when the program parts in the program hierarchy part are repeatedly reused for the number of parameters listed. It shows that it applies.
  • the program components included in the program hierarchy component are repeatedly reused as many times as the number of parameters listed and applied in the reuse parameter. For example, if three parameters X1, X2, and X3 are enumerated and applied to the reuse parameter VB, the reuse is performed three times. In that case, in the first reuse, the first parameter X1 is applied to VB @, and VB @! The other parameters X2 and X3 are applied to. In the second reuse, the second parameter X2 is applied to VB @ and VB @! The other parameters X1 and X3 are applied to. In the third reuse, the third parameter X3 is applied to VB @ and VB @! The other parameters X1 and X2 are applied.
  • a program hierarchy component can also be a component of another program hierarchy component. If there is a program hierarchy part that has already been defined and saved, it is displayed in the right box of the program part order setting area on the program hierarchy part definition screen, and can be selected in the same way as a normal program part. Thereby, it is possible to define a program hierarchy component that reuses another program hierarchy component.
  • FIG. 28 shows an example of an operation screen display (program hierarchy component reuse screen) when the program creation support apparatus 1 automatically generates a program by reusing a program hierarchy component.
  • This program hierarchy component reuse screen has substantially the same configuration as that shown in FIG. 10, and includes a program hierarchy component name display area for displaying the name of the program hierarchy component to be reused, and devices and variables (labels) applied to reuse parameters. ) And other parameter application areas for inputting parameters.
  • FIG. 28 shows a case where the program hierarchy parts defined as shown in FIGS. 24 and 25 are reused.
  • the “No.”, “Enumeration”, and “Explanation” columns of the reuse parameter displayed in the parameter application area the contents defined in the parameter definition area of the program hierarchy part definition screen of FIGS. 24 and 25 are displayed. Is done.
  • the user inputs parameters to be applied to reuse parameters in the parameter application area.
  • two or more parameters can be listed and input in the reuse parameter for which a check (“Le”) is displayed in the “Enumeration” column.
  • Le a check
  • the number of parameters to be enumerated and applied to each reuse parameter needs to be the same.
  • FIG. 29 is a program for processing the setting result of the cutting override switch as shown in FIG.
  • the operator of the facility selects a cutting override value when the facility is operated from 25%, 50%, 75%, and 100% by using a cutting override switch provided on the operation panel of the facility.
  • the output of the cutting override switch is connected to each X device (X285, X286, X287, X288) of the controller incorporated for performing measurement monitoring control of the facility.
  • the controller stores the cutting override value selected by ON / OFF of each X device in the R register (R2500) inside the controller.
  • FIG. 31 is a flowchart of the generation method.
  • a case where the ladder program shown in FIG. 7 is generated is taken as an example.
  • the program creation support apparatus 1 first enumerates parameters and applies applicable reuse parameters (programs). In the parameter definition area of the Hierarchical Component Definition screen, check if there are multiple checks (those that have “check” in the “enumeration” column), and if there are multiple, all the number of parameters applied to them It is confirmed whether or not they are the same (S71). If there are different numbers, a reusable parameter setting error is displayed, and the process ends without generating a program (S72).
  • the program is generated by reusing the program parts by the number of parameters enumerated in the reuse parameters and applied.
  • an index i for counting the number of reuses is set to 1 (S74). The index i is incremented by one every time the reuse of the program part is completed, and the reuse of the program part is repeated until the value of i exceeds the number of parameters listed.
  • the program creation support apparatus 1 extracts program parts in the order of the program structure of the program hierarchy parts (S75).
  • the reuse parameters of the extracted program parts are sequentially extracted (S76), and it is confirmed whether or not the reuse parameters of the program hierarchy parts are applied thereto (S77). If the reuse parameter of the program hierarchy component is applied, it is determined whether the symbol “@” is attached (S78), the symbol “@!” Is attached (S80), or neither. Is done.
  • the i-th reuse parameter of the program hierarchy part is applied thereto (S79). If the symbol “@!” Is added to the reuse parameter of the program part, all the reuse parameters other than the i-th part of the program hierarchy part are enumerated and applied (S81). If neither symbol is added, the reuse parameter of the program hierarchy part is applied to the reuse parameter of the program part (S82).
  • the process related to the reuse parameter of the program part (S76 to S83) is executed for all the reuse parameters of the program part (S84).
  • a program that reuses the program component is generated based on the processing result (S85).
  • processing similar to the program generation method shown in FIG. 11 is performed.
  • Processing from program part extraction (S75) to program generation by reusing program parts (S85) is executed in the specified order for all program parts in the program hierarchy part (S86).
  • the index i is incremented (S87), and the index i after the increment exceeds the number of parameters listed in the reuse parameter of the program hierarchy part. This process is repeated (S88).
  • the program creation support apparatus 1 puts a check (“Re”) in the “Enumeration” column. No. The number of parameters listed in the reuse parameters 1 to 4 is confirmed (S71). In this case, since there are four, no setting error occurs and program creation is executed.
  • the program creation support apparatus 1 outputs the “start cutting override setting switch” added with “start” as a program comment. (S73). No jump label is set.
  • the program parts are extracted in the order of the structure of the program hierarchy parts (S75).
  • the first program part of the program hierarchy part is a self-holding process program part, so that it is extracted.
  • the reuse parameters are extracted in order for the extracted self-holding processing program parts (S76).
  • Self-holding processing program part No. In the reuse parameter VB2 of No. 2, the program hierarchy part No. The one with the symbol “@!” Attached to one reuse parameter VB is applied. Therefore, X286, X287, and X288 other than the first (i-th) of the devices X285, X286, X287, and X288 listed and set as the self-holding processing program part No. 2 is applied to the reuse parameter VB2 (S81).
  • Self-holding processing program part No. In the reuse parameter VB3 of No. 3, the program hierarchy part No. The one with the symbol “@” attached to the reuse parameter VM of No. 3 is applied. Therefore, the first (i-th) M4002 of the devices M4002, M4003, M4004, and M4005 enumerated and set in it is the self-holding processing program part No. 3 is applied to the reuse parameter VB3 (S79).
  • the numerical value setting processing program component which is the second program component of the program hierarchy component is extracted (S75). Then, the reusable parameters are extracted in order for the extracted numerical value setting processing program parts (S76), and the same processing as described above is performed.
  • Numeric setting processing program part No. In the reuse parameter VB1 of No. 1, the program hierarchy part No. The one with the symbol “@” attached to the reuse parameter VM of No. 3 is applied. Therefore, the first (i-th) M4002 of the devices M4002, M4003, M4004, and M4005 enumerated and set therein is the number setting processing program part No. 1 is applied to the reuse parameter VB1 (S79).
  • Numeric setting processing program part No. In the reuse parameter VK2 of No. 2, the program hierarchy part No. The one with the symbol “@” added to the reuse parameter VK of 3 is applied. Therefore, 25 (decimal expression “K25” in FIG. 29), which is the first (i-th) of the numerical values 25, 50, 75, and 100 enumerated and set in the numerical value setting processing program part No. 2 is applied to the reuse parameter VK2 (S79).
  • the index i is incremented (S87).
  • the program shown in FIG. 29 is generated by the above procedure.
  • the program hierarchy component according to the present embodiment can be reused to generate a program configured by combining a plurality of program components. At that time, by enumerating and applying multiple parameters (devices, variables (labels), numerical values, etc.) to the reuse parameters of the program hierarchy parts, it is possible to generate a program having a structure in which those program parts are reused multiple times. It is.
  • the program hierarchy component can take various forms according to the number of parameters to be applied to the reuse parameter.
  • the program creation support apparatus 1 of the present embodiment is characterized by including a program part definition unit 12 that can define such a program part.
  • the program creation support apparatus 1 is characterized by including a program part definition unit 12 capable of defining such program parts.
  • the design effort for selecting and combining program parts to create a program that matches the specification description is reduced, and the effort required to create a program with all the functions described in the specification is greatly reduced. it can.
  • the program creation support apparatus 1 generates a program for controlling the machine tool.
  • generates a ladder program is demonstrated as the example.
  • a machine tool that uses a ladder program generated by the program creation support apparatus 1 will be described.
  • FIG. 33 is a block diagram showing the configuration of the machine tool.
  • the machine tool 46 includes a computer numerical controller (hereinafter referred to as “CNC”) 47, a spindle motor 54 and a servo motor 55 that rotate and move the tools and workpieces of the machine tool 46, and the machine tool 46.
  • CNC computer numerical controller
  • the machine tool 46 including the CNC 47 shown in FIG. 33 may be referred to as a “CNC machine tool 46”.
  • the CNC 47 is composed of, for example, a computer incorporated in the CNC machine tool 46, and includes a motion control unit 51 having a motion control function and a sequence control unit 52 having a sequence control function.
  • the CNC 47 stores a machining program 48 in which machining procedures in the CNC machine tool 46 are described.
  • the CNC 47 interprets the machining program 48 to control the spindle motor 54 and the servo motor 55, or to add an accessory.
  • the equipment 57 is controlled.
  • the machining program 48 describes a G code 49 for instructing the moving amount and moving speed of the tool and the workpiece, and the motion control unit 51 of the CNC 47 specifies the command (numerical value) of the G code 49. Based on the above, the rotation and movement of the spindle motor 54 and the servo motor 55 are controlled. Thereby, the machine tool 46 provided with the CNC 47 can rotate and move the tool and the workpiece with a desired movement amount and movement speed.
  • the machining program 48 describes the M code 50 for instructing control of the incidental equipment 57, and the sequence control unit 52 of the CNC 47 controls the incidental equipment 57 based on the instruction of the M code 50. Since the sequence control unit 52 has a function equivalent to that of a PC, the sequence control unit 52 may be realized by hardware equivalent to the PC and different from the PC, or may be realized by hardware of the PC.
  • Non-Patent Document 2 PLC Programming Manual IB-1500035, Internet ⁇ URL: http: //wwwf2.mitsubishielectric.co.jp/melfansweb/index_j.htm>).
  • the CNC machine tool 46 controls the auxiliary equipment 57 according to the command of the M code 50 (hereinafter referred to as “M code processing program”). And a ladder program 53 for controlling the machine tool 46 using the operation panel 56 (hereinafter referred to as “operation panel processing program”).
  • the program creation support apparatus 1 generates an operation panel processing program and an M code processing program used in the CNC machine tool 46 from the specifications of the operation panel 56 and the specifications of the M code 50. .
  • the program creation support apparatus 1 according to the present embodiment will be described.
  • the program creation support device for creating the operation panel processing program and the M code processing program may be the same as or different from the program creation support device for creating the PC ladder program, A program creation support apparatus for creating a ladder program may be applied.
  • the CNC machine tool 46 is provided with a large number of switches in the operation panel 56 and several tens to several hundreds of M codes 50. In the following, typical switches such as operation mode selection and override, A typical M code such as M3, M4, M5, and M30 will be described as an example.
  • the hardware configuration of the program creation support apparatus 1 is the same as the block diagram shown in FIG. The hardware configuration will be described with reference to FIG. 2.
  • the specification data related to the CNC machine tool 46 and the file related to the measurement monitoring control program are held in the storage unit 5. Then, the program creation support apparatus 1 displays the specification to be input on the display unit 3, and the microprocessor 2 executes the program generation process according to the specification set by the user in the input unit 4.
  • FIG. 34 is a diagram showing a functional block configuration (software block configuration) of the program creation support apparatus 1 according to the present embodiment.
  • the program creation support apparatus 1 further includes a specification setting unit 31 and a device specification holding unit 32 in contrast to the program editing unit 6 and the program component holding unit 11 described in the above embodiments.
  • the program component definition unit 12 and the like are not shown in FIG.
  • the specifications such as the operation panel 56 and the M code 50 are input to the program creation support apparatus 1 from the outside (specification input 29) as the specification input 29. Further, the program creation support apparatus 1 is connected to a specification description file 30 in which specifications such as the operation panel 56 and M code are described, and can read and write the specification description file 30 with respect to the specifications such as the operation panel 56 and M code. It has become.
  • the specification setting unit 31 receives the specifications of the operation panel 56 and the M code 50 from the specification input 29 and the specification description file 30, and sets the specification of the operation panel 56 and the specification of the M code 50.
  • the specification setting unit 31 receives the specification of the operation panel 56, sets (stores) the specification of the operation panel 56, and receives the specification of the M code 50 and the M code 50.
  • an M code specification setting unit 31B that sets (stores) the above specifications.
  • the specification setting unit 31 outputs the set specification (specification data) to the program editing unit 6, or outputs or inputs the specification so as to be written in the specification description file 30.
  • the program part holding unit 11 holds in advance a program part 10 such as a ladder part that is used when the program editing unit 6 generates a program.
  • This program component 10 may be defined in any one of the first to third embodiments, or may be defined by a conventional method other than those.
  • the program component holding unit 11 according to the present embodiment includes a mode inversion processing program component 10A, a self-holding processing program component 10B, a numerical value setting processing program component 10C, an M code decoding processing program component 10D, and an AND condition processing as the program component 10.
  • the program part 10E and the M code completion processing program part 10F are held.
  • FIG. 35 is a diagram showing device address specifications related to motion control input / output held by the device specification holding unit 32.
  • the device specification holding unit 32 holds the specification of the device as shown in FIG. 35 as the specification related to the ladder program used in the CNC machine tool 46. Specifically, the device specification holding unit 32 holds a table associating a name for identifying what kind of motion control input / output is associated with a device address to which the input / output is assigned.
  • Non-Patent Document 3 PLC Interface Manual IB-1500000, Internet ⁇ URL: http : //wwwf2.mitsubishielectric.co.jp/melfansweb/index_j.htm>).
  • the program editing unit 6 acquires the specifications of the operation panel 56 and the M code 50 by receiving the specifications from the specification setting unit 31 or reading the specifications stored in the specification description file 30.
  • the program editing unit 6 includes a program generation unit 34.
  • the program generation unit 34 stores the specifications of the operation panel 56 and the M code 50 described in the specification description file 30 and the specifications of the operation panel 56 and the M code 50 set by the specification setting unit 31.
  • the program is created from the program component 10 while being applied to the reuse parameter 22 of the program component 10 held in the program component holding unit 11.
  • the program generation unit 34 refers to the device specifications held in the device specification holding unit 32 when creating a program from the program component 10.
  • the program generation unit 34 includes an operation panel processing program generation unit 341 and an M code processing program generation unit 342, and has means for generating a program for each functional specification. .
  • the operation panel processing program generation unit 341 and the M code processing program generation unit 342 will be described.
  • the operation panel processing program generation unit 341 holds the specifications of the operation panel 56 described in the specification description file 30 and the specifications of the operation panel 56 set by the specification setting unit 31 in the program component holding unit 11.
  • the operation panel processing program is generated from the program part 10 while being applied to the reuse parameter 22 of the program part 10 that is present.
  • the operation panel processing program generation unit 341 includes a mode inversion function generation unit 341A, an operation mode selection function generation unit 341B, and a cutting override function generation unit 341C (hereinafter collectively referred to as “function generation unit 341A”).
  • the function generation units 341A to 341C generate operation panel processing programs for performing different controls on the operation panel 56, respectively.
  • the mode inversion function generation unit 341A generates an operation panel processing program for performing the mode inversion control in the operation panel 56
  • the operation mode selection function generation unit 341B performs the operation mode selection control in the operation panel 56.
  • An operation panel processing program for performing the operation is generated, and the cutting override function generating unit 341C generates an operation panel processing program for performing the cutting override control on the operation panel 56.
  • the M code processing program generation unit 342 holds the specification of the M code 50 described in the specification description file 30 and the specification of the M code 50 set by the specification setting unit 31 in the program component holding unit 11.
  • the M code processing program is generated from the program part 10 while being applied to the reuse parameter 22 of the program part 10 that is present.
  • the M code processing program generation unit 342 includes an M code function generation unit 342A, and the M code function generation unit 342A generates an M code processing program.
  • the program editing unit 6 outputs the generated operation panel processing program and M code processing program as an edited program 8 and outputs an associated information file 9 as necessary.
  • the edited program 8 is a ladder program
  • a comment explaining the contents of each device used for the ladder program is output as the attached information file 9 as described in the first embodiment.
  • FIG. 36 shows a screen for setting the specifications of each switch on the operation panel 56 (hereinafter referred to as “operation panel specification setting”) in a CNC machine tool 46 having an operation panel 56 in which pushbutton switches are arranged. It is a figure which shows an example of a screen "). A plurality of switches are displayed in a matrix on the operation panel specification setting screen shown in FIG. 36, and any one switch is double-clicked (selected) by the user using the mouse. Then, a switch specification setting screen corresponding to the switch is displayed.
  • FIG. 37 is a diagram showing a switch specification setting screen that is displayed when the switch labeled “operation memory” in FIG. 36 is selected.
  • the switch type, switch operation, and switch input are set for one switch selected in FIG.
  • the character string displayed in the frame demarcating the switch shown in FIG. 36 includes the head part of the character string set in the switch type and the character string set in the switch operation shown in FIG. Are combined.
  • the head part “driving mode” of “operating mode selection” is set.
  • ”And“ memory ” are displayed in the switch frame as shown in FIG. 36.
  • a switch to which no character string is assigned indicates that the switch type and the switch operation are not set in FIG.
  • a drop-down list or combo box (hereinafter referred to as “drop-down list, etc.”) is provided next to the character string of switch type, and one desired switch type is selected by the user from the list displayed on this list. By selecting, the switch type is set.
  • operation panel specification setting unit 31A includes types of operation panel processing programs that can be generated by operation panel processing program generation unit 341, that is, function generation units 341A to 341C included in operation panel processing program generation unit 341.
  • the function names (“mode inversion”, “operation mode selection”, “cutting override”) are displayed in the above list. One of these is set by the user as the switch type.
  • a drop-down list or the like is provided next to the character string “switch operation”, and a desired switch operation is set from the list displayed on the drop-down list. Specifically, switch operations corresponding to the previously selected switch type are displayed in a list, and one of them is set. As a result, the switch operation corresponding to the switch type is set for the operation panel processing program that can be generated by the operation panel processing program generation unit 341.
  • mode inversion when “mode inversion” is set in the switch type, “single block” and “dry run” are displayed in the switch operation drop-down list as the mode inversion switch operation. Is set.
  • “Operating mode selection” is set in the switch type, “Jog”, “Handle”, “Memory” are displayed in the switch operation drop-down list, etc. as the operation mode selection switch operation.
  • One is set.
  • cutting override is set in the switch type, when the cutting override is expressed as a percentage value, “25”, “50”, “50” “75” and “100” are displayed, and one of these is set.
  • the PC input device assigned to the switch is set in the box next to the character string “Switch input”. If it is predetermined that each switch is assigned to a specific input device, the address of the device may be displayed so that address setting can be omitted.
  • FIG. 38 is a diagram showing a screen for setting the specifications of each switch in a display form different from the display form shown in FIGS.
  • “Single block” and “Dry run” are set in the “Switch operation” column for “Mode inversion”
  • “Jog” and “Handle” are set for “Operation mode selection”.
  • ”And“ Memory ” are set in the switch operation column, and“ 25 ”,“ 50 ”,“ 75 ”, and“ 100 ”are displayed in the switch operation column for“ cutting override ”.
  • FIG. 39 is a diagram showing an example of a screen for setting the functional specification of the M code 50 provided in the CNC machine tool 46. As shown in FIG. An M code number is set in the M code column, and a brief description of the M code 50 is set in the function name column.
  • “Simultaneous with block start” and “After completion of block axis movement” are selectively displayed by a drop-down list etc., and one of them is set.
  • “simultaneously with the start of block” means that when the M code 50 is commanded in the same block as the axis movement, the execution of the function of the M code 50 starts simultaneously with the start of the axis movement commanded in the block. It means to do.
  • “After completion of block axis movement” means that when the M code 50 is commanded in the same block as the axis movement, the execution of the function of the M code 50 is started after completion of the axis movement commanded in the block. means.
  • the function canceling column nothing is set when the function of the M code 50 is valid only in the assigned block. However, if it is desired that the function of the M code 50 be effective until canceled or changed by another M code 50 even after the block to which the function of the M code 50 is assigned, the function canceling The other M codes 50 are listed and set in the column.
  • an M code number different from the M code number set in the M code column is set. For example, when “M3” is set in the M code column, an M code number other than M3 is set in the function cancellation column, and “M4” is set in the M code column. In the function cancel column, an M code number other than M4 is set.
  • an address of a device such as a Y device that is an output device or an M device that is an internal device, which is a function output destination of the M code 50, is set. If there is no need to output a function in the M code 50, nothing is set in this field.
  • an address of a device such as an X device that is an input device or an M device that is an internal device, which is a condition for completing the function of the M code 50, is set.
  • a device such as an X device that is an input device or an M device that is an internal device, which is a condition for completing the function of the M code 50.
  • the M code 50 is an M code function that performs forward rotation of the spindle.
  • M3 is an M code function that performs forward rotation of the spindle.
  • Function spindle forward rotation
  • the M4 M code 50 for performing the main shaft reverse rotation function and the M5 M code 50 for performing the main shaft stop function are changed to M3 M
  • Another M code 50 for canceling the code function is set in the function cancel column.
  • Y1898 which is an output device for normal rotation of the spindle, is set in the function output column as a function output destination device.
  • X188D which is an input device indicating the arrival when the main shaft reaches the predetermined rotation speed
  • X188D is used as a function completion condition device.
  • the M code 50, M04 is an M code function that performs spindle reverse rotation.
  • the M code 50 of the M code 50 is simultaneously started with the axis movement commanded in that block. Starts function (spindle reverse). Since the spindle reverse rotation function is continued until forward rotation or stop is commanded, the M3 M code 50 that performs the spindle forward rotation function and the M5 M code 50 that performs the spindle stop function are M4.
  • Another M code 50 for canceling the M code function is set in the function cancel column.
  • Y1899 which is an output device for reversing the spindle, is set in the function output column as a function output destination device.
  • the M code 50 called M05 is an M code function for stopping the spindle, and when commanded in the same block as the axis movement, when the axis movement commanded in that block is started, the M code 50 Starts the function (spindle stop).
  • the spindle stop function cancels other M code functions, but is not canceled from another M code 50, so nothing is set in the function cancel column. Also, since the spindle stop function stops the operation, nothing is set in the function output column.
  • X188C which is an input device indicating that the rotational speed of the spindle has become zero, is set in the function completion column as a function completion condition device.
  • M30 is an M code function that performs end-of-data processing.
  • M30 functions (end of data) at the same time as the axis movement commanded in that block starts. Process).
  • the function of end-of-data processing is to reset the CNC machine tool 46. Accordingly, the function of end-of-data processing is not canceled from the other M code 50, so that function cancellation is not set.
  • YC1A which is a device for resetting the CNC machine tool 46, is set in the function output column as a function output destination device. M30 completes the function simultaneously with the function output.
  • a mode inversion processing program component 10A,..., An M code completion processing program component 10F is held in the program component holding unit 11.
  • the mode inversion processing program component 10A, the numerical value setting processing program component 10C, the M code decoding processing program component 10D, and the AND condition processing program component 10E will be mainly described. Since the numerical value setting processing program component 10C has been described in detail in the third embodiment, it will be briefly described here.
  • FIG. 40 is a diagram showing a mode inversion processing program component 10A in which a program for processing the mode inversion function is made into a component. 40.
  • a program program part POU
  • FIG. 40 By simply specifying a device or variable (label) as a reuse parameter of the mode inversion processing program part 10A shown in FIG. 40, a program (program part POU) for processing the mode inversion function is automatically based on the parameter. Generated automatically.
  • VB1 which is a device for instructing mode inversion
  • VB2 is turned on for one scan of the PC by the PLS instruction
  • VB3 is inverted, that is, turned on in response to VB2 being turned on.
  • VB2 is turned off by the PLS instruction, but VB3 is kept on. Even if VB1 is turned off after a time interval, VB3 remains on.
  • VB1 When VB1 is turned ON again after a time interval, VB2 is turned ON for one PC scan by the PLS command, and VB3 is inverted, that is, turned OFF in response to VB2 being turned ON. In the next scan of the PC, VB2 is turned off by the PLS command, but VB3 is kept off. Even if VB1 is turned off after a time interval, VB3 is kept off.
  • the numerical value setting processing ladder program for processing the numerical value setting function will be described on the assumption that a device or the like is specified as the reuse parameter of the numerical value setting processing program component 10C shown in FIG.
  • the numerical value of VD3 is an initial value (that is, zero).
  • VB1 which is a device for instructing numerical value setting
  • the numerical value applied to VK2 by the MOV instruction is set to VD3.
  • VD3 Even if VB1 is turned off after a while, the value of VD3 is retained, but this is not the case when the value of VD3 is set in another part of the ladder program.
  • VB1 may be held at the ON state at all times.
  • FIG. 41 is a diagram showing an M code decoding processing program part 10D obtained by converting a program for processing the decoding function of the M code 50 into parts. 41.
  • a program program that processes the decoding function of the M code 50 based on the parameters only by specifying a device or variable (label) as a reuse parameter of the code processing program component 10D in the M code shown in FIG. Part POU) is automatically generated.
  • VB1 and VB4 are both OFF. If VB1 is ON and the values of VD2 and VK3 are the same, VB4 is ON. If VB1 is turned off, or if the value of VD2 is different from the value of VK3, VB4 is turned off.
  • FIG. 42 is a diagram showing an AND condition processing program part 10E obtained by converting a program for processing an AND condition into parts. 42.
  • a program program component POU
  • the operation panel processing program generation unit 341 (such as the mode inversion function generation unit 341A) shown in FIG. 34 performs the specifications of the device shown in FIG. 35 and the specifications of the operation panel 56 shown in FIG.
  • the operation for generating the operation panel processing program from the program part 10 will be described while applying the above to the reuse parameter of the program part 10.
  • FIG. 43 is a diagram illustrating an example of an operation panel processing program generated by the mode reversal function generation unit 341A.
  • the mode inversion function generation unit 341A uses the device specifications (FIG. 35) and the specifications of the operation panel 56 (FIG. 38) relating to “mode inversion” to re-create the mode inversion processing program component 10A shown in FIG.
  • An operation of generating an operation panel processing program for performing the mode inversion control shown in FIG. 43 from the mode inversion processing program component 10A by applying to the usage parameters will be described.
  • the operation panel processing program for performing the mode inversion control generated by the mode inversion function generation unit 341A may be referred to as a “mode inversion switch processing program”.
  • FIG. 44 shows attributes of the mode inversion function generation unit 341A.
  • the switch type and the switch operation according to FIG. 44 the contents related to the mode inversion are displayed in the specification of the operation panel 56 (FIG. 38).
  • the switch type “mode reversal” indicates that the switch operations “single block” and “dry run” are set in the specification of the operation panel 56.
  • 44 indicates that the program component 10 used by the mode inversion function generation unit 341A is the mode inversion processing program component 10A.
  • FIG. 45 is a flowchart showing an operation when the mode inversion function generation unit 341A generates a mode inversion switch processing program. Hereinafter, this operation will be described with reference to FIG.
  • the mode inversion function generation unit 341A uses the device address set for the switch input in the specification of the operation panel 56 (FIG. 38) as the reuse parameter of the mode inversion processing program component 10A shown in FIG. No. 1 (here, VB1). For example, the mode inversion function generation unit 341A reads the rows set as “mode inversion” from the specification of the operation panel 56 (FIG. 38) in order from the top (here, the “single block” in the first row is read). Then, the mode inversion function generation unit 341A uses the device address (X280 in this case) set to the “single block” switch input as the reuse parameter No. of the mode inversion processing program component 10A shown in FIG. 1 (VB1). Thereby, the left portion of the first stage of the mode reversal switch processing program shown in FIG. 43 is generated.
  • the mode inversion function generation unit 341A obtains one internal local device address that is not set in the specifications of the operation panel 56 or the M code 50 (that is, any device address that is not used redundantly).
  • the reuse parameter No. of the mode inversion processing program component 10A shown in FIG. 2 here, VB2.
  • the mode inversion function generation unit 341A sets M4000 as a device address not set in the specifications of the operation panel 56 or the specifications of the M code 50, and the reuse parameter No. of the mode inversion processing program component 10A shown in FIG. 2 (VB2). It is assumed that the device address in the M4000 range is a device address that is not set by the specifications of the operation panel 56 or the specifications of the M code 50.
  • the device address automatically assigned by the program generation unit 34 may be held in the device specification holding unit 32 and referred to the device specification holding unit 32. As a result, the right part of the first stage and the left part of the second to third stages of the mode reversal switch processing program shown in FIG. 43 are generated.
  • step S93 the mode inversion function generation unit 341A extracts a device address corresponding to the content of the switch operation column in the specification of the operation panel 56 (FIG. 38) from the device specification (FIG. 35), and the device address The reusable parameter No. of the mode inversion processing program part 10A shown in FIG. 3 (here, VB3).
  • the mode reversal function generation unit 341A determines from the device specification shown in FIG. A device address (YC12 in this case) corresponding to “single block” is extracted, and YC12 is assigned a reuse parameter No.
  • the mode inversion function generation unit 341A converts the device specifications (FIG. 35) and the operation panel 56 specifications (FIG. 38) into the reuse parameter VB1 of the mode inversion processing program component 10A.
  • the operation applied to VB3 has been described.
  • mode inversion function generation unit 341A according to the present embodiment also outputs a device comment in steps S91 to S93.
  • step S91 the mode reversal function generation unit 341A generates a character string obtained by combining the switch type character string and the switch operation character string in the specification of the operation panel 56 (FIG. 38) in step S91.
  • the device comment of the device address is output to the attached information file 9.
  • step S92 the mode reversal function generation unit 341A converts the character string of the switch type character string of the specification of the operation panel 56 and the character string of the switch operation into the device comment of the device address according to step S92. Is output to the attached information file 9 as follows.
  • step S93 the mode inversion function generation unit 341A outputs the character string of the name corresponding to the device address in step S93 to the attached information file 9 as the device comment of the device address in the device specifications (FIG. 35). .
  • FIG. 46 shows a list of device comments obtained from these.
  • the mode inversion function generation unit 341A when the program comment shown in FIG. 40 is required, indicates the character string of the switch type and the character of the switch operation.
  • the character string obtained by combining the columns is applied as the program comment.
  • the mode inversion function generation unit 341A uses the character string “mode inversion single block” as a program comment. Created and added before and after the program created in steps S91 to S93. As a result, in FIG. 43, a character string “start mode inversion single block” is given before the program, and a character string “end mode inversion single block” is given after the program.
  • step S95 the mode inversion function generation unit 341A selects a program pointer that is not used by another program when the jump label shown in FIG. 40 is required, and selects the selected program pointer. Apply as the jump label.
  • the mode reversal function generation unit 341A performs the operations in steps S91 to S95 described above for all switch operations related to “mode reversal” in the specifications of the operation panel 56 (FIG. 38).
  • “dry run” in the second row is set as the mode inversion switch operation in addition to “single block” in the first row.
  • the operations in steps S91 to S95 are performed. Thereby, the part from the “start mode inversion dry run” to the “end mode inversion dry run” of the mode inversion switch processing program shown in FIG. 43 is generated.
  • a device address M4001 that does not overlap with M4000 is applied in “dry run”.
  • step S96 the mode inversion function generation unit 341A sets the mode inversion processing program component 10A to which the above parameters are applied as the mode inversion switch processing program. Thereby, the mode reversal switch processing program shown in FIG. 43 is generated from the specifications of the operation panel 56 shown in FIG.
  • FIG. 47 is a diagram illustrating an example of an operation panel processing program generated by the operation mode selection function generation unit 341B.
  • the operation mode selection function generation unit 341B sets the device specifications (FIG. 35) and the specifications (FIG. 38) of the operation panel 56 relating to “operation mode selection” as shown in FIG.
  • An operation for generating an operation panel processing program for performing the operation mode selection control shown in FIG. 47 from the self-holding processing program component 10B will be described.
  • the operation panel processing program for performing the operation mode selection control generated by the operation mode selection function generation unit 341B may be referred to as an “operation mode selection switch processing program”.
  • the operation mode selection function generation unit 341B sets a device comment, a program comment, and a jump label as in the mode inversion function generation unit 341A when generating the operation mode selection switch processing program. Description and results are omitted.
  • FIG. 48 shows attributes of the operation mode selection function generation unit 341B.
  • the switch type and switch operation according to FIG. 48 the contents related to the operation mode selection among the specifications of the operation panel 56 (FIG. 38) are displayed.
  • the switch type “operation mode selection” indicates that the switch operations “jog”, “handle”, and “memory” are set in the specification of the operation panel 56.
  • the program part 10 used by the operation mode selection function generation unit 341B is the self-holding process program part 10B.
  • FIG. 49 is a flowchart showing an operation when the operation mode selection function generation unit 341B generates an operation mode selection switch processing program. Hereinafter, this operation will be described with reference to FIG.
  • step S101 the operation mode selection function generation unit 341B reuses the device address set in the switch input in the specification of the operation panel 56 (FIG. 38) as the self-holding processing program component 10B shown in FIG. Parameter No. 1 (here, VB1).
  • the operation mode selection function generation unit 341B reads rows set as “operation mode selection” from the specification of the operation panel 56 (FIG. 38) in order from the top (here, “jog” on the third row is read).
  • the operation mode selection function generation unit 341B uses the device address (here, X282) set to the “jog” switch input as the reuse parameter No. of the self-holding processing program component 10B shown in FIG. 1 (VB1). Thereby, the left portion of the first stage of the operation mode selection switch processing program shown in FIG. 47 is generated.
  • the switch of “operation mode selection” when one switch operation is instructed from the operation panel 56, the operation mode that has been instructed so far is canceled and the operation mode of one instructed switch operation is performed. Is called. For example, when the switch operation “jog” is instructed from the operation panel 56, the operation mode of “handle” and “memory” that have been instructed so far is canceled, and the operation mode of “jog” is performed. When the switch operation “handle” is commanded from the operation panel 56, the “jog” and “memory” operation modes that have been commanded so far are canceled, and the “handle” operation mode is performed. Similarly to the switch operation “memory”, the “memory” operation mode is performed.
  • step S102 the operation mode selection function generation unit 341B sets the device address set in the switch input for the switch operation other than the switch operation according to step S101 among the switch operations in the operation selection mode.
  • the reuse parameter No. of the self-holding processing program component 10B shown in FIG. 2 (here VB2) and apply.
  • the switch operation according to step S101 is “Jog”
  • the operation mode selection function generation unit 341B relates to “handle” and “memory” in FIG. X283 and X284)
  • the reuse parameter No. of the self-holding processing program component 10B shown in FIG. 2 (VB2) is applied.
  • the central portion of the first stage of the operation mode selection switch processing program shown in FIG. 47 is generated.
  • step S103 the operation mode selection function generation unit 341B extracts a device address corresponding to the content of the column of the switch operation in the specification of the operation panel 56 (FIG. 38) from the device specification (FIG. 35).
  • the re-use parameter No. of the self-holding processing program part 10B shown in FIG. 3 (here, VB3).
  • the operation mode selection function generation unit 341B determines from the device specification shown in FIG. Device address (YC00 in this case) corresponding to “Jog” is extracted, and YC00 is set as the reuse parameter No. of the self-holding processing program component 10B shown in FIG. 3 (VB3).
  • the right part of the first stage and the second stage of the operation mode selection switch processing program shown in FIG. 47 are generated.
  • the operation mode selection function generation unit 341B performs the operations in steps S101 to S103 described above for all switch operations related to “operation mode selection” in the specifications of the operation panel 56 (FIG. 38). For example, in the specification of the operation panel 56 shown in FIG. 38, “handle” on the 4th line and “memory” on the 5th line are set as the operation mode selection switch operations in addition to the “jog” on the 3rd line. Therefore, the operations of steps S101 to S103 are performed for each of the “handle” and “memory”. Thereby, the third to sixth stages of the operation mode selection switch processing program shown in FIG. 47 are generated.
  • step S104 the operation mode selection function generation unit 341B sets the self-holding processing program component 10B to which the above parameters are applied as an operation mode selection switch processing program. Thereby, the operation mode selection switch processing program shown in FIG. 47 is generated from the specifications of the operation panel 56 shown in FIG.
  • FIG. 29 described above is a diagram illustrating an example of the operation panel processing program generated by the cutting override function generation unit 341C.
  • the cutting override function generation unit 341C sets the specification of the device (FIG. 35) and the specification of the operation panel 56 related to “cutting override” (FIG. 38), the self-holding processing program component 10B (FIG. 3), and numerical setting.
  • An operation panel processing program for performing the cutting override control shown in FIG. 29 is used from the self-holding processing program component 10B and the numerical value setting processing program component 10C by using the reuse parameter of the processing program component 10C (FIG. 27). An operation to be generated will be described.
  • the operation panel processing program for performing the cutting override control generated by the cutting override function generating unit 341C may be referred to as an “override switch processing program”.
  • the cutting override function generation unit 341C sets a device comment, a program comment, and a jump label in the same manner as the mode inversion function generation unit 341A when generating the override switch processing program. Results are omitted.
  • FIG. 50 shows attributes of the cutting overlard function generation unit 341C.
  • the switch type and the switch operation according to FIG. 50 the contents relating to the cutting override in the specifications of the operation panel 56 (FIG. 38) are displayed.
  • the switch type “cutting override” indicates that the switch operations “25”, “50”, “75”, and “100” are set in the specification of the operation panel 56.
  • the program parts 10 used by the cutting override function generation unit 341C are the self-holding process program part 10B and the numerical value setting process program part 10C.
  • FIG. 51 is a flowchart showing an operation when the cutting override function generation unit 341C generates a cutting override switch processing program. Hereinafter, this operation will be described with reference to FIG.
  • the cutting override function generation unit 341C generates a cutting override switch processing program from the self-holding processing program component 10B shown in FIG. 3 in steps S111 to S113.
  • the cutting override function generation unit 341C uses the device address set for the switch input in the specification of the operation panel 56 (FIG. 38) as the reuse parameter of the self-holding processing program component 10B shown in FIG. No. 1 (here, VB1). For example, the cutting override function generation unit 341C reads rows set as “cutting override” from the specification of the operation panel 56 (FIG. 38) in order from the top (here, “25” on the sixth row is read). Then, the cutting override function generation unit 341C uses the device address (X285 here) set to the switch input of “25” as the reuse parameter No. of the self-holding processing program component 10B shown in FIG. 1 (VB1). Thereby, the left portion of the first stage of the cutting override switch processing program shown in FIG. 29 is generated.
  • the switch “cutting override” when one switch operation is instructed from the operation panel 56, the operation mode that has been instructed so far is canceled and the operation mode of the instructed one switch operation is performed. .
  • the switch operation “25” when the switch operation “25” is instructed from the operation panel 56, the operation modes “50”, “75” and “100” which have been instructed until then are canceled, and the operation mode “25” is performed. Is called.
  • the switch operation “50” is instructed from the operation panel 56, the operation modes “25”, “75”, and “100” that have been instructed so far are canceled, and the operation mode “50” is performed.
  • the switch operations “75” and “100” the operation modes “75” and “100” are performed, respectively.
  • the cutting override function generation unit 341C shows the device address set for the switch input in relation to the switching operation other than the switching operation according to step S111 among the switching operations of the cutting override, as shown in FIG.
  • the reusable parameter No. of the self-holding processing program component 10B. 2 here VB2
  • the cutting override function generation unit 341C causes the devices set as switch inputs for “50”, “75”, and “100” in FIG. Addresses (here, X286 to X288) are listed and applied to the reuse parameter (VB2) of the self-holding processing program component 10B shown in FIG.
  • the central portion of the first stage of the cutting override switch processing program shown in FIG. 29 is generated.
  • the cutting override function generation unit 341C uses the self-holding processing program component shown in FIG. 3 as an internal local device address that is not set in the specifications of the operation panel 56 or the M code 50. 10B reuse parameter No. 3 (here, VB3).
  • the cutting override function generation unit 341C sets M4002 as a device address not set in the specification of the operation panel 56 or the specification of the M code 50, and the reuse parameter No. of the self-holding processing program component 10B shown in FIG. 3 (VB3). Thereby, the right part of the first stage and the second stage of the cutting override switch processing program shown in FIG. 29 are generated.
  • the cutting override function generation unit 341C generates a cutting override switch processing program from the numerical value setting processing program component 10C shown in FIG. 27 in steps S114 to S116.
  • step S114 the cutting override function generating unit 341C determines the reuse parameter No. of the self-holding processing program component 10B in step S113. 3 (VB3), the reuse parameter No. of the numerical value setting processing program component 10C shown in FIG. 1 (VB1).
  • the cutting override function generation unit 341C determines the reuse parameter No. of the self-holding processing program component 10B.
  • M4002 applied to 3 (VB3) is a reuse parameter No. of the numerical value setting processing program component 10C shown in FIG. 1 (VB1).
  • step S115 the cutting override function generation unit 341C shows a device address in which “K” is added before the numerical value set for the switch operation in the specification of the operation panel 56 (FIG. 38).
  • the reusable parameter No. of the numerical value setting processing program part 10C. 2 (here, VK2).
  • the cutting override function generation unit 341C relates to the switch operation “25” in the specification of the operation panel 56 (FIG. 38), assigns the device address K25 to the reuse parameter No. of the numerical value setting processing program component 10C shown in FIG. . 2 (VK2).
  • VK2 the right part of the third stage of the cutting override switch processing program shown in FIG. 29 is generated.
  • step S116 the cutting override function generation unit 341C extracts a device address corresponding to the contents of the switch type column in the specification of the operation panel 56 (FIG. 38) from the device specification (FIG. 35), and the device address Is the reuse parameter No. of the numerical value setting processing program component 10C shown in FIG. 3 (here, VD3).
  • the cutting override function generation unit 341C determines from the device specification shown in FIG. The device address (here, R2500) corresponding to “cutting override” is extracted, and R2500 is set to the reuse parameter No. of the numerical value setting processing program component 10C shown in FIG. 3 (VD3).
  • the right part of the third stage of the cutting override switch processing program shown in FIG. 29 is generated.
  • the cutting override function generation unit 341C performs the operations in steps S111 to S117 described above for all switch operations related to “cutting override” in the specifications of the operation panel 56 (FIG. 38). For example, in the specification of the operation panel 56 shown in FIG. 38, in addition to “25” in the sixth row, “50” in the seventh row, “75” in the eighth row, and “100” in the ninth row are switched. Therefore, the operations of steps S111 to S116 are performed for each of “50”, “75”, and “100”. As a result, the fourth to twelfth stages of the cutting override switch processing program shown in FIG. 29 are generated.
  • step S117 the cutting override function generation unit 341C combines the self-holding processing program part 10B and the numerical value setting processing program part 10C to which the above parameters are applied, to obtain a cutting override switch processing program.
  • the cutting override switch processing program shown in FIG. 29 is generated from the specifications of the operation panel 56 shown in FIG.
  • the cutting override function generation unit 341C generates the cutting override switch processing program.
  • the operation is not limited to this, and the cutting override function generation unit 341C is used in Embodiment 3 with reference to FIG. You may use the program hierarchy component which performs the process of exclusive numerical value setting demonstrated.
  • the cutting override function generation unit 341C performs the reproduction shown in FIG. 28 based on the specifications of the device (FIG. 35) and the specifications of the operation panel 56 set to “cutting override” (FIG. 38). Generate application relationship of usage parameters.
  • the cutting override function generating unit 341C determines that the device address (set to the switch input) is set in the sixth line in which the switch type “cutting override” is set from the specification of the operation panel 56 (FIG. 38). X285), as shown in FIG. The numerical value “25” set for the switch operation is applied to the parameter No. of the program hierarchy part. Applies to 2. Then, the cutting override function generation unit 341C obtains the device address (M4002) of the M4000 series from the parameter No. of the program hierarchy part. 3, the device address (R2500) corresponding to the switch type “cutting override” is extracted from the device specification (FIG. 35), and R2500 is set as the parameter number of the program hierarchy part. Applies to 4.
  • the cutting override function generation unit 341C based on the specification of the operation panel 56 (FIG. 38), sets the device address (X286) set as the switch input in the seventh line in which the switch type “cutting override” is set. , The program hierarchy part parameter No. The numerical value “50” set for the switch operation is applied to the parameter No. of the program hierarchy part. Applies to 2. Then, the cutting override function generation unit 341C obtains the device address (M4003) of the M4000 series from the parameter No. of the program hierarchy part. Applies to 3. The cutting override function generation unit 341C generates the application relationship of the reuse parameters shown in FIG.
  • the cutting override function generation unit 341C may generate the cutting override switch processing program shown in FIG. 29 by performing the same operation as that described in the third embodiment.
  • the operation panel processing program generation unit 341 shown in FIG. 34 has described the operation for generating the operation panel processing program.
  • the M code processing program generation unit 342 shown in FIG. 34 that is, the M code function generation unit 342A converts the device specification (FIG. 35) and the specification of the M code 50 shown in FIG. An operation for generating an M code processing program from the program part will be described while being applied to 10 reuse parameters.
  • FIG. 52 is a diagram showing an example of the M code processing program generated by the M code function generation unit 342A below.
  • the M code processing program shown in FIG. 52 includes an M code 50 decoding process program LPA, an M code 50 function processing program LPB, LPC, LPD, and an M code 50 completion processing program LPE.
  • FIG. 53 shows attributes of the M code function generation unit 342A.
  • the program part 10 used in the M code function generation unit 342A includes an M code decoding process program part 10D, a self-holding process program part 10B, an AND condition processing program part 10E, and an M code completion process. It is displayed that it is a program part 10F.
  • FIG. 54 is a flowchart showing an operation in which the M code function generation unit 342A generates a decoding processing program. Hereinafter, this operation will be described with reference to FIG.
  • step S121 the M code function generation unit 342A uses the M code decoding process program component 10D shown in FIG. 41 to execute the M code 50 decoding process program LPA shown in FIG. Generate.
  • step S122 the M code function generation unit 342A uses each of the M code shown in FIG. 52 using the self-holding processing program part 10B shown in FIG. 3 and the AND condition processing program part 10E shown in FIG. 50 function processing programs LPB, LPC, LPD are generated.
  • step S123 the M code function generation unit 342A generates the M code 50 completion processing program LPE shown in FIG. 52 using the M code completion processing program component 10F shown in FIG.
  • step S124 the M code function generation unit 342A generates the M code processing program shown in FIG. 52 by combining the programs generated in steps S121 to S123.
  • the M code function generation unit 342A generates the M code 50 decoding process program LPA, the function processing programs LPB, LPC, LPD, and the completion processing program LPE will be described in detail. First, an operation in which the M code function generation unit 342A generates the M code 50 decoding processing program LPA will be described.
  • FIG. 55 is a flowchart showing an operation in which the M code function generation unit 342A generates the M code 50 decode processing program LPA using the M code decode processing program component 10D shown in FIG.
  • the M code function generation unit 342A performs each process shown in FIG. 55 in order from the top with respect to the setting of each line of the specification of the M code 50 (FIG. 39).
  • the M code function generation unit 342A generates the first stage of the decoding processing program LPA shown in FIG. 52 by performing processing on the setting of M3 of the M code 50 specification (FIG. 39). The operation to be performed will be described.
  • step S131 the M code function generation unit 342A extracts a device address (here, XC60) corresponding to the M code strobe from the device specification (FIG. 35), and the device address is the M address shown in FIG.
  • the reuse parameter No. of the code decoding processing program part 10D. 1 here, VB1.
  • step S132 the M code function generation unit 342A extracts a device address (here, R504) corresponding to the M code data from the device specification (FIG. 35), and the device address is represented by the M code shown in FIG.
  • the reuse parameter No. of the code decoding processing program part 10D. 2 here, VD2.
  • step S133 the M code function generation unit 342A starts from the M code 50 specification (FIG. 39) before the numerical value (here, 3) of the M code number (here, M3) set in the M code column. K is added to generate a character string (K3), and the character string is stored in the reuse parameter No. of the M code decoding processing program part 10D shown in FIG. 3 (here, VK3).
  • step S134 the M code function generation unit 342A uses the M code number (in this case, M3) set in the M code column from the M code 50 specification (FIG. 39) as the device address as it is in FIG.
  • the reuse parameter No. of the M code decoding processing program part 10D shown is shown. 4 (here, VB4).
  • the first stage of the decoding processing program LPA shown in FIG. 52 is generated for the setting of M3 in the specification of the M code 50 (FIG. 39).
  • the M code function generation unit 342A sequentially performs the operations in steps S131 to S134 until the setting of M4 in the M code 50 specification (FIG. 39), the setting of M5,.
  • the second to fourth stages of the decoding processing program LPA shown in FIG. 52 are generated.
  • step S135 the M code function generation unit 342A sets the M code decoding processing program component 10D to which the above parameters are applied as a decoding processing program. Thereby, the decoding processing program LPA shown in FIG. 52 is generated from the specification of the M code 50 shown in FIG.
  • FIG. 56 is a flowchart showing an operation when the M code function generation unit 342A generates a function processing program for each M code 50.
  • the M code function generation unit 342A performs the processing shown in FIG. 56 in order from the top with respect to the setting of each row of the specification of the M code 50 (FIG. 39).
  • step S141 the M code function generation unit 342A determines whether the function output is set in the line to be processed in the specification of the M code 50 (FIG. 39). If it is determined that the function output is set, the M code function generation unit 342A proceeds to step S142, otherwise proceeds to step S145. For example, in the setting shown in FIG. 39, since the function output is set in the settings of M3, M4, and M30, the process proceeds to step S142, and in the setting of M5, the function output is not set, and the process proceeds to step S145. .
  • step S142 the M code function generation unit 342A determines whether or not function cancellation is set in a line to be processed in the specification of the M code 50 (FIG. 39). If the M code function generation unit 342A determines that the function cancellation is set, the process proceeds to step S143. If not, the process proceeds to step S144. For example, in the setting as shown in FIG. 39, since the function cancellation is set in the settings of M3 and M4, the process proceeds to step S143. In the setting of M30, the function cancellation is not set, and the process proceeds to step S144.
  • step S143 the M code function generation unit 342A performs the function processing of the M code 50 based on the setting of the line to be processed in the specification of the M code 50 (FIG. 39) and the self-holding processing program component 10B. Generate a program.
  • the M code function generation unit 342A shown in FIG. 52 based on the settings of M3 and M4 of the specification of the M code 50 shown in FIG. 39 and the self-holding processing program component 10B shown in FIG. Function processing programs LPB and LPC to be generated.
  • the operation in step S143 will be described in detail later.
  • the setting below the line currently being processed is set as the processing target, and the process returns to step S141.
  • step S144 the M code function generation unit 342A performs the function processing of the M code 50 based on the setting of the line to be processed in the specification of the M code 50 (FIG. 39) and the AND condition processing program component 10E. Generate a program. For example, the M code function generation unit 342A performs the function shown in FIG. 52 based on the setting of M30 of the M code 50 specification shown in FIG. 39 and the AND condition processing program component 10E shown in FIG. A processing program LPD is generated. The operation in step S144 will be described in detail later. Thereafter, in the specification of the M code 50 (FIG. 39), the setting below the line currently being processed is set as the processing target, and the process returns to step S141.
  • step S145 the M code function generation unit 342A does not generate a function processing program for the M code 50 for the setting of the line to be processed in the M code 50 specification (FIG. 39).
  • the function processing program for the M code 50 is not generated for the M5 setting of the M code 50 specification shown in FIG. Therefore, as shown in FIG. 52, a function processing program corresponding to the setting of M30 of the M code 50 specification is placed under the function processing programs LPB and LPC corresponding to the setting of M3 and M4 of the specification of the M code 50. LPD will be generated.
  • step S145 in the specification of the M code 50 (FIG. 39), the setting below the line currently being processed is set as the processing target, and the process returns to step S141.
  • step S143 Next, the operation of step S143 described above will be described.
  • FIG. 57 is a flowchart showing an operation when the M code function generation unit 342A generates a function processing program when the function cancellation is set in the above-described step S143, that is, the line to be processed.
  • an operation in which the M code function generation unit 342A generates the function processing program LPB shown in FIG. 52 based on the setting of M3 of the specification of the M code 50 (FIG. 39) will be described as an example.
  • the M code function generation unit 342A uses the M code number (here, M3) set in the M code column from the M code 50 specification (FIG. 39) as it is as the device address.
  • the reuse parameter No. of the self-holding processing program component 10B shown in FIG. 1 here, VB1.
  • step S152 the M code function generation unit 342A determines whether “after block axis movement is completed” is set in the function start column of the M code 50 specification (FIG. 39).
  • the M code function generation unit 342A proceeds to step S153 when determining that “after block axis movement completion” is set, and proceeds to step S154 without performing step S153 otherwise.
  • step S153 is not performed but step S154 is performed.
  • step S153 the M code function generation unit 342A extracts the device address corresponding to the movement command completion from the device specification (FIG. 35), and uses the device address as the self-holding processing program component shown in FIG. 10B reuse parameter No. 1 (here, VB1) is applied. If step S153 is performed in the setting of M3 shown in FIG. 39, the M code function generation unit 342A extracts the XC 18 corresponding to the completion of the movement command from the device specification (FIG. 35), and sets the device address. , The reuse parameter No. of the self-holding processing program component 10B. Will be added in series to M3 applied to 1 (VB1).
  • step S154 the M code function generation unit 342A uses the M code number (here, M4 and M5) set in the function cancel column from the M code 50 specification (FIG. 39) as the device address as it is.
  • the reuse parameter No. of the self-holding processing program component 10B shown in FIG. 2 here, VB2.
  • step S155 the M code function generation unit 342A obtains the device address (Y1898 in this case) set as the function output from the specification of the M code 50 (FIG. 39), and the self-holding processing program component shown in FIG. 10B reuse parameter No. 3 (here, VB3).
  • step S156 the M code function generation unit 342A sets the self-holding processing program component 10B to which the above parameters are applied as a function processing program with function cancellation.
  • the function processing program LPB shown in FIG. 52 is generated based on the setting of M3 of the specification of the M code 50 shown in FIG.
  • the M code function generation unit 342A performs the same operation for setting M4 in the specification of the M code 50 (FIG. 39), thereby generating the function processing program LPC shown in FIG.
  • step S144 the operation in step S144 described above will be described.
  • FIG. 58 is a flowchart showing the operation performed when the M code function generation unit 342A generates a function processing program in the above-described step S144, that is, when the function cancellation is not set in the line to be processed.
  • the M code function generation unit 342A generates the function processing program LPD shown in FIG. 52 based on the setting of M30 of the specification of the M code 50 (FIG. 39) will be described.
  • the M code function generation unit 342A uses the M code number (here, M30) set in the M code column from the M code 50 specification (FIG. 39) as it is as the device address.
  • the reuse parameter No. of the AND condition processing program part 10E shown in FIG. 1 here, VB1.
  • step S162 the M code function generation unit 342A determines whether “after completion of block axis movement” is set in the function start column of the M code 50 specification (FIG. 39). If it is determined that “after completion of block axis movement” is set, the M code function generation unit 342A proceeds to step S163, and if not, proceeds to step S164 without performing step S163. In the setting of M30 shown in FIG. 39, after completion of block axis movement is set in the function start column, step S163 is performed after step S162, and then step S164 is performed.
  • step S163 the M code function generation unit 342A extracts a device address corresponding to the completion of the movement command from the device specification (FIG. 35), and uses the device address as the AND condition processing program component shown in FIG. 10E reuse parameter no. 1 (here, VB1) is applied.
  • step S163 is performed in the setting of M30 shown in FIG. 39
  • the M code function generation unit 342A extracts XC18 corresponding to the completion of the movement command from the device specification (FIG. 35), and the device address is ANDed.
  • the reuse parameter No. of the condition processing program part 10E It is added in series to M30 applied to 1 (here, VB1).
  • step S164 the M code function generation unit 342A obtains the device address (in this case, YC1A) set to the function output from the specification of the M code 50 (FIG. 39), and the AND condition processing program component shown in FIG. 10E reuse parameter no. 2 (here, VB2).
  • the device address in this case, YC1A
  • FIG. 10E reuse parameter no. 2
  • step S165 the M code function generation unit 342A sets the AND condition processing program part 10E to which the above parameters are applied as a function processing program without function cancellation.
  • the function processing program LPD shown in FIG. 52 is generated based on the setting of M30 of the specification of the M code 50 shown in FIG.
  • FIG. 59 is a flowchart showing an operation when the M code function generation unit 342A generates an M code 50 completion processing program using the M code completion processing program component 10F shown in FIG.
  • step S171 the M code function generation unit 342A obtains all M code numbers (here, M3, M4, M5, M30) set in the M code column from the M code 50 specification (FIG. 39). Each is used as a device address as it is, and the parameter No. of the M code completion processing program component 10F shown in FIG. 1 corresponding to the parameter No. of the AND condition processing element part shown in FIG. Applies to 1.
  • step S171 will be described in detail by dividing it into step S171A and step S171B.
  • step S171A the M code function generation unit 342A shows the M code number set in the M code column of the first line from the M code 50 specification (FIG. 39) as the device address as shown in FIG. AND condition processing element part reuse parameter No. 1 (here, VB1).
  • step S171B if a device address is set for the completion of the function in the first row, the M code function generation unit 342A sets the device address to the AND condition processing element component shown in FIG. Use parameter No. 1 (here, VB1) are enumerated (added in series) and applied, and the process returns to step S171A to perform the same operation as the first line for the second and subsequent lines.
  • step S171B if the device address is not set for the completion of the function on the first line, the M code function generation unit 342A returns to step S171A and continues to set the second and subsequent lines as well. Do the same as the eyes.
  • the M3 is applied to VB1 of the AND condition processing element part.
  • the X188D is listed in M3 applied to the AND condition processing element component (added in series) Applied). Thereby, the left portion (M3 and X188D) of the first stage of the completion processing program LPE shown in FIG. 52 is generated.
  • the M4 is applied to VB1 of the AND condition processing element part.
  • the M code function generation unit 342A adds the generated program in parallel under the programs (M3 and X188D) obtained based on the setting of the first line. Thereby, the second stage (M4 and X188D) of the completion processing program LPE shown in FIG. 52 is generated.
  • the M code function generation unit 342A adds the generated program in parallel under the programs (M4 and X188D) obtained based on the setting of the second line. Thereby, the third stage (M5 and X188C) of the completion processing program LPE shown in FIG. 52 is generated.
  • the M code function generation unit 342A executes the program obtained by applying the M30 to the AND condition processing element component as 3 It is added under the program (M5 and X188C) obtained based on the setting of the line. Thereby, the fourth stage (M30) of the completion processing program LPE shown in FIG. 52 is generated.
  • step S172 the M code function generation unit 342A extracts the device address (YC1E here) corresponding to the completion of the M code from the device specification (FIG. 35), and the device address is shown in FIG. Reuse parameter No. of M code completion processing program part 10F. 2 (here YC1E) is applied. Thereby, the right side of the first stage of the completion processing program LPE shown in FIG. 52 is generated.
  • step S173 the M code function generation unit 342A sets the M code completion processing program part 10F to which the above parameters are applied as the M code 50 completion processing program. Thereby, the completion processing program LPE shown in FIG. 52 is generated from the specification of the M code 50 shown in FIG.
  • the operation panel processing program generation unit 341 generates the operation panel processing program and the M code processing program generation unit 342 generates the M code processing program, taking the case where the programs are ladder programs as an example.
  • the program editing unit 6 combines the operation panel processing program generated by the operation panel processing program generation unit 341 and the M code processing program generated by the M code processing program generation unit 342 into a program for the CNC machine tool 46. At this time, the program may be generated as a single program, or may be generated by dividing the program into parts.
  • program generation is configured like mode reversal switch processing, operation mode selection switch processing, cutting override switch processing, M code decoding processing, M code function processing, and M code completion processing.
  • the program parts may be divided (in this case, six divided programs are generated), or may be grouped together as an operation panel process and an M code process (in this case, two divided programs are generated). Further, the divided program may be generated in the same file, or may be generated separately for each divided program.
  • the program generated by the program editing unit 6 is a ladder program
  • an END processing instruction is added to the end of the ladder program including the operation panel processing program and the M code processing program, and the ladder program of the CNC machine tool 46 is added.
  • the program may be generated as a single ladder program as shown in FIG. 60, or may be generated by dividing the ladder program into parts as shown in FIG.
  • program generation is configured like mode reversal switch processing, operation mode selection switch processing, cutting override switch processing, M code decoding processing, M code function processing, and M code completion processing.
  • the program parts may be divided (in this case, six divided ladder programs are generated), or may be grouped as operation panel processing and M code processing (in this case, two divided ladder programs are generated).
  • the divided ladder program may be generated in the same file, or may be generated separately for each divided ladder program.
  • the operation panel 56 the character string selected by the switch type and the character string selected / set by the switch operation are combined with the device address set for the switch input to generate a device comment.
  • the operation panel processing program generation unit 341 may be configured.
  • the character string set in the function name is assigned as a device comment to the same device address as the M code 50, and the function name is set in the device set in the function output.
  • the M code processing program generation unit 342 may be configured to combine the generated character string and the character string set for function output to generate a device comment.
  • the mode reversal function generation unit 341A described with reference to FIG. 45 is a procedure for generating a device comment together with a program generation process. By this procedure, the device comment shown in FIG. Is generated.
  • the specifications described in the specification description file 30 and the specifications set by the specification setting unit 31 are used when the program component 10 is reused.
  • a measurement monitoring control program to be executed by a controller or a microcomputer is generated from the program component 10 while being applied to parameters to be applied or parameters to be listed and applied. Therefore, since the program is generated almost automatically, it is possible to create a program that operates without excess or deficiency and functions with the functions described in the specification, and it is possible to reduce labor in creating the program.
  • 1 program creation support device 2 microprocessor, 3 display section, 4 input section, 5 storage section, 6 program editing section, 8 edited program, 9 attached information file, 10 program parts, 11 program parts holding section, 12 programs Part definition part, 14 reuse parameter, 15 program element part definition part, 17 program element part, 18 reuse parameter, 19 program hierarchy part definition part, 21 program hierarchy part, 22 reuse parameter, 30 specification description file, 31 specification setting Section, 31A operation panel specification setting section, 31B M code specification setting section, 32 device specification holding section, 34 program generation section, 341 operation panel processing program generation section, 342 M code processing program generation section.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)
  • Stored Programmes (AREA)

Abstract

 本発明は、所定の仕様に合致したプログラムを作成するためのプログラム部品の選定および組み合わせを行う労力を軽減し、プログラム作成効率の向上を図ることを目的とする。そして、本発明に係るプログラム作成支援装置(1)は、各プログラム要素に対応する再利用パラメータの内容をユーザが設定することで、その設定内容に応じたプログラムを生成するプログラム部品(10)と、それを再利用してプログラムを編集するプログラム部品保持部(11)とを備える。プログラム部品(10)は、再利用パラメータに複数のパラメータが列挙して設定されることで、各パラメータに応じた複数の要素が結合したプログラムを生成するプログラム要素を含んでいる。

Description

プログラム作成支援装置
 本発明は、プログラム作成支援装置に関し、特に、産業用コントローラやマイコンで実行される計測監視制御プログラムの作成支援装置に関する。
 従来より、各種設備の計測監視制御の目的で、プログラマブルコントローラ(Programmable Controller;PC)、モーションコントローラ(Motion Controller;MC)、数値制御装置コントローラ(Numerical Controller:NC)、検査装置コントローラ、表示器(Graphic Operation Terminal;GOT)などの産業用コントローラが用いられている。産業用コントローラで実行される計測監視制御プログラムに用いられる言語としては、ラダーを代表例とするIEC61131-3規格に準拠した言語や、コントローラ専用の言語が挙げられる。また、産業用コントローラの代わりにマイコンを使用する場合の計測監視制御プログラムの言語としては、C言語やアセンブリ言語が挙げられる。
 以下、代表的にプログラマブルコントローラ(以下「PC」)を例に挙げて説明する。PCは、計測監視制御プログラム(以下「プログラム」)を実行して、計測監視制御対象の状態を把握したり、動作を指示したりする。プログラムは、所定のプログラム作成支援装置(例えば、ラダー作成支援装置)を用いて作成され、主に変数、デバイス、数値を用いて記述される。
 ここで言うデバイスとは、PCとそれが接続する計測監視制御対象との間の入出力を、PCのメモリアドレスに割り付けたもの、および、PCが内部的に使用するメモリアドレスを指している。例えば下記非特許文献1のプログラム作成支援装置(ラダー作成支援装置)に対応するPCでは、入力を割り付けたものをXデバイス、出力を割り付けたものをYデバイス、内部的に使用するビットデータ(内部リレー)をMデバイス、内部的に使用するワードデータ(レジスタ)をDデバイスやRデバイス、というようにデータ種別によってデバイス文字が予め決められている。各デバイスのアドレスは、XデバイスやYデバイスについては16進表現、MデバイスやDデバイスやRデバイスについては10進表現となっている。
 変数は、デバイスを指し示すものである。非特許文献1のプログラム作成支援装置に対応するPCでは、この変数は「ラベル」と呼ばれ、コンパイル時に特定のデバイスに割り付けられる。ラベルのデバイスへの割り付けは、プログラム作成者が直接指定する場合もあれば、コンパイル時に自動的に割り付けられる場合もある。ラベルとして使用できる文字は、デバイス文字など予め決められている文字以外の文字である。ラベルを用いてプログラムを記述した場合、プログラム自体の記述を変えずに、プログラム内のラベルに割り付けられるデバイスを変えることができる。
 ラダープログラムにおいて数値を記述する場合、各数値の先頭に10進表現の記号Kあるいは16進表現の記号Hを付すことになっている。例えば「K25」は10進表現の数値「25」を表している。
 プログラム作成支援装置は、一般的にはパーソナルコンピュータ(以下「パソコン」)上で動作するソフトウェアツールとして提供され、PCが設備の計測・監視・制御を行うためのプログラムの編集を支援する他、PCをパソコンに接続して、パソコンで編集したプログラム(あるいはそれをコンパイルして得られた実行コード)をPCへ転送したり、設備の状態やプログラムの実行により変化する変数の値およびデバイスの値をモニタしたりする機能を有している。
 なお、プログラム作成支援装置が提供するプログラム編集機能やモニタ機能を搭載する表示器(GOT)もある。これにより、PCと常時接続状態にあるGOT上から、プログラムの編集や状態のモニタを行うことができる。
 計測監視制御対象である設備の仕様及びプログラムは、パソコン上で動作するソフトウェアツールを用いて記述されることにより電子的にデータ化されているが、仕様とプログラムとの間には電子データ的な相互関係がないことから、計測監視制御プログラムは、仕様に基づいて、プログラム作成支援装置を用いて人手により作成されている。そのため、仕様に記述された機能を過不足なく不具合なく動作させるプログラムの作成には多大な労力が必要であった。
 近年では、よく利用するプログラムをプログラムモジュール(Program Organization Unit;POU)として部品化し、設備の仕様に合致するPOUを再利用しつつ、複数のPOUからプログラムを構成することが可能なプログラム作成支援装置もある。プログラム言語がラダーであれば、POUはサブルーチンや機能ブロック(Function Block;FB)に相当し、ストラクチャードテキスト(Structured Text;ST)やC言語であれば、POUはサブルーチンや関数に相当する。
 さらに、複数のプログラム部品から成る任意のプログラムパターンに名前(マクロ名)を付けて登録しておき、プログラムの作成時にそれを呼び出して再利用(マクロ流用)できるマクロ機能を有するプログラム作成支援装置もある。このようにプログラム部品を再利用できるプログラム作成支援装置を用いることにより、プログラムの作成の労力は軽減される。
「GX Developer Version 8 オペレーティングマニュアル」三菱電機株式会社、マニュアル番号SH-080356
 上記のように、プログラムの作成は、作成者すなわち人間が計測監視制御対象の仕様記述を理解した上で、手作業により行われる。近年のプログラム作成支援装置では、プログラム部品を再利用することにより、プログラムの作成労力はある程度軽減されるが、仕様に合致するようにプログラムを作成するためには、どのプログラム部品を選定し、それらをどのように組み合わせるかといった判断が難しく、さらにその労力を軽減することが望まれている。
 本発明は、計測監視制御プログラムの作成において、計測監視制御対象の使用に合致したプログラムを作成するためのプログラム部品の選定および組み合わせを行う労力を軽減し、プログラム作成効率の向上を図ることを目的とする。
 本発明に係るプログラム作成支援装置は、少なくとも1つのプログラム要素を含み、各プログラム要素に対応する再利用パラメータの内容をユーザが設定することで、その設定内容に応じたプログラムを生成するプログラム部品と、前記プログラム部品が保持されるプログラム部品保持部と、前記プログラム部品を再利用してプログラムを編集するプログラム編集部とを備え、前記プログラム部品は、再利用パラメータに複数のパラメータが列挙して設定されることで、各パラメータに応じた複数の要素が結合したプログラムを生成するプログラム要素を含んでいるものである。
 本発明によれば、設備の計測監視制御に係る仕様に、より直接的に合致するようにプログラム部品を定義することが可能となり、仕様に合致するようにプログラムを作成するための、プログラム部品の選定と、それらプログラム部品の組み合わせに関する設計の労力を軽減し、仕様に記述された機能を過不足なく不具合なく動作するプログラムの作成の労力を大幅に軽減できる。
 この発明の目的、特徴、局面、および利点は、以下の詳細な説明と添付図面とによって、より明白となる。
実施の形態1に係るプログラム作成支援装置のハードウェア構成を示す図である。 実施の形態1に係るプログラム作成支援装置のソフトウェア構成を示す図である。 実施の形態1に係るプログラム作成支援装置のプログラム部品定義画面の一例を示す図である。 実施の形態1に係るプログラム部品に含まれる記号「*」が付与された要素を説明するための図である。 実施の形態1に係るプログラム部品に含まれる記号「+」が付与された要素を説明するための図である。 実施の形態1に係るプログラム部品の定義手順を示すフローチャートである。 実施の形態1に係る自己保持処理プログラム部品を再利用して生成される主軸正転処理プログラム(ラダーダイアグラム形式)を示す図である。 実施の形態1に係る自己保持処理プログラム部品を再利用して生成される主軸正転処理プログラム(インストラクションリスト形式)を示す図である。 実施の形態1に係るプログラム部品の定義手順の変更例を示すフローチャートである。 実施の形態1に係るプログラム部品再利用画面の一例を示す図である。 実施の形態1に係るプログラム部品を再利用するプログラムの生成方法を示すフローチャートである。 実施の形態1に係るプログラム部品再利用画面の一例を示す図である。 実施の形態1に係る自己保持処理プログラム部品を再利用して生成される主軸オリエンテーション処理プログラムを示す図である。 実施の形態1に係るプログラム作成支援装置が生成するプログラムの付属情報ファイルの一例を示す図である。 実施の形態1に係る付属情報ファイルの生成方法を示すフローチャートである。 実施の形態2に係るプログラム作成支援装置のソフトウェア構成を示す図である。 実施の形態2に係るプログラム要素部品定義画面の一例を示す図である。 実施の形態2に係るプログラム部品定義画面の一例を示す図である。 実施の形態2に係るプログラム部品再利用画面の一例を示す図である。 実施の形態2に係るプログラム部品再利用画面に付随するプログラム要素部品再利用画面の一例を示す図である。 実施の形態2に係るプログラム部品再利用画面に付随するプログラム要素部品再利用画面の一例を示す図である。 実施の形態2に係るMコード完了処理プログラム部品を再利用して生成されるプログラムを示す図である。 実施の形態3に係るプログラム作成支援装置のソフトウェア構成を示す図である。 実施の形態3に係るプログラム階層部品の定義手順を示すフローチャートである。 実施の形態3に係るプログラム階層部品定義画面の一例を示す図である。 実施の形態3に係るプログラム階層部品定義画面の一例を示す図である。 実施の形態3に係るプログラム部品定義画面の一例を示す図である。 実施の形態3に係る階層部品再利用画面の一例を示す図である。 実施の形態3に係る排他的選択数値設定プログラム階層部品を再利用して生成される切削オーバライド設定スイッチプログラムを示す図である。 切削オーバライド設定スイッチの一例を示す図である。 実施の形態3に係るプログラム階層部品を再利用するプログラムの生成方法を示すフローチャートである。 実施の形態1に係るプログラム部品再利用画面の一例を示す図である。 実施の形態4に係る工作機械の構成を示すブロック図である。 実施の形態4に係るプログラム作成支援装置のソフトウェア構成を示す図である。 デバイスの仕様における設定を示す図である。 操作盤の仕様における設定を示す図である。 操作盤の仕様における設定を示す図である。 操作盤の仕様における設定を示す図である。 Mコードの仕様における設定を示す図である。 実施の形態4に係るモード反転処理プログラム部品を示す図である。 実施の形態4に係るMコードデコード処理プログラム部品を示す図である。 実施の形態4に係るAND条件処理プログラム部品を示す図である。 モード反転機能生成部により作成される操作盤処理プログラムを示す図である。 モード反転機能生成部の属性を示す図である。 モード反転機能生成部の動作を示すフローチャートである。 モード反転機能生成部が取得するデバイスコメントを示す図である。 運転モード選択機能生成部により作成される操作盤処理プログラムを示す図である。 運転モード選択機能生成部の属性を示す図である。 運転モード選択機能生成部の動作を示すフローチャートである。 切削オーバライド機能生成部の属性を示す図である。 切削オーバライド機能生成部の動作を示すフローチャートである。 Mコード機能生成部により作成されるMコード処理プログラムを示す図である。 Mコード機能生成部の属性を示す図である。 Mコード機能生成部の動作を示すフローチャートである。 Mコード機能生成部がMコードデコード処理プログラムを生成する動作を示すフローチャートである。 Mコード機能生成部が機能処理プログラムを生成する動作を示すフローチャートである。 Mコード機能生成部が機能処理プログラムを生成する動作を示すフローチャートである。 Mコード機能生成部が機能処理プログラムを生成する動作を示すフローチャートである。 Mコード機能生成部が完了処理プログラムを生成する動作を示すフローチャートである。 プログラム編集部が生成するラダープログラムの一例を示す図である。 プログラム編集部が生成するラダープログラムの一例を示す図である。
 <実施の形態1>
 実施の形態1では、プログラム部品を定義して再利用する計測監視制御プログラムの作成方法の一例として、ラダープログラムの作成方法について説明する。
 図1は、実施の形態1に係るプログラム作成支援装置のハードウェア構成を示す図である。プログラム作成支援装置1は、マイクロプロセッサ2、表示部3、入力部4、保存部5から構成される。計測監視制御対象である設備の仕様記述および計測監視制御プログラム(以下「プログラム」)は、保存部5にファイルとして保持される。表示部3は、プログラム作成支援装置1の各種情報を表示することができる。例えばユーザが入力部4を用いて設備の仕様をプログラム作成支援装置1に入力する際には、その入力項目が表示部3に表示される。また後述する各種の操作画面は、この表示部3に表示される。マイクロプロセッサ2は、ユーザが入力して保存部5に保存されている設備の仕様に基づき、プログラムの生成処理を実行する。
 図2は、プログラム作成支援装置1の機能ブロック構成(ソフトウェアブロック構成)を示した図である。図2に示す各機能ブロックは、マイクロプロセッサ2が実行するソフトウェアにより、図1に示した各ハードウェアが制御されることによって実現される。
 プログラム作成支援装置1は、ユーザの操作(プログラム編集)に基づいてプログラムの編集を行うプログラム編集部6と、ユーザの操作(プログラム部品定義入力)に基づいて再利用可能なプログラム部品10を定義するプログラム部品定義部12と、プログラム部品定義部12によって定義されたプログラム部品10を格納するプログラム部品保持部11とを備える。本発明においてプログラム部品10は、再利用の際に設定される再利用パラメータ14を含んでおり、プログラム部品10はその設定内容に応じて様々な形態をとることができる(詳細は後述する)。
 本実施の形態のプログラム編集部6は、編集後のプログラム8を出力する他、必要に応じてそれに関連する付属情報ファイル9(例えばデバイスの内容を説明するコメント等)も出力することができる。
 なお、図2ではプログラム部品定義部12がプログラム作成支援装置1に内蔵された構成を示したが、プログラム部品定義部12は、プログラム作成支援装置1とは別の装置として規定されていてもよい。
 以下、本実施の形態のプログラム作成支援装置1の動作、およびプログラム作成支援装置1を用いたプログラム作成方法について説明する。ここではプログラム作成支援装置1がラダープログラムを生成する例を示す。
 図3は、ユーザがプログラム部品定義部12を用いてプログラム部品10を定義する際の操作画面表示(プログラム部品定義画面)の例である。ここではラダープログラムでよく使用される自己保持処理のプログラム部品を定義するときの例を示している。
 図3に示すプログラム部品定義画面(ラダー部品定義画面)は、上から順に、ラダーダイアグラムの作成に使用するアイコンが表示されたアイコン表示領域と、それらのアイコンを操作してプログラム部品のラダーダイアグラムを編集するためのプログラム編集領域と、プログラム部品の再利用パラメータを定義するためのパラメータ定義領域と、作成したプログラム部品の名前を入力するためのプログラム部品名入力領域とが配設された構成となっている。
 アイコン表示領域には、接点(a接点「-| |-」およびb接点「-|/|-」)、命令(「-[ ]-」)、コイル(「-( )-」)といった一般的なプログラム要素のアイコンに加え、それらに「*」や「+」の記号が付されたアイコンが設けられている。「*」や「+」の記号が付されたアイコンは、1以上のプログラム要素から成る集合体(コレクション)に対応するものであり、「*」が付されたアイコンは、図4のようにプログラム要素がAND結合したリレー列に対応し、「+」が付されたアイコンは、図5のようにプログラム要素がOR結合したリレー列に対応している。なお、ラダーダイアグラムでは、コイルはAND結合しないので、「*」が付与されたコイルのアイコンは無い。
 プログラム編集領域は、上記の各種アイコンを操作してラダーダイアグラムを編集できる領域であり、従来のラダープログラム作成支援装置が備えるプログラム編集画面(ラダー編集画面)と同様の構成でよい。
 パラメータ定義領域は、プログラム部品を再利用する際に設定すべき再利用パラメータを定義するための領域であり、プログラム部品の作成(定義)を行う際、ユーザにより所定の事項が入力される。
 図6は、本実施の形態に係るプログラム部品の作成手順を示すフローチャートである。同図に基づき、プログラム部品の作成手順を説明する。ここでは図3のように、自己保持処理のプログラム部品を作成する場合を例示する。
 まず、プログラム部品の各要素に付与する再利用パラメータを、当該プログラム部品の記述に用いる部品変数として定義する(S11)。これは、ユーザがプログラム部品定義画面のパラメータ定義領域で再利用パラメータを設定することにより行われる。図3の例では、No.1の再利用パラメータとして部品変数VB1が定義され、No.2の再利用パラメータとして部品変数VB2が定義され、No.3の再利用パラメータとして部品変数VB3が定義されている。
 なおプログラム部品の再利用パラメータとして、プログラムコメントとジャンプ用ラベル(プログラムポインタ)を用意してもよい。それらは各プログラム部品が必ず有する再利用パラメータとして規定されていてもよい。
 再利用パラメータとしてのプログラムコメントには、プログラム部品を再利用してプログラムを生成する際に、生成されるプログラムに関するコメントの文字列が設定される。その用途としては、例えば、生成するプログラムの冒頭に、「開始」の文字列を先頭に付したプログラムコメントを記述し、同プログラムの末尾に、「終了」の文字列を先頭に付したプログラムコメントを記述するなどして、その間のプログラムの内容を示すことなどが挙げられる。ラダープログラムではプログラムコメントはステートメントとして扱われ、プログラムコメントとして「主軸正転」が設定された場合、生成したプログラムにおいて図7や図8のようにコメントが記述される。図7はラダーダイアグラム形式のプログラムであり、図8インストラクションリスト形式のプログラムである。
 なお、プログラム部品に、プログラムコメントの再利用パラメータが定義されていたとしても、必要なければ文字列を設定しなくてもよい。その場合は、プログラムコメントを有さないプログラムが生成される。
 再利用パラメータとしてのジャンプ用ラベル(プログラムポインタ)には、当該プログラム部品の再利用により生成されたプログラムに対し他のプログラムからのジャンプ(コール)処理が行われるときに、当該プログラムの位置を表すラベルが設定される。ラダープログラムの場合、プログラムポインタはデバイスの一種として扱われる。プログラムポインタとして「P3」が設置された場合、生成されたプログラムにおいて図7(ラダーダイアグラム形式)や図8(インストラクションリスト形式)のようにプログラムポインタが記述される。またプログラムポインタを有するプログラムの最後に、ジャンプ元に戻るためのリターン(RET)命令を付すようにしてもよい。
 なお、プログラム部品にジャンプ用ラベルの再利用パラメータが設定されていたとしても、必要なければ何も設定しなくてよい。その場合は、ジャンプ用ラベルを有さないプログラムが生成される(ラダープログラムでは、プログラムポインタとRET命令の無いプログラムが生成される)。
 次に、プログラム編集領域にプログラム部品の構成を記述する(S12)。ここではラダーダイアグラムの記述を行う。これはユーザが、プログラム部品定義画面のアイコンを操作することにより行われる。
 通常のプログラム作成においては、接点等の各要素のパラメータとしてデバイスまたは変数(ラベル)を付与するが、プログラム部品の各要素に対しては、パラメータとしてデバイスまたは変数(ラベル)、あるいは再利用パラメータとして定義した部品変数を付与する。部品変数が付与された要素には、プログラム部品を再利用する際に、ユーザがそれに適用するデバイスまたは変数(ラベル)を指定する必要がある。デバイスまたは変数(ラベル)が付与された要素は、プログラム部品を再利用する際、そのデバイスまたは変数(ラベル)がそのまま適用される。
 「*」または「+」が付された要素(コレクション)は、プログラム部品を再利用する際に設定するパラメータの数により、それに含まれる接点の数を指定できる。プログラム部品の作成段階では、コレクションに対してはデバイスまたは変数(ラベル)を付与せずに部品変数を1つ付与する。
 自己保持処理のラダープログラムが有する自己保持用リレーは1つなので、自己保持用リレーには通常のa接点とコイルが用いられる。一方、保持指令条件(ON条件)リレーや、保持キャンセル条件(OFF条件)リレーは、さまざまな構造が考えられる。図3の例では、排他的選択処理やMコード機能処理のプログラムの作成に再利用できる自己保持処理のプログラム部品を定義することを想定し、ON条件リレーおよびOFF条件リレーとして、1以上の接点がAND結合したリレー列(「*」が付された要素)を用いている。即ち、ON条件リレー列として「*」が付されたa接点を用い、OFF条件リレー列として「*」が付されたb接点を用いている。
 またON条件リレー列にはNo.1の再利用パラメータとして定義された部品変数VB1が付与され、OFF条件リレー列にはNo.2の再利用パラメータとして定義された部品変数VB2が付与され、自己保持用リレーにはNo.3の再利用パラメータとして定義された部品変数VB3が付与されている。このことは、プログラム部品定義画面のプログラム編集領域の表示とパラメータ定義領域の表示との対応から判断できるが、ユーザは、その対応関係が一目で分かるようにパラメータ定義領域の「説明文」の欄に、図3の如く再利用パラメータが割り当てられた要素を説明するコメント(文字列)を入力することができる。
 図3のように、パラメータ定義領域において、「*」が付されたリレー列に付与されたNo.1およびNo.2の再利用パラメータの「列挙」の欄には「*」の記号が表示される。また図3には示されていないが、「+」が付されたリレー列に付与された再利用パラメータの「列挙」の欄には「+」の記号が表示される。これによりその再利用パラメータがコレクションに付与されていることが明示される。なお自己保持用リレーは1つであるので、No.3の再利用パラメータの「列挙」の欄は空白となっている。
 プログラム部品のラダーダイアグラムを記述した後、当該プログラム部品に名称を与える(S13)。これは、ユーザがプログラム部品定義画面のプログラム部品名入力領域に文字列を入力することにより行われる。図3の例では、作成したプログラム部品に「自己保持処理」という名称を与えている。以上により、プログラム部品の作成が完了する。
 なお、上の説明では、先に再利用パラメータの定義を行い(S11)、その後それを用いてプログラム部品のプログラム(ラダーダイアグラム)を記述する(S12)という手順であったが、その順番は逆でもよい。
 即ち図9のフローチャートのように、先に未定義の変数を用いてプログラム部品のプログラム(ラダーダイアグラム)を記述し(S21)、その後、記述したプログラムから未定義の変数を抽出して(S22)、抽出した未定義の変数を再利用パラメータ(部品変数)として定義し(S23)、プログラム部品の名称を付与する(S24)といった手順でもよい。未定義の変数の抽出および再利用パラメータ(部品変数)としての定義づけは、ユーザがパラメータ定義領域に所定の事項を入力することによって行ってもよいし、プログラム部品定義部12が未定義の変数を検索することによって行ってもよい。再利用パラメータと記述したプログラムで用いる部品変数との対応が矛盾しなければ、その方法は任意のものでよい。
 次に、プログラム作成支援装置1にプログラムを自動生成させる手順を説明する。図10は、プログラム作成支援装置1にプログラム部品を再利用してプログラムを自動生成させる際の操作画面表示(プログラム部品再利用画面)の一例を示している。同図では、図3のように定義された自己保持処理プログラム部品を再利用するケースを示している。
 このプログラム部品再利用画面は、再利用するプログラム部品の名称が表示されるプログラム部品名表示領域と、再利用パラメータに適用するデバイスや変数(ラベル)などのパラメータを入力するためのパラメータ適用領域とを備えている。なお、プログラム部品再利用画面には、図32の如く、選択されたプログラム部品の構造およびその各要素に付与された再利用パラメータのナンバー(No.)が表示されるプログラム表示領域を設けてもよい。その場合ユーザは、再利用しようとするプログラム部品の構造、並びに、各要素と再利用パラメータとの対応関係を容易に把握できるようになる。
 プログラム部品名表示領域は、再利用するプログラム部品の名称を表示するだけでなく、既に定義済みの複数のプログラム部品から再利用するものを選択する選択メニューとしての機能を持っている。
 プログラム部品再利用画面において、パラメータ適用領域に表示される再利用パラメータの「No.」、「列挙」、「説明文」の欄には、図3のプログラム部品定義画面のパラメータ定義領域で定義した内容が表示される。
 ユーザは、パラメータ適用領域において、再利用パラメータに適用するパラメータを入力する。このとき「列挙」の欄に「*」あるいは「+」が表示されている再利用パラメータには、パラメータを2つ以上列挙して入力できる。また、再利用パラメータとしてのプログラムコメントには、生成するプログラムについてのコメント(文字列)を入力できる。
 図10の例では、プログラムコメントに「主軸正転」、ジャンプ用ラベルに「P3」、No.1の再利用パラメータ(VB1)に「M3」、No.2の再利用パラメータ(VB2)に「M4,M19」、No.3の再利用パラメータ(VB3)に「Y1898」を適用する例を示している。
 この場合、プログラム作成支援装置1は、図3に示したラダーダイアグラムにおいてON条件リレー列VB1を1つのa接点M3に置き換え、OFF条件リレー列VB2をAND結合した2つのb接点M4,M19に置き換え、自己保持用リレーVB3をリレーVB3に置き換え、それにプログラムポインタP3、リターン命令(RET)、プログラムコメント「開始主軸正転」および「終了主軸正転」を付加して得られるラダープログラム、即ち図7に示したラダーダイアグラムを生成する。あるいは、それをインストラクションリスト形式で記述した図8に示したプログラムを生成するようにしてもよい(図7のラダーダイアグラムと、図8のインストラクションリストは等価である)。
 プログラム作成支援装置1が行う、プログラム部品を再利用したプログラムの生成方法について説明する。図11は、当該生成方法のフローチャートである。ここでは図7に示したラダープログラムを生成する場合を例に挙げる。
 図10の如く、ユーザによりプログラム部品再利用画面に必要な情報が入力され、プログラムの生成が命じられると、プログラム作成支援装置1は、まず再利用パラメータのプログラムコメントに文字列が設定されているか否かを調べる(S31)。プログラムコメントに文字列が設定されていれば、その先頭に「開始」を付与したプログラムコメントを出力する(S32)。図10の場合、プログラムコメントに「主軸正転」の文字列が設定されているため、それに「開始」を付与した「開始主軸正転」がプログラムコメントとして出力される。
 続いて、ジャンプ用ラベル(プログラムポインタ)の再利用パラメータとして何らかのラベルが設定されているかを調べ(S33)、設定されていれば、それに応じたジャンプ用ラベルを出力する。図10の場合、ラベルP3が設定されているため、「P3」がジャンプ用ラベルとして出力される。
 次に、プログラム部品のプログラム構造の順に、プログラムを構成する要素を抽出し(S35)、抽出された要素のそれぞれに対し、以下の処理が行われる。
 まず、抽出された要素に再利用パラメータが定義されているか否かを確認する(S36)。再利用パラメータが設定されていれば、当該要素が「*」が付されたもの(AND列)かどうか調べ(S37)、AND列であれば、図10のパラメータ適用領域に列挙されたパラメータを適用した要素をAND結合して出力する。
 一方、再利用パラメータが設定された当該要素が「+」が付されたもの(OR列)であれば(S39)、再利用パラメータに列挙されたパラメータを適用した要素をOR結合して出力する(S40)。
 再利用パラメータが設定された当該要素に「*」も「+」も付されていなければ、再利用パラメータに設定されたパラメータを適用した要素を出力する(S41)。
 また当該要素が、再利用パラメータが設定されていないもの、つまり部品変数ではなくデバイスや変数(ラベル)が付与されたものである場合には、そのデバイスや変数(ラベル)がそのまま出力される(S42)。
 以上の工程は、再利用するプログラム部品の全ての要素について行われる(S43)。例えば、図3で定義したプログラム部品における1番目の要素は、a接点のAND列「-| |-*」であり、これにはNo.1の再利用パラメータVB1が定義されている。図10の例では、No.1の再利用パラメータにM3のみが設定されており、この場合、1つのa接点M3が出力される(S38)。
 2番目の要素は、1番目の要素(VB1)にOR結合し、No.3の再利用パラメータVB3が定義された、「*」も「+」も付されていないa接点である。No.3の再利用パラメータにはY1898が設定されているため、先に出力されたa接点M3にOR結合する位置にa接点Y1898が出力される(S41)。
 3番目の要素は、1番目の要素(VB1)および2番目の要素(VB3)にAND結合し、No.2の再利用パラメータVB2が定義されたb接点のAND列(-|/|-*)である。No.2の再利用パラメータにはM4,M19が列挙されているため、先に出力されたa接点M3,Y1898とAND結合する位置に、b接点M4,M19をAND結合させた要素が出力される(S38)。
 最後(第4番目)の要素は、3番目の要素(VB3)にAND結合し、No.3の再利用パラメータVB3が定義されたコイル(-( )-)である。No.3の再利用パラメータにはY1898が設定されているため、先に出力されたb接点M4,M19にAND結合する位置にコイルY1898が出力される(S41)。
 プログラム部品の全ての要素について以上の工程が完了すると(S43)、もう一度再利用パラメータとしてのジャンプ用ラベル(プログラムポインタ)に、特定のラベルが設定されているかを確認し(S44)、設定されていれば、ジャンプの呼び出し元へ戻るリターン命令を出力する(S45)。図10の例では、以上の第1~第4番目の要素にOR結合する位置に、リターン命令(-[RET]-)が出力される。
 そして、もう一度再利用パラメータのプログラムコメントに文字列が設定されているか否かを確認し(S46)、文字列が設定されていれば、その先頭に「終了」を付与したプログラムコメントを出力する(S47)。図10の場合、「主軸正転」に「終了」を付与した「終了主軸正転」がプログラムコメントとして出力される。
 以上の工程により、プログラム部品定義画面(図3)で定義したプログラム部品の再利用パラメータに対し、プログラム部品再利用画面(図10)で設定したパラメータを適用して得られるプログラム(図7のラダーダイアグラムまたは図8のインストラクションリスト)が自動的に作成される。
 ここで図7のラダープログラムの動作について説明する。初期状態ではデバイスM3、M4、M19、Y1898は全てOFF状態である。自己保持の保持指令条件(ON条件)リレーであるa接点M3がONとなれば、a接点Y1898がONする。その後は、a接点M3がOFFとなってもa接点Y1898のONは保持される。a接点Y1898のON状態は、保持キャンセル条件(OFF条件)リレーであるb接点M4,M19のいずれかがONするまで継続される。b接点M4,M19のいずれかがONするとa接点Y1898はOFFに戻る(すなわち自己保持がキャンセルされる)。
 本実施の形態のプログラム作成支援装置1は、プログラム部品再利用画面で設定する再利用パラメータの内容を変更することにより、1つのプログラム部品から様々な形態のプログラムを生成することができる。例えば、上記と同様に図3の如く定義した自己保持処理のプログラム部品を再利用する際、プログラム部品再利用画面で図12のように再利用パラメータの内容を設定すれば、図13に示すラダープログラムを生成することができる。
 図13のラダープログラムの動作について説明する。初期状態ではデバイスM19、XC18、M3、M4、Y189Eは全てOFF状態である。ON条件リレーであるa接点M19,XC18の両方がONとなれば、a接点Y189EがONする。その後は、a接点M19,XC18がOFFとなってもa接点Y189EのONは保持される。a接点Y189EのON状態は、OFF条件リレーであるb接点M3,M4のいずれかがONするまで継続される。b接点M3,M4のいずれかがONするとa接点Y189EはOFFに戻る(すなわち自己保持がキャンセルされる)。
 上記したように、プログラム作成支援装置1は、作成されたプログラム8と共に、それに関連する付属情報ファイル9を出力できる。付属情報ファイル9には、例えば、生成されたプログラムで再利用されたデバイスまたは変数(ラベル)(プログラム部品で再利用パラメータが定義されたデバイスまたは変数(ラベル))について、それらの内容を説明するコメントが記述される。
 付属情報ファイルは、ユーザがプログラム作成支援装置1を操作して作成してもよいが、自動生成されるようにしてもよい。図14は、生成されたプログラムで再利用されたデバイスまたは変数(ラベル)の内容を説明するコメントが記述された付属情報ファイルの自動作成方法を示すフローチャートである。
 図14に基づき、付属情報ファイルの自動作成方法を説明する。プログラム作成支援装置1は、プログラム部品を再利用してプログラムを生成すると、その中から再利用パラメータに適用されたパラメータ(図10の例では「主軸正転」,P3,M3,M4,M19,Y1898)を順に抽出し(S51)、当該パラメータがデバイスまたは変数(ラベル)かどうかを確認する(S52)。当該パラメータがデバイス(M3,M4,M19,Y1898)または変数(ラベル)であれば、当該プログラム部品名と当該パラメータに対応する「説明文」の文字列を結合し、それを当該デバイスや変数(ラベル)のコメントとして出力する(S53)。これらの工程は、再利用パラメータに適用されたパラメータの全てが抽出されるまで繰り返される(S54)。以上の工程により付属情報ファイルが自動生成される。
 例えば図10のように再利用パラメータが設定された場合、プログラム作成支援装置1は、図7または図8のプログラムと共に、図15のような付属情報ファイルを生成することができる。
 本実施の形態に係るプログラム部品は、再利用する際に、再利用パラメータに複数のパラメータ(デバイスや変数(ラベル)、数値等)を列挙して適用することにより、複数の要素が所定の形態(AND結合やOR結合)で生成されるプログラム要素(リレー列)を含むことを特徴としている。当該プログラム部品は、再利用パラメータに適用するパラメータの列挙数に応じて、様々な形態を取ることが可能である。つまり1つのプログラム要素から複数の形態のプログラムを生成することが可能である。そして本実施の形態のプログラム作成支援装置1は、そのようなプログラム部品を定義可能なプログラム部品定義部12を備えることを特徴としている。
 従来のプログラム作成支援装置では、異なる形態のプログラム、例えば図7のプログラムと図13のプログラムを、同一のプログラム部品を用いて生成することができなかったが、本発明ではそれが可能となる。これにより、プログラム部品を応用可能な範囲が広くなり、計測監視制御対象である設備の仕様記述に、より直接的に合致するようにプログラム部品を定義することが可能となる。
 よって、仕様記述に合致するプログラムを作成するための、プログラム部品の選定およびそれらの組み合わせに関する設計の労力を軽減し、仕様に記述された機能を過不足なく備えるプログラムの作成の労力を大幅に軽減できる。またプログラム部品を再利用して生成したプログラムの付属情報ファイルも自動生成することができ、この付属情報の存在によって、生成したプログラムの理解が容易となり、生成したプログラムの理解に係る労力が軽減される。
 <実施の形態2>
 実施の形態1では、単独でプログラム(プログラム部品POU)として成り立つ構造のプログラム部品について説明した。ここでは、単独ではプログラム(プログラム部品POU)として成立しないが、プログラム部品の要素と成り得るプログラム部品(以下「プログラム要素部品」)を用いる実施形態を示す。
 例えば接点や命令、コイルは、それ以上分解できない最も基本となるプログラム要素部品と成り得る。接点、命令やコイルは、プログラムおよびプログラム部品の構成要素となり得るとともに、プログラム要素部品の構成要素でもある。同様に、プログラム要素部品も、プログラムおよびプログラム部品の構成要素にも、他のプログラム要素部品の構成要素にも成り得る。
 以下、プログラム要素部品の定義方法と再利用方法について説明する。図16は、実施の形態2に係るプログラム作成支援装置1の機能ブロック構成(ソフトウェアブロック構成)を示す図である。当該プログラム作成支援装置1は、実施の形態1(図2)の構成に対し、プログラム要素部品17を定義するためのプログラム要素部品定義部15をさらに備えている。定義されたプログラム要素部品17は、プログラム部品保持部11に保存される。プログラム要素部品17は、それを再利用する際に設定される再利用パラメータ18を有している。
 なお図16では、プログラム部品定義部12およびプログラム要素部品定義部15が、プログラム作成支援装置1に内蔵された構成を示したが、それらは外部装置であってもよい。
 図17は、ユーザがプログラム要素部品定義部15を用いてプログラム要素部品17を定義する際の、操作画面表示(プログラム要素部品定義画面)の一例を示す図である。ここでは、ラダーダイアグラム形式で記述されたプログラム要素部品(AND条件処理プログラム要素部品)を定義する場合の例を示している。
 プログラム要素部品定義画面(ラダー要素部品定義画面)は、図3で示したプログラム部品定義画面(ラダー部品定義画面)に類似した構成を有している。即ち図17のように、プログラム要素部品定義画面は、上から順に、ラダーダイアグラムの作成に使用するアイコンが表示されたアイコン表示領域と、それらのアイコンを操作してプログラム要素部品のラダーダイアグラムを編集するためのプログラム編集領域と、プログラム要素部品の再利用パラメータを定義するためのパラメータ定義領域と、作成したプログラム要素部品の名前を入力するためのプログラム要素部品名入力領域とが配設された構成となっている。
 アイコン表示領域には、図3で示したプログラム部品定義画面が備えるアイコンに加え、プログラム要素部品(-□-)及びそれに「*」あるいは「+」が付されたアイコンが配置されている。「*」の記号はAND結合したプログラム要素部品の列を示し、「+」の記号はOR結合したプログラム要素部品の列を示している。
 プログラム編集領域は、上記の各種アイコンを操作してラダーダイアグラムを編集できる領域であり、従来のラダープログラム作成支援装置が備えるプログラム編集画面(ラダー編集画面)と同様の構成でよい。但し、プログラム要素部品はそれだけでプログラムとして成立しないので、図3に示したプログラム編集領域とは異なり、左母線と右母線がなく、ラダーダイアグラムを構成する1つの要素の内部構造を編集するような形態となっている。
 パラメータ定義領域は、プログラム要素部品を再利用する際に設定すべき再利用パラメータを定義するための領域であり、ユーザによって所定の事項が入力される。
 プログラム要素部品の定義の手順は、図6または図9で示したプログラム部品の定義手順と同様であるので、ここでの説明は省略する。図17には、プログラム要素部品を、「*」が付与されたa接点(a接点がAND結合したリレー列)1つから成る構成とした例を示している。またそのa接点のリレー列にはNo.1の再利用パラメータとして定義された部品変数VB1が付与され、当該部品変数VB1には「AND条件リレー列」なる説明文が付されている。そして当該プログラム要素部品に対し、「AND条件処理」という名称が与えられている。
 なお、プログラム要素部品定義画面において、プログラム要素部品のアイコン(「-□-」、「-□-+」および「-□-*」)を用いて他のプログラム要素部品を含むラダーダイアグラムを構成すれば、他のプログラム要素部品を再利用するプログラム要素部品を定義することもできる。
 図18は、本実施の形態に係るプログラム作成支援装置1のプログラム部品定義画面の例である。図3に示したものと同様に、上から順に、アイコン表示領域、プログラム編集領域、パラメータ定義領域、プログラム部品名入力領域が配設された構成となっている。
 アイコン表示領域には、図3で示したプログラム部品定義画面が備えるアイコンに加え、プログラム要素部品(-□-)及びそれに「*」あるいは「+」が付されたアイコンが配置されている。ユーザは、このアイコンを操作することにより、プログラム要素部品を再利用したプログラム部品を作成することができる。
 パラメータ定義領域は、プログラム部品の作成を行う際にユーザが所定の事項を入力する領域である。図3に示した欄に加え、プログラム要素部品を含むプログラム部品を定義する場合に、そのプログラム要素部品の種類を特定するための「要素部品種別」の欄が設けられている。ユーザは、プログラム要素部品を用いてプログラム部品を定義するとき、「要素部品種別」の欄を操作して、既に定義済みのプログラム要素部品の中から使用するものを選択して指定する。
 図18では、プログラム編集領域において、OR結合したプログラム要素部品の列(-□-+)と、コイル(-( )-)とがAND結合して成るプログラム部品が定義されている。そして、上記のプログラム要素部品の列に、No.1の再利用パラメータとして定義された部品変数VE1を付与し、且つ、パラメータ定義領域において、部品変数VE1のプログラム要素部品の種別として「AND条件処理」(つまり図17で定義したプログラム要素部品)を指定している。またここではユーザにより、それに対して「OR条件(AND条件処理プログラム要素部品列)」という説明文が設定されている。
 上記のコイルには、再利用パラメータとして定義された部品変数ではなく、Mコード完了を意味する出力デバイスであるYC1Eを付与している。この場合、当該プログラム部品が再利用されるときは、常にデバイスYC1Eが記述されることになる。なお、プログラム部品に用いるプログラム要素部品には、デバイスや変数(ラベル)を付与することは許されず、必ず再利用パラメータの部品変数を付与する必要がある。
 図18では、プログラム部品名入力領域を用いて、当該プログラム部品に対し「Mコード完了処理」なる名称を付与している。
 プログラム部品の定義に用いたプログラム要素部品に対しては、プログラム要素部品の種別を列挙して指定することも可能である。この場合は、列挙された種別のうち、いかなるプログラム要素部品を再利用してもよいプログラム部品が定義される。
 また、プログラム部品の定義に用いたプログラム要素部品(に付与した部品変数)に対し、プログラム要素部品の種別を指定しないことも可能である。この場合、プログラム要素部品の種別に制約がなく、いかなるプログラム要素部品を再利用してもよいプログラム部品が定義される。プログラム要素部品の種別が指定されていない部品変数であり、且つプログラム要素部品に付与されているものに対しては、プログラム部品を再利用する際、プログラム要素部品を適用する必要がある。また、プログラム要素部品の種別が指定されていない部品変数であり、接点や命令やコイルのアイコンに付与されているものに対しては、プログラム部品を再利用する際、実施の形態1のようにデバイスや変数(ラベル)を適用する必要がある。
 次に、プログラム作成支援装置1に、プログラム要素部品を含むプログラム部品を用いてプログラムを自動生成させる手順を説明する。図19は、プログラム作成支援装置1にプログラム部品を再利用してプログラムを自動生成させる際の操作画面表示(プログラム部品再利用画面)の一例を示している。同図では、図18のように定義されたMコード完了処理プログラム部品を再利用するケースを示している。
 実施の形態2のプログラム部品再利用画面(図19)は、実施の形態1のプログラム部品再利用画面(図10)に対し、プログラム部品に含まれているプログラム要素部品の種別が表示される「要素部品種別」の欄と、「行追加」および「行削除」のボタンが追加されたものである。
 図18に示したMコード完了処理プログラム部品には、種別が「AND条件処理」のプログラム要素部品が含まれているため、図19の例ではNo.1の再利用パラメータの「種別」の欄に「AND条件処理」が表示され、それに対応する説明文「OR条件(AND条件処理プログラム要素部品列)」が「説明文」の欄に表示される。
 なお、プログラム部品が、種別未指定のプログラム要素部品を含んでいる場合や、複数の種別が指定されたプログラム要素部品を含んでいる場合には、プログラム部品再利用画面(図19)においてその種別を指定・選択がユーザにより行われる。
 プログラム要素部品には再利用される要素が複数含まれる場合があるため、図19のような画面だけでは再利用パラメータの設定が困難である。そのため再利用するプログラム部品がプログラム要素部品を含む場合には、プログラム部品再利用画面においてプログラム要素部品の「再利用パラメータ」の欄には、当該プログラム要素部品の再利用パラメータを設定するための別画面を展開するためのボタン(以下「展開ボタン」)が表示される。ユーザは、この展開ボタンを押すことにより、プログラム要素部品についての再利用パラメータ設定を行う画面(プログラム要素部品再利用画面)を開くことができる。
 またプログラム部品がプログラム要素部品のコレクションを含み、その再利用パラメータに複数のパラメータを適用したい場合、1つのプログラム要素部品再利用画面ではその設定が困難である。そこでプログラム要素部品のコレクションを含んでいる場合には、図19の如く、プログラム部品再利用画面に「行追加」「行削除」のボタンが表示される。行追加ボタンは、コレクションを構成するプログラム要素部品の数を増やすものであり、これを押すことにより、パラメータ適用領域において、プログラム要素部品の再利用パラメータを設定するための欄が1行増える(展開ボタンが1つ増える)。行削除ボタンを押すとそれを1行削除できる。
 図19のプログラム部品再利用画面を参照すると、Mコード完了処理プログラム部品(図18)は、AND条件処理プログラム要素部品がOR結合するコレクション(「列挙」の欄に「+」が表示される)を含んでおり、当該コレクションはNo.1の再利用パラメータに対応付けされている。ユーザは、作成するプログラムにおいてAND条件処理プログラム要素部品を複数個OR結合させたい場合は、行追加ボタンを押してパラメータ適用領域に行を追加する。図19では、2つのAND条件処理プログラム要素部品をOR結合させる場合の例が示されている。
 ユーザはその後、各要素の再利用パラメータの設定を行うことになるが、プログラム要素部品に対する再利用パラメータの設定は次のように行われる。
 例えばOR結合させる2つのAND条件処理プログラム要素部品のうちの1つ目(「列挙」の欄に「1」が表示)の展開ボタンを押すと、図20のようなプログラム要素部品再利用画面が開く。プログラム要素部品再利用画面の構成は、プログラム部品再利用画面(図19)と同様である。ユーザは、この画面のパラメータ適用領域に設定するパラメータを入力する。図20では、1つ目のAND条件処理プログラム要素部品の再利用パラメータにデバイスM3を適用した例である。
 なお、再利用するプログラム要素部品が別のプログラム要素部品を有する場合は、「要素部品種別」の欄にその種別が表示される(種別が設定されていない、あるいは複数の種別が設定されている場合は、その欄を用いて所望の種別を選択する)。さらに「再利用パラメータ」の欄にも展開ボタンが表示され、それによって別のプログラム要素部品の再利用パラメータを設定できる。図20では、AND条件処理プログラム要素部品はプログラム要素部品を含まないため、「要素部品種別」の欄は空欄であり、展開ボタンも表示されていない。
 またプログラム部品再利用画面において、2つ目のAND条件処理プログラム要素部品(「列挙」の欄に「2」が表示)の展開ボタンを押すと、図20と同様の図21のようなプログラム要素部品再利用画面が開く。図21では、1つ目のAND条件処理プログラム要素部品の再利用パラメータにデバイスM3を適用した例である。図21では、2つ目のAND条件処理プログラム要素部品の再利用パラメータにデバイスM19,X188Eを列挙して適用した例である。
 図19、図20および図21のようにそれぞれの再利用パラメータを設定し、プログラム作成支援装置1にプログラムを生成させた結果を図22に示す。この場合、Mコード完了処理プログラム部品(図18)において、プログラム要素部品VE1の部分が、図20で設定したAND条件処理プログラム要素部品M3と、図21で設定したAND条件処理プログラム要素部品M19,X188EとのOR結合に置き換えられたプログラムが、プログラム作成支援装置1によって生成される。
 本実施の形態に係るプログラム部品は、再利用する際に、再利用パラメータに複数のパラメータ(デバイスや変数(ラベル)、数値等)を列挙して適用することにより、複数のプログラム要素部品が所定の形態(AND結合やOR結合)で生成されるプログラム要素部品の列を含むことを特徴としている。当該プログラム部品では、プログラム要素部品に適用する再利用パラメータの数に応じて、再利用されるプログラム要素部品の個数が変わり、且つ、プログラム要素部品自体もそれに適用されるパラメータに応じて様々な形態を取ることが可能である。従って実施の形態2では、1つのプログラム要素から、実施の形態1よりもさらに多くの形態のプログラムを生成することが可能である。そして本実施の形態のプログラム作成支援装置1は、そのようなプログラム部品を定義可能なプログラム部品定義部12を備えることを特徴としている。
 よって、仕様記述に合致するプログラムを作成するための、プログラム部品の選定およびそれらの組み合わせに関する設計の労力を軽減し、仕様に記述された機能を過不足なく備えるプログラムの作成の労力を大幅に軽減できる。またプログラム部品を再利用して生成したプログラムの付属情報ファイルも自動生成することができ、この付属情報の存在によって、生成したプログラムの理解が容易となり、生成したプログラムの理解に係る労力が軽減される。
 <実施の形態3>
 実施の形態3では、特定のプログラム部品が複数個結合して成る、より大きなプログラム部品(以下「プログラム階層部品」)を用いる実施形態を示す。
 図23は、実施の形態3に係るプログラム作成支援装置1の機能ブロック構成(ソフトウェアブロック構成)を示す図である。当該プログラム作成支援装置1は、実施の形態2(図16)の構成に対し、プログラム階層部品21を定義するためのプログラム階層部品定義部19をさらに備えている。定義されたプログラム階層部品21は、プログラム部品保持部11に保存される。プログラム階層部品21は、それを再利用する際に設定される再利用パラメータ22を備えている。
 なお図23では、プログラム部品定義部12、プログラム要素部品定義部15およびプログラム階層部品定義部19が、プログラム作成支援装置1に内蔵された構成を示したが、それらは外部装置であってもよい。
 図24は、プログラム階層部品19の定義の手順を示すフローチャートである。また図25および図26は、プログラム階層部品定義部19を用いてプログラム階層部品を定義する際の操作画面表示(プログラム階層部品定義画面)の例である。ここでは、ラダーダイアグラム形式で、排他的選択数値設定の処理を行うプログラム階層部品を定義する画面の例を示している。
 このプログラム階層部品定義画面(ラダー階層部品定義画面)は、上から順に、作成するプログラム階層部品に含ませるプログラム部品を設定するためのプログラム部品設定領域、プログラム階層部品の再利用パラメータを定義するためのパラメータ定義領域、およびプログラム階層部品の名称を入力するプログラム階層部品名入力領域が配設された構成となっている。プログラム部品設定領域はさらに、プログラム階層部品におけるプログラム部品の配列を設定するためのプログラム部品順序設定領域と、プログラム階層部品を構成する各プログラム部品の再利用パラメータに所定のパラメータを適用するためのパラメータ適用領域とから構成されている。
 以下、図3に示した自己保持処理プログラム部品と、図27のように定義された数値設定処理プログラム部品とから構成される排他的選択数値設定プログラム階層部品を例に挙げて、プログラム階層部品の定義の手順を説明する。
 まず、プログラム階層部品を再利用する際に設定する再利用パラメータを、プログラム階層部品の記述に用いる部品変数として定義する(S61)。図25および図26の例では、No.1の再利用パラメータとして、排他的選択数値設定プログラムの指令リレー(図27において再利用パラメータとしての部品変数VB1が付与されたa接点)に付与する部品変数VBを定義している。またNo.2の再利用パラメータとして、数値設定処理命令(MOV)で設定する数値(図27の変数VK2)に付与する部品変数VKを定義し、No.3の再利用パラメータとして、内部ローカル変数(内部リレー)として部品変数VMを設定し、No.4の再利用パラメータとして、数値の設定先レジスタ(図27の変数VD3)に付与する部品変数VDを、それぞれ定義している。
 ここで、パラメータ定義領域の「列挙」のチェックボックスは、当該再利用パラメータに対してパラメータを列挙して設定可能か否かを設定するものである。図25および図26の例において、チェック(「レ」)が入っているNo.1~3の再利用パラメータは、パラメータを列挙して設定可能なものとして定義されている。プログラム階層部品は、列挙されたパラメータの数だけ、所定のプログラム部品を再利用してプログラム生成を行うことになる。
 なお図25および図26のパラメータ定義領域に示すように、プログラム階層部品の再利用パラメータとして、プログラムコメントとプログラムポインタを用意してもよい。
 次に、プログラム部品順序設定領域を用いて、プログラム階層部品で再利用するプログラム部品およびその順番を選択する(S62)。プログラム階層部品を用いてプログラムが生成される際、この工程で選択されたプログラム部品が選択された順番で再利用される。
 図25および図26の例では、プログラム部品順序設定領域の右側のボックスには定義済みのプログラム部品の一覧が表示されており、その一覧から1つを選択して選択ボタン(「<<」)を押すと、それが左側のボックス内のラダーダイアグラムに追加される。また左側のボックス(ラダーダイアグラム)に表示されているプログラム部品の1つを選択し、削除ボタンを押すと、ラダーダイアグラムからそのプログラム部品を削除することができる。さらに、左側のボックスに表示されているプログラム部品の1つを選択し、上下移動ボタン(矢印ボタン「↑」及び「↓」)を押すと、そのプログラム部品の順番を変更することができる。
 図25および図26では、プログラム部品の一覧の中から、まず自己保持処理プログラム部品を選択してラダーダイアグラムに追加し、さらに数値設定処理プログラム部品を選択して、ラダーダイアグラムの上記自己保持処理プログラム部品の次に追加した例を示している。この結果、自己保持処理プログラム部品および数値設定処理プログラム部品をこの順番で再利用したプログラムを生成可能なプログラム階層部品が定義される。また当該プログラム階層部品は、再利用パラメータにパラメータが列挙して設定されると、自己保持処理プログラム部品および数値設定処理プログラム部品を、その列挙されたパラメータの数だけ繰り返し再利用したプログラムを生成できる。
 次に、プログラム階層部品において再利用パラメータとして定義した部品変数を、当該プログラム階層部品に含まれるプログラム部品の再利用パラメータへと適用する(S63)。図25および図26の例では、プログラム部品順序設定領域の左側ボックス(ラダーダイアグラム)内のプログラム部品を選択すれば、その下のパラメータ適用領域に、選択されたプログラム部品の再利用パラメータの一覧が表示される。
 図25では、プログラム部品順序設定領域の左側ボックス内で自己保持処理プログラム部品を選択され、パラメータ適用領域にその再利用パラメータの一覧が表示されている。ここでは、自己保持処理プログラム部品のNo.1の再利用パラメータ(図3のVB1)に対し当該プログラム階層部品のNo.1の再利用パラメータVBに記号「@」を付したもの(VB@)を適用し、自己保持処理プログラム部品のNo.2の再利用パラメータ(図3のVB2)に対し当該プログラム階層部品のNo.1の再利用パラメータVBに記号「@!」を付したもの(VB@!)を適用し、自己保持処理プログラム部品のNo.3の再利用パラメータ(図3のVB3)に対し当該プログラム階層部品のNo.3の再利用パラメータVMに記号「@」を付したもの(VM@)を適用している。
 図26では、プログラム部品順序設定領域の左側ボックス内で数値設定処理プログラム部品を選択され、パラメータ適用領域にその再利用パラメータの一覧が表示されている。ここでは、数値設定処理プログラム部品のNo.1の再利用パラメータ(図27のVB1)に対し当該プログラム階層部品のNo.3の再利用パラメータVMに記号「@」を付したもの(VM@)を適用し、数値設定処理プログラム部品のNo.2の再利用パラメータ(図27のVK2)に対し当該プログラム階層部品のNo.2の再利用パラメータVKに記号「@」を付したもの(VK@)を適用し、数値設定処理プログラム部品のNo.3の再利用パラメータ(図27のVD3)に対し当該プログラム階層部品のNo.4の再利用パラメータVDを適用している。
 なお、記号「@」は、プログラム階層部品内のプログラム部品が列挙されたパラメータの数だけ繰り返し再利用される際に、列挙されたパラメータを1つずつ順に適用することを示すものである。また記号「@!」は、プログラム階層部品内のプログラム部品が列挙されたパラメータの数だけ繰り返し再利用される際に、記号「@」に基づき適用されるパラメータ以外の全てのパラメータを列挙して適用することを示すものである。
 プログラム階層部品の再利用の際、再利用パラメータに列挙して適用されたパラメータの数だけ、当該プログラム階層部品に含まれるプログラム部品が繰り返し再利用される。例えば再利用パラメータVBに、3つのパラメータX1,X2,X3が列挙して適用されたとすると、再利用は3回行われる。その場合、1回目の再利用ではVB@に1番目のパラメータX1が適用され、VB@!にはそれ以外のパラメータX2,X3が適用される。また2回目の再利用では、VB@に2番目のパラメータX2が適用され、VB@!にはそれ以外のパラメータX1,X3が適用される。そして3回目の再利用では、VB@に3番目のパラメータX3が適用され、VB@!にそれ以外のパラメータX1,X2が適用されることになる。
 最後に、プログラム階層部品名入力領域に作成したプログラム階層部品に名称を入力し(S64)、保存することによって、プログラム階層部品の定義が完了する。
 なお、プログラム階層部品は、他のプログラム階層部品の構成要素と成ることもできる。既に定義して保存されているプログラム階層部品がある場合には、プログラム階層部品定義画面のプログラム部品順序設定領域の右側ボックスにそれが表示され、通常のプログラム部品と同様に選択可能である。これにより、他のプログラム階層部品を再利用するプログラム階層部品を定義することができる。
 図28は、プログラム作成支援装置1にプログラム階層部品を再利用してプログラムを自動生成させる際の操作画面表示(プログラム階層部品再利用画面)の一例を示している。このプログラム階層部品再利用画面は、図10とほぼ同様の構成であり、再利用するプログラム階層部品の名称が表示されるプログラム階層部品名表示領域と、再利用パラメータに適用するデバイスや変数(ラベル)などのパラメータを入力するためのパラメータ適用領域とを備えている。
 図28では、図24および図25のように定義されたプログラム階層部品を再利用するケースを示している。パラメータ適用領域に表示される再利用パラメータの「No.」、「列挙」、「説明文」の欄には、図24および図25のプログラム階層部品定義画面のパラメータ定義領域で定義した内容が表示される。
 ユーザは、パラメータ適用領域において、再利用パラメータに適用するパラメータを入力する。このとき「列挙」の欄にチェック(「レ」)が表示されている再利用パラメータには、パラメータを2つ以上列挙して入力できる。但し、各再利用パラメータ(パラメータを列挙して適用可能なものに限る)に列挙して適用するパラメータの数は、全て同じにする必要がある。
 図28の例では、プログラムコメントに「切削オーバライド設定スイッチ」、No.1の再利用パラメータ(VB)に「X285,X286,X287,X288」、No.2の再利用パラメータ(VK)に「25,50,75,100」、No.3の再利用パラメータ(VM)に「M4002,M4003,M4004,M4005」、No.3の再利用パラメータ(VD)に「R2500」を適用する例を示している。この場合は、図29のようなラダープログラムがプログラム作成支援装置1によって作成される。
 図29のプログラムは、図30のような切削オーバライドスイッチの設定結果を処理するプログラムである。設備の操作者は、設備の操作盤などに備えられた切削オーバライドスイッチによって、その設備が稼動する際の切削オーバライド値を25%、50%、75%、100%から選択する。切削オーバライドスイッチの出力は、設備の計測監視制御を行うために組み込まれたコントローラの各Xデバイス(X285,X286,X287,X288)に接続される。コントローラは、各XデバイスのON/OFFによって選択された切削オーバライド値を、コントローラ内部のRレジスタ(R2500)に格納する。
 以下、プログラム作成支援装置1が行う、プログラム部品を再利用したプログラムの生成方法について説明する。図31は、当該生成方法のフローチャートである。ここでは図7に示したラダープログラムを生成する場合を例に挙げる。
 図29の如く、ユーザによりプログラム階層部品再利用画面に必要な情報が入力され、プログラムの生成が命じられると、まずプログラム作成支援装置1は、パラメータを列挙して適用可能な再利用パラメータ(プログラム階層部品定義画面のパラメータ定義領域で「列挙」の欄にチェック(「レ」)が入っているもの)が複数あるか確認し、複数ある場合には、それらに適用されたパラメータの数が全て同じか否かを確認する(S71)。数の異なるものがあれば、再利用パラメータの設定エラーを表示するなどして、プログラムを生成せずに終了する(S72)。
 次に、再利用パラメータとしてのプログラムコメントおよびジャンプ用ラベル(プログラムポインタ)の設定内容に応じた処理を行う(S73)。この処理は、図11のステップS31~S34と同じ処理である。
 以降、再利用パラメータに列挙して適用されたパラメータの数だけ、プログラム部品の再利用を行ってプログラムを生成する。まず再利用の回数をカウントするためのインデックスiを1に設定する(S74)。インデックスiはプログラム部品の再利用が完了する毎に1つずつ増やされ、iの値がパラメータの列挙数を超えるまで、プログラム部品の再利用が繰り返される。
 プログラム部品の再利用は、プログラム階層部品のプログラム構造の順、即ちプログラム階層部品定義画面のプログラム部品順序設定領域で設定した順に行われる。プログラム作成支援装置1は、プログラム階層部品のプログラム構造の順にプログラム部品を抽出する(S75)。
 続いて、抽出したプログラム部品の再利用パラメータを順に抽出し(S76)、それに当該プログラム階層部品の再利用パラメータが適用されているかを確認する(S77)。当該プログラム階層部品の再利用パラメータが適用されていれば、それに記号「@」が付されているか(S78)、記号「@!」が付されているか(S80)、あるいはそのどちらでもないかが判断される。
 プログラム部品の再利用パラメータに記号「@」が付されていれば、それに対してプログラム階層部品のi番目の再利用パラメータを適用する(S79)。プログラム部品の再利用パラメータに記号「@!」が付されていれば、それに対してプログラム階層部品のi番目以外の全ての再利用パラメータを列挙して適用する(S81)。どちらの記号も付されていなければ、プログラム部品の再利用パラメータに、プログラム階層部品の再利用パラメータを適用する(S82)。
 なお、抽出したプログラム部品の再利用パラメータに、当該プログラム階層部品の再利用パラメータが適用されていない場合は(S77においてNo)、当該プログラム階層部品の再利用パラメータに適用されているデバイスや変数(ラベル)、数値をそのまま適用する(S83)。
 プログラム部品の再利用パラメータに関する処理(S76~S83)は、当該プログラム部品の全ての再利用パラメータに対して実行される(S84)。全ての再利用パラメータに対する処理が完了すると(S84においてNo)、その処理結果に基づいて当該プログラム部品を再利用したプログラムが生成される(S85)。このプログラム生成工程では、図11に示したプログラムの生成方法と同様の処理が行われる。
 プログラム部品の抽出(S75)からプログラム部品を再利用してのプログラム生成(S85)までの処理は、プログラム階層部品内の全てのプログラム部品に対し、指定された順番で実行される(S86)。それらの処理が全てのプログラム部品について完了すると(S86においてNo)インデックスiがインクリメントされ(S87)、インクリメント後のインデックスiがプログラム階層部品の再利用パラメータに列挙されたパラメータの数を超えるまで、それらの処理が繰り返される(S88)。
 最後に、再利用パラメータとしてのプログラムコメントおよびジャンプ用ラベル(プログラムポインタ)の設定内容に応じた処理を行う(S89)。この処理は、図11のステップS44~S47と同じ処理である。
 以上説明したプログラム生成方法を、図25および図26のように定義したプログラム階層部品につき、図28のように再利用パラメータを設定した場合を例にして、具体的に説明する。
 図28の如く、ユーザによりプログラム階層部品再利用画面に必要な情報が入力され、プログラムの生成が命じられると、プログラム作成支援装置1は、「列挙」の欄にチェック(「レ」)が入ったNo.1~4の再利用パラメータに列挙されたパラメータの数を確認する(S71)。ここではいずれも4つであるため、設定エラーとはならず、プログラムの作成が実行される。
 まず、再利用パラメータのプログラムコメントには「切削オーバライド設定スイッチ」が設定されているため、プログラム作成支援装置1は、それに「開始」を付与した「開始切削オーバライド設定スイッチ」をプログラムコメントとして出力する(S73)。ジャンプ用ラベルは設定されていない。
 インデックスiを1に設定した後、プログラム階層部品の構造順にプログラム部品を抽出する(S75)。図25および図26で定義したように、当該プログラム階層部品の1番目のプログラム部品は、自己保持処理プログラム部品であるので、それが抽出される。そして抽出された自己保持処理プログラム部品について、再利用パラメータが順番に抽出される(S76)。
 まず自己保持処理プログラム部品のNo.1の再利用パラメータVB1には、プログラム階層部品のNo.1の再利用パラメータVBに記号「@」が付されたものが適用されている。よって、それに列挙して設定されたデバイスX285,X286,X287,X288の第1番目(第i番目)のX285が、自己保持処理プログラム部品のNo.1の再利用パラメータVB1に適用される(S79)。
 自己保持処理プログラム部品のNo.2の再利用パラメータVB2には、プログラム階層部品のNo.1の再利用パラメータVBに記号「@!」が付されたものが適用されている。よって、それに列挙して設定されたデバイスX285,X286,X287,X288の第1番目(第i番目)以外のX286,X287,X288が、自己保持処理プログラム部品のNo.2の再利用パラメータVB2に適用される(S81)。
 自己保持処理プログラム部品のNo.3の再利用パラメータVB3には、プログラム階層部品のNo.3の再利用パラメータVMに記号「@」が付されたものが適用されている。よって、それに列挙して設定されたデバイスM4002,M4003,M4004,M4005の第1番目(第i番目)のM4002が、自己保持処理プログラム部品のNo.3の再利用パラメータVB3に適用される(S79)。
 以上の再利用パラメータの適用結果に基づいて、自己保持処理プログラム部品を再利用して生成したプログラムが出力される(S85)。
 自己保持処理プログラム部品を再利用してのプログラム生成が終わると、今度はプログラム階層部品の2番目のプログラム部品である数値設定処理プログラム部品が抽出される(S75)。そして抽出された数値設定処理プログラム部品について、再利用パラメータが順番に抽出され(S76)、上記と同様の処理が行われる。
 数値設定処理プログラム部品のNo.1の再利用パラメータVB1には、プログラム階層部品のNo.3の再利用パラメータVMに記号「@」が付されたものが適用されている。よって、それに列挙して設定されたデバイスM4002,M4003,M4004,M4005の第1番目(第i番目)のM4002が、数値設定処理プログラム部品のNo.1の再利用パラメータVB1に適用される(S79)。
 数値設定処理プログラム部品のNo.2の再利用パラメータVK2には、プログラム階層部品のNo.3の再利用パラメータVKに記号「@」が付されたものが適用されている。よって、それに列挙して設定された数値25,50,75,100の第1番目(第i番目)である25(図29では10進表現「K25」)が、数値設定処理プログラム部品のNo.2の再利用パラメータVK2に適用される(S79)。
 数値設定処理プログラム部品のNo.3の再利用パラメータVD3には、プログラム階層部品のNo.4の再利用パラメータVDが適用されている。これには記号「@」も記号「@!」も付されていないので、それに設定されたデバイスR2500がそのまま数値設定処理プログラム部品のNo.3の再利用パラメータVD3に適用される(S82)。
 以上の再利用パラメータの適用結果に基づいて、数値設定処理プログラム部品を再利用して生成したプログラムが出力される(S85)。
 このように自己保持処理プログラム部品および数値設定処理プログラム部品を再利用してのプログラム生成が完了すると、インデックスiがインクリメントされる(S87)。図28の例では、パラメータの列挙数は4つなので、インデックスi=2、3、4について、上記と同様の手順により自己保持処理プログラム部品および数値設定処理プログラム部品を再利用してのプログラム生成が繰り返される。
 最後に、再利用パラメータとしてのプログラムコメントおよびジャンプ用ラベル(プログラムポインタ)の設定内容に応じた処理が行われる(S89)。図28の例では、設定されたプログラムコメント「切削オーバライド設定スイッチ」に「終了」を付与した「終了切削オーバライド設定スイッチ」がプログラムコメントとして出力される。またジャンプ用ラベルは設定されていないので、リターン命令は出力されない。
 以上のような手順により、図29に示したプログラムが生成される。
 本実施の形態に係るプログラム階層部品は、再利用することにより、プログラム部品を複数組み合わせて構成されるプログラムを生成することが可能である。またその際、プログラム階層部品の再利用パラメータに複数のパラメータ(デバイスや変数(ラベル)、数値等)を列挙して適用することにより、それらプログラム部品を複数回再利用した構成のプログラムを生成可能である。当該プログラム階層部品は、再利用パラメータに適用するパラメータの列挙数に応じて、様々な形態を取ることが可能である。そして本実施の形態のプログラム作成支援装置1は、そのようなプログラム部品を定義可能なプログラム部品定義部12を備えることを特徴としている。
 実施の形態1,2との組み合わせにより、実施の形態1,2よりもさらに多くの形態のプログラムを生成することが可能である。そして本実施の形態のプログラム作成支援装置1は、そのようなプログラム部品を定義可能なプログラム部品定義部12を備えることを特徴としている。
 よって、仕様記述に合致するプログラムを作成するための、プログラム部品の選定およびそれらの組み合わせに関する設計の労力を軽減し、仕様に記述された機能を過不足なく備えるプログラムの作成の労力を大幅に軽減できる。またプログラム部品を再利用して生成したプログラムの付属情報ファイルも自動生成することができ、この付属情報の存在によって、生成したプログラムの理解が容易となり、生成したプログラムの理解に係る労力が軽減される。
 <実施の形態4>
 本実施の形態4に係るプログラム作成支援装置1は、工作機械を制御するためのプログラムを生成する。以下においては、その一例として、プログラム作成支援装置1が、ラダープログラムを生成する場合を説明する。まず、プログラム作成支援装置1について説明する前に、プログラム作成支援装置1が生成するラダープログラムを用いる工作機械について説明する。
 図33は、工作機械の構成を示すブロック図である。工作機械46は、コンピュータ数値制御装置コントローラ(Computerized Numerical Controller:以下「CNC」と記す)47と、工作機械46の工具及び加工物を回転及び移動させる主軸モータ54及びサーボモータ55と、工作機械46を操作するための操作盤56と、付帯設備57とを備えている。なお、以下、図33に示される、CNC47を備える工作機械46を「CNC工作機械46」と呼ぶこともある。
 CNC47は、例えばCNC工作機械46に組み込まれたコンピュータから構成されるものであり、モーション制御機能を有するモーション制御部51と、シーケンス制御機能を有するシーケンス制御部52とを備えている。このCNC47には、CNC工作機械46における加工手順が記述された加工プログラム48が記憶されており、CNC47は、当該加工プログラム48を解釈して、主軸モータ54及びサーボモータ55を制御したり、付帯設備57を制御したりする。
 具体的には、加工プログラム48には、工具及び加工物の移動量及び移動速度を指令するGコード49が記述されており、CNC47のモーション制御部51が、当該Gコード49の指令(数値)に基づいて、主軸モータ54及びサーボモータ55の回転及び移動を制御する。これにより、CNC47を備える工作機械46は、工具及び加工物を、所望の移動量及び移動速度で回転させたり移動させたりすることが可能となっている。
 また、加工プログラム48には、付帯設備57の制御を指令するMコード50が記述されており、CNC47のシーケンス制御部52が、当該Mコード50の指令に基づいて、付帯設備57を制御する。このシーケンス制御部52は、PCと同等の機能を有することから、PCと同等でかつPCとは別のハードウェアで実現されてもよいし、PCのハードウェアで実現されてもよい。
 以上のようなCNC工作機械46のラダープログラムの作成に関連する仕様は、例えば、非特許文献2に開示されている(非特許文献2:PLCプログラミング説明書IB-1500035、インターネット<URL:http://wwwf2.mitsubishielectric.co.jp/melfansweb/index_j.htm>)。
 さて、以上のようなCNC工作機械46が正しく動作するためには、CNC工作機械46が、Mコード50の指令どおりに付帯設備57を制御させるためのラダープログラム53(以下、「Mコード処理プログラム」)を有する必要があるとともに、操作盤56を用いて工作機械46を制御するためのラダープログラム53(以下、「操作盤処理プログラム」)が有する必要がある。
 <プログラム作成支援装置1の構成>
 本実施の形態に係るプログラム作成支援装置1は、操作盤56の仕様、及び、Mコード50の仕様から、CNC工作機械46において使用される操作盤処理プログラム、及び、Mコード処理プログラムを生成する。以下、本実施の形態に係るプログラム作成支援装置1について説明する。なお、操作盤処理プログラム及びMコード処理プログラムを作成するプログラム作成支援装置は、PCのラダープログラムを作成するためのプログラム作成支援装置と同等でそれとは別の装置であってもよいし、PCのラダープログラムを作成するためのプログラム作成支援装置が適用されてもよい。また、一般にCNC工作機械46は、操作盤56において多数のスイッチを備えるとともに、Mコード50を数十~数百個を備えるが、以下においては、運転モード選択やオーバライドなどの典型的なスイッチや、M3、M4、M5、M30などの代表的なMコードを例にして説明する。
 本実施の形態に係るプログラム作成支援装置1のハードウェア構成は、図2に示されるブロック図と同じである。そのハードウェア構成を図2を用いて説明すると、CNC工作機械46に関する仕様のデータ及び計測監視制御プログラムに関するファイルが、保存部5に保持されている。そして、プログラム作成支援装置1は、入力すべき仕様を表示部3に表示し、入力部4においてユーザにより設定された仕様に従って、マイクロプロセッサ2がプログラム生成処理を実行する。
 図34は、本実施の形態に係るプログラム作成支援装置1の機能ブロック構成(ソフトウェアブロック構成)を示す図である。当該プログラム作成支援装置1は、これまでの実施の形態で説明したプログラム編集部6及びプログラム部品保持部11に対し、仕様設定部31と、デバイス仕様保持部32とをさらに備えている。なお、図を簡略化するため、図34においては、プログラム部品定義部12等の図示は省略されている。
 プログラム作成支援装置1には、外部(仕様入力29)から、操作盤56及びMコード50等の仕様が仕様入力29として入力される。また、プログラム作成支援装置1は、操作盤56及びMコード等の仕様が記述された仕様記述ファイル30と接続されており、操作盤56及びMコード等の仕様に関して仕様記述ファイル30を読み書き可能となっている。
 仕様設定部31は、仕様入力29及び仕様記述ファイル30から、操作盤56及びMコード50の仕様を受けて、操作盤56の仕様及びMコード50の仕様を設定する。本実施の形態では、仕様設定部31は、操作盤56の仕様を受けて操作盤56の仕様を設定(記憶)する操作盤仕様設定部31Aと、Mコード50の仕様を受けてMコード50の仕様を設定(記憶)するMコード仕様設定部31Bとを有している。仕様設定部31は、設定された仕様(仕様データ)を、プログラム編集部6に出力したり、仕様記述ファイル30に書き込まれるように出力したり込んだりする。
 プログラム部品保持部11は、プログラム編集部6がプログラムを生成する際に使用する、ラダー部品などのプログラム部品10を予め保持している。このプログラム部品10は、実施の形態1~3のいずれかにおいて定義されたものであってもよく、それら以外の従来の方式で定義されたものであってもよい。本実施の形態に係るプログラム部品保持部11は、プログラム部品10として、モード反転処理プログラム部品10A、自己保持処理プログラム部品10B、数値設定処理プログラム部品10C、Mコードデコード処理プログラム部品10D、AND条件処理プログラム部品10E、Mコード完了処理プログラム部品10Fを保持している。
 図35は、デバイス仕様保持部32が保持している、モーション制御入出力に関するデバイスアドレスの仕様を示す図である。デバイス仕様保持部32は、CNC工作機械46で使用されるラダープログラムに関連する仕様として、図35に示されるようなデバイスの仕様を保持する。具体的には、デバイス仕様保持部32は、どのようなモーション制御入出力であるかを特定する名称と、その入出力が割り付けられたデバイスアドレスとを関連付けたテーブルを保持している。以上のようなCNC工作機械46のラダープログラムの作成に関するデバイスアドレスの仕様は、例えば、非特許文献3に開示されている(非特許文献3:PLCインターフェース説明書IB-1500000、インターネット<URL:http://wwwf2.mitsubishielectric.co.jp/melfansweb/index_j.htm>)。
 プログラム編集部6は、仕様設定部31からの仕様を受け取ったり、仕様記述ファイル30に保存された仕様を読み取ったりすることにより、操作盤56及びMコード50の仕様を取得する。本実施の形態においては、このプログラム編集部6はプログラム生成部34を備えている。このプログラム生成部34は、仕様記述ファイル30に記述されている操作盤56及びMコード50の仕様のそれぞれ、及び、仕様設定部31で設定された操作盤56及びMコード50の仕様のそれぞれを、プログラム部品保持部11に保持されているプログラム部品10の再利用パラメータ22に適用しつつ、当該プログラム部品10からプログラムを作成する。なお、本実施の形態に係るプログラム生成部34は、プログラム部品10からプログラムを作成する際に、デバイス仕様保持部32に保持されているデバイスの仕様を参照する。
 本実施の形態では、このプログラム生成部34は、操作盤処理プログラム生成部341と、Mコード処理プログラム生成部342とを有しており、機能仕様ごとにプログラムを生成する手段を有している。次に、操作盤処理プログラム生成部341及びMコード処理プログラム生成部342について説明する。
 操作盤処理プログラム生成部341は、仕様記述ファイル30に記述されている操作盤56の仕様、及び、仕様設定部31で設定された操作盤56の仕様を、プログラム部品保持部11に保持されているプログラム部品10の再利用パラメータ22に適用しつつ、当該プログラム部品10から上記操作盤処理プログラムを生成する。
 本実施の形態において、操作盤処理プログラム生成部341は、モード反転機能生成部341A、運転モード選択機能生成部341B、及び、切削オーバライド機能生成部341C(以下、これらをまとめて「機能生成部341A~341C」と記すこともある)を備えており、機能生成部341A~341Cのそれぞれが、操作盤56において互いに異なる制御を行うための操作盤処理プログラムを生成する。具体的には、モード反転機能生成部341Aは、操作盤56においてモード反転制御を行うための操作盤処理プログラムを生成し、運転モード選択機能生成部341Bは、操作盤56において運転モード選択制御を行うための操作盤処理プログラムを生成し、切削オーバライド機能生成部341Cは、操作盤56において切削オーバライド制御を行うための操作盤処理プログラムを生成する。
 Mコード処理プログラム生成部342は、仕様記述ファイル30に記述されているMコード50の仕様、及び、仕様設定部31で設定されたMコード50の仕様を、プログラム部品保持部11に保持されているプログラム部品10の再利用パラメータ22に適用しつつ、当該プログラム部品10から上記のMコード処理プログラムを生成する。本実施の形態において、Mコード処理プログラム生成部342は、Mコード機能生成部342Aを備えており、Mコード機能生成部342Aが、Mコード処理プログラムを生成する。
 プログラム編集部6は、生成した操作盤処理プログラム及びMコード処理プログラムを編集後のプログラム8として出力するとともに、必要に応じてそれに関連する付属情報ファイル9を出力する。例えば、編集後のプログラム8がラダープログラムである場合には、実施の形態1で説明したように、そのラダープログラムに用いる各デバイスの内容を説明するコメントを、付属情報ファイル9として出力する。
 <操作盤仕様設定部31Aにおける仕様の設定>
 次に、仕様設定部31の操作盤仕様設定部31Aによって操作盤56の仕様が設定される例について説明する。
 図36は、トグル型でないスイッチ、例えば、押しボタンスイッチが並んだ操作盤56を有するCNC工作機械46において、当該操作盤56における各スイッチの仕様を設定するための画面(以下「操作盤仕様設定画面」)の一例を示す図である。この図36に示される操作盤仕様設定画面上においては、複数のスイッチが行列状に並べられて表示されており、いずれか1つのスイッチが使用者によりマウスを用いてダブルクリック(選択)されると、当該スイッチに対応するスイッチ仕様設定画面が表示される。
 図37は、図36において「運転メモリ」と記されたスイッチが選択された場合に表示されるスイッチ仕様設定画面を示す図である。このスイッチ仕様設定画面では、図36において選択された1つのスイッチに対して、スイッチ種別、スイッチ動作、スイッチ入力が設定される。ここで、図36に示されるスイッチを画定する枠内に表示される文字列は、図37に示される、スイッチ種別において設定された文字列の先頭部分と、スイッチ動作において設定された文字列とを組み合わせたものとしている。例えば、図37に示されるように、スイッチ種別において「運転モード選択」が設定され、スイッチ動作において「メモリ」が設定されている場合には、「運転モード選択」という文字列の先頭部分「運転」と、「メモリ」とを組み合わせた「運転メモリ」が図36に示されるようにスイッチの枠内に表示される。なお、図36において、文字列が付与されていないスイッチ(図36では右上のスイッチ)は、図37において、スイッチ種別及びスイッチ動作が設定されていないことを示している。
 図37に示されるスイッチ仕様設定画面における設定は、まず、スイッチ種別の設定が行われ、その後にスイッチ動作の設定が行われる。
 スイッチ種別という文字列の横には、ドロップダウンリストまたはコンボボックス(以下、「ドロップダウンリスト等」と記す)が設けられており、これに表示される一覧から所望のスイッチ種別がユーザにより1つ選択されることにより、スイッチ種別が設定される。ドロップダウンリスト等に表示される一覧には、CNC工作機械46の操作盤56に必要なスイッチの種別が表示される。本実施の形態では、操作盤仕様設定部31Aは、操作盤処理プログラム生成部341が生成可能な操作盤処理プログラムの種別、つまり、操作盤処理プログラム生成部341が備える機能生成部341A~341Cの機能の名称(「モード反転」、「運転モード選択」、「切削オーバライド」)を上記一覧に表示する。そして、これらのうちの一つがスイッチ種別としてユーザにより設定されることになる。
 スイッチ動作という文字列の横には、ドロップダウンリスト等が設けられ、これに表示される一覧から所望のスイッチ動作が、スイッチ動作が設定される。具体的には、先に選択されたスイッチ種別に応じたスイッチ動作が一覧に表示され、そのうちの一つが設定される。これにより、操作盤処理プログラム生成部341が生成可能な操作盤処理プログラムに対して、スイッチ種別に応じたスイッチ動作が設定されることになる。
 本実施の形態では、スイッチ種別において「モード反転」が設定されると、スイッチ動作のドロップダウンリスト等には、モード反転のスイッチ動作として「シングルブロック」、「ドライラン」が表示され、これらのうちの一つが設定される。スイッチ種別において「運転モード選択」が設定されると、スイッチ動作のドロップダウンリスト等には、運転モード選択のスイッチ動作として「ジョグ」、「ハンドル」、「メモリ」が表示され、これらのうちの一つが設定される。スイッチ種別において「切削オーバライド」が設定されると、切削オーバライドが%値で表される場合には、スイッチ動作のドロップダウンリスト等には、切削オーバライドのスイッチ動作として「25」、「50」、「75」、「100」が表示され、これらのうちの一つが設定される。
 スイッチ入力という文字列の横のボックスには、そのスイッチに割り当てられるPCの入力デバイスが設定される。もし、各スイッチが特定の入力デバイスに割り当てられていることが予め決まっているのであれば、そのデバイスのアドレスを表示し、アドレス設定が省略できるようにしてもよい。
 図38は、各スイッチの仕様を設定するための画面を、図36及び図37に示した表示形態とは別の表示形態で表示した図である。上述で説明したのと同様に、「モード反転」に対しては「シングルブロック」、「ドライラン」がスイッチ動作の欄にて設定され、「運転モード選択」に対しては「ジョグ」、「ハンドル」、「メモリ」がスイッチ動作の欄にて設定され、「切削オーバライド」に対しては「25」、「50」、「75」、「100」がスイッチ動作の欄にて表示されている。
 <Mコード仕様設定部31Bにおける仕様の設定>
 次に、仕様設定部31のMコード仕様設定部31BによってMコード50の仕様が設定される例について説明する。
 図39は、CNC工作機械46が備えるMコード50の機能仕様を設定するための画面の一例を示す図である。Mコードの欄にはMコード番号が設定され、機能名の欄にはそのMコード50の簡単な説明が設定される。
 機能開始の欄には、「ブロック開始と同時」、「ブロック軸移動完了後」がドロップダウンリスト等により選択的に表示され、そのうちの1つが設定される。ここで、「ブロック開始と同時」は、そのMコード50が軸移動と同一ブロックで指令されている場合に、当該ブロックで指令された軸移動の開始と同時に当該Mコード50の機能を実行開始することを意味する。「ブロック軸移動完了後」は、そのMコード50が軸移動と同一ブロックで指令されている場合に、当該ブロックで指令された軸移動の完了後に当該Mコード50の機能を実行開始することを意味する。
 機能キャンセルの欄には、そのMコード50の機能が割り当てられたブロック内だけで有効である場合には何も設定されない。しかし、当該Mコード50の機能が割り当てられたブロックを過ぎても、当該Mコード50の機能を他のMコード50によってキャンセルまたは変更されるまで有効となるようにしたい場合には、機能キャンセルの欄に当該他のMコード50が列挙されて設定される。この機能キャンセルの欄には、Mコードの欄で設定されたMコード番号と異なるMコード番号が設定される。例えば、Mコードの欄で「M3」が設定された場合には、機能キャンセルの欄には、M3以外のMコード番号が設定され、Mコードの欄で「M4」が設定された場合には、機能キャンセルの欄には、M4以外のMコード番号が設定される。
 機能出力の欄には、そのMコード50の機能出力先である、出力デバイスであるYデバイスや内部デバイスであるMデバイスなどのデバイスのアドレスが設定される。当該Mコード50において機能出力する必要が無い場合には、この欄には何も設定されない。
 機能完了の欄には、そのMコード50の機能完了の条件となる、入力デバイスであるXデバイスや内部デバイスであるMデバイスなどのデバイスのアドレスが設定される。そのMコード50の機能出力と同時に機能完了する場合には、この欄には何も設定されない。
 次に、図39に示された表の行ごとに設定された各Mコード50についてそれぞれ具体的に説明する。
 M03(M3)というMコード50は、主軸正転を行うMコード機能であり、軸移動と同一ブロックで指令されている場合には、そのブロックで指令された軸移動の開始と同時にMコード50の機能(主軸正転)を開始する。主軸正転の機能は、逆転や停止が指令されるまで継続されるので、主軸逆転の機能を行うM4のMコード50、及び、主軸停止の機能を行うM5のMコード50が、M3のMコード機能をキャンセルする他のMコード50として機能キャンセルの欄に設定されている。なお、図39に示される仕様においては、主軸を正転させるための出力デバイスであるY1898が、機能出力先デバイスとして機能出力の欄に設定されている。また、主軸が所定の回転速度に到達すればM3の機能が完了するという仕様では、主軸が当該所定の回転速度に到達した場合に当該到達を示す入力デバイスであるX188Dが、機能完了条件デバイスとして機能完了の欄に設定される。
 M04(M4)というMコード50は、主軸逆転を行うMコード機能であり、軸移動と同一ブロックで指令されている場合には、そのブロックで指令された軸移動の開始と同時にMコード50の機能(主軸逆転)を開始する。主軸逆転の機能は、正転や停止が指令されるまで継続されるので、主軸正転の機能を行うM3のMコード50、及び、主軸停止の機能を行うM5のMコード50が、M4のMコード機能をキャンセルする他のMコード50として機能キャンセルの欄に設定されている。なお、図39に示される仕様においては、主軸を逆転させるための出力デバイスであるY1899が、機能出力先デバイスとして機能出力の欄に設定されている。また、主軸が所定の回転速度に到達すればM4の機能が完了するという仕様では、主軸が当該所定の回転速度に到達した場合に当該到達を示す入力デバイスであるX188Dが、機能完了条件デバイスとして機能完了の欄に設定される。
 M05(M5)というMコード50は、主軸停止を行うMコード機能であり、軸移動と同一ブロックで指令されている場合には、そのブロックで指令された軸移動の開始と同時にMコード50の機能(主軸停止)を開始する。主軸停止の機能は、他のMコード機能をキャンセルするものであるが、他のMコード50からキャンセルされるものではないから、機能キャンセルの欄には何も設定されない。また、主軸停止の機能は動作を停止するものであるから、機能出力の欄にも何も設定されない。なお、この図においては、主軸の回転速度がゼロになった場合にそのことを示す入力デバイスであるX188Cが、機能完了条件デバイスとして機能完了の欄に設定されている。
 M30は、エンドオブデータの処理を行なうMコード機能であり、軸移動と同一ブロックで指令されている場合には、そのブロックで指令された軸移動の開始と同時にMコード50の機能(エンドオブデータの処理)を開始する。エンドオブデータの処理の機能は、CNC工作機械46をリセットするものである。したがって、エンドオブデータの処理の機能は、他のMコード50からキャンセルされるものではないので機能キャンセルは設定されない。なお、この図においては、CNC工作機械46をリセットするデバイスであるYC1Aが、機能出力先デバイスとして機能出力の欄に設定されている。M30は、機能出力と同時に機能完了する。
 <プログラム部品>
 次に、操作盤処理プログラム生成部341が操作盤処理プログラムをはじめとするプログラムを生成する際に再利用し、Mコード処理プログラム生成部342がMコード処理プログラムをはじめとするプログラムを生成する際に再利用するプログラム部品10について説明する。
 図34に示したように、このプログラム部品10として、モード反転処理プログラム部品10A、…、Mコード完了処理プログラム部品10Fが、プログラム部品保持部11において保持されている。このうち、自己保持処理プログラム部品10B及びMコード完了処理プログラム部品10Fについては、実施の形態1及び実施の形態2において説明したので、これらの説明については省略する。以下、モード反転処理プログラム部品10A、数値設定処理プログラム部品10C、Mコードデコード処理プログラム部品10D、AND条件処理プログラム部品10Eについて主に説明する。なお、数値設定処理プログラム部品10Cについては実施の形態3で詳細に説明したので、ここでは簡単に説明する。
 図40は、モード反転の機能を処理するプログラムを部品化したモード反転処理プログラム部品10Aを示す図である。図40に示されるモード反転処理プログラム部品10Aの再利用パラメータにデバイスまたは変数(ラベル)が指定されるだけで、当該パラメータに基づいて、モード反転の機能を処理するプログラム(プログラム部品POU)が自動的に生成される。
 次に、図40に示されるモード反転処理プログラム部品10Aの再利用パラメータにデバイス等が指定されたと仮定して、モード反転処理ラダープログラムの動作について説明する。初期状態では、VB1、VB2、VB3のいずれもOFF状態となっている。モード反転を指令するデバイスであるVB1がONされると、PLS命令によりPCの1スキャン分だけVB2がONし、VB2のONを受けてVB3が反転、すなわちONとなる。PCの次のスキャンでPLS命令によりVB2はOFFされるが、VB3のONは保持される。時間を空けてVB1をOFFしても、VB3のONは保持される。さらに時間を空けてVB1を再度ONすると、PLS命令によりPCの1スキャン分だけVB2がONし、VB2のONを受けてVB3が反転、すなわちOFFとなる。PCの次のスキャンでPLS命令によりVB2はOFFされるが、VB3のOFFは保持される。時間を空けてVB1をOFFしても、VB3のOFFは保持される。
 次に、図27に示される数値設定処理プログラム部品10Cの再利用パラメータにデバイス等が指定されたと仮定して、数値設定の機能を処理する数値設定処理ラダープログラムの動作について説明する。初期状態ではVB1はOFF状態となっており、VD3に数値を設定する処理が行われないので、VD3の数値は初期値(すなわちゼロ)となっている。数値設定を指令するデバイスであるVB1をONすれば、MOV命令によりVK2に適用された数値が、VD3に設定される。時間を空けてVB1をOFFしても、VD3の数値は保持されるが、ラダープログラムの他の箇所でVD3への数値設定が行われた場合にはその限りではない。他の箇所でVD3への数値設定が行われても、VD3がVK2の数値に保持されることを望む場合には、VB1を常にON状態に保持しておけばよい。
 図41は、Mコード50のデコードの機能を処理するプログラムを部品化したMコードデコード処理プログラム部品10Dを示す図である。図41に示されるMコードでコード処理プログラム部品10Dの再利用パラメータにデバイスまたは変数(ラベル)が指定されるだけで、当該パラメータに基づいて、Mコード50のデコードの機能を処理するプログラム(プログラム部品POU)が自動的に生成される。
 次に、図41に示されるMコードデコード処理プログラム部品10Dの再利用パラメータにデバイス等が指定されたと仮定して、Mコードデコード処理ラダープログラムの動作について説明する。初期状態では、VB1、VB4はいずれもOFF状態となっている。VB1がONとなり、かつ、VD2の値とVK3の値が同じであれば、VB4がONとなる。VB1がOFFとなるか、または、VD2の値とVK3の値とが異なれば、VB4がOFFとなる。
 図42は、AND条件を処理するプログラムを部品化したAND条件処理プログラム部品10Eを示す図である。図42に示されるAND条件処理プログラム部品10Eの再利用パラメータにデバイスまたは変数(ラベル)が指定されるだけで、当該パラメータに基づいて、AND条件を処理するプログラム(プログラム部品POU)が自動定期に生成される。このAND条件処理は、ラダーでは非常に一般的であり、よく使われるものであるので詳細な説明は省略する。
 <操作盤処理プログラムの生成>
 次に、図34に示された操作盤処理プログラム生成部341(モード反転機能生成部341A等)が、図35に示されたデバイスの仕様、及び、図38に示された操作盤56の仕様を、プログラム部品10の再利用パラメータに適用しつつ、当該プログラム部品10から操作盤処理プログラムを生成する動作について説明する。
 図43は、モード反転機能生成部341Aが生成した操作盤処理プログラムの一例を示す図である。以下では、モード反転機能生成部341Aが、デバイスの仕様(図35)、及び、「モード反転」に関する操作盤56の仕様(図38)を、図40に示したモード反転処理プログラム部品10Aの再利用パラメータに適用して、当該モード反転処理プログラム部品10Aから、図43に示されるモード反転制御を行うための操作盤処理プログラムを生成する動作について説明する。なお、以下、モード反転機能生成部341Aが生成する、モード反転制御を行うための操作盤処理プログラムを、「モード反転スイッチ処理プログラム」と呼ぶこともある。
 図44は、モード反転機能生成部341Aの属性を示したものである。図44に係るスイッチ種別及びスイッチ動作には、操作盤56の仕様(図38)のうちモード反転に関する内容が表示されている。ここでは、「モード反転」というスイッチ種別には、「シングルブロック」及び「ドライラン」というスイッチ動作が操作盤56の仕様において設定されたことが表示されている。そして、図44に係る使用部品には、モード反転機能生成部341Aにより使用されるプログラム部品10が、モード反転処理プログラム部品10Aであることが表示されている。
 図45は、モード反転機能生成部341Aがモード反転スイッチ処理プログラムを生成する際の動作を示すフローチャートである。以下、この動作を図45に即して説明する。
 ステップS91にて、モード反転機能生成部341Aは、操作盤56の仕様(図38)でのスイッチ入力に設定されているデバイスアドレスを、図40に示したモード反転処理プログラム部品10Aの再利用パラメータNo.1(ここではVB1)に適用する。例えば、モード反転機能生成部341Aは、操作盤56の仕様(図38)から「モード反転」と設定された行を上から順に読み取る(ここでは1行目の「シングルブロック」を読み取る)。そして、モード反転機能生成部341Aは、「シングルブロック」のスイッチ入力に設定されているデバイスアドレス(ここではX280)を、図40に示したモード反転処理プログラム部品10Aの再利用パラメータNo.1(VB1)に適用する。これにより、図43に示されるモード反転スイッチ処理プログラムの1段目の左部分が生成される。
 ステップS92にて、モード反転機能生成部341Aは、操作盤56の仕様やMコード50の仕様で設定されない内部のローカル的な1つのデバイスアドレス(すなわち、重複して使用されない任意のデバイスアドレス)を、図40に示したモード反転処理プログラム部品10Aの再利用パラメータNo.2(ここではVB2)に適用する。例えば、モード反転機能生成部341Aは、M4000を、操作盤56の仕様やMコード50の仕様で設定されないデバイスアドレスとして、図40に示したモード反転処理プログラム部品10Aの再利用パラメータNo.2(VB2)に適用する。なお、M4000番台のデバイスアドレスは、操作盤56の仕様やMコード50の仕様で設定されないデバイスアドレスであるものとする。このようなプログラム生成部34が自動的に割り付けるデバイスアドレスは、デバイス仕様保持部32に保持しておいて、デバイス仕様保持部32を参照するようにしてもよい。これにより、図43に示されるモード反転スイッチ処理プログラムの1段目の右部分、及び、2~3段目の左部分が生成される。
 ステップS93にて、モード反転機能生成部341Aは、デバイスの仕様(図35)から、操作盤56の仕様(図38)におけるスイッチ動作の欄の内容に対応するデバイスアドレスを抽出し、当該デバイスアドレスを、図40に示したモード反転処理プログラム部品10Aの再利用パラメータNo.3(ここではVB3)に適用する。例えば、図38に示される操作盤56の仕様においては、スイッチ動作の欄に「シングルブロック」が設定されているから、モード反転機能生成部341Aは、図35に示されるデバイスの仕様から、「シングルブロック」に対応するデバイスアドレス(ここではYC12)を抽出し、YC12を、図40に示したモード反転処理プログラム部品10Aの再利用パラメータNo.3(VB3)という再利用パラメータに適用する。これにより、図43に示されるモード反転スイッチ処理プログラムの2段目の中央部分、右部分、及び、3段目の右部分が生成される。
 さて、以上のステップS91~S93の説明では、モード反転機能生成部341Aが、デバイスの仕様(図35)及び操作盤56の仕様(図38)を、モード反転処理プログラム部品10Aの再利用パラメータVB1~VB3に適用する動作について説明した。本実施の形態に係るモード反転機能生成部341Aは、この動作と並行して、同ステップS91~S93においてデバイスコメントの出力も行う。
 具体的には、ステップS91にて、モード反転機能生成部341Aは、操作盤56の仕様(図38)のスイッチ種別の文字列とスイッチ動作の文字列とを合わせた文字列を、ステップS91に係るデバイスアドレスのデバイスコメントとして付属情報ファイル9に出力する。同様に、ステップS92にて、モード反転機能生成部341Aは、操作盤56の仕様のスイッチ種別の文字列とスイッチ動作の文字列とを合わせた文字列を、ステップS92に係るデバイスアドレスのデバイスコメントとして付属情報ファイル9に出力する。ステップS93にて、モード反転機能生成部341Aは、デバイスの仕様(図35)において、ステップS93のデバイスアドレスに対応する名称の文字列を、当該デバイスアドレスのデバイスコメントとして付属情報ファイル9に出力する。これらにより得られたデバイスコメントの一覧を図46に示す。
 以上のステップS91~S93の後、ステップS94にて、モード反転機能生成部341Aは、図40に示されるプログラムコメントが必要とされている場合には、スイッチ種別の文字列と、スイッチ動作の文字列とを組み合わせて得られる文字列を、当該プログラムコメントとして適用する。例えば、モード反転機能生成部341Aは、スイッチ種別が「モード反転」という文字列、スイッチ動作が「シングルブロック」という文字列である場合には、「モード反転シングルブロック」という文字列をプログラムコメントとして作成し、ステップS91~S93で作成したプログラムの前後に付与する。その結果、図43においては、当該プログラムの前に「開始モード反転シングルブロック」という文字列が付与され、当該プログラムの後に「終了モード反転シングルブロック」という文字列が付与されている。
 ステップS95にて、モード反転機能生成部341Aは、図40に示されるジャンプ用ラベルが必要とされている場合には、他のプログラムに使用されていないプログラムポインタを選定し、選定したプログラムポインタを当該ジャンプ用ラベルとして適用する。
 モード反転機能生成部341Aは、以上のステップS91~S95の動作を、操作盤56の仕様(図38)のうち「モード反転」に関する全てのスイッチ動作に対して行う。例えば、図38に示される操作盤56の仕様では、1行目の「シングルブロック」以外に、2行目の「ドライラン」がモード反転のスイッチ動作として設定されているから、「ドライラン」についてもステップS91~S95の動作が行われる。これにより、図43に示されるモード反転スイッチ処理プログラムの「開始モード反転ドライラン」から「終了モード反転ドライラン」までの部分が生成される。なお、図43に示される例では、M4000と重複しないM4001というデバイスアドレスが、「ドライラン」において適用されている。
 ステップS96にて、モード反転機能生成部341Aは、以上のパラメータの適用がされたモード反転処理プログラム部品10Aを、モード反転スイッチ処理プログラムとする。これにより、図38に示される操作盤56の仕様からは、図43に示されるモード反転スイッチ処理プログラムが生成される。
 図47は、運転モード選択機能生成部341Bが生成した操作盤処理プログラムの一例を示す図である。次に、運転モード選択機能生成部341Bが、デバイスの仕様(図35)、及び、「運転モード選択」に関する操作盤56の仕様(図38)を、図3に示した自己保持処理プログラム部品10Bの再利用パラメータに適用して、当該自己保持処理プログラム部品10Bから、図47に示される運転モード選択制御を行うための操作盤処理プログラムを生成する動作について説明する。なお、以下、運転モード選択機能生成部341Bが生成する、運転モード選択制御を行うための操作盤処理プログラムを、「運転モード選択スイッチ処理プログラム」と呼ぶこともある。また、運転モード選択機能生成部341Bは、運転モード選択スイッチ処理プログラムを生成する際に、モード反転機能生成部341Aと同様に、デバイスコメント、プログラムコメント及びジャンプ用ラベルを設定するが、これについての説明及びその結果は省略する。
 図48は、運転モード選択機能生成部341Bの属性を示したものである。図48に係るスイッチ種別及びスイッチ動作には、操作盤56の仕様(図38)のうち運転モード選択に関する内容が表示されている。ここでは、「運転モード選択」というスイッチ種別には、「ジョグ」、「ハンドル」及び「メモリ」というスイッチ動作が操作盤56の仕様において設定されたことが表示されている。そして、図48に係る使用部品には、運転モード選択機能生成部341Bにより使用されるプログラム部品10が、自己保持処理プログラム部品10Bであることが表示されている。
 図49は、運転モード選択機能生成部341Bが運転モード選択スイッチ処理プログラムを生成する際の動作を示すフローチャートである。以下、この動作を図49に即して説明する。
 ステップS101にて、運転モード選択機能生成部341Bは、操作盤56の仕様(図38)でのスイッチ入力に設定されているデバイスアドレスを、図3に示した自己保持処理プログラム部品10Bの再利用パラメータNo.1(ここではVB1)に適用する。例えば、運転モード選択機能生成部341Bは、操作盤56の仕様(図38)から「運転モード選択」と設定された行を上から順に読み取る(ここでは3行目の「ジョグ」を読み取る)。そして、運転モード選択機能生成部341Bは、「ジョグ」のスイッチ入力に設定されているデバイスアドレス(ここではX282)を、図3に示した自己保持処理プログラム部品10Bの再利用パラメータNo.1(VB1)に適用する。これにより、図47に示される運転モード選択スイッチ処理プログラムの1段目の左部分が生成される。
 さて、「運転モード選択」というスイッチでは、1つのスイッチ動作が操作盤56から指令されると、それまで指令されていた運転モードをキャンセルして、指令された1つのスイッチ動作の運転モードが行われる。例えば、スイッチ動作「ジョグ」が操作盤56から指令されると、それまで指令されていた「ハンドル」及び「メモリ」の運転モードをキャンセルして、「ジョグ」の運転モードが行われる。スイッチ動作「ハンドル」が操作盤56から指令されると、それまで指令されていた「ジョグ」及び「メモリ」の運転モードをキャンセルして、「ハンドル」の運転モードが行われる。スイッチ動作「メモリ」についてもこれらと同様に「メモリ」の運転モードが行われる。
 そこで、ステップS102にて、運転モード選択機能生成部341Bは、運転選択モードのスイッチ動作のうち、ステップS101に係るスイッチ動作以外のスイッチ動作に関し、スイッチ入力に設定されているデバイスアドレスを、図3に示した自己保持処理プログラム部品10Bの再利用パラメータNo.2(ここではVB2)に列挙して適用する。例えば、ステップS101に係るスイッチ動作が「ジョグ」である場合には、運転モード選択機能生成部341Bは、図38において「ハンドル」及び「メモリ」に関し、スイッチ入力に設定されているデバイスアドレス(ここではX283及びX284)を、図3に示した自己保持処理プログラム部品10Bの再利用パラメータNo.2(VB2)に列挙して適用する。これにより、図47に示される運転モード選択スイッチ処理プログラムの1段目の中央部分が生成される。
 ステップS103にて、運転モード選択機能生成部341Bは、デバイスの仕様(図35)から、操作盤56の仕様(図38)におけるスイッチ動作の欄の内容に対応するデバイスアドレスを抽出し、当該デバイスアドレスを、図3に示した自己保持処理プログラム部品10Bの再利用パラメータNo.3(ここではVB3)に適用する。例えば、図38に示される操作盤56の仕様においては、スイッチ動作の欄に「ジョグ」が設定されているから、運転モード選択機能生成部341Bは、図35に示されるデバイスの仕様から、「ジョグ」に対応するデバイスアドレス(ここではYC00)を抽出し、YC00を、図3に示した自己保持処理プログラム部品10Bの再利用パラメータNo.3(VB3)に適用する。これにより、図47に示される運転モード選択スイッチ処理プログラムの1段目の右部分、及び、2段目が生成される。
 運転モード選択機能生成部341Bは、以上のステップS101~S103の動作を、操作盤56の仕様(図38)のうち「運転モード選択」に関する全てのスイッチ動作に対して行う。例えば、図38に示される操作盤56の仕様では、3行目の「ジョグ」以外に、4行目の「ハンドル」及び5行目の「メモリ」が運転モード選択のスイッチ動作として設定されているから、「ハンドル」及び「メモリ」のそれぞれについてもステップS101~S103の動作が行われる。これにより、図47に示される運転モード選択スイッチ処理プログラムの3段目~6段目が生成される。
 ステップS104にて、運転モード選択機能生成部341Bは、以上のパラメータの適用がされた自己保持処理プログラム部品10Bを、運転モード選択スイッチ処理プログラムとする。これにより、図38に示される操作盤56の仕様からは、図47に示される運転モード選択スイッチ処理プログラムが生成される。
 先に説明された図29は、切削オーバライド機能生成部341Cが生成した操作盤処理プログラムの一例を示す図である。次に、切削オーバライド機能生成部341Cが、デバイスの仕様(図35)、及び、「切削オーバライド」に関する操作盤56の仕様(図38)を、自己保持処理プログラム部品10B(図3)及び数値設定処理プログラム部品10C(図27)の再利用パラメータに起用して、当該自己保持処理プログラム部品10B及び数値設定処理プログラム部品10Cから、図29に示される切削オーバライド制御を行うための操作盤処理プログラムを生成する動作について説明する。なお、以下、切削オーバライド機能生成部341Cが生成する、切削オーバライド制御を行うための操作盤処理プログラムを、「オーバライドスイッチ処理プログラム」と呼ぶこともある。また、切削オーバライド機能生成部341Cは、オーバライドスイッチ処理プログラムを生成する際に、モード反転機能生成部341Aと同様に、デバイスコメント、プログラムコメント及びジャンプ用ラベルを設定するが、これについての説明及びその結果は省略する。
 図50は、切削オーバラード機能生成部341Cの属性を示したものである。図50に係るスイッチ種別及びスイッチ動作には、操作盤56の仕様(図38)のうち切削オーバライドに関する内容が表示されている。ここでは、「切削オーバライド」というスイッチ種別には、「25」、「50」、「75」及び「100」というスイッチ動作が操作盤56の仕様において設定されたことが表示されている。そして、図50に係る使用部品には、切削オーバライド機能生成部341Cにより使用されるプログラム部品10が、自己保持処理プログラム部品10B及び数値設定処理プログラム部品10Cであることが表示されている。
 図51は、切削オーバライド機能生成部341Cが切削オーバライドスイッチ処理プログラムを生成する際の動作を示すフローチャートである。以下、この動作を図51に即して説明する。
 切削オーバライド機能生成部341Cは、ステップS111~S113において、図3に示した自己保持処理プログラム部品10Bから、切削オーバライドスイッチ処理プログラムを生成する。
 ステップS111にて、切削オーバライド機能生成部341Cは、操作盤56の仕様(図38)でのスイッチ入力に設定されているデバイスアドレスを、図3に示した自己保持処理プログラム部品10Bの再利用パラメータNo.1(ここではVB1)に適用する。例えば、切削オーバライド機能生成部341Cは、操作盤56の仕様(図38)から「切削オーバライド」と設定された行を上から順に読み取る(ここでは6行目の「25」を読み取る)。そして、切削オーバライド機能生成部341Cは、「25」のスイッチ入力に設定されているデバイスアドレス(ここではX285)を、図3に示した自己保持処理プログラム部品10Bの再利用パラメータNo.1(VB1)に適用する。これにより、図29に示される切削オーバライドスイッチ処理プログラムの1段目の左部分が生成される。
 さて、「切削オーバライド」というスイッチでは、1つのスイッチ動作が操作盤56から指令されると、それまで指令されていた運転モードをキャンセルして、指令された1つのスイッチ動作の運転モードが行われる。例えば、スイッチ動作「25」が操作盤56から指令されると、それまで指令されていた「50」、「75」及び「100」の運転モードをキャンセルして、「25」の運転モードが行われる。スイッチ動作「50」が操作盤56から指令されると、それまで指令されていた「25」、「75」及び「100」の運転モードをキャンセルして、「50」の運転モードが行われる。スイッチ動作「75」及び「100」についてもこれらと同様に「75」及び「100」の運転モードがそれぞれ行われる。
 そこで、ステップS112にて、切削オーバライド機能生成部341Cは、切削オーバライドのスイッチ動作のうち、ステップS111に係るスイッチ動作以外のスイッチ動作に関し、スイッチ入力に設定されているデバイスアドレスを、図3に示した自己保持処理プログラム部品10Bの再利用パラメータNo.2(ここではVB2)に列挙して適用する。例えば、ステップS111に係るスイッチ入力が「25」である場合には、切削オーバライド機能生成部341Cは、図38において「50」、「75」及び「100」に関し、スイッチ入力に設定されているデバイスアドレス(ここではX286~X288)を、図3に示した自己保持処理プログラム部品10Bの再利用パラメータ(VB2)に列挙して適用する。これにより、図29に示される切削オーバライドスイッチ処理プログラムの1段目の中央部分が生成される。
 ステップS113にて、切削オーバライド機能生成部341Cは、操作盤56の仕様やMコード50の仕様で設定されていない内部のローカル的な1つのデバイスアドレスを、図3に示した自己保持処理プログラム部品10Bの再利用パラメータNo.3(ここではVB3)に適用する。例えば、切削オーバライド機能生成部341Cは、M4002を、操作盤56の仕様やMコード50の仕様で設定されていないデバイスアドレスとして、図3に示した自己保持処理プログラム部品10Bの再利用パラメータNo.3(VB3)に適用する。これにより、図29に示される切削オーバライドスイッチ処理プログラムの1段目の右部分、及び、2段目が生成される。
 次に、切削オーバライド機能生成部341Cは、ステップS114~S116において、図27に示した数値設定処理プログラム部品10Cから、切削オーバライドスイッチ処理プログラムを生成する。
 ステップS114にて、切削オーバライド機能生成部341Cは、ステップS113にて自己保持処理プログラム部品10Bの再利用パラメータNo.3(VB3)に適用したデバイスアドレスを、図27に示した数値設定処理プログラム部品10Cの再利用パラメータNo.1(VB1)に適用する。例えば、切削オーバライド機能生成部341Cは、自己保持処理プログラム部品10Bの再利用パラメータNo.3(VB3)に適用したM4002を、図27に示した数値設定処理プログラム部品10Cの再利用パラメータNo.1(VB1)に適用する。これにより、自己保持処理プログラムの処理結果が数値設定処理プログラムで受けられる、図29で示される切削オーバライドスイッチ処理プログラムの3段目の左部分が生成される。
 ステップS115にて、切削オーバライド機能生成部341Cは、操作盤56の仕様(図38)でのスイッチ動作に設定されている数値の前に、「K」を加えたデバイスアドレスを、図27に示した数値設定処理プログラム部品10Cの再利用パラメータNo.2(ここではVK2)に適用する。例えば、切削オーバライド機能生成部341Cは、操作盤56の仕様(図38)における「25」というスイッチ動作に関し、K25というデバイスアドレスを、図27に示した数値設定処理プログラム部品10Cの再利用パラメータNo.2(VK2)に適用する。これにより、図29に示される切削オーバライドスイッチ処理プログラムの3段目の右部分が生成される。
 ステップS116にて、切削オーバライド機能生成部341Cは、デバイスの仕様(図35)から、操作盤56の仕様(図38)におけるスイッチ種別の欄の内容に対応するデバイスアドレスを抽出し、当該デバイスアドレスを、図27に示した数値設定処理プログラム部品10Cの再利用パラメータNo.3(ここではVD3)に適用する。例えば、図38に示される操作盤56の仕様においては、スイッチ種別の欄に「切削オーバライド」が設定されているから、切削オーバライド機能生成部341Cは、図35に示されるデバイスの仕様から、「切削オーバライド」に対応するデバイスアドレス(ここではR2500)を抽出し、R2500を、図27に示した数値設定処理プログラム部品10Cの再利用パラメータNo.3(VD3)に適用する。これにより、図29に示される切削オーバライドスイッチ処理プログラムの3段目の右部分が生成される。
 切削オーバライド機能生成部341Cは、以上のステップS111~S117の動作を、操作盤56の仕様(図38)のうち「切削オーバライド」に関する全てのスイッチ動作に対して行う。例えば、図38に示される操作盤56の仕様では、6行目の「25」以外に、7行目の「50」、8行目の「75」及び9行目の「100」がスイッチ動作として設定されているから、「50」、「75」及び「100」のそれぞれについてもステップS111~S116の動作が行われる。これにより、図29に示される切削オーバライドスイッチ処理プログラムの4段目~12段目が生成される。
 ステップS117にて、切削オーバライド機能生成部341Cは、以上のパラメータの適用がされた自己保持処理プログラム部品10B及び数値設定処理プログラム部品10Cを合わせて、切削オーバライドスイッチ処理プログラムとする。これにより、図38に示される操作盤56の仕様からは、図29に示される切削オーバライドスイッチ処理プログラムが生成される。
 以上、切削オーバライド機能生成部341Cが、切削オーバライドスイッチ処理プログラムを生成する動作について説明したが、これに限ったものではなく、切削オーバライド機能生成部341Cとして、実施の形態3で図25を用いて説明された排他的選択数値設定の処理を行うプログラム階層部品を用いてもよい。この場合には、切削オーバライド機能生成部341Cは、デバイスの仕様(図35)、及び、「切削オーバライド」と設定された操作盤56の仕様(図38)に基づいて、図28に示した再利用パラメータの適用関係を生成する。
 具体的には、切削オーバライド機能生成部341Cは、操作盤56の仕様(図38)から、「切削オーバライド」というスイッチ種別が設定された6行目において、スイッチ入力に設定されているデバイスアドレス(X285)を、図28に示されるようにプログラム階層部品のパラメータNo.1に適用し、スイッチ動作に設定されている数値「25」をプログラム階層部品のパラメータNo.2に適用する。そして、切削オーバライド機能生成部341Cは、M4000番台のデバイスアドレス(M4002)を、プログラム階層部品のパラメータNo.3に適用し、デバイスの仕様(図35)からスイッチ種別「切削オーバライド」に対応するデバイスアドレス(R2500)を抽出して、R2500をプログラム階層部品のパラメータNo.4に適用する。
 同様に、切削オーバライド機能生成部341Cは、操作盤56の仕様(図38)から、「切削オーバライド」というスイッチ種別が設定された7行目において、スイッチ入力に設定されているデバイスアドレス(X286)を、プログラム階層部品のパラメータNo.1に適用し、スイッチ動作に設定されている数値「50」をプログラム階層部品のパラメータNo.2に適用する。そして、切削オーバライド機能生成部341Cは、M4000番台のデバイスアドレス(M4003)を、プログラム階層部品のパラメータNo.3に適用する。切削オーバライド機能生成部341Cは、操作盤56の仕様(図38)の8行目及び9行目についても同様の処理を行うことにより、図28に示した再利用パラメータの適用関係を生成する。それから、切削オーバライド機能生成部341Cは、実施の形態3で説明した動作と同じ動作を行うことにより、図29に示した切削オーバライドスイッチ処理プログラムを生成してもよい。
 <Mコード処理プログラムの生成>
 以上、図34に示される操作盤処理プログラム生成部341が、操作盤処理プログラムを生成する動作について説明した。次に、図34に示されるMコード処理プログラム生成部342、つまり、Mコード機能生成部342Aが、デバイスの仕様(図35)、及び、図39に示されるMコード50の仕様を、プログラム部品10の再利用パラメータに適用しつつ、当該プログラム部品から、Mコード処理プログラムを生成する動作について説明する。
 図52は、以下において、Mコード機能生成部342Aが生成したMコード処理プログラムの一例を示す図である。図52に示されるMコード処理プログラムは、Mコード50のデコード処理プログラムLPAと、Mコード50の機能処理プログラムLPB,LPC,LPDと、Mコード50の完了処理プログラムLPEとから構成されている。
 図53は、Mコード機能生成部342Aの属性を示したものである。図53に係る使用部品には、Mコード機能生成部342Aに使用されるプログラム部品10が、Mコードデコード処理プログラム部品10D、自己保持処理プログラム部品10B、AND条件処理プログラム部品10E、Mコード完了処理プログラム部品10Fであることが表示されている。
 図54は、Mコード機能生成部342Aが、デコード処理プログラムを生成する動作を示すフローチャートである。以下、この動作を図54に即して説明する。
 本実施の形態においては、ステップS121にて、Mコード機能生成部342Aは、図41に示したMコードデコード処理プログラム部品10Dを用いて、図52に示されるMコード50のデコード処理プログラムLPAを生成する。ステップS122にて、Mコード機能生成部342Aは、図3に示した自己保持処理プログラム部品10B、及び、図42に示したAND条件処理プログラム部品10Eを用いて、図52に示される各Mコード50の機能処理プログラムLPB,LPC,LPDを生成する。ステップS123にて、Mコード機能生成部342Aは、図18に示したMコード完了処理プログラム部品10Fを用いて、図52に示されるMコード50の完了処理プログラムLPEを生成する。ステップS124にて、Mコード機能生成部342Aは、ステップS121~S123で生成したプログラムを合わせて、図52に示されるMコード処理プログラムを生成する。
 以下、Mコード機能生成部342Aが、Mコード50のデコード処理プログラムLPA、機能処理プログラムLPB,LPC,LPD、及び、完了処理プログラムLPEを生成する動作について詳細に説明する。まず、Mコード機能生成部342Aが、Mコード50のデコード処理プログラムLPAを生成する動作について説明する。
 図55は、Mコード機能生成部342Aが、図41に示したMコードデコード処理プログラム部品10Dを用いて、Mコード50のデコード処理プログラムLPAを生成する動作を示すフローチャートである。本実施の形態では、Mコード機能生成部342Aは、Mコード50の仕様(図39)の各行の設定に対して、上から順に、図55に示される各処理を行う。ここでは、まず、Mコード機能生成部342Aが、Mコード50の仕様(図39)のM3の設定に対して処理を行うことにより、図52に示されるデコード処理プログラムLPAの1段目を生成する動作について説明する。
 ステップS131にて、Mコード機能生成部342Aは、デバイスの仕様(図35)から、Mコードストローブに対応するデバイスアドレス(ここではXC60)を抽出し、当該デバイスアドレスを、図41に示したMコードデコード処理プログラム部品10Dの再利用パラメータNo.1(ここではVB1)に適用する。
 ステップS132にて、Mコード機能生成部342Aは、デバイスの仕様(図35)から、Mコードデータに対応するデバイスアドレス(ここではR504)を抽出し、当該デバイスアドレスを、図41に示したMコードデコード処理プログラム部品10Dの再利用パラメータNo.2(ここではVD2)に適用する。
 ステップS133にて、Mコード機能生成部342Aは、Mコード50の仕様(図39)から、Mコードの欄に設定されたMコード番号(ここではM3)の数値(ここでは3)の前にKを加えて文字列(K3)を生成し、当該文字列を、図41に示したMコードデコード処理プログラム部品10Dの再利用パラメータNo.3(ここではVK3)に適用する。
 ステップS134にて、Mコード機能生成部342Aは、Mコード50の仕様(図39)から、Mコードの欄に設定されたMコード番号(ここではM3)を、そのままデバイスアドレスとして、図41に示したMコードデコード処理プログラム部品10Dの再利用パラメータNo.4(ここではVB4)に適用する。
 以上の動作により、Mコード50の仕様(図39)のM3の設定に対して、図52に示されるデコード処理プログラムLPAの1段目が生成される。Mコード機能生成部342Aは、以上のステップS131~S134の動作を、Mコード50の仕様(図39)のM4の設定、M5の設定、…と設定がなくなるまで順に行う。これにより、図52示されるデコード処理プログラムLPAの2~4段目が生成される。
 ステップS135にて、Mコード機能生成部342Aは、以上のパラメータの適用がされたMコードデコード処理プログラム部品10Dを、デコード処理プログラムとする。これにより、図39に示されるMコード50の仕様からは、図52に示されたデコード処理プログラムLPAが生成される。
 次に、Mコード機能生成部342Aが、Mコード50の機能処理プログラムLPB,LPC,LPDを生成する動作について説明する。
 図56は、Mコード機能生成部342Aが、各Mコード50の機能処理プログラムを生成する際の動作を示すフローチャートである。本実施の形態では、Mコード機能生成部342Aは、Mコード50の仕様(図39)の各行の設定に対して、上から順に、図56に示される処理を行う。
 ステップS141にて、Mコード機能生成部342Aは、Mコード50の仕様(図39)での処理の対象としている行において、機能出力が設定されているかを判定する。Mコード機能生成部342Aは、機能出力が設定さていると判定した場合には、ステップS142に進み、そうでない場合には、ステップS145に進む。例えば、図39に示される設定においては、M3,M4,M30の設定においては機能出力が設定されているからステップS142に進み、M5の設定においては機能出力が設定されていないからステップS145に進む。
 ステップS142にて、Mコード機能生成部342Aは、Mコード50の仕様(図39)での処理の対象としている行において、機能キャンセルが設定されているかを判定する。Mコード機能生成部342Aは、機能キャンセルが設定されていると判定した場合には、ステップS143に進み、そうでない場合には、ステップS144に進む。例えば、図39のような設定においては、M3,M4の設定においては機能キャンセルが設定されているからステップS143に進み、M30の設定においては機能キャンセルが設定されていないからステップS144に進む。
 ステップS143においては、Mコード機能生成部342Aは、Mコード50の仕様(図39)において処理の対象としている行の設定と、自己保持処理プログラム部品10Bとに基づいて、Mコード50の機能処理プログラムを生成する。例えば、Mコード機能生成部342Aは、図39に示されたMコード50の仕様のM3,M4の設定と、図3に示された自己保持処理プログラム部品10Bとに基づいて、図52に示される機能処理プログラムLPB,LPCをそれぞれ生成する。このステップS143における動作については、後で詳細に説明する。その後、Mコード50の仕様(図39)において、現在処理の対象となっている行の下の設定を処理対象として、ステップS141に戻る。
 ステップS144においては、Mコード機能生成部342Aは、Mコード50の仕様(図39)において処理の対象としている行の設定と、AND条件処理プログラム部品10Eとに基づいて、Mコード50の機能処理プログラムを生成する。例えば、Mコード機能生成部342Aは、図39に示されたMコード50の仕様のM30の設定と、図42に示されたAND条件処理プログラム部品10Eとに基づいて、図52に示される機能処理プログラムLPDを生成する。このステップS144における動作については、後で詳細に説明する。その後、Mコード50の仕様(図39)において、現在処理の対象となっている行の下の設定を処理対象として、ステップS141に戻る。
 ステップS145にて、Mコード機能生成部342Aは、Mコード50の仕様(図39)において処理の対象としている行の設定に対しては、Mコード50の機能処理プログラムを生成しない。例えば、図39に示されたMコード50の仕様のM5の設定に対しては、Mコード50の機能処理プログラムは生成されない。したがって、図52に示されるように、Mコード50の仕様のM3,M4の設定に対応する機能処理プログラムLPB,LPCの下には、Mコード50の仕様のM30の設定に対応する機能処理プログラムLPDが生成されることになる。ステップS145の後、Mコード50の仕様(図39)において、現在処理の対象となっている行の下の設定を処理対象として、ステップS141に戻る。
 次に、上述のステップS143の動作について説明する。
 図57は、上述のステップS143、つまり、処理の対象としている行に機能キャンセルが設定されている場合に、Mコード機能生成部342Aが機能処理プログラムを生成する際の動作を示すフローチャートである。以下、Mコード50の仕様(図39)のM3の設定に基づいて、Mコード機能生成部342Aが、図52に示される機能処理プログラムLPBを生成する動作を例にして説明する。
 まず、ステップS151にて、Mコード機能生成部342Aは、Mコード50の仕様(図39)から、Mコードの欄に設定されたMコード番号(ここではM3)を、そのままデバイスアドレスとして、図3に示された自己保持処理プログラム部品10Bの再利用パラメータNo.1(ここではVB1)に適用する。
 ステップS152にて、Mコード機能生成部342Aは、Mコード50の仕様(図39)の機能開始の欄において、「ブロック軸移動完了後」が設定されているかを判定する。Mコード機能生成部342Aは、「ブロック軸移動完了後」が設定されていると判定した場合にはステップS153に進み、そうでない場合にはステップS153を行わずにステップS154に進む。なお、図39に示されるM3の設定では、機能開始の欄においてブロック軸移動完了後が設定されていないから、ステップS152の後、ステップS153が行われずに、ステップS154が行われることになる。
 ステップS153にて、Mコード機能生成部342Aは、デバイスの仕様(図35)から、移動指令完了に対応するデバイスアドレスを抽出し、当該デバイスアドレスを、図3に示された自己保持処理プログラム部品10Bの再利用パラメータNo.1(ここではVB1)に列挙して適用する。仮に、図39に示されるM3の設定においてステップS153が行われると、Mコード機能生成部342Aは、デバイスの仕様(図35)から、移動指令完了に対応するXC18を抽出し、当該デバイスアドレスを、自己保持処理プログラム部品10Bの再利用パラメータNo.1(VB1)に適用されたM3に直列的に追加することになる。
 ステップS154にて、Mコード機能生成部342Aは、Mコード50の仕様(図39)から、機能キャンセルの欄に設定されたMコード番号(ここではM4,M5)を、そのままデバイスアドレスとして、図3に示された自己保持処理プログラム部品10Bの再利用パラメータNo.2(ここではVB2)に適用する。
 ステップS155にて、Mコード機能生成部342Aは、Mコード50の仕様(図39)から、機能出力に設定されたデバイスアドレス(ここではY1898)を、図3に示された自己保持処理プログラム部品10Bの再利用パラメータNo.3(ここではVB3)に適用する。
 ステップS156にて、Mコード機能生成部342Aは、以上のパラメータの適用がされた自己保持処理プログラム部品10Bを、機能キャンセルがある機能処理プログラムとする。これにより、図39に示されるMコード50の仕様のM3の設定に基づいて、図52に示される機能処理プログラムLPBが生成される。Mコード機能生成部342Aは、Mコード50の仕様(図39)のM4の設定にも同様の動作を行うことにより、図52に示される機能処理プログラムLPCが生成される。
 次に、上述のステップS144の動作について説明する。
 図58は、上述のステップS144、つまり、処理の対象としている行に機能キャンセルが設定されていない場合に、Mコード機能生成部342Aが機能処理プログラムを生成する際の動作を示すフローチャートである。以下、Mコード50の仕様(図39)のM30の設定に基づいて、Mコード機能生成部342Aが、図52に示される機能処理プログラムLPDを生成する動作について説明する。
 まず、ステップS161にて、Mコード機能生成部342Aは、Mコード50の仕様(図39)から、Mコードの欄に設定されたMコード番号(ここではM30)を、そのままデバイスアドレスとして、図42に示されたAND条件処理プログラム部品10Eの再利用パラメータNo.1(ここではVB1)に適用する。
 ステップS162にて、Mコード機能生成部342Aは、Mコード50の仕様(図39)の機能開始の欄において、「ブロック軸移動完了後」が設定されているかを判定する。Mコード機能生成部342Aは、「ブロック軸移動完了後」が設定されていると判定した場合にはステップS163に進み、そうでない場合にはステップS163を行わずにステップS164に進む。なお、図39に示されるM30の設定では、機能開始の欄においてブロック軸移動完了後が設定されているから、ステップS162の後にステップS163が行われてから、ステップS164が行われることになる。
 ステップS163にて、Mコード機能生成部342Aは、デバイスの仕様(図35)から、移動指令完了に対応するデバイスアドレスを抽出し、当該デバイスアドレスを、図42に示されたAND条件処理プログラム部品10Eの再利用パラメータNo.1(ここではVB1)に列挙して適用する。図39に示されるM30の設定においてステップS163が行われると、Mコード機能生成部342Aは、デバイスの仕様(図35)から、移動指令完了に対応するXC18を抽出し、当該デバイスアドレスを、AND条件処理プログラム部品10Eの再利用パラメータNo.1(ここではVB1)に適用されたM30に直列的に追加することになる。
 ステップS164にて、Mコード機能生成部342Aは、Mコード50の仕様(図39)から、機能出力に設定されたデバイスアドレス(ここではYC1A)を、図42に示されたAND条件処理プログラム部品10Eの再利用パラメータNo.2(ここではVB2)に適用する。
 ステップS165にて、Mコード機能生成部342Aは、以上のパラメータの適用がされたAND条件処理プログラム部品10Eを、機能キャンセルがない機能処理プログラムとする。これにより、図39に示されるMコード50の仕様のM30の設定に基づいて、図52に示される機能処理プログラムLPDが生成される。
 次に、Mコード機能生成部342Aが、Mコード50の完了処理プログラムLPEを生成する動作について説明する。
 図59は、Mコード機能生成部342Aが、図18に示したMコード完了処理プログラム部品10Fを用いて、Mコード50の完了処理プログラムを生成する際の動作を示すフローチャートである。
 ステップS171にて、Mコード機能生成部342Aは、Mコード50の仕様(図39)から、Mコードの欄に設定された全てのMコード番号(ここでは、M3,M4,M5,M30)のそれぞれを、そのままデバイスアドレスとして、図18に示したMコード完了処理プログラム部品10FのパラメータNo.1に相当する、図17に示したAND条件処理要素部品のパラメータNo.1に適用する。以下、このステップS171をステップS171AとステップS171Bに分けて詳細に説明する。
 ステップS171Aにて、Mコード機能生成部342Aは、Mコード50の仕様(図39)から、1行目のMコードの欄に設定されたMコード番号を、そのままデバイスアドレスとして、図17に示したAND条件処理要素部品の再利用パラメータNo.1(ここではVB1)に適用する。そして、ステップS171Bにて、Mコード機能生成部342Aは、1行目の機能完了にデバイスアドレスが設定されている場合には、当該デバイスアドレスを、図17に示したAND条件処理要素部品の再利用パラメータNo.1(ここではVB1)に列挙して(直列的に追加して)適用し、ステップS171Aに戻って2行目以降の設定についても1行目と同様の動作を行っていく。一方、ステップS171Bにて、Mコード機能生成部342Aは、1行目の機能完了にデバイスアドレスが設定されていない場合には、そのまま、ステップS171Aに戻って2行目以降の設定についても1行目と同様の動作を行っていく。
 例えば、図39に示される1行目の設定では、Mコードの欄に設定されたMコード番号はM3であるから、当該M3がAND条件処理要素部品のVB1に適用される。そして、同1行目の設定では、機能完了の欄にX188Dというデバイスアドレスが設定されているから、当該X188Dが、AND条件処理要素部品に適用されたM3に列挙されて(直列的に追加されて)適用される。これにより、図52に示される完了処理プログラムLPEの1段目の左部分(M3とX188D)が生成される。
 次に、図39に示される2行目の設定では、Mコードの欄に設定されたMコード番号はM4であるから、当該M4がAND条件処理要素部品のVB1に適用される。そして、同2行目の設定では、機能完了の欄にX188Dというデバイスアドレスが設定されているから、当該X188Dが、AND条件処理要素部品に適用されたM4に列挙されて(直列的に追加されて)適用される。そして、Mコード機能生成部342Aは、こうして生成されたプログラムを、1行目の設定に基づいて得られたプログラム(M3とX188D)の下に並列的に追加する。これにより、図52に示される完了処理プログラムLPEの2段目(M4とX188D)が生成される。
 同様に、図39に示される3行目の設定では、Mコードの欄に設定されたMコード番号はM5であるから、当該M5がAND条件処理要素部品のVB1に適用される。そして、同3行目の設定では、機能完了の欄にX188Cというデバイスアドレスが設定されているから、当該X188Cが、AND条件処理要素部品に適用されたM5に列挙されて(直列的に追加されて)適用される。そして、Mコード機能生成部342Aは、こうして生成されたプログラムを、2行目の設定に基づいて得られたプログラム(M4とX188D)の下に並列的に追加する。これにより、図52に示される完了処理プログラムLPEの3段目(M5とX188C)が生成される。
 同様に、図39に示される4行目の設定では、Mコードの欄に設定されたMコード番号はM30であるから、当該M30がAND条件処理要素部品のVB1に適用される。そして、同4行目の設定では、機能完了の欄にデバイスアドレスが設定されていないから、Mコード機能生成部342Aは、当該M30がAND条件処理要素部品に適用されて得られるプログラムを、3行目の設定に基づいて得られたプログラム(M5とX188C)の下に追加する。これにより、図52に示される完了処理プログラムLPEの4段目(M30)が生成される。
 ステップS172にて、Mコード機能生成部342Aは、デバイスの仕様(図35)から、Mコード完了に対応するデバイスアドレス(ここではYC1E)を抽出し、当該デバイスアドレスを、図18に示されたMコード完了処理プログラム部品10Fの再利用パラメータNo.2(ここではYC1E)を適用する。これにより、図52に示される完了処理プログラムLPEの1段目の右側が生成される。
 ステップS173にて、Mコード機能生成部342Aは、以上のパラメータの適用がされたMコード完了処理プログラム部品10Fを、Mコード50の完了処理プログラムとする。これにより、図39に示されるMコード50の仕様からは、図52に示される完了処理プログラムLPEが生成される。
 <まとめ>
 以上、操作盤処理プログラム生成部341が操作盤処理プログラムを生成する動作と、Mコード処理プログラム生成部342がMコード処理プログラムを生成する動作について、それらプログラムがラダープログラムである場合を例にして説明した。プログラム編集部6は、操作盤処理プログラム生成部341が生成した操作盤処理プログラムと、Mコード処理プログラム生成部342が生成したMコード処理プログラムとを合わせて、CNC工作機械46のプログラムとする。このとき、1本のプログラムとして生成してもよいし、プログラムを部品単位で分割して生成してもよい。
 部品単位で分割して生成する場合には、モード反転スイッチ処理、運転モード選択スイッチ処理、切削オーバライドスイッチ処理、Mコードデコード処理、Mコード機能処理、Mコード完了処理のようにプログラム生成を構成するプログラム部品単位で分割してもよいし(この場合6つの分割プログラムが生成される)、操作盤処理、Mコード処理のようにまとめてもよい(この場合2つの分割プログラムが生成される)。また、分割プログラムを同じファイルで生成してもよいし、分割プログラムごとに別ファイルに分けて生成してもよい。
 プログラム編集部6で生成されるプログラムがラダープログラムの場合には、操作盤処理プログラムとMコード処理プログラムと合わせてなるラダープログラムの最後にEND処理命令を追記して、CNC工作機械46のラダープログラムとする。このとき、図60に示されるように1本のラダープログラムとして生成してもよいし、図61に示されるようにラダープログラムを部品単位で分割して生成してもよい。部品単位で分割して生成する場合には、モード反転スイッチ処理、運転モード選択スイッチ処理、切削オーバライドスイッチ処理、Mコードデコード処理、Mコード機能処理、Mコード完了処理のようにプログラム生成を構成するプログラム部品単位で分割してもよいし(この場合6つの分割ラダープログラムが生成される)、操作盤処理、Mコード処理のようにまとめてもよい(この場合2つの分割ラダープログラムが生成される)。なお、部品単位で分割する場合には、ラダープログラムの先頭に分割プログラムをコールするCALL命令からなるラダープログラムを生成する必要があり、また、分割プログラムの先頭にはジャンプ用ラベルであるプログラムポインタ、終端にはRET命令を生成する必要があるが、これらを生成する場合についても、本実施の形態で説明した技術を用いることが可能である。また、分割ラダープログラムを同じファイルで生成してもよいし、分割ラダープログラムごとに別ファイルに分けて生成してもよい。
 ラダープログラム生成で使用したデバイスアドレスには、デバイスコメントを付与しておけば、ラダープログラムを確認するときに便利である。例えば、操作盤56の場合、スイッチ入力に設定されたデバイスアドレスに対して、スイッチ種別で選択された文字列とスイッチ動作で選択/設定された文字列を結合してデバイスコメントとして生成するように、操作盤処理プログラム生成部341を構成すればよい。また、Mコード50の場合、Mコード50と同じデバイスアドレスに対しては、機能名に設定された文字列をデバイスコメントとして付与し、機能出力に設定されたデバイスには、機能名に設定された文字列と機能出力に設定された文字列を結合してデバイスコメントとして生成するようにMコード処理プログラム生成部342を構成するなどすればよい。
 具体的な例では、図45を用いて説明した、モード反転機能生成部341Aがプログラム生成の過程でデバイスコメントを合わせて生成する手順の通りであり、この手順によって、図43に示したデバイスコメントが生成される。
 以上のような本実施の形態に係るプログラム作成支援装置1によれば、仕様記述ファイル30に記述されている仕様、及び、仕様設定部31で設定された仕様を、プログラム部品10の再利用時に適用すべきパラメータまたは列挙して適用すべきパラメータに適用しつつ、当該プログラム部品10から、コントローラやマイコンで実行される計測監視制御プログラムを生成する。したがって、プログラムがほぼ自動的に生成されることから、当該仕様に記述された機能で過不足なく及び不具合なく動作するプログラムを作成することができるとともに、プログラム作成における労力を軽減することができる。
 この発明は詳細に説明されたが、上記した説明は、すべての局面において、例示であって、この発明がそれに限定されるものではない。例示されていない無数の変形例が、この発明の範囲から外れることなく想定され得るものと解される。
 1 プログラム作成支援装置、2 マイクロプロセッサ、3 表示部、4 入力部、5 保存部、6 プログラム編集部、8 編集後のプログラム、9 付属情報ファイル、10 プログラム部品、11 プログラム部品保持部、12 プログラム部品定義部、14 再利用パラメータ、15 プログラム要素部品定義部、17 プログラム要素部品、18 再利用パラメータ、19 プログラム階層部品定義部、21 プログラム階層部品、22 再利用パラメータ 30 仕様記述ファイル、31 仕様設定部、31A 操作盤仕様設定部、31B Mコード仕様設定部、32 デバイス仕様保持部、34 プログラム生成部、341 操作盤処理プログラム生成部、342 Mコード処理プログラム生成部。

Claims (14)

  1.  少なくとも1つのプログラム要素を含み、各プログラム要素に対応する再利用パラメータの内容をユーザが設定することで、その設定内容に応じたプログラムを生成するプログラム部品(10)と、
     前記プログラム部品(10)が保持されるプログラム部品保持部(11)と、
     前記プログラム部品(10)を再利用してプログラムを編集するプログラム編集部(6)と
    を備え、
     前記プログラム部品(10)は、
     再利用パラメータに複数のパラメータが列挙して設定されることで、各パラメータに応じた複数の要素が結合したプログラムを生成するプログラム要素を含んでいる
    ことを特長とするプログラム作成支援装置。
  2.  使用者が新たなプログラム部品を定義可能なプログラム部品定義部(12)をさらに備える
    請求項1記載のプログラム作成支援装置。
  3.  前記プログラム部品保持部(11)は、
     プログラム部品(10)の構成要素として使用でき、且つ、少なくとも1つのプログラム要素を含み、各プログラム要素に対応する再利用パラメータの内容をユーザが設定することで、その設定内容に応じたプログラムを生成するプログラム要素部品(17)をさらに保持し、
     前記プログラム要素部品(17)は、
     再利用パラメータに複数のパラメータが列挙して設定されることで、各パラメータに応じた複数の要素が結合したプログラムを生成するプログラム要素を含んでいる
    請求項1記載のプログラム作成支援装置。
  4.  前記プログラム要素部品(17)は、他のプログラム要素部品の構成要素としても使用可能である
    請求項3記載のプログラム作成支援装置。
  5.  使用者が新たなプログラム要素部品を定義可能なプログラム要素部品定義部(15)と、
     使用者がプログラム要素部品(17)を用いて新たなプログラム部品(10)を定義可能なプログラム部品定義部(12)とをさらに備える
    請求項3または請求項4記載のプログラム作成支援装置。
  6.  前記プログラム部品保持部(11)は、
     少なくとも1つのプログラム部品(10)を含み、各プログラム部品の各プログラム要素に関連付けされた再利用パラメータの内容をユーザが設定することで、その設定内容に応じたプログラムを生成するプログラム階層部品(21)をさらに保持し、
     前記プログラム編集部(6)は、
     前記プログラム階層部品(21)を再利用してプログラムを編集することができ、
     前記プログラム階層部品(21)は、
     再利用パラメータに複数のパラメータが列挙して設定されることで、各パラメータに応じた複数のプログラム部品が結合したプログラムを生成する
    ことを特長とする
    請求項1から請求項4のいずれか記載のプログラム作成支援装置。
  7.  前記プログラム階層部品(21)は、他のプログラム階層部品(21)の構成要素としても使用可能である
    請求項6記載のプログラム作成支援装置。
  8.  使用者がプログラム部品(10)を用いて新たなプログラム階層部品(21)を定義可能なプログラム階層部品定義部(19)をさらに備える
    請求項6記載のプログラム作成支援装置。
  9.  前記プログラム編集部(6)は、
     前記再利用パラメータの各々に設定されたパラメータに基づいて、編集後のプログラムに関する付属情報を生成する手段をさらに備える
    請求項1から請求項4のいずれか記載のプログラム作成支援装置。
  10.  前記プログラム編集部(6)は、
     仕様記述ファイル(30)に記述されている所定の仕様を、前記プログラム部品保持部(11)に保持されているプログラム部品(10)の前記再利用パラメータに適用しつつ、当該プログラム部品(10)からプログラムを生成するプログラム生成部(34)をさらに備える、
    請求項1から請求項4のいずれか記載のプログラム作成支援装置。
  11.  所定の仕様を設定する仕様設定部(31)をさらに備え、
     前記プログラム生成部(34)は、
     前記仕様設定部(31)で設定された所定の仕様を、前記プログラム部品保持部(11)に保持されているプログラム部品(10)の前記再利用パラメータに適用しつつ、当該プログラム部品(10)からプログラムを生成する、
    請求項10記載のプログラム作成支援装置。
  12.  前記仕様設定部(31)は、
     操作盤の仕様を設定する操作盤仕様設定部(31A)を含み、
     前記プログラム生成部(34)は、
     前記操作盤の仕様を、前記プログラム部品保持部(11)に保持されているプログラム部品(10)の前記再利用パラメータに適用しつつ、当該プログラム部品(10)から操作盤処理プログラムを生成する操作盤処理プログラム生成部(341)を含む、
    請求項11記載のプログラム作成支援装置。
  13.  前記仕様設定部(31)は、
     Mコードの仕様を設定するMコード仕様設定部(31B)を含み、
     前記プログラム生成部(34)は、
     前記Mコードの仕様を、前記プログラム部品保持部(11)に保持されているプログラム部品(10)の前記再利用パラメータに適用しつつ、当該プログラム部品(10)からMコード処理プログラムを生成するMコード処理プログラム生成部(342)を含む、
    請求項11記載のプログラム作成支援装置。
  14.  デバイスの仕様を保持するデバイス仕様保持部(32)をさらに備え、
     前記プログラム生成部(34)は、
     前記プログラム部品(10)から前記プログラムを作成する際に、前記デバイスの仕様を参照する、
    請求項10記載のプログラム作成支援装置。
PCT/JP2010/064244 2009-12-28 2010-08-24 プログラム作成支援装置 WO2011080945A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
DE112010005023.6T DE112010005023B4 (de) 2009-12-28 2010-08-24 Verwendung einer programmerstellungsunterstützungsvorrichtung zum erstellen von programmen für zu steuernde anlagen
CN201080053863.5A CN102640112B (zh) 2009-12-28 2010-08-24 程序制作支援装置
US13/503,747 US8843885B2 (en) 2009-12-28 2010-08-24 Program creation support device
JP2011547356A JP5506822B2 (ja) 2009-12-28 2010-08-24 プログラム作成支援装置
TW099137909A TWI464558B (zh) 2009-12-28 2010-11-04 程式作成支援裝置

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2009296780 2009-12-28
JP2009-296780 2009-12-28

Publications (1)

Publication Number Publication Date
WO2011080945A1 true WO2011080945A1 (ja) 2011-07-07

Family

ID=44226366

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/064244 WO2011080945A1 (ja) 2009-12-28 2010-08-24 プログラム作成支援装置

Country Status (6)

Country Link
US (1) US8843885B2 (ja)
JP (1) JP5506822B2 (ja)
CN (1) CN102640112B (ja)
DE (1) DE112010005023B4 (ja)
TW (1) TWI464558B (ja)
WO (1) WO2011080945A1 (ja)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013222439A (ja) * 2012-04-19 2013-10-28 Mitsubishi Electric Corp プログラム生成装置
JP2018190133A (ja) * 2017-05-01 2018-11-29 ファナック株式会社 ラダープログラム編集装置
KR20190070999A (ko) * 2016-12-22 2019-06-21 미쓰비시덴키 가부시키가이샤 프로그램 개발 지원 장치 및 프로그램 부품의 관리 방법
JP2020194373A (ja) * 2019-05-28 2020-12-03 岩井ファルマテック株式会社 制御プログラムの作成支援システム及び作成支援プログラム
WO2024116261A1 (ja) * 2022-11-29 2024-06-06 ファナック株式会社 プログラム生成装置、方法およびプログラム

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105074587B (zh) 2013-02-22 2017-08-25 三菱电机株式会社 系统开发装置、方法以及程序
CN105074591A (zh) * 2013-03-07 2015-11-18 三菱电机株式会社 梯形图程序显示程序及梯形图程序显示装置
DE112013006769T5 (de) * 2013-03-29 2015-11-26 Mitsubishi Electric Corp. Erzeugungsprogramm für Ablaufprogramm-Komponenten und Vorrichtung zur Erzeugung von Ablaufprogramm-Komponenten
KR101772785B1 (ko) * 2013-04-08 2017-08-29 미쓰비시덴키 가부시키가이샤 프로그램 그래프 표시 장치, 프로그램 그래프 표시 방법 및 프로그램 그래프 표시 프로그램을 기록한 컴퓨터 판독 가능한 기록 매체
JP6111210B2 (ja) * 2013-08-23 2017-04-05 日本電信電話株式会社 情報生成装置、情報生成方法及び情報生成プログラム
TWI501059B (zh) * 2013-09-12 2015-09-21 Syntec Inc 用於工具機之工件程式解譯方法
CN103605318B (zh) * 2013-11-14 2017-02-15 北京铭隆世纪科技有限公司 Cnc控制器的功能定制方法、装置以及cnc控制器
EP3203333B1 (en) * 2014-09-30 2019-12-04 Makino Milling Machine Co., Ltd. Control device for machine tool and machine tool
JP6076565B1 (ja) * 2015-04-16 2017-02-08 三菱電機株式会社 プログラム診断装置、プログラム診断方法及びプログラム診断プログラム
JP6079817B2 (ja) * 2015-04-21 2017-02-15 株式会社安川電機 ラダープログラム作成装置、コンピュータープログラム及びラダープログラム作成方法
CN104899042B (zh) * 2015-06-15 2018-07-24 江南大学 一种嵌入式机器视觉检测程序开发方法及系统
JP6520545B2 (ja) * 2015-08-10 2019-05-29 オムロン株式会社 サポート装置およびサポートプログラム
JP6673359B2 (ja) * 2015-08-27 2020-03-25 日本電気株式会社 システム構築支援システム、方法およびプログラム
JP6400558B2 (ja) * 2015-11-17 2018-10-03 ファナック株式会社 シーケンス制御プログラミング装置、シーケンス制御プログラミング方法及び作業システム
CN106527335B (zh) * 2016-12-08 2019-03-19 湖南戈人自动化科技有限公司 一种支持协程功能的plc控制器
ES2939966T3 (es) * 2017-03-30 2023-04-28 Citizen Watch Co Ltd Dispositivo de control para máquina de trabajo
CN106990750B (zh) * 2017-04-01 2019-12-24 贝加莱工业自动化(中国)有限公司 一种梯形图在线编辑方法
US11474496B2 (en) * 2017-04-21 2022-10-18 Rockwell Automation Technologies, Inc. System and method for creating a human-machine interface
KR102496699B1 (ko) * 2017-11-08 2023-02-06 현대자동차주식회사 다축헤드 가공설비의 공구파손 검지 장치 및 방법
JP6618642B1 (ja) * 2018-06-19 2019-12-11 三菱電機株式会社 プログラム実行支援装置、プログラム実行支援方法、およびプログラム実行支援プログラム
DE102020206303A1 (de) * 2019-06-04 2020-12-10 Fanuc Corporation Werkzeugmaschinensteuerung und werkzeugmaschine
TWI757926B (zh) * 2020-10-22 2022-03-11 財團法人工業技術研究院 工具機數值控制器軟體動態產生裝置及方法

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03109603A (ja) * 1989-09-22 1991-05-09 Mitsubishi Electric Corp プログラマブルコントローラのプログラミング装置
JPH0749651A (ja) * 1993-08-09 1995-02-21 Toshiba Corp 制御プログラムの作成支援装置
JPH07311606A (ja) * 1994-05-16 1995-11-28 Mitsubishi Electric Corp プログラマブルコントローラのプログラミング機器およびプログラマブルコントローラ用機能ユニット
JPH09282015A (ja) * 1996-04-09 1997-10-31 Fuji Electric Co Ltd 情報処理装置
JP2002229612A (ja) * 2001-02-02 2002-08-16 Keyence Corp ラダー図作成プログラム及びこれを記録した記憶媒体
JP2005092808A (ja) * 2003-09-19 2005-04-07 Keyence Corp ラダープログラムマクロ作成装置、ラダープログラムマクロ作成方法、ラダープログラムマクロ作成プログラムおよびコンピュータで読み取り可能な記録媒体
WO2005101147A1 (ja) * 2004-04-15 2005-10-27 Mitsubishi Denki Kabushiki Kaisha プログラマブルロジックコントローラの周辺装置及びそのプログラム作成方法
JP2008204237A (ja) * 2007-02-21 2008-09-04 Mitsubishi Electric Corp プログラム作成支援装置およびプログラム実行装置

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4870575A (en) * 1987-10-01 1989-09-26 Itt Corporation System integrated fault-tree analysis methods (SIFTAN)
US5237652A (en) * 1990-11-30 1993-08-17 Mcmanus Kirby L Programming system for programmable logic controller
JP3461400B2 (ja) 1995-02-17 2003-10-27 和泉電気株式会社 シーケンス制御プログラム作成装置
JPH1124905A (ja) * 1997-07-02 1999-01-29 Mitsubishi Electric Corp プログラムの開発方法
JPH11338514A (ja) 1998-05-22 1999-12-10 Nissan Motor Co Ltd プログラマブルコントローラ
JP3896849B2 (ja) * 2000-11-24 2007-03-22 三菱電機株式会社 プログラミング装置及びプログラミング方法
DE60223180D1 (de) * 2002-02-22 2007-12-06 Neosera Systems Ltd Verfahren und prozessor zur parallelen verarbeitung einer logikereignis-simulation
JP3915808B2 (ja) * 2003-09-26 2007-05-16 オムロン株式会社 プログラマブルコントローラおよびプログラマブルコントローラシステムならびにcpuユニット
US7272450B2 (en) 2004-03-31 2007-09-18 Omron Corporation Development aid device
JP3925557B2 (ja) * 2005-02-28 2007-06-06 オムロン株式会社 パラメータ設定装置
US8079027B2 (en) * 2006-09-08 2011-12-13 Via Technologies, Inc. Programming language translation systems and methods
CN100517144C (zh) 2007-10-26 2009-07-22 华中科技大学 分布式开放体系结构的数控系统
JP2009301163A (ja) 2008-06-11 2009-12-24 Fuji Xerox Co Ltd 生産管理装置、及びプログラム

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03109603A (ja) * 1989-09-22 1991-05-09 Mitsubishi Electric Corp プログラマブルコントローラのプログラミング装置
JPH0749651A (ja) * 1993-08-09 1995-02-21 Toshiba Corp 制御プログラムの作成支援装置
JPH07311606A (ja) * 1994-05-16 1995-11-28 Mitsubishi Electric Corp プログラマブルコントローラのプログラミング機器およびプログラマブルコントローラ用機能ユニット
JPH09282015A (ja) * 1996-04-09 1997-10-31 Fuji Electric Co Ltd 情報処理装置
JP2002229612A (ja) * 2001-02-02 2002-08-16 Keyence Corp ラダー図作成プログラム及びこれを記録した記憶媒体
JP2005092808A (ja) * 2003-09-19 2005-04-07 Keyence Corp ラダープログラムマクロ作成装置、ラダープログラムマクロ作成方法、ラダープログラムマクロ作成プログラムおよびコンピュータで読み取り可能な記録媒体
WO2005101147A1 (ja) * 2004-04-15 2005-10-27 Mitsubishi Denki Kabushiki Kaisha プログラマブルロジックコントローラの周辺装置及びそのプログラム作成方法
JP2008204237A (ja) * 2007-02-21 2008-09-04 Mitsubishi Electric Corp プログラム作成支援装置およびプログラム実行装置

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013222439A (ja) * 2012-04-19 2013-10-28 Mitsubishi Electric Corp プログラム生成装置
KR20190070999A (ko) * 2016-12-22 2019-06-21 미쓰비시덴키 가부시키가이샤 프로그램 개발 지원 장치 및 프로그램 부품의 관리 방법
KR102021327B1 (ko) 2016-12-22 2019-09-16 미쓰비시덴키 가부시키가이샤 프로그램 개발 지원 장치 및 프로그램 부품의 관리 방법
JP2018190133A (ja) * 2017-05-01 2018-11-29 ファナック株式会社 ラダープログラム編集装置
JP2020194373A (ja) * 2019-05-28 2020-12-03 岩井ファルマテック株式会社 制御プログラムの作成支援システム及び作成支援プログラム
JP7302937B2 (ja) 2019-05-28 2023-07-04 岩井ファルマテック株式会社 制御プログラムの作成支援システム及び作成支援プログラム
WO2024116261A1 (ja) * 2022-11-29 2024-06-06 ファナック株式会社 プログラム生成装置、方法およびプログラム

Also Published As

Publication number Publication date
JPWO2011080945A1 (ja) 2013-05-09
US8843885B2 (en) 2014-09-23
DE112010005023B4 (de) 2023-11-30
CN102640112B (zh) 2015-05-13
CN102640112A (zh) 2012-08-15
DE112010005023T5 (de) 2012-10-18
US20120222001A1 (en) 2012-08-30
TWI464558B (zh) 2014-12-11
TW201131333A (en) 2011-09-16
JP5506822B2 (ja) 2014-05-28

Similar Documents

Publication Publication Date Title
JP5506822B2 (ja) プログラム作成支援装置
US7505817B2 (en) Programming automation by demonstration
US5177420A (en) Method of and apparatus for generating control program
JP4680176B2 (ja) 工作機械の制御方法、および、それに対する装置
KR101627488B1 (ko) 엔지니어링 툴, 프로그램 편집 장치 및 프로그램 편집 시스템
JP5018477B2 (ja) インバータ
JP5123502B2 (ja) ポストプロセッサ開発支援システム及びそれを用いたcamシステム
US20150227348A1 (en) Development support device and development support program
JPH10143221A (ja) 機器制御プログラムの開発支援システムおよび開発支援方法
JP2009086898A (ja) プログラム可能な論理制御装置用マシーンコード・プログラムのコンパイル法
WO2012104959A1 (ja) モーションsfcプログラム部品作成装置
CN110968051A (zh) 用于规划自动化系统的方法和工程系统
JP4964036B2 (ja) エディタ装置およびエディタプログラム
JP2020086638A (ja) 制御プログラム作成支援ツール及び制御プログラムの作成方法
KR101303866B1 (ko) 기판 처리 장치의 모니터링 방법
KR100205337B1 (ko) 엔. 씨. 프로그램의 시뮬레이션 장치 및 그 방법
JP2533372B2 (ja) 制御プログラム作成方法
KR100423742B1 (ko) 순차기능챠트에 의한 전용 제어 시스템
JP2004318286A (ja) プログラム仕様書作成兼プログラム開発装置、同方法、および制御システム
JPH07302107A (ja) 数値制御装置
WO2012124153A1 (ja) シミュレーション装置
JPH03201104A (ja) 制御プログラム作成装置
JP2533374B2 (ja) 制御プログラム作成方法
JP2010055351A (ja) エディタ装置、エディタプログラムおよびそれを記録した記録媒体ならびにプログラマブル表示器
JP2002062911A (ja) エディタ装置およびエディタプログラムを記録した記録媒体

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201080053863.5

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10840804

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2011547356

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 13503747

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 112010005023

Country of ref document: DE

Ref document number: 1120100050236

Country of ref document: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10840804

Country of ref document: EP

Kind code of ref document: A1