WO2020017248A1 - 制御装置、制御方法、および制御プログラム - Google Patents

制御装置、制御方法、および制御プログラム Download PDF

Info

Publication number
WO2020017248A1
WO2020017248A1 PCT/JP2019/025054 JP2019025054W WO2020017248A1 WO 2020017248 A1 WO2020017248 A1 WO 2020017248A1 JP 2019025054 W JP2019025054 W JP 2019025054W WO 2020017248 A1 WO2020017248 A1 WO 2020017248A1
Authority
WO
WIPO (PCT)
Prior art keywords
axis
correspondence information
output destination
unit
control device
Prior art date
Application number
PCT/JP2019/025054
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 オムロン株式会社
Publication of WO2020017248A1 publication Critical patent/WO2020017248A1/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/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • 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/18Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form

Definitions

  • the present invention relates to a control device for controlling a plurality of motors, a control method in the control device, and a control program executed by the control device.
  • FA factory automation
  • Such an FA system is not only a control device such as a PLC (Programmable Logic Controller), but also a CNC (Computer Numerical Control) and a machine tool that follows the CNC (hereinafter, also referred to as a “CNC machine tool”).
  • CNC machine tool a machine configuration called an "axis" may be defined, and a motor corresponding to the axis may be controlled.
  • Patent Document 1 discloses a control device that controls a plurality of robots, and each of the plurality of robots is configured to have a different combination of axes.
  • an appropriate combination of axes can be set according to a change in the situation due to a change in the process. It is possible to control the motor every time. For example, when the combination of axes to be used changes according to a change in the process, a command value is output to an output destination (such as an address of a driver connected to the motor) corresponding to the changed axis.
  • an output destination such as an address of a driver connected to the motor
  • An object of the present invention is to provide a technique capable of changing a combination of axes to be controlled without increasing a storage area.
  • a control device that controls a plurality of motors.
  • the control device is configured to calculate a command value for at least one or more of the plurality of axes forming the coordinate system, and to calculate a command value for each of the plurality of motors.
  • a storage unit for storing correspondence information for specifying an output destination corresponding to each of one or more axes, and an output destination of a command value calculated by the calculation unit based on the correspondence information stored by the storage unit
  • a changing unit that, when a predetermined condition is satisfied, changes an output destination corresponding to each of one or more axes to be calculated by the calculation unit in the correspondence information stored by the storage unit.
  • the output destination of the calculated command value based on the correspondence information for specifying the output destination corresponding to each of one or more axes for which the command value is to be calculated. Further, when the predetermined condition is satisfied, the output destination corresponding to each of one or more axes to be calculated is changed in the correspondence information. Therefore, there is no need to prepare and store in advance correspondence information for specifying output destinations corresponding to all combinations of axes to be controlled.
  • the output destination can be appropriately specified only by dynamically changing the output destination corresponding to each of one or more target axes. Thereby, the combination of axes to be controlled can be changed without increasing the storage area.
  • the calculation unit, the specification unit, and the change unit operate according to control commands defined in the form of function blocks.
  • the changing unit does not change the corresponding information while the output unit is specified based on the corresponding information by the specifying unit.
  • the correspondence information is used to specify the output destination
  • the content of the correspondence information is not changed, so that the change in the content of the correspondence information may affect the specification of the output destination. Absent.
  • control device further includes a first abnormality determination unit that determines that the axis is abnormal when the arithmetic unit calculates the command value for the axis corresponding to the output destination that cannot be specified based on the correspondence information. Prepare.
  • a command value is calculated for an axis corresponding to an output destination that cannot be identified based on the correspondence information, it can be determined that the axis is abnormal.
  • control device further includes a second abnormality determination unit that determines that an abnormality has occurred when a plurality of axes correspond to one output destination in the correspondence information.
  • the abnormality when a plurality of axes correspond to one output destination in the correspondence information, it can be determined that the abnormality is abnormal.
  • the predetermined condition is satisfied when a predetermined event occurs during execution of a control command for the arithmetic unit, the specifying unit, and the changing unit, or when an external command is input.
  • the content of the correspondence information can be dynamically changed when a predetermined event occurs during execution of a control command or when an external command is input.
  • a control method in a control device that controls a plurality of motors includes a step of calculating a command value for at least one or more of the plurality of axes constituting the coordinate system, and a step of calculating among the output destinations corresponding to each of the plurality of motors.
  • a predetermined condition is satisfied
  • the output destination of the calculated command value based on the correspondence information for specifying the output destination corresponding to each of one or more axes for which the command value is to be calculated. Further, when the predetermined condition is satisfied, the output destination corresponding to each of one or more axes to be calculated is changed in the correspondence information. Therefore, there is no need to prepare and store in advance correspondence information for specifying output destinations corresponding to all combinations of axes to be controlled.
  • the output destination can be appropriately specified only by dynamically changing the output destination corresponding to each of one or more target axes. Thereby, the combination of axes to be controlled can be changed without increasing the storage area.
  • a control program executed by a control device that controls a plurality of motors includes: a step of calculating a command value for at least one or more of a plurality of axes constituting the coordinate system; and a calculation target in a step of calculating among output destinations corresponding to the plurality of motors.
  • the output destination of the calculated command value based on the correspondence information for specifying the output destination corresponding to each of one or more axes for which the command value is to be calculated. Further, when the predetermined condition is satisfied, the output destination corresponding to each of one or more axes to be calculated is changed in the correspondence information. Therefore, there is no need to prepare and store in advance correspondence information for specifying output destinations corresponding to all combinations of axes to be controlled.
  • the output destination can be appropriately specified only by dynamically changing the output destination corresponding to each of one or more target axes. Thereby, the combination of axes to be controlled can be changed without increasing the storage area.
  • the combination of axes to be controlled can be changed without increasing the storage area.
  • FIG. 9 is a schematic diagram for describing an application example in a first step (preparation operation) of the control device according to the present embodiment.
  • FIG. 9 is a schematic diagram for describing an application example of changing the correspondence of the control device according to the present embodiment.
  • FIG. 9 is a schematic diagram for describing an application example in a second step (normal operation) of the control device according to the present embodiment.
  • 1 is a schematic diagram for explaining an example of the overall configuration of a control system according to the present embodiment.
  • FIG. 3 is a block diagram for describing a hardware configuration example of a control device according to the present embodiment.
  • FIG. 3 is a diagram for describing function blocks that define a control program executed by the control device according to the present embodiment. It is a figure for explaining an axis group structure.
  • FIG. 4 is a schematic diagram for explaining a first abnormality process executed by the control device according to the present embodiment.
  • FIG. 9 is a schematic diagram for explaining a second abnormal process executed by the control device according to the present embodiment.
  • FIG. 1 is a schematic diagram for describing an application example in a first step (preparation operation) of control device 100 according to the present embodiment.
  • FIG. 2 is a schematic diagram for describing an application example of changing the correspondence of control device 100 according to the present embodiment.
  • FIG. 3 is a schematic diagram for describing an application example in the second step (normal operation) of control device 100 according to the present embodiment.
  • control device 100 is configured to be able to control a plurality of motors.
  • servo motors 522_1, 522_2, 522_3, 522_4, and 522_5 (hereinafter, also collectively referred to as “servo motor 522”) are controlled by control device 100 as an example of a motor.
  • Each of the servomotors 522_1, 522_2, 522_3, 522_4, and 522_5 is connected to the control device 100 via the field network 2 and connected to the drivers 520_1, 520_2, 520_3, 520_4, and 520_5 (hereinafter, also collectively referred to as “driver 520”). ).
  • the control device 100 controls each servomotor 522 by outputting a command value to each driver 520 via the field network 2.
  • the driver 520_1 is referred to as “driver 1”
  • the driver 520_2 is referred to as “driver 2”
  • the driver 520_3 is referred to as “driver 3”
  • the driver 520_4 is referred to as “driver 4”
  • the driver 520_5 is referred to as “transport driver”. There is.
  • ⁇ The“ motor ”of the present invention is not limited to a servomotor, but is a concept including any drive device including a synchronous motor and an induction motor.
  • the “motor” of the present invention may also include a device that performs a linear motion instead of a rotary motion, such as a linear motor.
  • the corresponding command value is output (transmitted and communicated) from the control device 100 to each servo driver 520 via the field network 2.
  • the signal indicating the command value may be directly transmitted by connecting the servo driver 100 and each servo driver 520 by wiring.
  • a space defined by axes corresponding to one or more motors belonging to an arbitrary group is also referred to as a “coordinate system”. For example, when a plurality of motors belonging to a certain group operate a CNC machine tool along each of the X axis, Y axis, and Z axis, the motors belonging to the group belong to the “XYZ coordinate system”. Be associated. Focusing on the axial direction of each of such motors, in the following description, each group may be referred to as an “axial group”.
  • a plurality of axes can be defined in the same axial direction.
  • the X'-axis and the X "-axis are defined as axes having different rotation directions in the X-axis direction, and the respective axes are driven by different motors.
  • FIG. 4 described later shows a CNC machine tool 540.
  • the CNC machine tool 540 is a gantry-type assembling apparatus that assembles components to the workpiece W transported by the transport device 550.
  • the CNC machine tool 540 includes a base 545, a main body 544 movable in the Y-axis direction with respect to the base 545, a front portion 543 movable in the Z-axis direction with respect to the main body 544, and a front portion.
  • An arm 541 and an arm 542 that can move in the X-axis direction with respect to 543 are provided.
  • the X axis, the Y axis, and the Z axis are axes orthogonal to each other.
  • an X'-axis is defined as an axis used when the arm 541 moves independently of the arm 542.
  • an X ′′ axis is defined as an axis used when the arm 542 moves independently of the arm 541.
  • the servo motor 522_1 operates the arm 541 in the X-axis direction or the X'-axis direction.
  • the servomotor 522_2 operates the arm 542 in the X-axis direction or the X ′′ axis direction.
  • the servomotor 522_3 operates the main body 544 in the Y-axis direction.
  • the servomotor 522_4 operates the front portion 543 in the Z-axis direction.
  • the servo motor 522_5 operates the transfer device 550 in the transfer direction.
  • each of the arms 541 and 542 moves independently of each other and is arranged at a position for normal operation in preparation for attaching a component to the workpiece W.
  • each of the arm 541 and the arm 542 moves in a direction facing each other along the X axis (a direction from the outside to the inside of the front portion 543).
  • the arm 541 and the arm 542 move to positions close to each other to complete the preparation operation.
  • the CNC machine tool 540 performs a normal operation as a second step.
  • the parts are attached to the work W while the arms 541 and 542 move in the same direction along the X axis.
  • both the arm 541 and the arm 542 attach components to the workpiece W while moving from one end of the front portion 543 to the other end.
  • the arm 541 and the arm 542 move in different directions, and move independently of each other. For this reason, since the arm 541 and the arm 542 are not simultaneously controlled, the X 'axis is used for the servo motor 522_1 for moving the arm 541 and the servo motor 522_2 for moving the arm 542 as an axis along the X axis direction. Is defined as the X "axis.
  • the movement direction is the same between the arm 541 and the arm 542, and both move together. Therefore, the arm 541 and the arm 542 are simultaneously controlled. Therefore, a common X axis is defined for each of the servomotor 522_1 for moving the arm 541 and the servomotor 522_2 for moving the arm 542.
  • the servomotor 522_3 for moving the main body 544 in the Y-axis direction
  • the servomotor 522_4 for moving the front portion 543 in the Z-axis direction.
  • the Z axis is defined.
  • control device 100 includes a storage 108, a program execution unit 150, a storage unit (memory) 195, and an input / output refresh unit 180.
  • the control program 30 is stored in the storage 108.
  • the program execution unit 150 executes the control program 30 for each control cycle.
  • control program is a so-called sequence program, and is a concept including a program in which the entire program is scanned each time an execution is performed, and one or a plurality of command values are calculated each time an execution is performed.
  • the “sequence program” includes a program including one or a plurality of instructions described in accordance with the international standard IEC61131-3 defined by the International Electrotechnical Commission (IEC).
  • a “sequence program” may include sequence instructions and / or motion instructions.
  • the “sequence program” is not limited to the instruction described in accordance with the international standard IEC61131-3, and may include an instruction uniquely defined by a manufacturer or vendor of a PLC (programmable logic controller). As described above, the “sequence program” is suitable for control that requires immediacy and high speed.
  • the “sequence command” is basically one or a plurality of commands described by one or a plurality of logic circuits for calculating an input value, an output value, an internal value and the like. Basically, in one control cycle, the “sequence command” is executed from the beginning to the end, and in the next control cycle, the “sequence command” is executed again from the beginning to the end.
  • Motion command is used to calculate the position (velocity), velocity (velocity), acceleration (acceleration), jerk, angle, angular velocity, angular acceleration, angular jerk, etc. for an actuator such as a servomotor.
  • One or more instructions for calculating as a command value As for the “motion command”, the program from the beginning to the end of the motion command program (motion program) described by a function block, a numerical expression, or the like is executed in one control cycle. That is, the command value is calculated (updated) for each control cycle.
  • the program execution unit 150 includes a control command interpretation unit 152, a library 154, a calculation unit 159, a change unit 156, and a specification unit 158.
  • the control command interpreting unit 152 interprets the control command included in the control program 30 and executes a specified sequence operation (logical operation).
  • the library 154 provides a code corresponding to a control instruction other than a simple sequence included in the control program 30. For example, in a case where the control program 30 can be described using a function block that enables complex processing, it is necessary to refer to the control program 30 to interpret and execute the function block. The required code is obtained.
  • the calculation unit 159 calculates the command value 141 according to the motion command included in the control program 30.
  • the motion command defines the calculation of the command value 141 over a plurality of control cycles by one command, and the arithmetic unit 159 interprets such a motion command and updates the command value 141 for each control cycle. I do.
  • the one or more command values 141 calculated for each control cycle by the operation unit 159 are output to the storage unit 195.
  • the storage unit 195 stores the parameter 143, the axis group structure 140, and the command values 141 and 142.
  • the parameter 143 includes various parameters for calculating the command value 141 output to the driver 520 according to a situation such as the first step or the second step.
  • the parameters 143 include a position (Position), a velocity (Velocity), an acceleration (Acceleration), and a jerk (Jerk).
  • the axis group structure 140 is an object mainly including a status 144 and correspondence information 145.
  • the status 144 is data indicating whether or not the axis group structure 140 is being executed, more specifically, whether or not the output destination of the command value is being specified using the correspondence information 145.
  • the correspondence information 145 is data for specifying the output destination driver 520 corresponding to each axis (X axis, Y axis, Z axis, X 'axis, X "axis).
  • the correspondence information 145 all the axes (X axis, Y axis, Z axis, X 'axis, X "axis) constituting the coordinate system are arranged in advance, and a command is issued to any of the axes.
  • One of the drivers 1 to 4 which is the output destination of the value, is associated.
  • the example shown in FIG. 1 is an example of application in the first step (preparation operation).
  • all axes (X axis, Y axis, Z axis, X ′ axis, X ′′ axis) constituting the coordinate system are used.
  • the X 'axis, the X "axis, the Y axis, and the Z axis are used.
  • the driver 4 that drives the servomotor 522_4 is set as the output destination for the axis.As described above, since the X axis is not used in the first step, any driver is used for the X axis. Although not shown in the drawing, the blank is “NULL” in the correspondence information 145 shown in FIGS.
  • the command value 141 is calculated by a calculation by the calculation unit 159.
  • the X ′ axis, the X ′′ axis, the Y axis, and the Z axis are used, so the command value 141 for each of these axes is stored in the storage unit 195.
  • “a” for the Y axis ",” B “for the Z axis,” c “for the X 'axis, and” d "for the X axis are calculated as command values. Since the X-axis is not used in the first step, no command value is calculated for the X-axis.
  • the specifying unit 158 specifies the output destination of the command value 141 calculated by the calculating unit 159 based on the correspondence information 145 stored by the storage unit 195.
  • the specifying unit 158 includes a command value 141 associated with each of the X ′ axis, the X ′′ axis, the Y axis, and the Z axis, and an X ′ axis that can be specified by the correspondence information 145.
  • the output of the command value 141 associated with each of the X′-axis, the X ′′ -axis, the Y-axis, and the Z-axis based on the driver of the output destination associated with each of the axes.
  • the destination is specified, and the command value 142 associated with the output destination is stored in the storage unit 195.
  • the input / output refresh unit 180 transmits output data including the command value 142 to the field side at predetermined intervals. Thereby, control device 100 outputs a command value to driver 520 corresponding to the axis to be controlled.
  • the X ′ axis defined by the servo motor 522_1 switches to the X axis
  • the servo motor 522_2 Is switched to the X axis.
  • the calculation target of the command value by the calculation unit 159 also changes from the X ′ axis, the X ′′ axis, the Y axis, and the Z axis to the X axis, the Y axis, and the X axis. Changed to Z axis.
  • the output destination of each command value is also changed from the output destination corresponding to each of the X 'axis, the X "axis, the Y axis, and the Z axis to the output destination corresponding to each of the X, Y, and Z axes. It must be.
  • the control target axes The storage area of the storage unit 195 increases as the number of combinations (axis groups) increases. That is, correspondence information dedicated to the axis group composed of the X ′ axis, X ′′ axis, Y axis, and Z axis and corresponding information dedicated to the axis group composed of the X axis, Y axis, and Z axis are prepared in advance.
  • the storage area of the storage unit 195 increases, and the parameter 143 also includes a parameter dedicated to an axis group including an X ′ axis, an X ′′ axis, a Y axis, and a Z axis. If parameters dedicated to the axis group including the X axis, the Y axis, and the Z axis are prepared in advance and stored in the storage unit 195, the storage area of the storage unit 195 increases.
  • the control device 100 for one axis group, in the correspondence information 145, all axes (X axis, Y axis, Z axis, X ′) constituting the coordinate system regardless of the type of process. , X ′′ axis) are specified in advance, and one of the drivers 1 to 4 that is the output destination of the command value is associated with one of all the axes.
  • the output destination corresponding to each of one or more axes to be calculated by the calculation unit 159 is changed in the same correspondence information 145 stored by the storage unit 195.
  • the predetermined condition is as follows. Holds when a predetermined internal event occurs during execution of the control program, or when an external command such as a user operation in the support device 200 described later is input. That.
  • the driver 1 is set as the output destination for the X ′ axis and the driver 2 is set as the output destination for the X ′′ axis, while the output is set for the X axis.
  • the destination is not set (NULL)
  • the output destination is not set for the X ′ axis and the X ′′ axis (NULL) with the shift to the second step, while the driver 1 is set for the X axis.
  • the driver 2 are set as output destinations.
  • one or more command values 146 are calculated again by the calculation unit 159.
  • an X axis, a Y axis, and a Z axis are used, and “ ⁇ ” is applied to the X axis, “ ⁇ ” is applied to the Y axis, and “ ⁇ ” is applied to the Z axis. It is calculated as the command value 146. Since the X 'axis and X "are not used in the second step, no command value is calculated for these axes.
  • the specifying unit 158 specifies the output destination of the command value 146 calculated by the calculating unit 159 based on the correspondence information 145 after the correspondence between each axis and the output destination is changed by the changing unit 156. I do.
  • the specifying unit 158 includes the command value 146 associated with each of the X axis, the Y axis, and the Z axis, and the X axis, the Y axis, and the Z axis that can be specified by the corresponding information 145.
  • the output destination of the command value 146 associated with each of the X-axis, Y-axis, and Z-axis is specified based on the output destination of the driver associated with each of 147 is stored in the storage unit 195.
  • the input / output refresh unit 180 transmits the output data including the command value 147 to the field side, so that the command value is output to the driver 520 corresponding to the axis to be controlled.
  • the specifying unit 158 specifies the output destination of the command value based on the correspondence information 145 for specifying the output destination corresponding to each of one or more axes for which the command value is to be calculated. Further, when the predetermined condition is satisfied by the change unit 156, the output destination corresponding to each of one or more axes to be calculated is changed in the correspondence information 145. For this reason, there is no need to prepare and store correspondence information for specifying output destinations corresponding to all combinations of axes to be controlled, and when the predetermined condition is satisfied, the correspondence information 145 The output destination can be appropriately specified only by dynamically changing the output destination corresponding to each of one or more axes to be calculated. Thereby, the combination of axes to be controlled can be changed without increasing the storage area.
  • control device 100 As described above, the application example of the control device 100 according to the present embodiment has been described. Hereinafter, the configuration and processing of control device 100 according to the present embodiment will be described in more detail.
  • FIG. 4 is a schematic diagram for explaining an example of the overall configuration of the control system 1 according to the present embodiment.
  • FIG. 4 shows a control system 1 centered on the control device 100 according to the present embodiment.
  • the control device 100 is equivalent to an industrial controller that controls a control target such as various facilities and devices.
  • the control device 100 is a kind of computer that executes a control operation, and is typically embodied as a PLC (programmable controller).
  • the control device 100 is connected to various field devices 500 via the field network 2.
  • the control device 100 exchanges data with one or more field devices 500 via the field network 2 or the like.
  • the control operation executed by the control device 100 is a process of collecting data (input data) collected or generated in the field device 500 (input process), and generates data (output data) such as a command value for the field device 500. Processing (arithmetic processing), processing (output processing) for transmitting the generated output data to the target field device 500, and the like are included.
  • the field network 2 employs a bus or network for performing periodic communication.
  • EtherCAT registered trademark
  • EtherNet / IP registered trademark
  • DeviceNet registered trademark
  • CompoNet registered trademark
  • EtherCAT registered trademark
  • EtherCAT is preferable in that the arrival time of data is guaranteed.
  • Any field device 500 can be connected to the field network 2.
  • the field device 500 includes an actuator that gives some physical action to a manufacturing device or a production line on the field side, and an input / output device that exchanges information with the field.
  • Data is exchanged between the control device 100 and the field device 500 via the field network 2, and the exchanged data is updated in a very short period of the order of several hundred ⁇ sec to several tens msec. Will be.
  • control device 100 controls the CNC machine tool 540 and the transport device 550 that supplies the work W to the CNC machine tool 540.
  • the CNC machine tool 540 is a gantry-type assembling apparatus that assembles components to the workpiece W transported by the transport device 550.
  • the CNC machine tool 540 is not limited to the illustrated one, and can be applied to any machining apparatus such as a lathe, a milling machine, and an electric discharge machine.
  • the CNC machine tool 540 and the transfer device 550 are driven according to a command value from the control device 100.
  • the work W transferred by the transfer device 550 is arranged on the work table 554, and the processing specified by the CNC machine tool 540 is performed.
  • the field device 500 includes a remote I / O (Input / Output) device 510, servo drivers 520_1, 520_2, 520_3, 520_4, servo motors 522_1, 522_2, 522_3, 522_4, and a servo driver. 530.
  • a remote I / O (Input / Output) device 510 servo drivers 520_1, 520_2, 520_3, 520_4, servo motors 522_1, 522_2, 522_3, 522_4, and a servo driver.
  • the remote I / O device 510 typically includes a communication coupler that performs communication via the field network 2 and an input / output unit (hereinafter, referred to as an “I / O unit”) for acquiring input data and outputting output data. ").
  • the remote I / O device 510 includes a device that collects input data such as an input relay and various sensors (for example, an analog sensor, a temperature sensor, a vibration sensor, and the like), an output relay, a contactor, a servo driver, and any other devices.
  • a device that exerts some action on the field, such as an actuator of this type, is connected.
  • the field device 500 is not limited to these, and may be any device that collects input data (for example, a visual sensor), any device that provides some action according to output data (for example, an inverter device), various robots, and the like. Can be adopted.
  • the servomotors 522_1, 522_2, 522_3, 522_4 are incorporated as a part of the CNC machine tool 540, and the servo driver 530 drives the servomotor 532 connected to the conveyor of the transfer device 550.
  • Servo drivers 520_1 to 520_4, 530 drive corresponding servo motors 522 in accordance with command values (for example, position command values and speed command values) from control device 100.
  • the control device 100 is also connected to other devices via the upper network 6.
  • Ethernet registered trademark
  • EtherNet / IP registered trademark
  • one or more server devices 300 and one or more display devices 400 may be connected to the upper network 6.
  • a database system As the server device 300, a database system, a manufacturing execution system (MES: Manufacturing Execution System), or the like is assumed.
  • the manufacturing execution system acquires information from the manufacturing apparatus or equipment to be controlled, monitors and manages the entire production, and can also handle order information, quality information, shipping information, and the like.
  • the present invention is not limited to this, and an apparatus for providing an information service may be connected to the upper network 6.
  • the information system service a process of acquiring information from a manufacturing apparatus or equipment to be controlled and performing a macro or micro analysis is assumed. For example, data mining that extracts some characteristic trends contained in information from controlled manufacturing equipment and equipment, and machine learning tools to perform machine learning based on information from controlled equipment and machines are assumed. Is done.
  • the display device 400 receives a user's operation and outputs a command or the like corresponding to the user's operation to the control device 100, and graphically displays a calculation result or the like in the control device 100.
  • a support device 200 can be connected to the control device 100.
  • the support device 200 is a device that supports preparation necessary for the control device 100 to control a control target.
  • the support device 200 is connected to the development environment (a program creation / editing tool, a parser, a compiler, and the like) for a program (for example, a control program) executed by the control device 100, the control device 100, and the control device 100.
  • the ability to modify and change programs, etc. online are examples of configuration information (configuration) of various devices, a function of outputting a generated user program (for example, a control program) to the control device 100, and a user program (for example, control) executed on the control device 100.
  • FIG. 5 is a block diagram for describing a hardware configuration example of control device 100 according to the present embodiment.
  • the control device 100 is an arithmetic processing unit called a CPU unit, and includes a processor 102, a chipset 104, a main memory 106, a storage 108, a host network controller 110, a USB A (Universal Serial Bus) controller 112, a memory card interface 114, an internal bus controller 120, and a field network controller 130 are included.
  • the processor 102 includes a CPU (Central Processing Unit), an MPU (Micro Processing Unit), a GPU (Graphics Processing Unit), and the like. As the processor 102, a configuration having a plurality of cores may be adopted, or a plurality of processors 102 may be arranged.
  • the chipset 104 controls the processor 102 and peripheral elements, thereby realizing overall processing in the control device 100.
  • the main memory 106 includes a volatile storage device such as a DRAM (Dynamic Random Access Memory) and an SRAM (Static Random Access Memory).
  • the storage unit (memory) 195 illustrated in FIG. 1 is typically realized by the main memory 106.
  • the storage 108 is composed of, for example, a non-volatile storage device such as a hard disk drive (HDD) or a solid state drive (SSD).
  • the processor 102 reads out various programs stored in the storage 108, expands them in the main memory 106, and executes them to realize control according to the control target and various processes.
  • the storage 108 stores, in addition to the system program 34 for realizing basic functions, a user program (for example, the control program 30) created according to the manufacturing apparatus or equipment to be controlled.
  • the upper network controller 110 controls data exchange with the server device 300 and the display device 400 (see FIG. 4) via the upper network 6.
  • the USB controller 112 controls data exchange with the support device 200 via a USB connection.
  • the support device 200 is not limited to a device that can communicate with the control device 100 via a USB connection, and may be capable of communicating with the control device 100 by Ethernet (Ethernet) communication.
  • the memory card interface 114 is configured so that the memory card 116 is detachable, and can write data to the memory card 116 and read various data (user program, trace data, etc.) from the memory card 116. I have.
  • the internal bus controller 120 controls the exchange of data with the I / O unit 122 mounted on the control device 100.
  • the field network controller 130 controls exchange of data with a field device via the field network 2.
  • FIG. 5 shows an example of a configuration in which necessary functions are provided by the processor 102 executing a program.
  • some or all of the provided functions may be replaced by a dedicated hardware circuit (for example, an ASIC). Or an FPGA or the like).
  • the main part of the control device 100 may be realized using hardware that conforms to a general-purpose architecture (for example, an industrial personal computer based on a general-purpose personal computer).
  • a general-purpose architecture for example, an industrial personal computer based on a general-purpose personal computer.
  • OSs Operating Systems
  • control device 100 the control device 100, the support device 200, and the display device 400 are configured separately, but all or some of these functions are integrated into a single device. May be adopted.
  • FIG. 6 is a diagram for describing function blocks that define a control program executed by control device 100 according to the present embodiment.
  • the control program includes a change program for changing the correspondence between each axis and the output destination in the correspondence information (correspondence information 145 shown in FIGS. 1 to 3), a command value, and a corresponding program based on the correspondence information.
  • a specifying program for specifying the output destination of the command value.
  • the change program may be defined in the form of function blocks 600 and 650 called “CNC_ChangeAxes”.
  • the left terminal is an input terminal
  • the right terminal is an output terminal.
  • the function block 600 is a change program used in the first step
  • the function block 650 is a change program used in the second step.
  • the specific program may be defined in the form of function blocks 700 and 750 called “CNC_Move”.
  • the left terminal is an input terminal
  • the right terminal is an output terminal.
  • the function block 700 is a specific program used in the first step
  • the function block 750 is a specific program used in the second step.
  • “AxisGroup” is given identification information (for example, an identification number) for specifying an axis group for which correspondence information is to be changed.
  • "AxisGroup@No.1" is given to "AxisGroup” as identification information for specifying axis group 1.
  • Exec An instruction to execute the function block 600 is given to “Execute”.
  • the function block 600 is activated when a predetermined event occurs during execution of the control program 30 (control command).
  • the activation condition of the function block 600 is satisfied when “Done1” is turned ON in the output of the function block (not shown) executed before the function block 600.
  • the function block 600 is not limited to being executed when an internal event occurs during execution of the control program 30 (control instruction), and may be executed when an external command is input.
  • the function block 600 may be executed when an external command such as a user operation on the support device 200 or another user terminal (not shown) (not shown) is input.
  • “AxisComp.” (Abbreviation of “AxisComposition”) is provided with an axis configuration for specifying an output destination corresponding to each axis specified by the user. For example, in the first step, “NULL” for the X axis, “Drive3” (driver 3) for the Y axis, “Drive4” (driver 4) for the Z axis, and “Drive 4” for the X ′ axis.
  • the axis configuration indicating the correspondence relationship between “Drive1” (driver 1) and “Drive2” (driver 2) with respect to the X ”axis is given to“ AxisComp. ”.
  • AxisComp Is not limited to the one described in the control program, and may be determined based on an external command input.
  • the axis configuration may be changed based on an external command input such as a user operation on a user terminal (for example, a touch panel display) not shown. By doing so, the number of axis group patterns can be increased by a user operation on the user terminal.
  • “AxisGroup” outputs identification information (for example, identification number) for specifying the axis group given to “AxisGroup” on the input side.
  • identification information for example, identification number
  • "AxisGroup@No.1" is output from "AxisGroup” as identification information for specifying axis group 1.
  • Done is turned on when the execution of the function block 600 is completed, and at this time, the variable indicated by the subsequent “Done2” is also turned on.
  • ErrorID outputs an error code when any error occurs in the execution of the function block 600.
  • ⁇ “Coord” is given identification information (for example, an identification number) for specifying an axis group for which a command value is to be calculated.
  • identification information for example, an identification number
  • “AxisGroup @ No. 1” is given to “Coord” as identification information for identifying the axis group 1.
  • Exec An instruction to execute the function block 700 is given to “Execute”.
  • the function block 700 is activated when a predetermined event occurs during execution of the control program 30 (control command).
  • a predetermined event occurs during execution of the control program 30 (control command).
  • “Error” is OFF and “Done2” is ON, so that the function block 700 is activated.
  • the condition holds.
  • the function block 700 is not limited to being executed when an internal event occurs during the execution of the control program 30 (control instruction), but may be executed when an external command is input.
  • the function block 700 may be executed when an external command such as a user operation on the support device 200 or another user terminal (for example, a touch panel display) not shown is input.
  • LogicalMotorNo is provided with corresponding information for specifying the axis to be calculated. For example, in the case of the first step, “NULL” for the X axis, “Drive3” (driver 3) for the Y axis, “Drive4” (driver 4) for the Z axis, and “Drive 4” for the X ′ axis. Correspondence information indicating the correspondence between "Drive1” (driver 1) and “Drive2" (driver 2) for the X "axis is given to" LogicalMotorNo ".
  • “Position” is given the target position of the operation. “Velocity” is given a target speed of the operation. “Acceleration” is given a target acceleration of the operation. “Jerk” is given a target jerk of the operation. “MoveMode” is given a designated operation mode such as an operation mode based on an absolute position or an operation mode based on a relative position.
  • “AxisGroup” outputs identification information (for example, identification number) for specifying an axis group given to “Coord” on the input side.
  • identification information for example, identification number
  • "AxisGroup@No.1" is output from "AxisGroup” as identification information for specifying axis group 1.
  • ErrorID outputs an error code when any error occurs in the execution of the function block 700.
  • the function block 650 in the second step has basically the same function as the function block 600 in the first step described above. However, in the second step, correspondence information having contents different from the correspondence information in the first step is obtained.
  • "AxisComp.” is not limited to the one described in the control program, and may be determined based on an external command input.
  • the axis configuration may be changed based on an external command input such as a user operation on a user terminal (for example, a touch panel display) not shown. By doing so, the number of axis group patterns can be increased by a user operation on the user terminal.
  • the function block 650 is activated when a predetermined event occurs during execution of the control program 30 (control command). As an example of the occurrence of the predetermined event, in the output of the function block 700 executed before the function block 650, “Error” is OFF and “Done3” is ON, so that the function block 650 is activated. The condition holds.
  • the function block 650 is not limited to being executed when an internal event occurs during the execution of the control program 30 (control instruction), and may be executed when an external command is input. For example, the function block 650 may be executed when an external command such as a user operation on the support device 200 or another user terminal (for example, a touch panel display) not shown is input.
  • the function block 750 in the second step has basically the same function as the function block 700 in the second step described above.
  • ⁇ “Coord” is given identification information (for example, an identification number) for specifying an axis group for which a command value is to be calculated.
  • identification information for example, an identification number
  • “AxisGroup @ No. 1” is given to “Coord” as identification information for identifying the axis group 1.
  • Exec An instruction to execute the function block 750 is given to “Execute”.
  • the function block 750 is activated when a predetermined event occurs during execution of the control program 30 (control command).
  • a predetermined event occurs during execution of the control program 30 (control command).
  • “Error” is OFF and “Done4” is ON, so that the function block 750 is activated.
  • the condition holds.
  • the function block 750 is not limited to being executed when an internal event occurs during execution of the control program 30 (control instruction), but may be executed when an external command is input.
  • the function block 750 may be executed when an external command such as a user operation on the support device 200 or another user terminal (not shown) (not shown) is input.
  • the control device 100 sequentially executes the above-described function blocks based on the control cycle, thereby acquiring the correspondence information for the first process (corresponding information 145 shown in FIG. 1) for one axis group according to the function block 600. Then, a command value is calculated based on the correspondence information for the first process according to the function block 700, and an output destination is designated. Thereby, the command value is output to an appropriate output destination based on the correspondence information for the first process.
  • control device 100 executes the function blocks as described above in order based on the control cycle, thereby changing the correspondence information for the first process for the one axis group according to the function block 650 and the correspondence information for the second process.
  • the corresponding information for the second process corresponding information 145 shown in FIG. 3
  • the command value is output to an appropriate output destination based on the correspondence information for the second process.
  • the control device 100 when the predetermined condition is satisfied, the control device 100 appropriately changes the output destination corresponding to each of the one or more axes to be calculated in the correspondence information, and appropriately changes the output destination. Can be specified. Thereby, the combination of axes to be controlled can be changed without increasing the storage area.
  • FIG. 7 is a diagram for explaining the axis group structure.
  • a plurality of shaft group structures are provided.
  • Each axis group structure includes identification information (for example, an identification number) for identifying an axis group, “Status” (status 144 shown in FIGS. 1 to 3), and “AxisComposition”.
  • “AxisGroup No. 1” is stored as identification information for specifying axis group 1.
  • “Status” becomes “Executing” when the correspondence information (AxisComposition) is referenced by the function blocks 700 and 750 that are the specific programs described above.
  • “AxisComposition” corresponds to the correspondence information, and is data for specifying the output destination of the driver 520 corresponding to each axis (X axis, Y axis, Z axis, X ′ axis, X ′′ axis).
  • the function block 650 which is a change program is executed.
  • the axis group structure for the first step is changed to the axis group structure for the second step.
  • “AxisComposition” for the second step is defined.
  • “Drive4” for the Z axis is defined by “AxisComposition”.
  • a correspondence such as “NULL” for the X ′ axis and “NULL” for the X axis is defined by “AxisComposition”.
  • control device 100 changes the content of the correspondence information according to the type of the process without changing the framework of the axis group 1 in the axis group structure of the axis group 1.
  • the command value can be output to an appropriate output destination according to the type of the process.
  • FIG. 8 is a diagram for explaining a change in the content of the correspondence information when the correspondence information is being used. As shown in FIG. 8, for example, when the axis group structure for the first step is being executed (Executing), the function block 650 which is the change program for the second step is not executed. The axis group structure is not changed to the axis group structure for the second step.
  • the control device 100 can execute a first abnormality process and a second abnormality process as the abnormality process.
  • FIG. 9 is a schematic diagram for explaining a first abnormal process executed by control device 100 according to the present embodiment.
  • the first abnormality process is an abnormality process executed by the control device 100 when a command value is calculated for an axis corresponding to an output destination that cannot be specified based on the correspondence information.
  • FIG. 9 shows an example in which the command value 146 is calculated in the second step, but the correspondence information 145 is not changed in the first step.
  • the X axis, the Y axis, and the Z axis are used, and therefore, the arithmetic unit 159 uses “ ⁇ ” for the X axis, “ ⁇ ” for the Y axis, and Z “ ⁇ ” is calculated as the command value 146 for the axis.
  • the correspondence information 145 should be changed to the content corresponding to the second step by the changing unit 156, but some cause (for example, programming error by the user, processing abnormality by the control device 100, etc.) ), The correspondence information 145 is maintained with the content corresponding to the first process.
  • the output destination is not set for the X ′ axis and the X ′′ axis (NULL), while both the driver 1 and the driver 2 are set for the X axis.
  • “driver 1” is set as the output destination for the X ′ axis and “driver 2” is set as the output destination for the X axis, and no output destination is set for the X axis ( NULL). Therefore, the output destination of the command value “ ⁇ ” for the X axis calculated by the calculation unit 159 is not specified based on the correspondence information 145.
  • the program execution unit 150 of the control device 100 may further include the first abnormality determination unit 191.
  • the first abnormality determination unit 191 calculates a command value by the calculation unit 159 for an axis corresponding to an output destination that is defined by the function block 700 or the function block 750 in the specific program and cannot be specified based on the correspondence information 145. If it is done, it is determined that it is abnormal. Then, when the first abnormality determination unit 191 determines that an abnormality has occurred, execution of a control program such as a specific program or a change program or other programs is prohibited, and lighting or blinking by an LED (not shown) or support is performed. The user is notified of the abnormality by displaying a warning image on the device 200 or the display device 400 or the like.
  • the example shown in FIG. 9 is an example in which the command value is calculated in the second step, but the correspondence information 145 is not changed as it is in the first step.
  • the first abnormality determination unit 191 can also determine that the abnormality is that the correspondence information 145 has not been changed in the second step and is not abnormal.
  • First abnormal processing such as prohibiting the execution of the program or issuing a warning is executed.
  • the control device 100 determines that the axis is abnormal, A first abnormal process such as prohibiting execution or issuing a warning may be executed.
  • the first abnormality determination unit 191 is not limited to the one specified by the function block 700 or the function block 750 in the specific program, and may be specified by a monitoring program (not shown) different from the specific program. That is, a monitoring program may be used to monitor whether a command value has been output for an axis corresponding to an output destination that cannot be specified based on the correspondence information 145 by a third party.
  • FIG. 10 is a schematic diagram for explaining the second abnormal process executed by control device 100 according to the present embodiment.
  • the second abnormality process is an abnormality process executed by the control device 100 when a plurality of axes correspond to one output destination in the correspondence information.
  • FIG. 10 shows an example in which the correspondence information 145 indicates that a plurality of axes correspond to one output destination (driver) in the second step.
  • “Driver 1” and “Driver 2” are both set for the X axis
  • “Driver 3” is set for the Y axis
  • "Driver 4" is set
  • each driver 520 corresponds to only one axis.
  • both the X-axis and the X ′′ -axis are associated with the driver 2 due to some cause (for example, a programming error by the user, a processing error by the control device 100, and the like).
  • the command value corresponding to the X ′′ axis has not been calculated by the calculation unit 159, the X ′′ axis is set as the output destination.
  • the program execution unit 150 of the control device 100 may further include the second abnormality determination unit 192.
  • the second abnormality determination unit 192 determines an abnormality when, for example, a plurality of axes correspond to one output destination in the correspondence information 145 defined by the function block 700 or the function block 750 in the specific program. . Then, when the second abnormality determination unit 192 determines that an abnormality has occurred, execution of a control program such as a specific program or a change program, or other programs is prohibited, and lighting or blinking by an LED (not shown) or support is performed. The user is notified of the abnormality by displaying a warning image on the device 200 or the display device 400 or the like.
  • the example shown in FIG. 10 is an example in which, in the second step, the correspondence information 145 indicates an abnormality that a plurality of axes correspond to one output destination (driver).
  • the second abnormality determination unit 192 can also determine that the abnormality is such that a plurality of axes correspond to one output destination (driver) in the correspondence information 145, and even in this case, A second abnormal process such as prohibiting the execution of the program or issuing a warning is executed.
  • the control device 100 determines that the output is abnormal, prohibits execution of the program, and issues a warning. For example, a second abnormality process such as the above may be executed.
  • the second abnormality determination unit 192 is not limited to the one defined by the function block 700 or the function block 750 in the specific program, and may be defined by the function block 600 or the function block 650 in the change program. Further, the second abnormality determination unit 192 may be defined by a monitoring program (not shown) different from the specific program and the change program. That is, in the correspondence information 145, whether or not a plurality of axes correspond to one output destination may be monitored by a third party by a monitoring program.
  • the control device 100 executes the function block 700 or the function block 750 in the specific program, so that the output corresponding to each of one or more axes for which the command value is calculated is obtained.
  • the output destination of the calculated command value can be specified based on the correspondence information 145 for specifying the destination.
  • the control device 100 executes the function block 600 or the function block 650 in the change program, so that when a predetermined condition is satisfied, the correspondence information 145 corresponds to each of one or more axes to be calculated. Change the output destination. Therefore, there is no need to prepare and store in advance correspondence information for specifying output destinations corresponding to all combinations of axes to be controlled.
  • the output destination can be appropriately specified only by dynamically changing the output destination corresponding to each of one or more target axes. Thereby, the combination of axes to be controlled can be changed without increasing the storage area.
  • control device 100 Since the specific program and the change program are defined by the function blocks, the control device 100 realizes the operation of the command value, the specification of the output destination, and the change of the content of the corresponding information in accordance with the reusable control command. Can be.
  • the control device 100 rewrites the data of the status 144 (“Status”) to “Executing” while specifying the output destination of the command value using the correspondence information 145, and interlocks the command of the axis group. To prohibit execution of the process of changing the correspondence information 145 for the axis group. As a result, while the correspondence information 145 is being used for specifying the output destination, the content of the correspondence information 145 is not changed, so that the change in the content of the correspondence information 145 may affect the specification of the output destination. Absent.
  • the control device 100 determines that the first abnormality determination unit 191 is abnormal when the arithmetic unit 159 calculates a command value for an axis corresponding to an output destination that cannot be specified based on the correspondence information 145. Accordingly, when the command value is calculated for the axis corresponding to the output destination that cannot be specified based on the correspondence information 145, it can be determined that the axis is abnormal.
  • the control device 100 determines that the second abnormality is abnormal by the second abnormality determining unit 192. Accordingly, when a plurality of axes correspond to one output destination in the correspondence information 145, it can be determined that the output is abnormal.
  • control device 100 calculates an arithmetic operation in correspondence information 145. Since the output destination corresponding to each of the one or more target axes is changed, the content of the corresponding information can be dynamically changed.
  • a control device comprising:
  • Configuration 2 The control device according to Configuration 1, wherein the arithmetic unit (159), the specifying unit (158), and the changing unit (156) operate according to a control command defined in the form of a function block.
  • a first abnormality determination unit that determines that the axis is abnormal when the arithmetic unit (159) calculates the command value for the axis corresponding to the output destination that cannot be specified based on the correspondence information (145);
  • the control device according to any one of Configurations 1 to 3, further comprising (191).
  • Configuration 5 Any one of Configurations 1 to 4, further comprising a second abnormality determination unit (192) that determines that an abnormality has occurred when the plurality of axes correspond to one of the output destinations in the correspondence information (145).
  • the control device according to any one of the above.
  • the predetermined condition is that when a predetermined event occurs during execution of a control command to the arithmetic unit (159), the specifying unit (158), and the changing unit (156), or an external command is input. 6.
  • the control device according to any one of Configurations 1 to 5, which is established at any one time.
  • a control method (a control method defined by the control program 30) in a control device (100) that controls a plurality of motors (522_1, 522_2, 522_3, 522_4), Calculating a command value for at least one or more of a plurality of axes (X axis, Y axis, Z axis, X ′ axis, X ′′ axis) constituting a coordinate system; To specify the output destination corresponding to each of the one or more axes to be calculated in the calculating step among the output destinations (520_1, 520_2, 520_3, 520_4) corresponding to each of the plurality of motors.
  • control system 1 control system, 2 field network, 6 upper network, 30 control program, 34 system program, 100 controller, 102 processor, 104 chipset, 106 main memory, 108 storage, 110 upper network controller, 112 controller, 114 memory card interface , 116 memory card, 120 internal bus controller, 122 unit, 130 field network controller, 140 axis group structure, 141, 142, 146, 147 command value, 143 parameter, 144 status, 145 correspondence information, 150 program execution unit, 152 Control command interpreter, 154 library, 156 changer, 158 identifier, 159 operation , 180 input / output refresh unit, 191 first abnormality judgment unit, 192 second abnormality judgment unit, 195 storage unit, 200 support device, 300 server device, 400 display device, 500 field device, 510 remote I / O device, 520, 530 servo driver, 522 532 servo motor, 540 machine tool, 5411,542 arm, 543 front, 544 body, 545 base, 550 conveyor, 554 work table, 600,650,

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Human Computer Interaction (AREA)
  • Manufacturing & Machinery (AREA)
  • Programmable Controllers (AREA)
  • Numerical Control (AREA)

Abstract

制御装置(100)は、特定プログラムにおけるファンクションブロック(700)やファンクションブロック(750)を実行することで、指令値の演算対象である1つ以上の軸のそれぞれに対応する出力先を特定するための対応情報(145)に基づいて、演算された指令値の出力先を特定することができ、さらに、変更プログラムにおけるファンクションブロック(600)やファンクションブロック(650)を実行することで、所定条件が成立したときに、対応情報(145)において、演算対象である1つ以上の軸のそれぞれに対応する出力先を変更する。

Description

制御装置、制御方法、および制御プログラム
 本発明は、複数のモータを制御する制御装置、当該制御装置における制御方法、および当該制御装置が実行する制御プログラムに関する。
 生産現場においては、様々なFA(Factory Automation)技術が広く普及している。このようなFAシステムは、PLC(Programmable Logic Controller:プログラマブルロジックコントローラ)といった制御装置だけでなく、CNC(Computer Numerical Control:コンピュータ数値制御)およびCNCに従う工作機械(以下、「CNC工作機械」とも称する。)なども含む。CNC工作機械においては、各々が「軸」と称される機械構成を定義して、当該軸に対応するモータの制御を行うことがある。
 たとえば、特許第3664910号公報(特許文献1)には、複数のロボットを制御する制御装置が開示されており、複数のロボットのそれぞれは、互いに異なる軸の組合せを有するように構成されている。
特許第3664910号公報
 上述の特許第3664910号公報に開示される制御装置のように、複数のロボットが互いに異なる軸の組合せを有するように構成すれば、工程の変化などによる状況変化に応じて、適切な軸の組合せごとにモータの制御を行うことが可能となる。たとえば、工程の変化に応じて使用する軸の組合せが変わると、変化後の軸に対応する出力先(モータに接続されたドライバのアドレスなど)に指令値が出力される。しかし、このように状況変化に応じて軸の組合せが変わることを考えると、制御対象となる全ての軸の組合せについて対応する出力先を特定するための情報を予め準備して記憶しておく必要がある。このため、制御対象となる軸の組合せの数が多くなればなるほど、記憶領域も増大する。
 本発明は、記憶領域を増大させることなく制御対象となる軸の組合せを変更することができる技術を提供することを目的とする。
 本開示の一例に従えば、複数のモータを制御する制御装置が提供される。制御装置は、座標系を構成する複数の軸のうちの少なくとも1つ以上の軸について指令値を演算する演算部と、複数のモータのそれぞれに対応する出力先のうち、演算部における演算対象である1つ以上の軸のそれぞれに対応する出力先を特定するための対応情報を記憶する記憶部と、記憶部によって記憶された対応情報に基づいて、演算部によって演算された指令値の出力先を特定する特定部と、所定条件が成立したときに、記憶部によって記憶された対応情報において、演算部における演算対象である1つ以上の軸のそれぞれに対応する出力先を変更する変更部とを備える。
 この開示によれば、指令値の演算対象である1つ以上の軸のそれぞれに対応する出力先を特定するための対応情報に基づいて、演算された指令値の出力先を特定することができ、さらに、所定条件が成立したときに、対応情報において、演算対象である1つ以上の軸のそれぞれに対応する出力先が変更される。このため、制御対象となる全ての軸の組合せについて対応する出力先を特定するための対応情報を予め準備して記憶しておく必要がなく、所定条件が成立したときに、対応情報において、演算対象である1つ以上の軸のそれぞれに対応する出力先を動的に変更するだけで、出力先を適切に特定することができる。これにより、記憶領域を増大させることなく制御対象となる軸の組合せを変更することができる。
 上述の開示において、演算部、特定部、および変更部は、ファンクションブロックの形で規定される制御命令に従って動作する。
 この開示によれば、再利用性のある制御命令に従って、指令値の演算、出力先の特定、および対応情報の内容変更を実現することができる。
 上述の開示において、変更部は、特定部によって対応情報に基づいて出力先が特定されている間、当該対応情報を変更しない。
 この開示によれば、出力先の特定のために対応情報が使用されている間は、対応情報の内容が変更されないため、対応情報の内容変更が出力先の特定に影響を与えてしまうことがない。
 上述の開示において、制御装置は、対応情報に基づいて特定することができない出力先に対応する軸について演算部によって指令値が演算された場合、異常であると判断する第1異常判断部をさらに備える。
 この開示によれば、対応情報に基づいて特定することができない出力先に対応する軸について指令値が演算された場合に、異常であると判断することができる。
 上述の開示において、制御装置は、対応情報において、一の出力先に対して複数の軸が対応する場合、異常であると判断する第2異常判断部をさらに備える。
 この開示によれば、対応情報において、一の出力先に対して複数の軸が対応する場合に、異常であると判断することができる。
 上述の開示において、所定条件は、演算部、特定部、および変更部に対する制御命令の実行中に所定のイベントが発生したとき、または外部からの指令が入力されたときに成立する。
 この開示によれば、制御命令の実行中に所定のイベントが発生したとき、または外部からの指令が入力されたときに、対応情報の内容を動的に変更することができる。
 本開示の別の一例に従えば、複数のモータを制御する制御装置における制御方法が提供される。制御方法は、座標系を構成する複数の軸のうちの少なくとも1つ以上の軸について指令値を演算するステップと、複数のモータのそれぞれに対応する出力先のうち、演算するステップにおける演算対象である1つ以上の軸のそれぞれに対応する出力先を特定するための対応情報を記憶するステップと、記憶するステップによって記憶された対応情報に基づいて、演算するステップによって演算された指令値の出力先を特定するステップと、所定条件が成立したときに、記憶するステップによって記憶された対応情報において、演算するステップにおける演算対象である1つ以上の軸のそれぞれに対応する出力先を変更するステップとを含む。
 この開示によれば、指令値の演算対象である1つ以上の軸のそれぞれに対応する出力先を特定するための対応情報に基づいて、演算された指令値の出力先を特定することができ、さらに、所定条件が成立したときに、対応情報において、演算対象である1つ以上の軸のそれぞれに対応する出力先が変更される。このため、制御対象となる全ての軸の組合せについて対応する出力先を特定するための対応情報を予め準備して記憶しておく必要がなく、所定条件が成立したときに、対応情報において、演算対象である1つ以上の軸のそれぞれに対応する出力先を動的に変更するだけで、出力先を適切に特定することができる。これにより、記憶領域を増大させることなく制御対象となる軸の組合せを変更することができる。
 本開示の別の一例に従えば、複数のモータを制御する制御装置が実行する制御プログラムが提供される。制御プログラムは、座標系を構成する複数の軸のうちの少なくとも1つ以上の軸について指令値を演算するステップと、複数のモータのそれぞれに対応する出力先のうち、演算するステップにおける演算対象である1つ以上の軸のそれぞれに対応する出力先を特定するための対応情報に基づいて、演算するステップによって演算された指令値の出力先を特定するステップと、所定条件が成立したときに、対応情報において、演算するステップにおける演算対象である1つ以上の軸のそれぞれに対応する出力先を変更するステップとを含む。
 この開示によれば、指令値の演算対象である1つ以上の軸のそれぞれに対応する出力先を特定するための対応情報に基づいて、演算された指令値の出力先を特定することができ、さらに、所定条件が成立したときに、対応情報において、演算対象である1つ以上の軸のそれぞれに対応する出力先が変更される。このため、制御対象となる全ての軸の組合せについて対応する出力先を特定するための対応情報を予め準備して記憶しておく必要がなく、所定条件が成立したときに、対応情報において、演算対象である1つ以上の軸のそれぞれに対応する出力先を動的に変更するだけで、出力先を適切に特定することができる。これにより、記憶領域を増大させることなく制御対象となる軸の組合せを変更することができる。
 本発明によれば、記憶領域を増大させることなく制御対象となる軸の組合せを変更することができる。
本実施の形態に係る制御装置の第1工程(準備動作)における適用例を説明するための模式図である。 本実施の形態に係る制御装置の対応関係変更における適用例を説明するための模式図である。 本実施の形態に係る制御装置の第2工程(通常動作)における適用例を説明するための模式図である。 本実施の形態に係る制御システムの全体構成例を説明するための模式図である。 本実施の形態に係る制御装置のハードウェア構成例を説明するためのブロック図である。 本実施の形態に係る制御装置が実行する制御プログラムを規定するファンクションブロックを説明するための図である。 軸グループ構造体を説明するための図である。 対応情報が使用中の場合における対応情報の内容変更について説明するための図である。 本実施の形態に係る制御装置が実行する第1異常処理を説明するための模式図である。 本実施の形態に係る制御装置が実行する第2異常処理を説明するための模式図である。
 本発明の実施の形態について、図面を参照しながら詳細に説明する。なお、図中の同一または相当部分については、同一符号を付してその説明は繰り返さない。
 <A.適用例>
 まず、図1~図3を参照して、本発明が適用される場面の一例について説明する。図1は、本実施の形態に係る制御装置100の第1工程(準備動作)における適用例を説明するための模式図である。図2は、本実施の形態に係る制御装置100の対応関係変更における適用例を説明するための模式図である。図3は、本実施の形態に係る制御装置100の第2工程(通常動作)における適用例を説明するための模式図である。
 図1に示されるように、本実施の形態に係る制御装置100は、複数のモータを制御可能に構成されている。図1の適用例においては、モータの一例として、サーボモータ522_1,522_2,522_3,522_4,522_5(以下、まとめて「サーボモータ522」とも称する。)が制御装置100によって制御される。サーボモータ522_1,522_2,522_3,522_4,522_5のそれぞれは、制御装置100とフィールドネットワーク2を介して接続されるドライバ520_1,520_2,520_3,520_4,520_5(以下、まとめて「ドライバ520」とも称する。)のそれぞれによって駆動される。制御装置100は、フィールドネットワーク2を介して各ドライバ520に指令値を出力することで、各サーボモータ522を制御する。なお、説明の都合上、ドライバ520_1は「ドライバ1」、ドライバ520_2は「ドライバ2」、ドライバ520_3は「ドライバ3」、ドライバ520_4は「ドライバ4」、ドライバ520_5は「搬送用ドライバ」と称することがある。
 本発明の「モータ」は、サーボモータに限らず、同期モータおよび誘導モータを含む任意の駆動装置を包含する概念である。また、本発明の「モータ」は、たとえば、リニアモータのような、回転運動ではなく直線運動するような装置も含み得る。
 産業用ロボットやCNC工作機械においては、ワークに対して何らかのアクションを行う場合に、複数のモータを連係させて駆動する必要がある。すなわち、複数のモータに対してそれぞれの指令値を同期して与える必要がある。本明細書において、それぞれの指令値を同期して与える必要がある複数のモータを「グループ」と称する。
 図1に示す適用例においては、制御装置100から各サーボドライバ520に対して、フィールドネットワーク2を介して、対応する指令値が出力(送信,通信)されるが、これに限らず、制御装置100と各サーボドライバ520とを配線接続して、指令値を示す信号を直接伝送するようにしてもよい。
 任意のグループに属する1つ以上のモータのそれぞれに対応する軸により規定される空間を「座標系」とも称する。たとえば、あるグループに属する複数のモータがCNC工作機械をX軸,Y軸,Z軸のそれぞれに沿って動作させるような場合、当該グループに属するモータは、「X-Y-Z座標系」に関連付けられる。このような各モータの軸方向に着目して、以下の説明においては、各グループを「軸グループ」と称することもある。
 また、状況によっては、同じ軸方向において複数の軸が定義され得る。たとえば、本実施の形態においては、X軸方向について、互いの回転方向が異なる軸として、X’軸およびX”軸が定義され、それぞれの軸が異なるモータによって駆動される。
 たとえば、後述する図4には、CNC工作機械540が示されている。CNC工作機械540は、搬送装置550によって搬送されるワークWに対して部品を組み付けるガントリ型の組付装置である。具体的には、CNC工作機械540は、土台545と、土台545に対してY軸方向に移動可能な本体544と、本体544に対してZ軸方向に移動可能な前部543と、前部543に対してX軸方向に移動可能なアーム541およびアーム542とを備える。X軸、Y軸、Z軸は、互いに直交する軸である。X軸方向について、アーム541がアーム542とは独立して移動する際に用いられる軸としてX’軸が定義される。また、X軸方向について、アーム542がアーム541とは独立して移動する際に用いられる軸としてX”軸が定義される。
 サーボモータ522_1は、アーム541をX軸方向あるいはX’軸方向に動作させる。サーボモータ522_2は、アーム542をX軸方向またはX”軸方向に動作させる。サーボモータ522_3は、本体544をY軸方向に動作させる。サーボモータ522_4は、前部543をZ軸方向に動作させる。サーボモータ522_5は、搬送装置550を搬送方向に動作させる。
 このように構成されたCNC工作機械540は、搬送装置550によって搬送されたワークWが作業台554の上に配置されると、まず、第1工程として準備動作を行う。第1工程においては、ワークWに部品を取り付けるための準備として、アーム541およびアーム542のそれぞれが、互いに独立して移動し、通常動作のための位置に配置される。たとえば、アーム541およびアーム542のそれぞれは、X軸に沿って互いに向かい合う方向(前部543における外側から内側に向かう方向)に向かって移動する。これにより、アーム541およびアーム542は、互いに近接する位置にまで移動して準備動作を完了する。
 次に、CNC工作機械540は、第2工程として通常動作を行う。通常動作においては、アーム541およびアーム542がX軸に沿って同じ方向に向かって移動しながらワークWに部品を取り付ける。たとえば、アーム541およびアーム542はともに、前部543の一端から他端に向かって移動しながらワークWに部品を取り付ける。
 このように、第1工程においては、アーム541とアーム542とで、移動方向が互いに異なり、かつ互いに独立して移動する。このため、アーム541およびアーム542は同時に制御されないため、X軸方向に沿った軸として、アーム541を移動させるサーボモータ522_1に対してはX’軸、アーム542を移動させるサーボモータ522_2に対してはX”軸が規定される。一方、第2工程においては、アーム541とアーム542とで、移動方向が同じであり、両者がともに移動する。このため、アーム541およびアーム542は同時に制御されるため、アーム541を移動させるサーボモータ522_1およびアーム542を移動させるサーボモータ522_2のそれぞれに対して共通のX軸が規定される。
 なお、第1工程および第2工程のいずれにおいても、本体544をY軸方向に移動させるサーボモータ522_3に対してはY軸、前部543をZ軸方向に移動させるサーボモータ522_4に対してはZ軸が規定される。
 図1に戻り、制御装置100は、ストレージ108と、プログラム実行部150と、記憶部(メモリ)195と、入出力リフレッシュ部180とを含む。
 ストレージ108には、制御プログラム30が格納されている。プログラム実行部150は、制御プログラム30を制御周期ごとに実行する。
 「制御プログラム」は、所謂シーケンスプログラムであり、実行ごとに全体がスキャンされて、実行ごとに1または複数の指令値が算出されるプログラムを包含する概念である。「シーケンスプログラム」は、国際電気標準会議(International Electrotechnical Commission:IEC)によって規定された国際規格IEC61131-3に従って記述された1または複数の命令からなるプログラムを包含する。「シーケンスプログラム」には、シーケンス命令および/またはモーション命令を含み得る。なお、「シーケンスプログラム」としては、国際規格IEC61131-3に従って記述された命令に限らず、PLC(プログラマブルロジックコントローラ)の製造メーカまたはベンダーなどが独自に規定した命令を含むようにしてもよい。このように、「シーケンスプログラム」は、即時性および高速性が要求される制御に好適である。
 「シーケンス命令」は、基本的には、入力値、出力値、内部値などを算出する1または複数の論理回路により記述される1または複数の命令である。基本的には、1回の制御周期において、「シーケンス命令」は、先頭から最終まで実行され、次の制御周期において、「シーケンス命令」は、先頭から最終までが再度実行される。
 「モーション命令」は、サーボモータなどのアクチュエータに対して、位置(Position)、速度(Velocity)、加速度(Acceleration)、加加速度(Jerk)、角度、角速度、角加速度、角加加速度などの数値を指令値として算出するための1または複数の命令である。「モーション命令」についても、1回の制御周期において、ファンクションブロックや数値算出式などにより記述されるモーション命令のプログラム(モーションプログラム)の先頭から最終までが実行される。すなわち、制御周期ごとに指令値は算出(更新)されることになる。
 プログラム実行部150は、制御命令解釈部152と、ライブラリ154と、演算部159と、変更部156と、特定部158とを含む。
 制御命令解釈部152は、制御プログラム30に含まれる制御命令を解釈し、指定されたシーケンス演算(論理演算)を実行する。ライブラリ154は、制御プログラム30に含まれる単純なシーケンス以外の制御命令に対応するコードを提供する。たとえば、複合的な処理を可能とするファンクションブロックを用いて制御プログラム30を記述することができるような場合には、制御プログラム30を参照することで、当該ファンクションブロックを解釈して実行するために必要なコードが取得される。
 演算部159は、制御プログラム30に含まれるモーション命令に従って指令値141を算出する。モーション命令は、1つのコマンドによって複数の制御周期に亘って指令値141の算出を定義しており、演算部159は、このようなモーション命令を解釈して、指令値141を制御周期ごとに更新する。
 演算部159により制御周期ごとに算出される1または複数の指令値141は、記憶部195に出力される。
 記憶部195は、パラメータ143と、軸グループ構造体140と、指令値141,142とを記憶する。パラメータ143は、第1工程や第2工程といったような状況に応じてドライバ520に出力される指令値141を算出するための各種パラメータを含む。たとえば、パラメータ143は、位置(Position)、速度(Velocity)、加速度(Acceleration)、および加加速度(Jerk)などを含む。
 軸グループ構造体140は、主にステータス144と対応情報145とを含むオブジェクトである。ステータス144は、軸グループ構造体140を実行中であるか否か、より具体的には対応情報145を用いて指令値の出力先を特定中であるか否かを示すデータである。対応情報145は、各軸(X軸,Y軸,Z軸,X’軸,X”軸)に対応する出力先のドライバ520を特定するためのデータである。
 対応情報145においては、座標系を構成する全ての軸(X軸,Y軸,Z軸,X’軸,X”軸)が予め配列されており、当該全ての軸のいずれかに対して指令値の出力先であるドライバ1~4のいずれかが対応付けられている。
 たとえば、図1に示す例は第1工程(準備動作)における適用例であり、この場合、座標系を構成する全ての軸(X軸,Y軸,Z軸,X’軸,X”軸)のうち、X’軸、X”軸、Y軸、およびZ軸が使用される。そして、X’軸に対してはサーボモータ522_1を駆動させるドライバ1、X”軸に対してはサーボモータ522_2を駆動させるドライバ2、Y軸に対してはサーボモータ522_3を駆動させるドライバ3、Z軸に対してはサーボモータ522_4を駆動させるドライバ4が出力先として設定されている。なお、上述したように、第1工程においてはX軸が使用されないため、X軸に対してはいずれのドライバも出力先として設定されない。なお、図示は省略するが、図1~図3に示す対応情報145において、空欄は“NULL”である。
 指令値141は、演算部159による演算によって算出される。第1工程においては、X’軸、X”軸、Y軸、Z軸が用いられるため、これら各軸に対する指令値141が記憶部195に記憶される。たとえば、Y軸に対しては“a”、Z軸に対しては“b”、X’軸に対しては“c”、X”軸に対しては“d”が指令値として算出されている。なお、第1工程においてはX軸が使用されないため、X軸に対しては指令値が算出されない。
 特定部158は、記憶部195によって記憶された対応情報145に基づいて、演算部159によって演算された指令値141の出力先を特定する。たとえば、図1に示す例においては、特定部158は、X’軸、X”軸、Y軸、Z軸のそれぞれに対応付けられた指令値141と、対応情報145によって特定可能なX’軸、X”軸、Y軸、Z軸のそれぞれに対応付けられた出力先のドライバとに基づき、X’軸、X”軸、Y軸、Z軸のそれぞれに対応付けられた指令値141の出力先を特定して、出力先に対応付けた指令値142を記憶部195に格納する。
 なお、特定部158は、対応情報145を用いて指令値の出力先を特定中である間、ステータス144を実行中(Status=Executing)とする。これにより、軸グループ構造体140に対応する軸グループの命令に対してインターロックが掛かり、軸グループに対して対応情報145を変更する処理の実行が禁止される。
 入出力リフレッシュ部180は、所定周期ごとに、指令値142を含む出力データをフィールド側へ送信する。これにより、制御装置100は、制御対象である軸に対応するドライバ520に対して指令値を出力する。
 ここで、上述したように、第1工程(準備動作)から第2工程(通常動作)へと状況が変化すると、サーボモータ522_1に規定されるX’軸がX軸に切り替わり、かつサーボモータ522_2に規定されるX”軸がX軸に切り替わる。そして、演算部159による指令値の演算対象となる軸も、X’軸、X”軸、Y軸、Z軸から、X軸、Y軸、Z軸へと変更される。よって、各指令値の出力先も、X’軸、X”軸、Y軸、Z軸のそれぞれに対応する出力先から、X軸、Y軸、Z軸のそれぞれに対応する出力先へと変更されなければならない。
 しかし、仮に、第1工程用の出力先を特定する対応情報と第2工程用の出力先を特定する対応情報とを予め準備して記憶部195に記憶させた場合、制御対象となる軸の組合せ(軸グループ)の数が多くなればなるほど、記憶部195の記憶領域も増大する。すなわち、X’軸、X”軸、Y軸、Z軸で構成される軸グループ専用の対応情報と、X軸、Y軸、Z軸で構成される軸グループ専用の対応情報とを予め準備して記憶部195に記憶させると、記憶部195の記憶領域が増大する。また、パラメータ143についても、X’軸、X”軸、Y軸、Z軸で構成される軸グループ専用のパラメータと、X軸、Y軸、Z軸で構成される軸グループ専用のパラメータとを予め準備して記憶部195に記憶させると、記憶部195の記憶領域が増大する。
 そこで、本実施の形態に係る制御装置100では、一の軸グループについて、対応情報145において、工程の種類に関わらず座標系を構成する全ての軸(X軸,Y軸,Z軸,X’軸,X”軸)が予め規定され、当該全ての軸のいずれかに対して指令値の出力先であるドライバ1~4のいずれかが対応付けられている。そして、変更部156は、所定条件が成立したときに、記憶部195によって記憶された同じ対応情報145において、演算部159における演算対象である1つ以上の軸のそれぞれに対応する出力先を変更する。なお、所定条件としては、制御プログラムの実行中に所定の内部イベントが発生したとき、または、たとえば、後述するサポート装置200におけるユーザ操作など、外部からの指令が入力されたときに成立する。
 たとえば、図2に示されるように、第1工程においては、X’軸に対してドライバ1、X”軸に対してドライバ2が出力先として設定される一方で、X軸に対しては出力先が設定されていなかったが(NULL)、第2工程への移行に伴い、X’軸およびX”軸に対しては出力先が設定されない(NULL)一方で、X軸に対してドライバ1およびドライバ2の両方が出力先として設定される。
 そして、図3に示されるように、第2工程(通常動作)に移行した後では、再び演算部159によって1または複数の指令値146が算出される。たとえば、第2工程においては、X軸、Y軸、Z軸が用いられ、X軸に対しては“α”、Y軸に対しては“β”、Z軸に対しては“γ”が指令値146として算出される。なお、第2工程においてはX’軸およびX”が使用されないため、これらの軸に対しては指令値が算出されない。
 次に、特定部158は、変更部156によって、各軸と出力先との対応関係が変更された後の対応情報145に基づいて、演算部159によって演算された指令値146の出力先を特定する。たとえば、図3に示す例においては、特定部158は、X軸、Y軸、Z軸のそれぞれに対応付けられた指令値146と、対応情報145によって特定可能なX軸、Y軸、Z軸のそれぞれに対応付けられたドライバの出力先とに基づき、X軸、Y軸、Z軸のそれぞれに対応付けられた指令値146の出力先を特定して、出力先に対応付けられた指令値147を記憶部195に格納する。
 また、特定部158は、対応情報145を用いて指令値の出力先を特定中である間、ステータス144を実行中(Status=Executing)にするため、軸グループ構造体140に対応する軸グループの命令に対してインターロックが掛かり、軸グループに対して対応情報145を変更する処理の実行が禁止される。
 その後、入出力リフレッシュ部180によって、指令値147を含む出力データがフィールド側へ送信されることで、制御対象である軸に対応するドライバ520に対して指令値が出力される。
 このように、特定部158によって、指令値の演算対象である1つ以上の軸のそれぞれに対応する出力先を特定するための対応情報145に基づいて、指令値の出力先が特定される。さらに、変更部156によって、所定条件が成立したときに、対応情報145において、演算対象である1つ以上の軸のそれぞれに対応する出力先が変更される。このため、制御対象となる全ての軸の組合せについて対応する出力先を特定するための対応情報を予め準備して記憶しておく必要がなく、所定条件が成立したときに、対応情報145において、演算対象である1つ以上の軸のそれぞれに対応する出力先を動的に変更するだけで、出力先を適切に特定することができる。これにより、記憶領域を増大させることなく制御対象となる軸の組合せを変更することができる。
 以上、本実施の形態に係る制御装置100の適用例について説明した。以下では、より詳細に、本実施の形態に係る制御装置100の構成および処理について説明する。
 <B.制御システムの全体構成例>
 次に、本実施の形態に係る制御装置100を含む制御システム1の全体構成例について説明する。図4は、本実施の形態に係る制御システム1の全体構成例を説明するための模式図である。なお図4では、本実施の形態に係る制御装置100を中心とした制御システム1を示す。
 制御装置100は、各種の設備や装置などの制御対象を制御する産業用コントローラに相当する。制御装置100は、制御演算を実行する一種のコンピュータであり、典型的には、PLC(プログラマブルコントローラ)として具現化されている。制御装置100は、フィールドネットワーク2を介して各種のフィールドデバイス500と接続されている。制御装置100は、フィールドネットワーク2などを介して、1または複数のフィールドデバイス500との間でデータを遣り取りする。
 制御装置100において実行される制御演算は、フィールドデバイス500において収集または生成されたデータ(入力データ)を収集する処理(入力処理)、フィールドデバイス500に対する指令値などのデータ(出力データ)を生成する処理(演算処理)、生成した出力データを対象のフィールドデバイス500へ送信する処理(出力処理)などを含む。
 フィールドネットワーク2は、定周期通信を行うバスまたはネットワークを採用することが好ましい。このような定周期通信を行うバスまたはネットワークとしては、EtherCAT(登録商標)、EtherNet/IP(登録商標)、DeviceNet(登録商標)、CompoNet(登録商標)などが知られている。データの到達時間が保証される点において、EtherCAT(登録商標)が好ましい。
 フィールドネットワーク2には、任意のフィールドデバイス500を接続することができる。フィールドデバイス500は、フィールド側にある製造装置や生産ラインなどに対して何らかの物理的な作用を与えるアクチュエータ、および、フィールドとの間で情報を遣り取りする入出力装置などを含む。
 フィールドネットワーク2を介して、制御装置100とフィールドデバイス500との間でデータが遣り取りされることになるが、これらの遣り取りされるデータは、数100μsecオーダ~数10msecオーダのごく短い周期で更新されることになる。
 図4に示す構成例においては、制御装置100は、CNC工作機械540と、CNC工作機械540に対してワークWを供給する搬送装置550とを制御する。
 CNC工作機械540は、前述したように、搬送装置550によって搬送されるワークWに対して部品を組み付けるガントリ型の組付装置である。なお、CNC工作機械540としては、図示のものに限られず、旋盤加工、フライス盤、放電加工などの任意の加工装置に適用できる。
 CNC工作機械540および搬送装置550は、制御装置100からの指令値に従って駆動される。搬送装置550により搬送されるワークWは、作業台554の上に配置され、CNC工作機械540により指定された加工が行われる。
 図4に示す構成例においては、フィールドデバイス500は、リモートI/O(Input/Output)装置510と、サーボドライバ520_1,520_2,520_3,520_4およびサーボモータ522_1,522_2,522_3,522_4と、サーボドライバ530とを含む。
 リモートI/O装置510は、典型的には、フィールドネットワーク2を介して通信を行う通信カプラと、入力データの取得および出力データの出力を行うための入出力部(以下、「I/Oユニット」とも称す。)とを含む。リモートI/O装置510には、入力リレーや各種センサ(たとえば、アナログセンサ、温度センサ、振動センサなど)などの入力データを収集する装置、および、出力リレー、コンタクタ、サーボドライバ、および、その他任意のアクチュエータなどのフィールドに対して何らかの作用を与える装置が接続される。
 フィールドデバイス500としては、これらに限られることなく、入力データを収集する任意のデバイス(たとえば、視覚センサなど)、出力データに従う何らかの作用を与える任意のデバイス(たとえば、インバータ装置など)、各種ロボットなどを採用することができる。
 サーボモータ522_1,522_2,522_3,522_4は、CNC工作機械540の一部として組み込まれており、サーボドライバ530は、搬送装置550のコンベアに連結されたサーボモータ532を駆動する。サーボドライバ520_1~520_4,530は、制御装置100からの指令値(たとえば、位置指令値や速度指令値など)に従って、対応するサーボモータ522を駆動する。
 制御装置100は、上位ネットワーク6を介して、他の装置にも接続されている。上位ネットワーク6には、一般的なネットワークプロトコルであるイーサネット(登録商標)やEtherNet/IP(登録商標)が採用されてもよい。より具体的には、上位ネットワーク6には、1または複数のサーバ装置300および1または複数の表示装置400が接続されてもよい。
 サーバ装置300としては、データベースシステム、製造実行システム(MES:Manufacturing Execution System)などが想定される。製造実行システムは、制御対象の製造装置や設備からの情報を取得して、生産全体を監視および管理するものであり、オーダ情報、品質情報、出荷情報などを扱うこともできる。これに限らず、情報系サービスを提供する装置を上位ネットワーク6に接続するようにしてもよい。情報系サービスとしては、制御対象の製造装置や設備からの情報を取得して、マクロ的またはミクロ的な分析などを行う処理が想定される。たとえば、制御対象の製造装置や設備からの情報に含まれる何らかの特徴的な傾向を抽出するデータマイニングや、制御対象の設備や機械からの情報に基づく機械学習を行うための機械学習ツールなどが想定される。
 表示装置400は、ユーザからの操作を受けて、制御装置100に対してユーザ操作に応じたコマンドなどを出力するとともに、制御装置100での演算結果などをグラフィカルに表示する。
 制御装置100には、サポート装置200が接続可能になっている。サポート装置200は、制御装置100が制御対象を制御するために必要な準備を支援する装置である。具体的には、サポート装置200は、制御装置100で実行されるプログラム(たとえば、制御プログラム)の開発環境(プログラム作成編集ツール、パーサ、コンパイラなど)、制御装置100および制御装置100に接続される各種デバイスの構成情報(コンフィギュレーション)を設定するための設定環境、生成したユーザプログラム(たとえば、制御プログラム)を制御装置100へ出力する機能、制御装置100上で実行されるユーザプログラム(たとえば、制御プログラム)などをオンラインで修正・変更する機能などを提供する。
 <C.制御装置100のハードウェア構成例>
 次に、本実施の形態に係る制御装置100のハードウェア構成例について説明する。図5は、本実施の形態に係る制御装置100のハードウェア構成例を説明するためのブロック図である。
 図5に示されるように、制御装置100は、CPUユニットと称される演算処理部であり、プロセッサ102と、チップセット104と、主メモリ106と、ストレージ108と、上位ネットワークコントローラ110と、USB(Universal Serial Bus)コントローラ112と、メモリカードインターフェイス114と、内部バスコントローラ120と、フィールドネットワークコントローラ130とを含む。
 プロセッサ102は、CPU(Central Processing Unit)、MPU(Micro Processing Unit)、GPU(Graphics Processing Unit)などで構成される。プロセッサ102としては、複数のコアを有する構成を採用してもよいし、プロセッサ102を複数配置してもよい。チップセット104は、プロセッサ102および周辺エレメントを制御することで、制御装置100における全体としての処理を実現する。主メモリ106は、DRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)などの揮発性記憶装置などで構成される。図1に示された記憶部(メモリ)195は、典型的には、主メモリ106によって実現される。ストレージ108は、たとえば、HDD(Hard Disk Drive)やSSD(Solid State Drive)などの不揮発性記憶装置などで構成される。
 プロセッサ102は、ストレージ108に格納された各種プログラムを読み出して、主メモリ106に展開して実行することで、制御対象に応じた制御、および、各種処理を実現する。ストレージ108には、基本的な機能を実現するためのシステムプログラム34に加えて、制御対象の製造装置や設備に応じて作成されるユーザプログラム(たとえば、制御プログラム30)が格納される。
 上位ネットワークコントローラ110は、上位ネットワーク6を介して、サーバ装置300や表示装置400(図4参照)などとの間のデータの遣り取りを制御する。USBコントローラ112は、USB接続を介してサポート装置200との間のデータの遣り取りを制御する。なお、サポート装置200は、USB接続を介して制御装置100との間で通信可能であるものに限らず、EtherNet(イーサネット)通信によって制御装置100との間で通信可能であってもよい。
 メモリカードインターフェイス114は、メモリカード116が着脱可能に構成されており、メモリカード116に対してデータを書込み、メモリカード116から各種データ(ユーザプログラムやトレースデータなど)を読み出すことが可能になっている。
 内部バスコントローラ120は、制御装置100に装着されるI/Oユニット122との間のデータの遣り取りを制御する。フィールドネットワークコントローラ130は、フィールドネットワーク2を介したフィールドデバイスとの間のデータの遣り取りを制御する。
 図5には、プロセッサ102がプログラムを実行することで必要な機能が提供される構成例を示したが、これらの提供される機能の一部または全部を、専用のハードウェア回路(たとえば、ASICまたはFPGAなど)を用いて実装してもよい。あるいは、制御装置100の主要部を、汎用的なアーキテクチャに従うハードウェア(たとえば、汎用パソコンをベースとした産業用パソコン)を用いて実現してもよい。この場合には、仮想化技術を用いて、用途の異なる複数のOS(Operating System)を並列的に実行させるとともに、各OS上で必要なアプリケーションを実行させるようにしてもよい。
 図4に示される制御システム1においては、制御装置100、サポート装置200および表示装置400がそれぞれ別体として構成されているが、これらの機能の全部または一部を単一の装置に集約するような構成を採用してもよい。
 <D.制御プログラム>
 次に、本実施の形態に係る制御装置100が実行する制御プログラムについて説明する。図6は、本実施の形態に係る制御装置100が実行する制御プログラムを規定するファンクションブロックを説明するための図である。
 制御プログラムは、対応情報(図1~図3で示した対応情報145)において各軸と出力先との対応関係を変更するための変更プログラムと、指令値を演算するとともに対応情報に基づいて当該指令値の出力先を特定するための特定プログラムとを含む。
 図6に示されるように、変更プログラムは、「CNC_ChangeAxes」と称されるファンクションブロック600,650の形で規定されてもよい。ファンクションブロック600,650において、左側の端子は入力端子、右側の端子は出力端子である。なお、ファンクションブロック600は、第1工程において用いられる変更プログラムであり、ファンクションブロック650は、第2工程において用いられる変更プログラムである。
 特定プログラムは、「CNC_Move」と称されるファンクションブロック700,750の形で規定されてもよい。ファンクションブロック700,750において、左側の端子は入力端子、右側の端子は出力端子である。なお、ファンクションブロック700は、第1工程において用いられる特定プログラムであり、ファンクションブロック750は、第2工程において用いられる特定プログラムである。
 まず、第1工程におけるファンクションブロック600の入力端子について説明する。ファンクションブロック600の入力端子としては、「AxisGroup」、「Execute」、および「AxisComp.」が設けられている。
 「AxisGroup」には、対応情報の変更対象となる軸グループを特定するための識別情報(たとえば、識別番号)が与えられる。図6に示す例では、軸グループ1を特定するための識別情報として“AxisGroup No.1”が「AxisGroup」に与えられている。
 「Execute」には、ファンクションブロック600を実行させるための指示が与えられる。ファンクションブロック600は、制御プログラム30(制御命令)の実行中に所定のイベントが発生したときに起動する。所定のイベントの発生例としては、ファンクションブロック600の前に実行された図示しないファンクションブロックの出力において、「Done1」がONになることで、ファンクションブロック600の起動条件が成立する。なお、ファンクションブロック600は、制御プログラム30(制御命令)の実行中における内部イベントが発生したときに実行されるものに限らず、外部からの指令が入力されたときに実行されてもよい。たとえば、サポート装置200や図示しない他のユーザ端末(たとえば、タッチパネルディスプレイ)におけるユーザ操作など、外部からの指令が入力されたときにファンクションブロック600が実行されてもよい。
 「AxisComp.」(「AxisComposition」の略称)には、ユーザによって指定された各軸のそれぞれに対応する出力先を特定するための軸構成が与えられる。たとえば、第1工程においては、X軸に対して“NULL”、Y軸に対して“Drive3”(ドライバ3)、Z軸に対して“Drive4”(ドライバ4)、X’軸に対して“Drive1”(ドライバ1)、X”軸に対して“Drive2”(ドライバ2)の対応関係が示された軸構成が「AxisComp.」に与えられる。なお、「AxisComp.」は、制御プログラム中に記述されるものに限らず、外部からの指令の入力に基づき決定されてもよい。たとえば、図示しないユーザ端末(たとえば、タッチパネルディスプレイ)におけるユーザ操作など、外部からの指令の入力に基づき軸構成を変更してもよい。このようにすれば、ユーザ端末におけるユーザ操作によって、軸グループのパターンを増やすことができる。
 次に、第1工程におけるファンクションブロック600の出力端子について説明する。出力端子としては、「AxisGroup」、「Busy」、「Done」、「CommandAborted」、「Error」、および「ErrorID」が設けられている。
 「AxisGroup」は、入力側の「AxisGroup」に与えられた軸グループを特定するための識別情報(たとえば、識別番号)を出力する。図6に示す例では、軸グループ1を特定するための識別情報として“AxisGroup No.1”が「AxisGroup」から出力される。
 「Busy」は、「Execute」に指示が与えられてファンクションブロック600が起動するとONになり、ファンクションブロック600の実行中にONを維持する。
 「Done」は、ファンクションブロック600の実行が完了すると、ONになり、このとき、後続の「Done2」で示された変数もONになる。
 「CommandAborted」は、ファンクションブロック600の実行が中断すると、ONになる。
 「Error」は、ファンクションブロック600の実行において何らかのエラーが発生した場合に、ONになる。
 「ErrorID」は、ファンクションブロック600の実行において何らかのエラーが発生した場合に、エラーコードを出力する。
 次に、第1工程におけるファンクションブロック700の入力端子について説明する。ファンクションブロック700の入力端子としては、「Coord」、「Execute」、「LogicalMotorNo」、「Position」、「Velocity」、「Acceleration」、「Jerk」、および「MoveMode」が設けられている。
 「Coord」には、指令値の演算対象となる軸グループを特定するための識別情報(たとえば、識別番号)が与えられる。図6に示す例では、軸グループ1を特定するための識別情報として“AxisGroup No.1”が「Coord」に与えられている。
 「Execute」には、ファンクションブロック700を実行させるための指示が与えられる。ファンクションブロック700は、制御プログラム30(制御命令)の実行中に所定のイベントが発生したときに起動する。所定のイベントの発生例としては、ファンクションブロック700の前に実行されたファンクションブロック600の出力において、「Error」がOFFでありかつ「Done2」がONになっていることで、ファンクションブロック700の起動条件が成立する。なお、ファンクションブロック700は、制御プログラム30(制御命令)の実行中における内部イベントが発生したときに実行されるものに限らず、外部からの指令が入力されたときに実行されてもよい。たとえば、サポート装置200や図示しない他のユーザ端末(たとえば、タッチパネルディスプレイ)におけるユーザ操作など、外部からの指令が入力されたときにファンクションブロック700が実行されてもよい。
 「LogicalMotorNo」には、演算対象となる軸を特定するための対応情報が与えられる。たとえば、第1工程の場合、X軸に対して“NULL”、Y軸に対して“Drive3”(ドライバ3)、Z軸に対して“Drive4”(ドライバ4)、X’軸に対して“Drive1”(ドライバ1)、X”軸に対して“Drive2”(ドライバ2)の対応関係が示された対応情報が「LogicalMotorNo」に与えられる。
 「Position」には、動作の目標位置が与えられる。「Velocity」には、動作の目標速度が与えられる。「Acceleration」には、動作の目標加速度が与えられる。「Jerk」には、動作の目標加加速度が与えられる。「MoveMode」には、絶対位置に基づく動作モード、あるいは相対位置に基づく動作モードなど、指定された動作モードが与えられる。
 次に、第1工程におけるファンクションブロック700の出力端子について説明する。ファンクションブロック700の出力端子としては、「AxisGroup」、「Busy」、「Done」、「CommandAborted」、「Error」、および「ErrorID」が設けられている。
 「AxisGroup」は、入力側の「Coord」に与えられた軸グループを特定するための識別情報(たとえば、識別番号)を出力する。図6に示す例では、軸グループ1を特定するための識別情報として“AxisGroup No.1”が「AxisGroup」から出力される。
 「Busy」は、「Execute」に指示が与えられてファンクションブロック700が起動するとONになり、ファンクションブロック700の実行中にONを維持する。
 「Done」は、ファンクションブロック700の実行が完了すると、ONになり、このとき、後続の「Done3」で示された変数もONとなる。
 「CommandAborted」は、ファンクションブロック700の実行が中断すると、ONになる。
 「Error」は、ファンクションブロック700の実行において何らかのエラーが発生した場合に、ONになる。
 「ErrorID」は、ファンクションブロック700の実行において何らかのエラーが発生した場合に、エラーコードを出力する。
 次に、第2工程におけるファンクションブロック650について説明する。第2工程におけるファンクションブロック650は、上述した第1工程におけるファンクションブロック600と基本的には同じ機能を有する。但し、第2工程においては、第1工程における対応情報とは異なる内容の対応情報を得る。
 たとえば、ファンクションブロック650の「AxisComp.」には、ファンクションブロック600の「AxisComp.」とは異なる軸構成が与えられる。たとえば、第2工程においては、X軸に対して“Drive1”(ドライバ1)および“Drive2”(ドライバ2)、Y軸に対して“Drive3”(ドライバ3)、Z軸に対して“Drive4”(ドライバ4)、X’軸に対して“NULL”、X”軸に対して“NULL”の対応関係が示された軸構成が「AxisComp.」に与えられる。なお、ファンクションブロック650においても、ファンクションブロック600と同様に、「AxisComp.」が制御プログラム中に記述されるものに限らず、外部からの指令の入力に基づき決定されてもよい。たとえば、図示しないユーザ端末(たとえば、タッチパネルディスプレイ)におけるユーザ操作など、外部からの指令の入力に基づき軸構成を変更してもよい。このようにすれば、ユーザ端末におけるユーザ操作によって、軸グループのパターンを増やすことができる。
 「Execute」には、ファンクションブロック650を実行させるための指示が与えられる。ファンクションブロック650は、制御プログラム30(制御命令)の実行中に所定のイベントが発生したときに起動する。所定のイベントの発生例としては、ファンクションブロック650の前に実行されたファンクションブロック700の出力において、「Error」がOFFでありかつ「Done3」がONになっていることで、ファンクションブロック650の起動条件が成立する。なお、ファンクションブロック650は、制御プログラム30(制御命令)の実行中における内部イベントが発生したときに実行されるものに限らず、外部からの指令が入力されたときに実行されてもよい。たとえば、サポート装置200や図示しない他のユーザ端末(たとえば、タッチパネルディスプレイ)におけるユーザ操作など、外部からの指令が入力されたときにファンクションブロック650が実行されてもよい。
 ファンクションブロック650の実行が完了すると、「Done」がONになり、このとき、後続の「Done4」で示された変数もONになる。
 次に、第2工程におけるファンクションブロック750について説明する。第2工程におけるファンクションブロック750は、上述した第2工程におけるファンクションブロック700と基本的には同じ機能を有する。
 「Coord」には、指令値の演算対象となる軸グループを特定するための識別情報(たとえば、識別番号)が与えられる。図6に示す例では、軸グループ1を特定するための識別情報として“AxisGroup No.1”が「Coord」に与えられている。
 「Execute」には、ファンクションブロック750を実行させるための指示が与えられる。ファンクションブロック750は、制御プログラム30(制御命令)の実行中に所定のイベントが発生したときに起動する。所定のイベントの発生例としては、ファンクションブロック750の前に実行されたファンクションブロック650の出力において、「Error」がOFFでありかつ「Done4」がONになっていることで、ファンクションブロック750の起動条件が成立する。なお、ファンクションブロック750は、制御プログラム30(制御命令)の実行中における内部イベントが発生したときに実行されるものに限らず、外部からの指令が入力されたときに実行されてもよい。たとえば、サポート装置200や図示しない他のユーザ端末(たとえば、タッチパネルディスプレイ)におけるユーザ操作など、外部からの指令が入力されたときにファンクションブロック750が実行されてもよい。
 ファンクションブロック750の実行が完了すると、「Done」がONになり、このとき、後続の「Done5」で示された変数もONになる。
 制御装置100は、上述したようなファンクションブロックを制御周期に基づいて順に実行することで、ファンクションブロック600に従って一の軸グループについて第1工程用の対応情報(図1に示す対応情報145)を取得し、ファンクションブロック700に従って第1工程用の対応情報に基づいて指令値を演算して出力先を指定する。これにより、第1工程用の対応情報に基づいて、適切な出力先に指令値が出力される。
 また、制御装置100は、上述したようなファンクションブロックを制御周期に基づいて順に実行することで、ファンクションブロック650に従って当該一の軸グループについて第1工程用の対応情報を第2工程用の対応情報へと変更して第2工程用の対応情報(図3に示す対応情報145)を取得し、ファンクションブロック750に従って第2工程用の対応情報に基づいて指令値を演算して出力先を指定する。これにより、第2工程用の対応情報に基づいて、適切な出力先に指令値が出力される。
 このように、制御装置100は、所定条件が成立したときに、対応情報において、演算対象である1つ以上の軸のそれぞれに対応する出力先を動的に変更するだけで、出力先を適切に特定することができる。これにより、記憶領域を増大させることなく制御対象となる軸の組合せを変更することができる。
 <E.軸グループ構造体>
 次に、軸グループ構造体について説明する。図7は、軸グループ構造体を説明するための図である。本実施の形態においては、複数の軸グループ構造体が設けられている。各軸グループ構造体には、軸グループを特定するための識別情報(たとえば、識別番号)と、「Status」(図1~図3で示したステータス144)と、「AxisComposition」とを含む。
 たとえば、軸グループ1に対応する軸グループ構造体においては、軸グループ1を特定するための識別情報として“AxisGroup No.1”が格納される。「Status」は、上述した特定プログラムであるファンクションブロック700,750によって対応情報(AxisComposition)が参照されている場合に、“Executing”になる。これにより、軸グループ1の命令に対してインターロックが掛かり、軸グループ1に対して対応情報を変更する処理の実行が禁止される。「AxisComposition」は、対応情報に相当し、各軸(X軸,Y軸,Z軸,X’軸,X”軸)に対応するドライバ520の出力先を特定するためのデータである。たとえば、第1工程においては、X軸に対して“NULL”、Y軸に対して“Drive3”(ドライバ3)、Z軸に対して“Drive4”(ドライバ4)、X’軸に対して“Drive1”(ドライバ1)、X”軸に対して“Drive2”(ドライバ2)といったような対応関係が「AxisComposition」で規定される。
 第1工程用の軸グループ構造体においては、上述した変更プログラムであるファンクションブロック600が実行されることで、軸グループ1を特定するための識別情報として“AxisGroup No.1”が指定され、かつ「AxisComposition」が規定される。その後、特定プログラムであるファンクションブロック700が実行されることで、「Status」が“Executing”となってインターロックが掛かる。
 第1工程から第2工程に移行すると、変更プログラムであるファンクションブロック650が実行される。このファンクションブロック650の実行によって、第1工程用の軸グループ構造体が第2工程用の軸グループ構造体に変更される。
 具体的には、第2工程用の変更プログラムであるファンクションブロック650が実行されることで、第2工程用の「AxisComposition」が規定される。たとえば、第2工程においては、X軸に対して“Drive1”(ドライバ1),“Drive2”(ドライバ2)、Y軸に対して“Drive3”(ドライバ3)、Z軸に対して“Drive4”(ドライバ4)、X’軸に対して“NULL”、X”軸に対して“NULL”といったような対応関係が「AxisComposition」で規定される。その後、特定プログラムであるファンクションブロック750が実行されることで、「Status」が“Executing”となってインターロックが掛かる。
 このように、本実施の形態に係る制御装置100は、軸グループ1の軸グループ構造体において、軸グループ1という枠組みを変更することなく工程の種類に応じて対応情報の内容を変更することで、工程の種類に応じて適切な出力先に指令値を出力することができる。
 また、図8は、対応情報が使用中の場合における対応情報の内容変更について説明するための図である。図8に示されるように、たとえば、第1工程用の軸グループ構造体が実行中(Executing)の場合、第2工程用の変更プログラムであるファンクションブロック650が実行されないため、第1工程用の軸グループ構造体が第2工程用の軸グループ構造体に変更されることはない。
 <F.異常処理>
 次に、制御装置100が実行する異常処理について説明する。制御装置100は、異常処理として、第1異常処理および第2異常処理を実行可能である。
 図9は、本実施の形態に係る制御装置100が実行する第1異常処理を説明するための模式図である。第1異常処理とは、対応情報に基づいて特定することができない出力先に対応する軸について指令値が演算された場合に制御装置100によって実行される異常処理である。
 たとえば、図9には、第2工程において指令値146が演算されたが、対応情報145が第1工程のまま変更されていないという異常を示す例である。具体的には、第2工程においては、X軸、Y軸、Z軸が用いられるため、演算部159によって、X軸に対しては“α”、Y軸に対しては“β”、Z軸に対しては“γ”が指令値146として算出される。一方、本来であれば、変更部156によって、第2工程に応じた内容に対応情報145が変更されるはずであるが、何らかの原因(たとえば、ユーザによるプログラミングの間違い、制御装置100による処理異常など)により、第1工程に応じた内容で対応情報145が維持されている。
 具体的には、第2工程に従えば、X’軸およびX”軸に対して出力先が設定されない(NULL)一方で、X軸に対してドライバ1およびドライバ2の両方が設定されるはずであるが、この例では、X’軸に対して“ドライバ1”、X”軸に対して“ドライバ2”が出力先として設定され、X軸に対しては出力先が設定されていない(NULL)。このため、演算部159によって演算されたX軸に対する指令値“α”は、対応情報145に基づいて出力先が特定されないことになる。
 そこで、制御装置100のプログラム実行部150は、さらに第1異常判断部191を含んでいてもよい。第1異常判断部191は、たとえば、特定プログラムにおけるファンクションブロック700やファンクションブロック750によって規定され、対応情報145に基づいて特定することができない出力先に対応する軸について演算部159によって指令値が演算された場合、異常であると判断する。そして、第1異常判断部191によって異常であると判断された場合、特定プログラムや変更プログラムなどの制御プログラム、あるいは他のプログラムの実行が禁止されるとともに、図示しないLEDによる点灯や点滅、あるいはサポート装置200や表示装置400による警告画像の表示などによって、ユーザに異常が報知される。
 なお、図9に示す例は、第2工程において指令値が演算されたが、対応情報145が第1工程のまま変更されていないという異常を示す例であるが、たとえば、第1工程において指令値が演算されたが、対応情報145が第2工程のまま変更されていないという異常についても、第1異常判断部191は、異常であると判断することができ、この場合であっても、プログラムの実行を禁止したり、警告を発したりするなどの第1異常処理が実行される。
 このように、制御装置100は、対応情報145に基づいて特定することができない出力先に対応する軸について演算部159によって指令値146が演算された場合、異常であると判断するとともに、プログラムの実行を禁止したり、警告を発したりするなどの第1異常処理を実行してもよい。
 なお、第1異常判断部191は、特定プログラムにおけるファンクションブロック700やファンクションブロック750によって規定されるものに限らず、特定プログラムとは別の図示しない監視プログラムによって規定されてもよい。すなわち、対応情報145に基づいて特定することができない出力先に対応する軸について指令値が出力されたか否かを、監視プログラムによって第三者的に監視するものであってもよい。
 図10は、本実施の形態に係る制御装置100が実行する第2異常処理を説明するための模式図である。第2異常処理とは、対応情報において、一の出力先に対して複数の軸が対応する場合に制御装置100によって実行される異常処理である。
 たとえば、図10には、第2工程において、対応情報145において一の出力先(ドライバ)に対して複数の軸が対応するという異常を示す例である。具体的には、本来、第2工程においては、X軸に対して“ドライバ1”および“ドライバ2”の両方が設定され、Y軸に対して“ドライバ3”が設定され、Z軸に対して“ドライバ4”が設定され、各ドライバ520はそれぞれ一の軸のみが対応する。しかし、この例では、何らかの原因(たとえば、ユーザによるプログラミングの間違い、制御装置100による処理異常など)により、ドライバ2に対してX軸およびX”軸の両方が対応付けられている。このため、演算部159によって、X”軸に対応する指令値が演算されていないにも関わらず、出力先としてはX”軸が設定されることになる。
 そこで、制御装置100のプログラム実行部150は、さらに第2異常判断部192を含んでいてもよい。第2異常判断部192は、たとえば、特定プログラムにおけるファンクションブロック700やファンクションブロック750によって規定され、対応情報145において、一の出力先に対して複数の軸が対応する場合、異常であると判断する。そして、第2異常判断部192によって異常であると判断された場合、特定プログラムや変更プログラムなどの制御プログラム、あるいは他のプログラムの実行が禁止されるとともに、図示しないLEDによる点灯や点滅、あるいはサポート装置200や表示装置400による警告画像の表示などによって、ユーザに異常が報知される。
 なお、図10に示す例は、第2工程において、対応情報145において一の出力先(ドライバ)に対して複数の軸が対応するという異常を示す例であるが、たとえば、第1工程において、対応情報145において一の出力先(ドライバ)に対して複数の軸が対応するという異常についても、第2異常判断部192は、異常であると判断することができ、この場合であっても、プログラムの実行を禁止したり、警告を発したりするなどの第2異常処理が実行される。
 このように、制御装置100は、対応情報145において、一の出力先に対して複数の軸が対応する場合、異常であると判断するとともに、プログラムの実行を禁止したり、警告を発したりするなどの第2異常処理を実行してもよい。
 なお、第2異常判断部192は、特定プログラムにおけるファンクションブロック700やファンクションブロック750によって規定されるものに限らず、変更プログラムにおけるファンクションブロック600やファンクションブロック650によって規定されてもよい。また、第2異常判断部192は、特定プログラムや変更プログラムとは別の図示しない監視プログラムによって規定されてもよい。すなわち、対応情報145において、一の出力先に対して複数の軸が対応するか否かを、監視プログラムによって第三者的に監視するものであってもよい。
 <G.作用効果>
 以上のように、本実施の形態に係る制御装置100は、特定プログラムにおけるファンクションブロック700やファンクションブロック750を実行することで、指令値の演算対象である1つ以上の軸のそれぞれに対応する出力先を特定するための対応情報145に基づいて、演算された指令値の出力先を特定することができる。さらに、制御装置100は、変更プログラムにおけるファンクションブロック600やファンクションブロック650を実行することで、所定条件が成立したときに、対応情報145において、演算対象である1つ以上の軸のそれぞれに対応する出力先を変更する。このため、制御対象となる全ての軸の組合せについて対応する出力先を特定するための対応情報を予め準備して記憶しておく必要がなく、所定条件が成立したときに、対応情報において、演算対象である1つ以上の軸のそれぞれに対応する出力先を動的に変更するだけで、出力先を適切に特定することができる。これにより、記憶領域を増大させることなく制御対象となる軸の組合せを変更することができる。
 特定プログラムおよび変更プログラムは、ファンクションブロックで規定されているため、制御装置100は、再利用性のある制御命令に従って、指令値の演算、出力先の特定、および対応情報の内容変更を実現することができる。
 制御装置100は、対応情報145を用いて指令値の出力先を特定中である間、ステータス144(「Status」)のデータを実行中(Executing)に書き換え、軸グループの命令に対してインターロックを掛けて、軸グループに対して対応情報145を変更する処理の実行を禁止する。これにより、出力先の特定のために対応情報145が使用されている間は、対応情報145の内容が変更されないため、対応情報145の内容変更が出力先の特定に影響を与えてしまうことがない。
 制御装置100は、対応情報145に基づいて特定することができない出力先に対応する軸について演算部159によって指令値が演算された場合、第1異常判断部191によって異常であると判断する。これにより、対応情報145に基づいて特定することができない出力先に対応する軸について指令値が演算された場合に、異常であると判断することができる。
 制御装置100は、対応情報145において、一の出力先に対して複数の軸が対応する場合、第2異常判断部192によって異常であると判断する。これにより、対応情報145において、一の出力先に対して複数の軸が対応する場合に、異常であると判断することができる。
 制御装置100は、演算部159、特定部158、および変更部156に対する制御命令の実行中に所定のイベントが発生したとき、または外部からの指令が入力されたときに、対応情報145において、演算対象である1つ以上の軸のそれぞれに対応する出力先を変更するため、対応情報の内容を動的に変更することができる。
 <H.付記>
 以上のように、本実施の形態では以下のような開示を含む。
 (構成1)
 複数のモータ(522_1,522_2,522_3,522_4)を制御する制御装置(100)であって、
 座標系を構成する複数の軸(X軸,Y軸,Z軸,X’軸,X”軸)のうちの少なくとも1つ以上の軸について指令値を演算する演算部(159)と、
 前記複数のモータのそれぞれに対応する出力先(520_1,520_2,520_3,520_4)のうち、前記演算部における演算対象である前記1つ以上の軸のそれぞれに対応する前記出力先を特定するための対応情報(145)を記憶する記憶部(195)と、
 前記記憶部によって記憶された前記対応情報に基づいて、前記演算部によって演算された前記指令値の前記出力先を特定する特定部(158)と、
 所定条件が成立したときに、前記記憶部によって記憶された前記対応情報において、前記演算部における演算対象である前記1つ以上の軸のそれぞれに対応する前記出力先を変更する変更部(156)とを備える、制御装置。
 (構成2)
 前記演算部(159)、前記特定部(158)、および前記変更部(156)は、ファンクションブロックの形で規定される制御命令に従って動作する、構成1に記載の制御装置。
 (構成3)
 前記変更部(156)は、前記特定部(158)によって前記対応情報(145)に基づいて前記出力先が特定されている間、当該対応情報を変更しない、構成1または構成2に記載の制御装置。
 (構成4)
 前記対応情報(145)に基づいて特定することができない前記出力先に対応する前記軸について前記演算部(159)によって前記指令値が演算された場合、異常であると判断する第1異常判断部(191)をさらに備える、構成1~構成3のいずれかに記載の制御装置。
 (構成5)
 前記対応情報(145)において、一の前記出力先に対して前記複数の軸が対応する場合、異常であると判断する第2異常判断部(192)をさらに備える、構成1~構成4のいずれかに記載の制御装置。
 (構成6)
 前記所定条件は、前記演算部(159)、前記特定部(158)、および前記変更部(156)に対する制御命令の実行中に所定のイベントが発生したとき、または外部からの指令が入力されたときに成立する、構成1~構成5のいずれかに記載の制御装置。
 (構成7)
 複数のモータ(522_1,522_2,522_3,522_4)を制御する制御装置(100)における制御方法(制御プログラム30で規定される制御方法)であって、
 座標系を構成する複数の軸(X軸,Y軸,Z軸,X’軸,X”軸)のうちの少なくとも1つ以上の軸について指令値を演算するステップと、
 前記複数のモータのそれぞれに対応する出力先(520_1,520_2,520_3,520_4)のうち、前記演算するステップにおける演算対象である前記1つ以上の軸のそれぞれに対応する前記出力先を特定するための対応情報(145)を記憶するステップと、
 前記記憶するステップによって記憶された前記対応情報に基づいて、前記演算するステップによって演算された前記指令値の前記出力先を特定するステップと、
 所定条件が成立したときに、前記記憶するステップによって記憶された前記対応情報において、前記演算するステップにおける演算対象である前記1つ以上の軸のそれぞれに対応する前記出力先を変更するステップとを含む、制御方法。
 (構成8)
 複数のモータ(522_1,522_2,522_3,522_4)を制御する制御装置(100)が実行する制御プログラム(30)であって、
 座標系を構成する複数の軸(X軸,Y軸,Z軸,X’軸,X”軸)のうちの少なくとも1つ以上の軸について指令値を演算するステップと、
 前記複数のモータのそれぞれに対応する出力先(520_1,520_2,520_3,520_4)のうち、前記演算するステップにおける演算対象である前記1つ以上の軸のそれぞれに対応する前記出力先を特定するための対応情報(145)に基づいて、前記演算するステップによって演算された前記指令値の前記出力先を特定するステップと、
 所定条件が成立したときに、前記対応情報において、前記演算するステップにおける演算対象である前記1つ以上の軸のそれぞれに対応する前記出力先を変更するステップとを含む、制御プログラム。
 今回開示された各実施の形態は全ての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて請求の範囲によって示され、請求の範囲と均等の意味および範囲内での全ての変更が含まれることが意図される。また、実施の形態および各変形例において説明された発明は、可能な限り、単独でも、組み合わせても、実施することが意図される。
 1 制御システム、2 フィールドネットワーク、6 上位ネットワーク、30 制御プログラム、34 システムプログラム、100 制御装置、102 プロセッサ、104 チップセット、106 主メモリ、108 ストレージ、110 上位ネットワークコントローラ、112 コントローラ、114 メモリカードインターフェイス、116 メモリカード、120 内部バスコントローラ、122 ユニット、130 フィールドネットワークコントローラ、140 軸グループ構造体、141,142,146,147 指令値、143 パラメータ、144 ステータス、145 対応情報、150 プログラム実行部、152 制御命令解釈部、154 ライブラリ、156 変更部、158 特定部、159 演算部、180 入出力リフレッシュ部、191 第1異常判断部、192 第2異常判断部、195 記憶部、200 サポート装置、300 サーバ装置、400 表示装置、500 フィールドデバイス、510 リモートI/O装置、520,530 サーボドライバ、522,532 サーボモータ、540 工作機械、541,542 アーム、543 前部、544 本体、545 土台、550 搬送装置、554 作業台、600,650,700,750 ファンクションブロック。

Claims (8)

  1.  複数のモータを制御する制御装置であって、
     座標系を構成する複数の軸のうちの少なくとも1つ以上の軸について指令値を演算する演算部と、
     前記複数のモータのそれぞれに対応する出力先のうち、前記演算部における演算対象である前記1つ以上の軸のそれぞれに対応する前記出力先を特定するための対応情報を記憶する記憶部と、
     前記記憶部によって記憶された前記対応情報に基づいて、前記演算部によって演算された前記指令値の前記出力先を特定する特定部と、
     所定条件が成立したときに、前記記憶部によって記憶された前記対応情報において、前記演算部における演算対象である前記1つ以上の軸のそれぞれに対応する前記出力先を変更する変更部とを備える、制御装置。
  2.  前記演算部、前記特定部、および前記変更部は、ファンクションブロックの形で規定される制御命令に従って動作する、請求項1に記載の制御装置。
  3.  前記変更部は、前記特定部によって前記対応情報に基づいて前記出力先が特定されている間、当該対応情報を変更しない、請求項1または請求項2に記載の制御装置。
  4.  前記対応情報に基づいて特定することができない前記出力先に対応する前記軸について前記演算部によって前記指令値が演算された場合、異常であると判断する第1異常判断部をさらに備える、請求項1~請求項3のいずれか1項に記載の制御装置。
  5.  前記対応情報において、一の前記出力先に対して前記複数の軸が対応する場合、異常であると判断する第2異常判断部をさらに備える、請求項1~請求項4のいずれか1項に記載の制御装置。
  6.  前記所定条件は、前記演算部、前記特定部、および前記変更部に対する制御命令の実行中に所定のイベントが発生したとき、または外部からの指令が入力されたときに成立する、請求項1~請求項5のいずれか1項に記載の制御装置。
  7.  複数のモータを制御する制御装置における制御方法であって、
     座標系を構成する複数の軸のうちの少なくとも1つ以上の軸について指令値を演算するステップと、
     前記複数のモータのそれぞれに対応する出力先のうち、前記演算するステップにおける演算対象である前記1つ以上の軸のそれぞれに対応する前記出力先を特定するための対応情報を記憶するステップと、
     前記記憶するステップによって記憶された前記対応情報に基づいて、前記演算するステップによって演算された前記指令値の前記出力先を特定するステップと、
     所定条件が成立したときに、前記記憶するステップによって記憶された前記対応情報において、前記演算するステップにおける演算対象である前記1つ以上の軸のそれぞれに対応する前記出力先を変更するステップとを含む、制御方法。
  8.  複数のモータを制御する制御装置が実行する制御プログラムであって、
     座標系を構成する複数の軸のうちの少なくとも1つ以上の軸について指令値を演算するステップと、
     前記複数のモータのそれぞれに対応する出力先のうち、前記演算するステップにおける演算対象である前記1つ以上の軸のそれぞれに対応する前記出力先を特定するための対応情報に基づいて、前記演算するステップによって演算された前記指令値の前記出力先を特定するステップと、
     所定条件が成立したときに、前記対応情報において、前記演算するステップにおける演算対象である前記1つ以上の軸のそれぞれに対応する前記出力先を変更するステップとを含む、制御プログラム。
PCT/JP2019/025054 2018-07-18 2019-06-25 制御装置、制御方法、および制御プログラム WO2020017248A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018-134976 2018-07-18
JP2018134976A JP7167516B2 (ja) 2018-07-18 2018-07-18 制御装置、制御方法、および制御プログラム

Publications (1)

Publication Number Publication Date
WO2020017248A1 true WO2020017248A1 (ja) 2020-01-23

Family

ID=69163767

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/025054 WO2020017248A1 (ja) 2018-07-18 2019-06-25 制御装置、制御方法、および制御プログラム

Country Status (2)

Country Link
JP (1) JP7167516B2 (ja)
WO (1) WO2020017248A1 (ja)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5233256A (en) * 1975-09-10 1977-03-14 Toshiba Corp Multi shafts control apparatus of robbots
JPS6231405A (ja) * 1985-08-02 1987-02-10 Nec Corp 数値制御装置の軸変換符号切替方式
JPH06246664A (ja) * 1993-02-26 1994-09-06 Yamaha Motor Co Ltd 複数ロボットの制御方法および同装置
JPH09305212A (ja) * 1996-05-10 1997-11-28 Fanuc Ltd 数値制御装置および数値制御装置に対するコントロールソフトウェアの入力設定方法
JP3664910B2 (ja) * 1999-04-01 2005-06-29 株式会社三協精機製作所 ロボットの制御装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5233256A (en) * 1975-09-10 1977-03-14 Toshiba Corp Multi shafts control apparatus of robbots
JPS6231405A (ja) * 1985-08-02 1987-02-10 Nec Corp 数値制御装置の軸変換符号切替方式
JPH06246664A (ja) * 1993-02-26 1994-09-06 Yamaha Motor Co Ltd 複数ロボットの制御方法および同装置
JPH09305212A (ja) * 1996-05-10 1997-11-28 Fanuc Ltd 数値制御装置および数値制御装置に対するコントロールソフトウェアの入力設定方法
JP3664910B2 (ja) * 1999-04-01 2005-06-29 株式会社三協精機製作所 ロボットの制御装置

Also Published As

Publication number Publication date
JP2020013317A (ja) 2020-01-23
JP7167516B2 (ja) 2022-11-09

Similar Documents

Publication Publication Date Title
JP6946909B2 (ja) 制御システムおよび制御装置
EP3477405B1 (en) Control device
JP6903275B2 (ja) 制御装置および制御方法
JP6919404B2 (ja) 制御装置
US10908577B2 (en) Control device
JP6900863B2 (ja) 制御装置、制御方法および制御プログラム
JP6950385B2 (ja) 制御装置および制御方法
JP2019061467A (ja) サポート装置およびサポートプログラム
JP6881174B2 (ja) 制御装置および制御方法
JP7452124B2 (ja) ロボット制御システムおよび制御方法
WO2020017248A1 (ja) 制御装置、制御方法、および制御プログラム
WO2012124145A1 (ja) 演算ユニット、支援装置、支援プログラム、支援プログラムを格納した記憶媒体、および、支援装置における動作方法
CN116330263A (zh) 一种基于Codesys的智能工业机器人平台实现方法
JP2021026309A (ja) 制御システム、解析方法およびプログラム
JP2023151876A (ja) 制御装置、制御方法、開発支援装置、及びプログラム
JP2023151965A (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: 19836922

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19836922

Country of ref document: EP

Kind code of ref document: A1