WO2014064830A1 - 開発支援装置及び開発支援プログラム - Google Patents

開発支援装置及び開発支援プログラム Download PDF

Info

Publication number
WO2014064830A1
WO2014064830A1 PCT/JP2012/077704 JP2012077704W WO2014064830A1 WO 2014064830 A1 WO2014064830 A1 WO 2014064830A1 JP 2012077704 W JP2012077704 W JP 2012077704W WO 2014064830 A1 WO2014064830 A1 WO 2014064830A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
variable
selection
program
development support
Prior art date
Application number
PCT/JP2012/077704
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 JP2014543097A priority Critical patent/JP5994862B2/ja
Priority to PCT/JP2012/077704 priority patent/WO2014064830A1/ja
Publication of WO2014064830A1 publication Critical patent/WO2014064830A1/ja
Priority to US14/695,140 priority patent/US20150227348A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/311Functional or applicative languages; Rewrite languages
    • 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/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • G05B19/056Programming the PLC
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/32Monitoring with visual or acoustical indication of the functioning of the machine
    • G06F11/323Visualisation of programs or trace data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24067Processor stores variables, events and date in eeprom, for external monitor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system

Definitions

  • the present invention relates to a development support apparatus and a development support program.
  • a programmable logic controller (hereinafter referred to as “PLC”), which is good at input / output (I / O) control, is generally used as a controller for controlling a control target for these various devices. Therefore, a machine controller (also referred to as a motion controller) that uses a servo or an inverter to control complicated movements of various devices at high speed and high accuracy has been used.
  • controllers are common control devices that control motion using a control program such as a ladder language or motion language, and can be used to rewrite the control program inside the controller or to debug the control program.
  • a development support device is connected to the controller.
  • Patent Document 1 describes a function of displaying on a screen in order to monitor variables in a control program in debugging work.
  • variable names to be monitored were manually entered individually in the monitoring target list.
  • the list was registered. These selections have been made, for example, by specifying a range with a mouse.
  • the task of registering variables to be monitored in the monitoring target list is troublesome and inconvenient. For example, when registering a variable name in the monitoring target list by manual input, if there is an input error, the current value of the monitoring target variable cannot be displayed correctly. Further, in the work of registering variables, it is necessary to register the variables one by one, and it is necessary to delete the unnecessary variables by the user's operation.
  • the ladder program may have an EXPRESION function that expresses commands and variable operations in text format.
  • the EXPRESSION function is a command (in one command (instruction)) that can be described in a descriptible text format in a lump (in a single command (instruction)), generally like the programming language C language. Command).
  • an EXPRESSION window is displayed in a power line or rung expressed in a ladder language, and commands and variable operations are displayed in text format in the EXPRESION window.
  • the present invention has been made in view of the above circumstances, and a development support apparatus and a development support program that can realize monitoring of a variable value (current value) by a simple operation without forcing a user to perform a complicated operation. It is an exemplary problem to provide
  • a development support apparatus as an exemplary aspect of the present invention has a display screen, is connected to a controller for controlling a control target, and is described in a predetermined program language.
  • a development support apparatus for developing and supporting a stored control program including control command information for executing operation control or arithmetic processing of a control target, variable name information used for operation control or arithmetic processing, and variable names
  • a database constructed by associating the variable register information storing the current values of the corresponding variables with each other, and information in the control program, including control command information, variable name information, and variable register information
  • a selection unit that acquires information including at least one type of information as selection information based on a selection operation by a user, and a selection unit The selection information obtained by the analysis is analyzed for each type of information based on the database, the current value of the variable is obtained based on the variable name information or the variable register information, and the selection information analyzed by the analysis information
  • a display unit that displays the current value of the variable acquired by
  • the selection unit does not have to acquire information as selection information when the selection operation by the user does not continuously select the same information for a predetermined time or more.
  • the predetermined program language may be at least one of a ladder language and a program language.
  • the development support apparatus further includes an instruction format that is a regulation list that defines an arrangement of data related to the control command for each control command information, and the analysis unit selects the selection information acquired by the selection unit based on the instruction format. You may analyze for every kind of information.
  • the analysis unit determines whether the control command information is text information when the selection information acquired by the selection unit includes control command information, and controls the selection information when the selection information is text information.
  • the selection information may be analyzed for each line description of the program.
  • the development support apparatus may further include a state determination unit that determines whether or not the control program has been compiled.
  • the state determination unit may further determine whether or not the control program is being executed.
  • a development support program as another exemplary aspect of the present invention is information in a control program that is described in a predetermined program language and stored in the controller and is connected to the controller for controlling the control target.
  • a selection unit that acquires at least one type of information among the control command information, variable name information, and variable register information as selection information based on a selection operation by the user, and the selection information acquired by the selection unit is a control target.
  • Control command information for executing the operation control or arithmetic processing, variable name information used for the operation control or arithmetic processing, and variable register information for storing the current value of the variable corresponding to the variable name are associated with each other.
  • the analysis unit that acquires the current value of the variable based on the register information, and the selection information analyzed by the analysis unit are displayed on the computer display screen for each type of information, and the current value of the variable acquired by the analysis unit is displayed. It is made to function as a display unit displayed on the display screen.
  • variable monitoring can be realized by a simple operation without forcing the user to perform a complicated operation.
  • FIG. 1 It is a schematic structure figure showing the state where the computer concerning Embodiment 1 of the present invention was connected to the programmable logic controller (PLC). It is a figure which shows the state which displayed the ladder program on the screen of the computer shown in FIG. It is a figure which shows the state by which the watch window used as a monitoring object list was displayed on the screen where the ladder program was displayed. It is a block diagram which shows the outline of the internal structure of the computer shown in FIG.
  • PLC programmable logic controller
  • 6 is a flowchart for explaining a variable value display process by the development support program according to the first embodiment; 6 is a flowchart for explaining a variable value display process by the development support program according to the first embodiment; It is a figure which shows the state which displayed the motion program on the screen of the computer which concerns on Embodiment 2. FIG. It is a figure which shows the state by which the watch window used as a monitoring object list was displayed on the screen where the motion program was displayed.
  • 10 is a flowchart for explaining a variable value display process by the development support program according to the second embodiment. 10 is a flowchart for explaining a variable value display process by the development support program according to the second embodiment.
  • FIG. 1 is a schematic configuration diagram showing a state in which a computer 1 as a development support apparatus according to Embodiment 1 of the present invention is connected to a programmable logic controller (PLC) 2.
  • PLC programmable logic controller
  • reference numeral 3 denotes a servo control device
  • reference numeral 4 denotes a servo motor.
  • PLC2 stores the control program P inside. Based on the control program P, a control command is sent from the PLC 2 to the servo control device 3. The servo control device 3 performs operation control and driving of the servo motor (control target) 4 based on the received control command.
  • the control program P is configured by a ladder program written in a ladder language or a motion program written in a motion language.
  • the control program P may be written in both a ladder language and a motion language.
  • a main program may be described in a ladder language
  • a subprogram in the main program may be described in a motion language.
  • the ladder program is a control program written in a ladder language, and a logical operation element composed of a switch, a timer, a lamp, etc. is arranged along with variables in a power line or rung, and the program is executed (scanned).
  • a motion program is a control program written in a motion language composed of one or more lines of text, and each line can contain multiple commands, variables, and arithmetic expressions. It is something to execute. In the first embodiment, a case where the control program P is described in a ladder language will be described.
  • the control program P is created using the computer 1, compiled, and stored in the PLC 2.
  • the control program P is first loaded into the computer 1 from the PLC 2 while the computer 1 and the PLC 2 are connected.
  • the control program P is saved (stored) in the PLC 2 again.
  • FIG. 2 is a diagram showing a state in which the ladder program P1 is displayed on the screen (display screen) 1a of the computer 1.
  • the ladder program P1 is a control program P written in a ladder language.
  • the control program P is created by the computer 1, or when the control program P is loaded and edited on the computer 1, the ladder program P1 is displayed on the screen 1a.
  • reference numeral 11 denotes an element.
  • the elements of the ladder program P1 are commands (control commands) and are associated with variables.
  • the command includes switches, timers, lamps, and the like as logical operations.
  • the command also includes arithmetic processing such as ADD (addition processing) and STORE (storage processing).
  • reference numeral 11a is a switch as an element
  • reference numeral 11b is a variable in the switch 11a
  • reference numeral 11c is a register (variable register) in which the variable 11b is stored.
  • Reference numeral 11d is a storage process as an element
  • reference numeral 11e is a variable in the storage process 11d
  • 11f is a variable register in which the variable 11e is stored.
  • the EXPLESSION window 12 is also displayed on the screen 1a.
  • the EXPLESSION window 12 is a window frame as an element displayed on the power supply line or the rung based on the EXPRESION function of the ladder program P1.
  • commands, arithmetic processes, variables, and the like described in text are displayed.
  • FIG. 3 is a diagram illustrating a state in which a watch window 13 serving as a monitoring target list is displayed on the screen 1a on which the ladder program P1 is displayed. This watch window 13 is displayed based on the function of the development support program Pa.
  • FIG. 4 is a configuration diagram showing an outline of the internal configuration of the computer (development support apparatus) 1.
  • the computer 1 is connected to a display device having a screen 1a, and has a CPU (arithmetic processing device) 1b as a main part of the computer 1 and a memory 1c as a storage device.
  • a development support program Pa is stored in the memory 1c.
  • the development support program Pa causes the computer 1 to function as a development support apparatus, details of which will be described later.
  • a database DB is also stored in the memory 1c.
  • This database DB has commands, variable names, and variable registers used in the ladder program P1 as data.
  • commands include switches, timers, lamps, SIN functions, COS functions, STORE (storage processing), ADD (addition processing), and the like.
  • Examples of the instruction code corresponding to the command include an instruction code 0x00 corresponding to the switch 11a and an instruction code 0x02 corresponding to the storage process (STORE) 11d.
  • the variable name is the name of a variable determined by the user and defined in the ladder program P1. In the first embodiment, for example, variable names such as “QAZ”, [WSX], “Pos1”, “Pos2” are used. Is done.
  • variable register is, for example, a register type (I / O / M / C / D%), A data type (B / W / L / F / Q%), And an address (5-digit number). And “MW00010”, “MB00001”, and “DW00000”.
  • the development support program Pa causes the CPU 1b to function as the display unit Pa1, the selection unit Pa2, and the analysis unit Pa3, thereby realizing variable monitoring in the ladder program P1.
  • the display unit Pa1 has a function of displaying the watch window 13 on the screen 1a of the computer 1.
  • the display unit Pa1 displays the watch window 13 on the screen 1a.
  • the development support program Pa may be started by double-clicking the icon of the development support program Pa.
  • a button for starting the development support program Pa may be displayed in the editing screen of the ladder program P1, and the development support program Pa may be started when the button is clicked.
  • the display unit Pa1 has a function of displaying in the watch window 13 information such as variable names, variable registers, and comments selected by the selection unit Pa2 and analyzed by the analysis unit Pa3. In addition, it has a function of displaying in the watch window 13 the variable value (current value of the variable) acquired by the analysis unit Pa3 based on the variable name or variable register information.
  • a variable column 13a, a variable value column 13b, and a comment column 13c are formed in the watch window 13, as shown in FIG. 4, a variable column 13a, a variable value column 13b, and a comment column 13c are formed.
  • the display unit Pa1 displays the variable name information analyzed by the analysis unit Pa3 in the variable column 13a, the variable value information in the variable value column 13b, and the comment information in the comment column 13c.
  • the variable column 13a may display variable register information in which a variable is stored instead of the variable name or together with the variable name.
  • the display unit Pa1 displays in the watch window 13 information having a short selection time (the time during which the information is being selected). Do not show.
  • the realization of the function may be realized by the selection unit Pa2, as will be described later, or may be realized by the display unit Pa1.
  • the selection unit Pa2 has a function of acquiring information selected by the user and transmitting the information to the analysis unit Pa3. Specifically, after the development support program Pa is started, when the user selects information by an input means such as a keyboard or a mouse on the editing screen of the ladder program P1, the information is acquired and sent to the analysis unit Pa3. And send. The selection of information is executed, for example, when the user clicks the switch 11a with the mouse. In general, the selected switch 11a is highlighted.
  • the switch 11g is selected by pressing the right cursor key “ ⁇ ” once after acquiring the information of the switch 11a by clicking the switch 11a with the mouse.
  • the information acquired by the selection unit Pa2 is updated from information related to the switch 11a to information related to the switch 11g.
  • the highlight position on the screen 1a is also moved from the switch 11a to the switch 11g.
  • the switch 11h is selected by pressing the cursor key “ ⁇ ” once more.
  • Information acquired by the selection unit Pa2 is updated from information related to the switch 11g to information related to the switch 11h.
  • the highlight position on the screen 1a is also moved from the switch 11a to the switch 11g.
  • the element selection can be quickly moved from the switch 11a to the switch 11g to the switch 11h.
  • the display unit Pa1 displays information related to the switch 11g (the variable name WSX, the value of the variable WSX, the variable register in which the variable value is stored). Are not displayed in the watch window 13.
  • the selection unit Pa2 realizes a function of not displaying the information when the state in which the information such as the element and the text is selected is continued for less than the predetermined time (hereinafter referred to as the selection time). .
  • the selection unit Pa2 transmits the information of the switch 11g to the analysis unit Pa3, and the selection time is less than the predetermined time (200 msec). In some cases, the selection unit Pa2 does not transmit the information of the switch 11g to the analysis unit Pa3. In other words, the selection unit Pa2 selects the information when the information selection time is longer than the predetermined time, and does not select the information when the information selection time is less than the predetermined time. ing.
  • variable registers, comments, and variable current values need not be acquired), delays to other functions can be prevented, and performance degradation can be prevented.
  • the display unit Pa1 may realize a function of not displaying the information in the watch window 13. For example, even if information on the switch 11g is sent from the selection unit Pa2 to the display unit Pa1 via the analysis unit Pa3, the display unit is selected when the selection time of the switch 11g by the selection unit Pa2 is short (less than a predetermined time). Pa1 may be configured not to display the information of the switch 11g in the watch window 13. Information to be acquired is not associated with the blank space 14 on the screen 1a. Therefore, information acquisition is not performed even if the user clicks the blank 14 with the mouse.
  • the analysis unit Pa3 has a function of analyzing the information (selection information) selected by the selection unit Pa2 for each type of information.
  • the information received from the selection unit Pa2 includes one or more of command information, variable name information, variable register information, and comment information.
  • the information in which these types are mixed is received from the selection unit Pa2, and the analysis unit Pa3 analyzes the information and sends it to the display unit Pa1.
  • the analysis unit Pa3 analyzes the information selected by the selection unit Pa2 based on the database DB.
  • commands, variable names, and variable registers used in the ladder program P1 are stored as data.
  • the analysis unit Pa3 collates the information acquired by the selection unit Pa2 with the data in the database DB, and analyzes the acquired information into command information, variable name information, and variable register information.
  • the analysis unit Pa3 analyzes the information in the acquired information, which is inconsistent with any data in the database DB, or the part to which the tag information indicating the comment is added, as comment information.
  • the analyzed information is transmitted to the display unit Pa1.
  • information from the selection unit Pa2 is text information.
  • the analysis unit Pa3 recognizes that the information received from the selection unit Pa2 is text information, analyzes the text information, analyzes it into command information, variable name information, variable register information, and comment information. It transmits to display part Pa1.
  • the analysis unit Pa3 acquires a value (variable value) stored in the variable register and transmits the value to the display unit Pa1. It has the function to do.
  • the analysis unit Pa3 includes a variable register corresponding to the variable (that is, , And the variable value stored in the variable register, and transmits the acquired variable value to the display unit Pa1.
  • variable value display process by the development support program Pa will be described based on the flowcharts of FIGS. 5A and 5B.
  • the development support program Pa is started (S1).
  • the watch window 13 is displayed on the screen 1a by the display unit Pa1 (S2).
  • the selected position on the screen 1a is moved by the cursor operation of the mouse or keyboard (S3). It is determined whether or not the selection time at the selected position is a predetermined time (for example, 200 msec) or longer (S4). If the selected time is longer than the predetermined time, information on the selected position is selected by the selection unit Pa2. Then, information on the selected position (for example, the switch 11a) is sent to the analysis unit Pa3.
  • the analysis unit Pa3 analyzes the information selected by the selection unit Pa2.
  • the analysis unit Pa3 analyzes an instruction code corresponding to the command (S6).
  • the analysis unit Pa3 analyzes the text information line by line (S8). Then, the command used in the text information is analyzed, and the instruction format is acquired (S9).
  • the determination whether the selected information is an element command or the analysis of each line of text information performed by the analysis unit Pa3 is performed by collating with the data in the database DB. That is, the analysis unit Pa3 collates the selected information with the information in the database DB, and determines that the selected information is a command when it matches the command data in the database DB.
  • the instruction format is a data array format corresponding to an instruction (command). In other words, for each command, this is a defined list that defines what data array is associated with the command and describes the command, variable name, variable register, and comment.
  • the instruction code corresponding to the command is analyzed and the instruction format is acquired (S10).
  • Each element in the acquired instruction format is analyzed by the analysis unit Pa3 (S11). That is, it is analyzed whether each element in the acquired instruction format is a command, a variable name, a variable register, or a comment.
  • the analysis unit Pa3 determines whether the element in the instruction format is a variable name or a variable register (S12). If the element is a variable register (S13), the variable value stored in the variable register is acquired (S15). When the element is a variable name (S13), information on the variable register corresponding to the variable name is acquired (S14), and the variable value stored in the variable register is acquired (S15).
  • the analysis unit Pa3 may determine whether or not the element in the instruction format is a comment or a comment register. In this case, when the element is a comment register, the comment stored in the comment register is acquired. When the element is a comment, information on the comment register corresponding to the comment is acquired, and the comment stored in the comment register is acquired. Whether or not an element is a comment may be determined based on whether or not a comment tag is added. If the element matches a database DB and does not match any data in the database DB, the comment You may judge that.
  • the analysis unit Pa3 transmits command information, variable name information, variable register information, and variable value information as analysis results to the display unit Pa1.
  • the display unit Pa1 displays the variable name information, variable register information, variable value information, and comment information received from the analysis unit Pa3 in the watch window 13 (S16). At this time, the display unit Pa1 displays variable name information or variable register information in the variable column 13a, displays variable value information in the variable value column 13b, and displays comment information in the comment column 13c.
  • Embodiment 2 the development support program Pa according to the second embodiment and the computer 1 as a development support apparatus for storing the program will be described.
  • symbol is attached
  • the control program P is composed of a motion program P2 described in a motion language.
  • the control program P is created using the computer 1 and compiled and stored in the PLC 2.
  • FIG. 6 is a diagram showing a state in which the motion program P2 is displayed on the screen 1a of the computer 1.
  • the motion program P2 is displayed on the screen 1a.
  • FIG. 7 is a diagram illustrating a state in which a watch window 13 serving as a monitoring target list is displayed on the screen 1a on which the motion program P2 is displayed. This watch window 13 is displayed based on the function of the development support program Pa.
  • reference numeral 21 denotes a line number
  • reference numeral 22 denotes a source code of the motion program P2.
  • the source code 22 is described line by line in text.
  • the source code 22 includes one or more of a command (control command) as text information, a variable name, and a variable register.
  • the development support program Pa causes the CPU 1b shown in FIG. 4 described above to function as the display unit Pa1, the selection unit Pa2, and the analysis unit Pa3, thereby realizing variable monitoring in the motion program P2.
  • the source code 22 is selected for each row by the selection unit Pa2. That is, when the user selects the line number 21 with the mouse or the cursor key, the text information of the source code 22 corresponding to the selected line number 21 is selected by the selection unit Pa2. When the user selects a part of the source code 22 with the mouse or the cursor key, the selection unit Pa2 selects the entire source code 22 of the line number 21 corresponding to the source code 22.
  • This development support program Pa causes the CPU 1b to function as the state determination unit Pa4.
  • the state determination unit Pa4 has a function of determining whether or not the motion program P2 has been compiled. Further, the state determination unit Pa4 has a function of determining whether or not the motion program P2 is being executed.
  • the analysis unit Pa3 reads the text information of the source code 22 selected by the selection unit Pa2 line by line. analyse.
  • the analysis unit Pa3 analyzes the text information of the source code 22 selected by the selection unit Pa2 in units of blocks. At this time, the block may extend over a plurality of lines.
  • the analysis unit Pa3 includes the text information of the source code 22 corresponding to the execution position of the motion program P2, and the selection unit. The text information of the source code 22 selected by Pa2 is analyzed in block units. At this time, the block may extend over a plurality of lines.
  • a block means a group of a series of commands and arithmetic expressions over one or more lines.
  • a series of commands and arithmetic expressions may not always be described in one line.
  • the mouse In the analysis of text information in units of blocks, the mouse is operated at any position in the block unit (that is, any position in the text on the first line or any position in the text on the second line). Alternatively, by selecting by a cursor operation, text information (a series of arithmetic expressions) for two lines can be analyzed as a variable register. In other words, in the analysis in units of blocks, it is possible to analyze all of “ML01000”, “ML01002”, and “ML01004” by selecting any position in the block unit.
  • variable value display process by the development support program Pa will be described with reference to the flowcharts of FIGS. 8A and 8B.
  • the development support program Pa is started during editing of the motion program P2 or after compilation (S21).
  • the watch window 13 is displayed on the screen 1a by the display unit Pa1 (S22).
  • the user moves the selected line on the screen 1a by operating the cursor with the mouse or keyboard (S23). It is determined whether or not the selection time on the selected line is equal to or longer than a predetermined time (for example, 200 msec) (S24). Is selected.
  • a predetermined time for example, 200 msec
  • the analysis unit Pa3 analyzes the information selected by the selection unit Pa2.
  • the analysis unit Pa3 analyzes the text information of the source code 22 line by line (S26). .
  • the analysis unit Pa3 performs text information of the source code 22 Are analyzed in units of blocks (S28).
  • the analysis unit Pa3 executes the motion program P2.
  • the text information of the source code 22 corresponding to the middle position and the text information of the source code 22 selected by the selection unit Pa2 are analyzed in block units (S29).
  • the command used in the selected text information is analyzed by the analysis unit Pa3, and the instruction format is acquired (S30).
  • Each element in the acquired instruction format is analyzed by the analysis unit Pa3 (S31). That is, it is analyzed whether each element in the acquired instruction format is a command, a variable name, a variable register, or a comment.
  • the analysis of the text information for each line and the analysis in block units performed by the analysis unit Pa3 is performed by collating with the data in the database DB. That is, the analysis unit Pa3 collates the selected information with the information in the database DB, and determines that the selected information is a command when it matches the command data in the database DB. Since the instruction format has been described in the first embodiment, description thereof is omitted.
  • the analysis unit Pa3 determines whether or not the element in the instruction format is a variable name or a variable register (S32). If the element is a variable register (S33), the variable value stored in the variable register is acquired (S35). When the element is a variable name (S33), information on a variable register corresponding to the variable name is acquired (S34), and a variable value stored in the variable register is acquired (S35).
  • the analysis unit Pa3 may determine whether or not the element in the instruction format is a comment or a comment register. In this case, when the element is a comment register, the comment stored in the comment register is acquired. When the element is a comment, information on the comment register corresponding to the comment is acquired, and the comment stored in the comment register is acquired. Whether or not an element is a comment may be determined based on whether or not a comment tag is added. If the element matches a database DB and does not match any data in the database DB, the comment You may judge that.
  • the analysis unit Pa3 transmits command information, variable name information, variable register information, and variable value information as analysis results to the display unit Pa1.
  • the display unit Pa1 displays the variable name information, variable register information, variable value information, and comment information received from the analysis unit Pa3 in the watch window 13 (S36). At this time, the display unit Pa1 displays variable name information or variable register information in the variable column 13a, displays variable value information in the variable value column 13b, and displays comment information in the comment column 13c.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Automation & Control Theory (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Programmable Controllers (AREA)

Abstract

コントローラに格納される制御プログラムを開発支援するコンピュータ(1)であって、制御コマンド情報、変数名情報、及び、変数用レジスタ情報が相互に関連付けられて構築されたデータベース(DB)と、制御プログラム内の情報をユーザによる選択操作に基づき選択情報として取得する選択部(Pa2)と、選択情報をデータベース(DB)に基づき情報の種類ごとに分析すると共に、変数の現在値を取得する分析部(Pa3)と、分析された選択情報を情報の種類ごとに画面に表示すると共に、変数の現在値を画面に表示する表示部(Pa1)とを有する。

Description

開発支援装置及び開発支援プログラム
 本発明は、開発支援装置及び開発支援プログラムに関する。
 近年、一般産業用機械あるいは産業用ロボット等の各種装置には高性能化が求められてきた。これらの各種装置を対象とする制御対象を制御するコントローラには、入出力(I/O)制御を得意とするプログラマブルロジックコントローラ(以下、PLCという。)が一般的に用いられているが、一方で、サーボやインバータを用いて各種装置の複雑な動きを高速・高精度に制御するマシンコントローラ(モーションコントローラともいう)が用いられてきている。
 これらのコントローラはラダー言語やモーション言語等の制御プログラムを用いてモーションの制御を行う制御装置として共通なものであって、コントローラ内部の制御プログラムを書き換えたり、制御プログラムに対してデバッグ作業を行ったりするために、コントローラに開発支援装置が接続される。開発支援装置がPLCに接続された例として、例えば特許文献1に記載のものがある。また、デバッグ作業において制御プログラム内の変数を監視するために画面に表示させる機能について、特許文献1,2に記載されている。
 制御プログラムとしてラダー言語を用いた場合(以下、ラダー言語を用いた制御プログラムラダープログラムという。)とモーション言語を用いた場合(以下、モーション言語を用いた制御プログラムモーションプログラムという。)とのいずれの場合でも、変数監視のためには、監視対象の変数を監視対象リストに登録する必要がある。監視対象リストに変数が登録されると、その変数が格納されているレジスタ内の値(変数値)が画面に表示され、変数値(変数の現在値)の監視が可能となる。
 従来は、監視対象の変数を登録するために、監視したい変数名を個別に監視対象リストに手入力していた。また、ラダープログラムにおいて変数に対応する素子(スイッチ、タイマ、ランプ等)を選択し、ドラッグ&ドロップしたり、モーションプログラムにおいて変数に対応するテキストを選択し、ドラッグ&ドロップしたりすることにより監視対象リストへの登録が行われていた。これらの選択は、例えば、マウスによる範囲指定等によって行われていた。
特開2008-293138号公報 特開平1-244549号公報
 上記のように、監視対象リストに監視対象の変数を登録する作業は面倒かつ不便であった。例えば、変数名を手入力によって監視対象リストに登録する際に、入力ミスがあると監視対象の変数の現在値を正しく表示することができなかった。また、変数を登録する作業において、変数の登録は、1個ずつ行う必要があり、不要になった変数についてもユーザの操作により削除する操作が必要であった。
 ラダープログラムは、コマンドや変数演算をテキスト形式で表現するEXPRESSION機能を有する場合がある。ここで、EXPRESSION機能とは、一般にプログラミング言語のC言語のように、複数のコマンド(命令)を一括して(1回のコマンド(命令)内で)、記述可能なテキスト形式で記述できるコマンド(命令)のことを指す。このEXPRESSION機能では、ラダー言語で表現された電源線又はラング内にEXPRESSIONウィンドウが表示され、そのEXPRESSIONウィンドウ内にコマンドや変数演算がテキスト形式で表示される。
 EXPRESSIONウィンドウ内の変数を監視対象リストに登録する場合、EXPRESSIONウィンドウ内に記述された変数を目視により確認し、監視したい変数名を監視対象リスト内に手入力する必要があった。手入力の際に入力ミスが発生すると、変数の値が正しく表示されず、変数の現在値の監視ができないという問題があった。
 モーションプログラムにおいて、変数を監視対象リストに登録する場合も、変数に対応するテキストを手入力したり範囲指定したりする必要があった。したがって、手入力の際に入力ミスが発生した場合には、変数の値が正しく表示されず、変数の現在値の監視ができないという上記同様の問題があった。変数に対応するテキストを範囲指定する場合に、不必要な部分まで指定してしまったり、必要な部分の一部が指定から漏れてしまったりすることもあった。そうすると、上記同様に、変数の値が正しく表示されず、変数の現在値の監視ができないという問題があった。
 本発明は、上記の事情に鑑みてなされたもので、ユーザに煩雑な操作を強いることなく、簡単な操作によって変数値(現在値)の監視を実現することのできる開発支援装置及び開発支援プログラムを提供することを例示的課題とする。
 上記の課題を解決するために、本発明の例示的側面としての開発支援装置は、表示画面を有し、制御対象を制御するためのコントローラに接続され、所定のプログラム言語によって記述されてコントローラに格納される制御プログラムを開発支援する開発支援装置であって、制御対象の動作制御又は演算処理を実行するための制御コマンド情報、動作制御又は演算処理に用いられる変数名情報、及び、変数名に対応する変数の現在値が格納される変数用レジスタ情報が相互に関連付けられて構築されたデータベースと、制御プログラム内の情報であって、制御コマンド情報、変数名情報、及び、変数用レジスタ情報のうち少なくとも1種類以上の情報を含む情報をユーザによる選択操作に基づき選択情報として取得する選択部と、選択部により取得された選択情報をデータベースに基づき情報の種類ごとに分析すると共に、変数名情報又は変数用レジスタ情報に基づき変数の現在値を取得する分析部と、分析部によって分析された選択情報を情報の種類ごとに表示画面に表示すると共に、分析部によって取得された変数の現在値を表示画面に表示する表示部と、を有する。
 選択部は、ユーザによる選択操作が同一の情報を所定時間以上継続して選択するものでない場合に、情報を選択情報として取得しなくてもよい。
 所定のプログラム言語は、ラダー言語、及び、プログラム言語のうち少なくともいずれか一方であってもよい。
 開発支援装置は、制御コマンド情報ごとに、制御コマンドに関連するデータの配列を規定する規定リストである命令フォーマットを更に有し、分析部は、選択部により取得された選択情報を命令フォーマットに基づき情報の種類ごとに分析してもよい。
 分析部は、選択部により取得された選択情報が制御コマンド情報を含む場合に、制御コマンド情報がテキスト情報であるか否かを判別し、選択情報がテキスト情報である場合に、選択情報を制御プログラムの1行の記述ごとに選択情報を分析してもよい。
 開発支援装置は、制御プログラムがコンパイル処理済みであるか否かを判断する状態判断部、を更に有してもよい。
 状態判断部が、制御プログラムが実行中であるか否かを更に判断してもよい。
 本発明の他の例示的側面としての開発支援プログラムは、制御対象を制御するためのコントローラに接続されたコンピュータを、所定のプログラム言語によって記述されてコントローラに格納される制御プログラム内の情報であって、制御コマンド情報、変数名情報、及び、変数用レジスタ情報のうち少なくとも1種類以上の情報をユーザによる選択操作に基づき選択情報として取得する選択部、選択部により取得された選択情報を制御対象の動作制御又は演算処理を実行するための制御コマンド情報、動作制御又は演算処理に用いられる変数名情報、及び、変数名に対応する変数の現在値が格納される変数用レジスタ情報が相互に関連付けられて構築されたデータベースに基づき情報の種類ごとに分析すると共に、変数名情報又は変数用レジスタ情報に基づき変数の現在値を取得する分析部、及び、分析部によって分析された選択情報を情報の種類ごとにコンピュータの表示画面に表示すると共に、分析部によって取得された変数の現在値を表示画面に表示する表示部、として機能させる。
 本発明の更なる目的又はその他の特徴は、以下添付図面を参照して説明される好ましい実施の形態によって明らかにされるであろう。
 本発明によれば、ユーザに煩雑な操作を強いることなく、簡単な操作によって変数監視を実現することができる。
本発明の実施形態1に係るコンピュータがプログラマブルロジックコントローラ(PLC)に接続された状態を示す概略構成図である。 図1に示すコンピュータの画面に、ラダープログラムを表示した状態を示す図である。 ラダープログラムが表示された画面上に監視対象リストとなるウォッチウィンドウが表示された状態を示す図である。 図1に示すコンピュータの内部構成の概略を示す構成図である。 実施形態1に係る開発支援プログラムによる変数値の表示プロセスを説明するためのフローチャートである。 実施形態1に係る開発支援プログラムによる変数値の表示プロセスを説明するためのフローチャートである。 実施形態2に係るコンピュータの画面にモーションプログラムを表示した状態を示す図である。 モーションプログラムが表示された画面上に監視対象リストとなるウォッチウィンドウが表示された状態を示す図である。 実施形態2に係る開発支援プログラムによる変数値の表示プロセスを説明するためのフローチャートである。 実施形態2に係る開発支援プログラムによる変数値の表示プロセスを説明するためのフローチャートである。
  [実施形態1]
 以下、本発明の実施形態1について図面を用いて説明する。図1は、本発明の実施形態1に係る開発支援装置としてのコンピュータ1がプログラマブルロジックコントローラ(PLC)2に接続された状態を示す概略構成図である。図1において、符号3はサーボ制御装置、符号4はサーボモータである。
 PLC2は、内部に制御プログラムPを格納している。その制御プログラムPに基づいて、PLC2からサーボ制御装置3に向けて制御指令が送出されるようになっている。サーボ制御装置3は、受信した制御指令に基づき、サーボモータ(制御対象)4の動作制御及び駆動を実行するようになっている。
 制御プログラムPは、ラダー言語によって記述されたラダープログラム又はモーション言語によって記述されたモーションプログラムによって構成されている。制御プログラムPは、ラダー言語とモーション言語の両方によって記述される場合もある。例えば、メインプログラムがラダー言語によって記述され、そのメインプログラム内のサブプログラムがモーション言語によって記述される場合がある。
 ここで、ラダープログラムとは、ラダー言語によって記述された制御用のプログラムであって、電源線又はラング内にスイッチ、タイマ、ランプ等で構成される論理演算素子を変数と共に配置しプログラム実行(スキャン)するものである。モーションプログラムとは、1又は複数行のテキストで構成されたモーション言語によって記述された制御用のプログラムであって、各行内に複数のコマンド、変数、演算式が記述可能であり、行ごとにプログラム実行するものである。実施形態1では、制御プログラムPがラダー言語により記述されている場合を説明する。
 制御プログラムPは、コンピュータ1を用いて作成され、コンパイルされた後にPLC2内部に格納される。既にPLC2内部に格納された制御プログラムPを編集する場合は、コンピュータ1とPLC2とが接続された状態で、まず、PLC2内部から制御プログラムPがコンピュータ1にロードされる。コンピュータ1上で編集作業が行われ、コンパイル処理が完了したら、再び制御プログラムPがPLC2内部へとセーブ(格納)される。
 図2は、コンピュータ1の画面(表示画面)1aに、ラダープログラムP1を表示した状態を示す図である。ラダープログラムP1は、ラダー言語により記述された制御プログラムPである。コンピュータ1によって制御プログラムPを作成する場合、又はコンピュータ1に制御プログラムPをロードして編集する場合に、画面1aにラダープログラムP1が表示される。
 図2において、符号11は素子である。ラダープログラムP1の素子はコマンド(制御コマンド)であり、変数と関連付けられる。コマンドは、論理演算としてのスイッチ、タイマ、ランプ等を含んでいる。また、コマンドは、ADD(加算処理)やSTORE(格納処理)等の演算処理も含む。例えば、符号11aは素子としてのスイッチであり、符号11bはスイッチ11aにおける変数であり、符号11cは変数11bが格納されるレジスタ(変数用レジスタ)である。符号11dは素子としての格納処理であり、符号11eは格納処理11dにおける変数であり、11fは変数11eが格納される変数用レジスタである。
 画面1aには、EXPRESSIONウィンドウ12も表示されている。EXPRESSIONウィンドウ12は、ラダープログラムP1が有するEXPRESSION機能に基づき電源線又はラング上に表示される素子としてのウィンドウ枠である。EXPRESSIONウィンドウ12内にはテキストで記述されたコマンドや演算処理、変数等が表示されている。電源線又はラング上にEXPRESSIONウィンドウ12を配置することにより、その内部にテキストで記述されたコマンドや演算処理等を実行させることができる。
 図3は、ラダープログラムP1が表示された画面1a上に監視対象リストとなるウォッチウィンドウ13が表示された状態を示す図である。このウォッチウィンドウ13は、開発支援プログラムPaの機能に基づき表示されている。
 図4は、コンピュータ(開発支援装置)1の内部構成の概略を示す構成図である。コンピュータ1は、画面1aを有する表示装置と接続されており、内部にコンピュータ1の主要部としてのCPU(演算処理装置)1bと記憶装置としてのメモリ1cとを有している。メモリ1c内には、開発支援プログラムPaが格納されている。開発支援プログラムPaがコンピュータ1を開発支援装置として機能させるが、詳細は後述する。メモリ1c内には、データベースDBも格納されている。
 このデータベースDBは、ラダープログラムP1で用いるコマンド、変数名、変数用レジスタをデータとして有している。コマンドとして、スイッチ、タイマ、ランプ、SIN関数、COS関数、STORE(格納処理)、ADD(加算処理)等を例示することができる。また、コマンドに対応する命令コードとして、スイッチ11aに対応する命令コード0x00や格納処理(STORE)11dに対応する命令コード0x02等を例示することができる。変数名は、ユーザが決定しラダープログラムP1内で定義した変数の名称であって、本実施形態1では、例えば「QAZ」、[WSX]、「Pos1」、「Pos2」等の変数名が使用される。変数用レジスタは、例えば、レジスタ種別(I/O/M/C/D・・・)とデータ型(B/W/L/F/Q・・・)とアドレス(5桁の数字)とを有して「MW00010」「MB00001」「DW00000」のように構成されている。
 開発支援プログラムPaは、CPU1bを表示部Pa1、選択部Pa2、分析部Pa3として機能させ、ラダープログラムP1における変数監視を実現する。
 表示部Pa1は、コンピュータ1の画面1a上にウォッチウィンドウ13を表示させる機能を有する。開発支援プログラムPaが起動されると、表示部Pa1が画面1a上にウォッチウィンドウ13を表示させるようになっている。具体的には、開発支援プログラムPaのアイコンをダブルクリックすることにより開発支援プログラムPaが起動されてもよい。また、ラダープログラムP1の編集画面内に開発支援プログラムPa起動用のボタンが表示されており、そのボタンをクリックすると開発支援プログラムPaが起動するようになっていてもよい。
 表示部Pa1は、選択部Pa2によって選択され、分析部Pa3によって分析された変数名、変数用レジスタ、コメント等の情報をウォッチウィンドウ13内に表示する機能を有する。また、変数名又は変数用レジスタの情報に基づいて分析部Pa3が取得した変数値(変数の現在値)をウォッチウィンドウ13内に表示する機能を有する。ウォッチウィンドウ13には、図4に示すように、変数欄13a、変数値欄13b、コメント欄13cが形成されている。表示部Pa1は、分析部Pa3によって分析された変数名情報を変数欄13aに、変数値の情報を変数値欄13bに、コメント情報をコメント欄13cに表示する。変数欄13aには、変数名に代えて、又は変数名と共に変数が格納されている変数用レジスタ情報が表示されてもよい。
 表示部Pa1は、選択部Pa2によって選択された情報が短時間で更新された場合に、選択時間(その情報を選択している状態が継続している時間)の短い情報をウォッチウィンドウ13内に表示しない。その機能の実現は、後述するように選択部Pa2によって実現されていてもよいし、表示部Pa1によって実現されていてもよい。
 選択部Pa2は、ユーザによって選択された情報を取得し、分析部Pa3に送信する機能を有する。具体的には、開発支援プログラムPaが起動された後に、ユーザがラダープログラムP1の編集画面上でキーボードやマウス等の入力手段によって情報を選択した場合に、その情報を取得して分析部Pa3へと送信する。情報の選択は、例えば、ユーザがマウスによってスイッチ11aをクリックすることにより実行される。一般的には、選択されたスイッチ11aは、ハイライト表示される。
 キーボードのカーソルキー「↑」「↓」「←」「→」を用いて選択位置を移動させることによっても、新たな情報の選択、すなわち取得情報の更新を行うことができる。例えば、図2において、スイッチ11aをマウスクリックすることによりスイッチ11aの情報を取得した後に、右カーソルキー「→」を1回押すことにより、スイッチ11gが選択される。それにより、選択部Pa2により取得される情報が、スイッチ11aに関する情報からスイッチ11gに関する情報へと更新される。このとき、画面1a上でのハイライト位置も、スイッチ11aからスイッチ11gへと移動する。
 更にカーソルキー「→」をもう1回押すことにより、スイッチ11hが選択される。選択部Pa2により取得する情報が、スイッチ11gに関する情報からスイッチ11hに関する情報へと更新される。このとき、画面1a上でのハイライト位置も、スイッチ11aからスイッチ11gへと移動する。
 カーソルキー「→」を素早く2回押すことにより、素子の選択をスイッチ11a→スイッチ11g→スイッチ11hへと素早く移動させることができる。このとき、スイッチ11gを短時間(例えば、200msec未満)しか選択しなかった場合に、表示部Pa1はスイッチ11gに関する情報(変数名WSXや変数WSXの値、変数値が格納されている変数用レジスタ等の情報)をウォッチウィンドウ13内に表示しない。この場合において、素子やテキスト等の情報を選択した状態が継続している時間(以下、選択時間という。)が所定時間未満である場合に、その情報を表示しない機能を選択部Pa2が実現する。すなわち、スイッチ11gに関する情報の選択時間が所定時間(200msec)以上である場合にのみ、選択部Pa2がスイッチ11gの情報を分析部Pa3へと送信し、その選択時間が所定時間(200msec)未満である場合に、選択部Pa2はスイッチ11gの情報を分析部Pa3へと送信しない。これを換言すると、選択部Pa2は、情報の選択時間が所定時間以上である場合にその情報を選択し、情報の選択時間が所定時間未満である場合にその情報を選択しない、ことを意味している。
 上記に示したように、情報の選択時間を設けることにより、ユーザが意図して選択していない場合(カーソルを移動している場合)は、表示部の描画の更新を実施しないで済む(変数名、変数用レジスタ、コメント、変数の現在値の取得処理を実施しないで済む)という理由があり、その他の機能への遅延を防ぎ、パフォーマンスの低下を防ぐことができる。
 なお、情報の選択時間が所定時間未満である場合に、その情報をウォッチウィンドウ13内に表示しない機能を表示部Pa1が実現してもよい。例えば、選択部Pa2から分析部Pa3を介してスイッチ11gの情報が表示部Pa1に送られても、選択部Pa2によるスイッチ11gの選択時間が短時間(所定時間未満)である場合に、表示部Pa1がスイッチ11gの情報をウォッチウィンドウ13内に表示しないように構成されていてもよい。画面1a上の空欄14には、取得すべき情報が対応付けられていない。したがって、ユーザがマウスで空欄14をクリックしても情報取得は行われない。
 分析部Pa3は、選択部Pa2によって選択された情報(選択情報)を情報の種類ごとに分析する機能を有する。選択部Pa2から受信した情報には、コマンド情報、変数名情報、変数用レジスタ情報及びコメント情報のうちの1つ又は複数が含まれている。これらの種類が混在した情報を選択部Pa2から受け取り、分析部Pa3は情報を分析して表示部Pa1へと送る。
 分析部Pa3は、データベースDBに基づいて選択部Pa2が選択した情報を分析する。データベースDB内には、ラダープログラムP1で用いるコマンド、変数名、変数用レジスタがデータとして格納されている。分析部Pa3は、選択部Pa2が取得した情報とデータベースDB内のデータとを照合し、取得情報をコマンド情報、変数名情報、変数用レジスタ情報に分析する。分析部Pa3は、取得情報内の情報であって、データベースDB内のいずれのデータとも整合しない部分、又はコメントを示すタグ情報が付加されている部分をコメント情報と分析する。分析された情報は、表示部Pa1へと送信される。
 なお、ユーザがEXPRESSIONウィンドウ12を選択した場合には、選択部Pa2からの情報はテキスト情報となる。このとき、分析部Pa3は、選択部Pa2から受け取った情報がテキスト情報であることを認識し、そのテキスト情報を分析してコマンド情報、変数名情報、変数用レジスタ情報、コメント情報に分析して表示部Pa1へと送信する。
 分析部Pa3は、選択部Pa2が取得した情報の中に変数用レジスタの情報が含まれる場合に、その変数用レジスタに格納されている値(変数値)を取得して表示部Pa1へと送信する機能を有する。分析部Pa3は、選択部Pa2が取得した情報の中に変数名の情報が含まれ、その変数に対応する変数用レジスタの情報が含まれない場合に、その変数に対応する変数用レジスタ(すなわち、その変数の変数値が格納されているレジスタ)の情報とその変数用レジスタに格納された変数値を取得して表示部Pa1へと送信する機能を有する。
 次に、この開発支援プログラムPaによる変数値の表示プロセスについて、図5A及び図5Bのフローチャートに基づいて説明する。
 ラダープログラムP1の編集中に、開発支援プログラムPaを起動する(S1)。開発支援プログラムPaの起動により、ウォッチウィンドウ13が表示部Pa1によって画面1a上に表示される(S2)。ユーザがマウス又はキーボードのカーソル操作によって画面1a上の選択位置が移動する(S3)。その選択位置での選択時間が所定時間(例えば、200msec)以上か否かが判断され(S4)、所定時間以上の場合に、選択部Pa2によりその選択位置の情報が選択される。そして、選択位置(例えば、スイッチ11a)の情報が分析部Pa3へと送られる。
 分析部Pa3は選択部Pa2が選択した情報を分析する。選択した情報が素子のコマンドである場合には(S5)、分析部Pa3は、そのコマンドに対応する命令コードを分析する(S6)。選択した情報がテキスト情報としてのコマンドである場合には(S7)、分析部Pa3によりそのテキスト情報が1行ずつ分析される(S8)。そして、テキスト情報内で使用されているコマンドが分析され、命令フォーマットが取得される(S9)。
 分析部Pa3によって行われる、選択した情報が素子のコマンドであるか否かの判断や、テキスト情報の1行ずつの分析は、データベースDB内のデータとの照合によって行われる。すなわち、分析部Pa3は、選択した情報とデータベースDB内の情報とを照合し、データベースDB内のコマンドデータと整合した場合に、その選択情報がコマンドであると判断する。命令フォーマットは、命令(コマンド)に応じたデータ配列のフォーマットである。すなわち、コマンドごとに、そのコマンドに関連してどのようなデータ配列で、コマンド、変数名、変数用レジスタ、コメントが記述されているかを規定した規定リストである。
 例えば、「ML01002=SIN(ML01000)」という演算式を例として説明する。コマンドがSIN関数である場合、命令フォーマットには、SINに続くデータが変数名又は変数用レジスタであることが規定される。また、「=」の前のデータは変数名又は変数用レジスタであることが規定される。データ内の「M」「L」に基づき、上記演算式の「=」の前のデータもSINの後に続くデータも変数用レジスタであることが分析される。
 選択した情報がテキスト情報としてのコマンドでない場合には(S7)、そのコマンドに対応する命令コードが分析され、命令フォーマットが取得される(S10)。分析部Pa3により、取得した命令フォーマット中の各要素が分析される(S11)。すなわち、取得した命令フォーマット中の各要素が、コマンド、変数名、変数用レジスタ、コメントのいずれであるかが分析される。
 分析部Pa3により、命令フォーマット中の要素が変数名又は変数用レジスタであるか否かが判断される(S12)。そして、要素が変数用レジスタである場合には(S13)、その変数用レジスタ内に格納された変数値が取得される(S15)。要素が変数名である場合には(S13)、その変数名に対応する変数用レジスタの情報が取得され(S14)、その変数用レジスタ内に格納された変数値が取得される(S15)。
 なお、変数名又は変数用レジスタであるか否かの判断と同様に、分析部Pa3により、命令フォーマット中の要素がコメント又はコメント用レジスタであるか否かが判断されてもよい。この場合、要素がコメント用レジスタである場合には、そのコメント用レジスタ内に格納されたコメントが取得される。要素がコメントである場合には、そのコメントに対応するコメント用レジスタの情報が取得され、そのコメント用レジスタ内に格納されたコメントが取得される。要素がコメントであるか否かについては、コメント用タグが付加されているか否かに基いて判断してもよいし、データベースDBと照合してデータベースDB内のいずれのデータとも整合しない場合にコメントであると判断してもよい。
 分析部Pa3により、分析した結果としてのコマンド情報、変数名情報、変数用レジスタ情報、変数値情報が表示部Pa1へと送信される。表示部Pa1は、ウォッチウィンドウ13内に分析部Pa3から受け取った変数名情報、変数用レジスタ情報、変数値情報、コメント情報を表示する(S16)。このとき、表示部Pa1は、変数欄13a内に変数名情報又は変数用レジスタ情報を表示し、変数値欄13bに変数値情報を表示し、コメント欄13cにコメント情報を表示する。
  [実施形態2]
 以下、実施形態2に係る開発支援プログラムPa及びそれを格納する開発支援装置としてのコンピュータ1について説明する。この実施形態2において、実施形態1と同様の構成については同様の符号を付し、その説明を省略する。
 実施形態2においては、制御プログラムPがモーション言語によって記述されたモーションプログラムP2により構成されている。制御プログラムPは、コンピュータ1を用いて作成され、コンパイル処理された後にPLC2内部に格納される。図6は、コンピュータ1の画面1aにモーションプログラムP2を表示した状態を示す図である。コンピュータ1によって制御プログラムPを作成する場合、又はコンピュータ1に制御プログラムPをロードして編集する場合に、画面1aにモーションプログラムP2が表示される。図7は、モーションプログラムP2が表示された画面1a上に監視対象リストとなるウォッチウィンドウ13が表示された状態を示す図である。このウォッチウィンドウ13は、開発支援プログラムPaの機能に基づき表示されている。
 図6において、符号21は行番号であり、符号22はモーションプログラムP2のソースコードである。ソースコード22はテキストで1行ずつ記述されている。ソースコード22は、テキスト情報としてのコマンド(制御コマンド)、変数名、変数用レジスタのうちの1つ又は複数を含む。実施形態2に係る開発支援プログラムPaは、前述の図4に示すCPU1bを表示部Pa1、選択部Pa2、分析部Pa3として機能させ、モーションプログラムP2における変数監視を実現する。
 この実施形態2においては、選択部Pa2により行ごとにソースコード22が選択される。すなわち、ユーザがマウス又はカーソルキーにより行番号21を選択すると、選択された行番号21に対応するソースコード22のテキスト情報が選択部Pa2により選択される。ユーザがマウス又はカーソルキーによりソースコード22の一部を選択した場合には、そのソースコード22に対応する行番号21のソースコード22全体を選択部Pa2が選択する。
 この開発支援プログラムPaは、CPU1bを状態判断部Pa4としても機能させる。状態判断部Pa4は、モーションプログラムP2がコンパイル処理済みか否かを判断する機能を有する。更に、状態判断部Pa4は、モーションプログラムP2が実行中であるか否かを判断する機能を有する。
 モーションプログラムP2がコンパイル処理済みでない(すなわち、編集中である。)と状態判断部Pa4が判断した場合は、分析部Pa3は、選択部Pa2によって選択されたソースコード22のテキスト情報を1行ずつ分析する。モーションプログラムP2がコンパイル処理済みであって実行中でないと状態判断部Pa4が判断した場合は、分析部Pa3は、選択部Pa2によって選択されたソースコード22のテキスト情報をブロック単位で分析する。このとき、ブロックは複数行にわたる場合もある。モーションプログラムP2がコンパイル処理済みであって実行中であると状態判断部Pa4が判断した場合は、分析部Pa3は、モーションプログラムP2の実行中位置に対応するソースコード22のテキスト情報と、選択部Pa2によって選択されたソースコード22のテキスト情報とをブロック単位で分析する。このとき、ブロックは複数行にわたる場合もある。
 なお、ブロックとは、1行又は複数行にわたる一連のコマンドや演算式のひとまとまりを意味する。テキスト情報によるソースコード22は、一連のコマンドや演算式が必ずしも1行中に記述されない場合がある。例えば、「ML01000=SIN(ML01002)+ML01004」という演算式が途中で改行されて、1行目に「ML01000=SIN(ML01002)」、2行目に「+ML01004」と記述される場合がある。このような場合に、テキスト情報の1行ずつの分析では、1行目が選択された場合は、変数用レジスタとして「ML01000」「ML01002」の2つのみが分析される。テキスト情報のブロック単位での分析では、前記のブロック単位中のいずれかの位置(すなわち、1行目のテキスト中のいずれかの位置又は2行目のテキスト中のいずれかの位置)をマウス操作又はカーソル操作により選択することで、2行分のテキスト情報(一連の演算式)を、変数用レジスタとして分析することができる。すなわち、ブロック単位での分析においては、ブロック単位中のいずれかの位置の選択により、「ML01000」「ML01002」「ML01004」のうすべてを分析することができる。
 次に、この開発支援プログラムPaによる変数値の表示プロセスについて、図8A及び図8Bのフローチャートに基づいて説明する。
 モーションプログラムP2の編集中又はコンパイル処理後に、開発支援プログラムPaを起動する(S21)。開発支援プログラムPaの起動により、ウォッチウィンドウ13が表示部Pa1によって画面1a上に表示される(S22)。ユーザがマウス又はキーボードのカーソル操作によって画面1a上の選択行が移動する(S23)。その選択行での選択時間が所定時間(例えば、200msec)以上か否かが判断され(S24)、所定時間以上の場合に、選択部Pa2によりその選択行における行番号21のソースコード22の情報が選択される。そして、そのソースコード22のテキスト情報が分析部Pa3へと送られる。分析部Pa3は選択部Pa2が選択した情報を分析する。
 状態判断部Pa4によりモーションプログラムP2がコンパイル処理済みでない(編集中である)と判断された場合は(S25)、分析部Pa3により、ソースコード22のテキスト情報が1行ずつ分析される(S26)。状態判断部Pa4によりモーションプログラムP2がコンパイル処理済みであると判断され(S25)、かつモーションプログラムP2が実行中でないと判断された場合は(S27)、分析部Pa3により、ソースコード22のテキスト情報がブロック単位で分析される(S28)。状態判断部Pa4によりモーションプログラムP2がコンパイル処理済みであると判断され(S25)、かつモーションプログラムP2が実行中であると判断された場合は(S27)、分析部Pa3により、モーションプログラムP2の実行中位置に対応するソースコード22のテキスト情報と、選択部Pa2によって選択されたソースコード22のテキスト情報とがブロック単位で分析される(S29)。
 選択されたテキスト情報内で使用されているコマンドが分析部Pa3により分析され、命令フォーマットが取得される(S30)。分析部Pa3により、取得した命令フォーマット中の各要素が分析される(S31)。すなわち、取得した命令フォーマット中の各要素が、コマンド、変数名、変数用レジスタ、コメントのいずれであるかが分析される。
 分析部Pa3によって行われる、テキスト情報の1行ごとの分析やブロック単位での分析は、データベースDB内のデータとの照合によって行われる。すなわち、分析部Pa3は、選択した情報とデータベースDB内の情報とを照合し、データベースDB内のコマンドデータと整合した場合に、その選択情報がコマンドであると判断する。命令フォーマットについては上記実施形態1において説明したので、説明を省略する。
 分析部Pa3により、命令フォーマット中の要素が変数名又は変数用レジスタであるか否かが判断される(S32)。そして、要素が変数用レジスタである場合には(S33)、その変数用レジスタ内に格納された変数値が取得される(S35)。要素が変数名である場合には(S33)、その変数名に対応する変数用レジスタの情報が取得され(S34)、その変数用レジスタ内に格納された変数値が取得される(S35)。
 なお、変数名又は変数用レジスタであるか否かの判断と同様に、分析部Pa3により、命令フォーマット中の要素がコメント又はコメント用レジスタであるか否かが判断されてもよい。この場合、要素がコメント用レジスタである場合には、そのコメント用レジスタ内に格納されたコメントが取得される。要素がコメントである場合には、そのコメントに対応するコメント用レジスタの情報が取得され、そのコメント用レジスタ内に格納されたコメントが取得される。要素がコメントであるか否かについては、コメント用タグが付加されているか否かに基いて判断してもよいし、データベースDBと照合してデータベースDB内のいずれのデータとも整合しない場合にコメントであると判断してもよい。
 分析部Pa3により、分析した結果としてのコマンド情報、変数名情報、変数用レジスタ情報、変数値情報が表示部Pa1へと送信される。表示部Pa1は、ウォッチウィンドウ13内に分析部Pa3から受け取った変数名情報、変数用レジスタ情報、変数値情報、コメント情報を表示する(S36)。このとき、表示部Pa1は、変数欄13a内に変数名情報又は変数用レジスタ情報を表示し、変数値欄13bに変数値情報を表示し、コメント欄13cにコメント情報を表示する。
 なお、本発明の実施形態では、開発支援装置としてのコンピュータがプログラマブルコントローラに接続された事例について説明したが、プログラマブルコントローラに替えて、マシンコントローラに接続されたものであっても構わない。以上、本発明の好ましい実施の形態を説明したが、本発明はこれらに限定されるものではなく、その要旨の範囲内で様々な変形や変更が可能である。
コンピュータ(開発支援装置):1
画面:1a
CPU:1b
メモリ:1c
プログラマブルロジックコントローラ(PLC):2
サーボ制御装置:3
サーボモータ(制御対象):4
素子:11
スイッチ:11a,11g,11h
スイッチ11aにおける変数:11b
変数用レジスタ:11c
格納処理:11d
格納処理11dにおける変数:11e
変数用レジスタ:11f
EXPRESSIONウィンドウ:12
ウォッチウィンドウ:13
変数欄:13a
変数値欄:13b
コメント欄:13c
空欄:14
行番号:21
ソースコード:22
データベース:DB
制御プログラム:P
ラダープログラム:P1
モーションプログラム:P2
開発支援プログラム:Pa
表示部:Pa1
選択部:Pa2
分析部:Pa3
状態判断部:Pa4

Claims (8)

  1.  表示画面を有し、制御対象を制御するためのコントローラに接続され、所定のプログラム言語によって記述されて前記コントローラに格納される制御プログラムを開発支援する開発支援装置であって、
     前記制御対象の動作制御又は演算処理を実行するための制御コマンド情報、前記動作制御又は演算処理に用いられる変数名情報、及び、該変数名に対応する変数の現在値が格納される変数用レジスタ情報が相互に関連付けられて構築されたデータベースと、
     前記制御プログラム内の情報であって、前記制御コマンド情報、前記変数名情報、及び、前記変数用レジスタ情報のうち少なくとも1種類以上の情報を含む情報をユーザによる選択操作に基づき選択情報として取得する選択部と、
     前記選択部により取得された前記選択情報を前記データベースに基づき情報の種類ごとに分析すると共に、前記変数名情報又は前記変数用レジスタ情報に基づき前記変数の現在値を取得する分析部と、
     前記分析部によって分析された前記選択情報を前記情報の種類ごとに前記表示画面に表示すると共に、前記分析部によって取得された前記変数の現在値を前記表示画面に表示する表示部と、を有する、開発支援装置。
  2.  前記選択部は、前記ユーザによる選択操作が同一の情報を所定時間以上継続して選択するものでない場合に、該情報を選択情報として取得しない、請求項1に記載の開発支援装置。
  3.  前記所定のプログラム言語は、ラダー言語、及び、プログラム言語のうち少なくともいずれか一方である、請求項1又は請求項2に記載の開発支援装置。
  4.  前記制御コマンド情報ごとに、該制御コマンドに関連するデータの配列を規定する規定リストである命令フォーマットを更に有し、
     前記分析部は、
     前記選択部により取得された前記選択情報を前記命令フォーマットに基づき情報の種類ごとに分析する、請求項1から請求項3のうちいずれか1項に記載の開発支援装置。
  5.  前記分析部は、
     前記選択部により取得された前記選択情報が前記制御コマンド情報を含む場合に、該制御コマンド情報がテキスト情報であるか否かを判別し、該選択情報がテキスト情報である場合に、該選択情報を前記制御プログラムの1行の記述ごとに前記選択情報を分析する、請求項4に記載の開発支援装置。
  6.  前記制御プログラムがコンパイル処理済みであるか否かを判断する状態判断部、を更に有する請求項1から請求項5に記載の開発支援装置。
  7.  前記状態判断部が、
     前記制御プログラムが実行中であるか否かを更に判断する、請求項6に記載の開発支援装置。
  8.  制御対象を制御するためのコントローラに接続されたコンピュータを、
     所定のプログラム言語によって記述されて前記コントローラに格納される制御プログラム内の情報であって、前記制御コマンド情報、前記変数名情報、及び、前記変数用レジスタ情報のうち少なくとも1種類以上の情報をユーザによる選択操作に基づき選択情報として取得する選択部、
     前記選択部により取得された前記選択情報を前記制御対象の動作制御又は演算処理を実行するための制御コマンド情報、前記動作制御又は演算処理に用いられる変数名情報、及び、該変数名に対応する変数の現在値が格納される変数用レジスタ情報が相互に関連付けられて構築されたデータベースに基づき情報の種類ごとに分析すると共に、前記変数名情報又は前記変数用レジスタ情報に基づき前記変数の現在値を取得する分析部、及び、
     前記分析部によって分析された前記選択情報を前記情報の種類ごとに前記コンピュータの表示画面に表示すると共に、前記分析部によって取得された前記変数の現在値を前記表示画面に表示する表示部、として機能させる、開発支援プログラム。
PCT/JP2012/077704 2012-10-26 2012-10-26 開発支援装置及び開発支援プログラム WO2014064830A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2014543097A JP5994862B2 (ja) 2012-10-26 2012-10-26 開発支援装置及び開発支援プログラム
PCT/JP2012/077704 WO2014064830A1 (ja) 2012-10-26 2012-10-26 開発支援装置及び開発支援プログラム
US14/695,140 US20150227348A1 (en) 2012-10-26 2015-04-24 Development support device and development support program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/077704 WO2014064830A1 (ja) 2012-10-26 2012-10-26 開発支援装置及び開発支援プログラム

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/695,140 Continuation US20150227348A1 (en) 2012-10-26 2015-04-24 Development support device and development support program

Publications (1)

Publication Number Publication Date
WO2014064830A1 true WO2014064830A1 (ja) 2014-05-01

Family

ID=50544223

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/077704 WO2014064830A1 (ja) 2012-10-26 2012-10-26 開発支援装置及び開発支援プログラム

Country Status (3)

Country Link
US (1) US20150227348A1 (ja)
JP (1) JP5994862B2 (ja)
WO (1) WO2014064830A1 (ja)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017016411A (ja) * 2015-07-01 2017-01-19 株式会社安川電機 開発支援プログラム、記録媒体、開発支援方法、及び開発支援装置
JP2017079008A (ja) * 2015-10-21 2017-04-27 株式会社キーエンス プログラマブル・ロジック・コントローラおよび制御方法
US10437226B2 (en) 2015-04-23 2019-10-08 Mitsubishi Electric Corporation Positioning control apparatus
JP2020071833A (ja) * 2018-11-02 2020-05-07 横河電機株式会社 エンジニアリング装置、エンジニアリング装置の制御方法及びプログラム

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6761158B1 (ja) * 2019-12-16 2020-09-23 株式会社安川電機 プログラム作成装置、プログラム作成方法、及びプログラム

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05257590A (ja) * 1992-03-13 1993-10-08 Hitachi Ltd キー入力文字の確定装置
JPH06131035A (ja) * 1992-10-19 1994-05-13 Honda Motor Co Ltd モニタデータ作成装置
JPH09319417A (ja) * 1996-05-31 1997-12-12 Keyence Corp 登録対象オブジェクトの登録方法,ラダープログラムの処理対象デバイスの登録方法,それらのコンピュータプログラムを記録した記録媒体,データ処理装置
JPH1011118A (ja) * 1996-06-24 1998-01-16 Keyence Corp シーケンス制御装置、データ処理装置、データ記録再生方法、及び記録媒体
JPH11327616A (ja) * 1998-05-20 1999-11-26 Digital Electronics Corp プログラム式表示装置用の表示画面作成方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08123515A (ja) * 1994-10-25 1996-05-17 Fanuc Ltd シーケンス・プログラムの表示方式
JP2004341671A (ja) * 2003-05-14 2004-12-02 Internatl Business Mach Corp <Ibm> 情報処理システム、制御方法、制御プログラム、及び記録媒体
JP4265423B2 (ja) * 2004-02-02 2009-05-20 村田機械株式会社 機械制御装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05257590A (ja) * 1992-03-13 1993-10-08 Hitachi Ltd キー入力文字の確定装置
JPH06131035A (ja) * 1992-10-19 1994-05-13 Honda Motor Co Ltd モニタデータ作成装置
JPH09319417A (ja) * 1996-05-31 1997-12-12 Keyence Corp 登録対象オブジェクトの登録方法,ラダープログラムの処理対象デバイスの登録方法,それらのコンピュータプログラムを記録した記録媒体,データ処理装置
JPH1011118A (ja) * 1996-06-24 1998-01-16 Keyence Corp シーケンス制御装置、データ処理装置、データ記録再生方法、及び記録媒体
JPH11327616A (ja) * 1998-05-20 1999-11-26 Digital Electronics Corp プログラム式表示装置用の表示画面作成方法

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10437226B2 (en) 2015-04-23 2019-10-08 Mitsubishi Electric Corporation Positioning control apparatus
JP2017016411A (ja) * 2015-07-01 2017-01-19 株式会社安川電機 開発支援プログラム、記録媒体、開発支援方法、及び開発支援装置
JP2017079008A (ja) * 2015-10-21 2017-04-27 株式会社キーエンス プログラマブル・ロジック・コントローラおよび制御方法
JP2020071833A (ja) * 2018-11-02 2020-05-07 横河電機株式会社 エンジニアリング装置、エンジニアリング装置の制御方法及びプログラム
US11215960B2 (en) 2018-11-02 2022-01-04 Yokogawa Electric Corporation Engineering apparatus, control method of engineering apparatus, and program for generating executable code for controlling target hardware

Also Published As

Publication number Publication date
US20150227348A1 (en) 2015-08-13
JPWO2014064830A1 (ja) 2016-09-05
JP5994862B2 (ja) 2016-09-21

Similar Documents

Publication Publication Date Title
JP5506822B2 (ja) プログラム作成支援装置
JP5994862B2 (ja) 開発支援装置及び開発支援プログラム
US7505817B2 (en) Programming automation by demonstration
US20130346842A1 (en) Programmable display device and drawing-data creation method
US10139805B2 (en) Ladder diagram monitoring device capable of additionally displaying operation situation of CNC in comment
CN112612238A (zh) 设置装置和plc系统
JP2012194680A (ja) 制御装置、制御システム、ツール装置および収集指示プログラム
US11960925B2 (en) Program generating device, program generating method, and information storage medium
KR20120085420A (ko) 컴퓨터 수치 제어 공작기계에서 대화형 프로그램을 이용한 가공 형상 입력 장치 및 방법
WO2018193503A1 (ja) プログラム作成装置
JP5153437B2 (ja) 制御プログラム作成装置
JP5830975B2 (ja) 動作制御装置
CN112559029B (zh) 逻辑组态元件、组态软件的使用方法、可读存储介质
CN111324088A (zh) 信息处理装置
KR100400060B1 (ko) 사출성형기의 제어장치
WO2020189142A1 (ja) 制御システム、制御方法、および制御プログラム
JP2533370B2 (ja) 制御プログラム作成方法
JP2533373B2 (ja) 制御プログラム作成方法
JP5152488B2 (ja) 作業機械の動作制御装置
JP2004234042A (ja) ラダー動作可変設定型シーケンス制御装置および入力支援装置
JPH045702A (ja) 制御プログラム作成装置
JP2533372B2 (ja) 制御プログラム作成方法
WO2014002125A1 (ja) 数値制御装置
JP3823938B2 (ja) プログラム作成装置
JP2533374B2 (ja) 制御プログラム作成方法

Legal Events

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

Ref document number: 12887066

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2014543097

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12887066

Country of ref document: EP

Kind code of ref document: A1