Information processing device

The information processing device addresses IEC61131-3's inability to detect missing parameter assignments or references in PLC function blocks by analyzing and alerting on these errors, thereby preventing accidents and simplifying verification.

JP7846222B2Active Publication Date: 2026-04-14FANUC LTD
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-06-24
Publication Date
2026-04-14

Smart Images

  • Figure 0007846222000001
    Figure 0007846222000001
  • Figure 0007846222000002
    Figure 0007846222000002
  • Figure 0007846222000003
    Figure 0007846222000003
Patent Text Reader

Abstract

The purpose of the present invention is to prevent programming errors such as omitting to assign or refer parameters in function blocks and thereby prevent accidents due to unintended behavior. This information processing device is provided with: a function block information acquisition unit that acquires a function block definition and an instance name from a sequence program; a function block instance name search unit that searches the sequence program for locations where the instance name acquired by the function block information acquisition unit is used; a function block analysis unit that analyzes access conditions including at least either calling positions for the instance defined by the instance name, parameter assignment positions, or parameter reference positions on the basis of the acquired function block definition and the results of the search by the function block instance name search unit; and a function block information display control unit that displays the results of the analysis by the function block analysis unit on a display unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an information processing apparatus.

Background Art

[0002] The program of a PLC (Programmable Logic Controller) is standardized by IEC61131-3. In IEC61131-3, function blocks are used as a means to componentize programs. For example, a technique for automatically editing function block instances by modifying function block definitions is known. For example, see Patent Document 1. In function blocks, as methods for substituting and referring to parameter values, there are (1) substituting and referring to parameters when an instance is called, (2) separately substituting and separately referring to parameters (that is, substituting and referring to parameters at locations other than when an instance is called), (3) setting initial values for parameters in the type declaration of the function block (omission at the time of call), and (4) no substitution or reference of parameters. Figures 10A to 10D are diagrams showing an example of a sequence program that performs each of the four methods of substituting and referring to parameter values. As shown in Figures 10A to 10D, the sequence program includes a function block definition section that defines a function block, a variable declaration section that declares an instance (variable) having the defined function block as a data type, and a program section that describes "instance name + ()" in the program to call a substitution process or a reference process. (1) In the method of substituting and referring to parameters when an instance is called, as shown in Figure 10A, when the instance "fbinst" is called in the program section, substitution processes for parameters "IN1" and "IN2" are performed, and a reference process for parameter "OUT" is performed. (2) In the method of separating parameter assignment and separate reference, as shown in Figure 10B, the assignment of parameters "IN1" and "IN2" is performed in the program section before the instance "fbinst" is called, and the reference of parameter "OUT" is performed after the instance "fbinst" is called. (3) In the method of setting initial values ​​for parameters in the type declaration of the function block, as shown in Figure 10C, the parameters "IN1", "IN2", and "OUT" are initialized to "1", "2", and "0" respectively in the function block definition section. (4) In the method without parameter assignment or referencing, as shown in Figure 10D, the program does not assign or reference any parameters when calling the instance "fbinst" or before or after calling the instance "fbinst". Even in this case, IEC61131-3 does not produce an error or warning. [Prior art documents] [Patent Documents]

[0003] [Patent Document 1] Japanese Patent Publication No. 2009-9462 [Overview of the project] [Problems that the invention aims to solve]

[0004] By the way, as shown on the right side of Figure 11, for example, when adding the parameter "IN3" shown in shaded area to the function block definition section of a sequence program, the common practice is to add an assignment (reference) process starting with "fbinst.IN3" for the parameter "IN3" added to the program section for all instances of that definition type. However, even if the assignment (reference) process for "fbinst.IN3" of the parameter "IN3" is forgotten in the program section, the IEC61131-3 standard also allows calling an instance without assigning (referring) the parameter "IN3," as described in (4) above (without parameter assignment or reference). Therefore, the compiler cannot detect this programming error of forgetting the assignment (reference) process as an error. As a result, running the sequence program in question may cause unexpected accidents. Furthermore, it is necessary to check for any omissions, but the larger the sequence program, the more likely omissions are to occur, placing a burden on the programmer for checking and verifying.

[0005] Therefore, it is desirable to prevent programming errors such as failing to assign or reference parameters in function blocks, and to prevent accidents caused by unintended behavior. [Means for solving the problem]

[0006] One embodiment of the information processing device of the present disclosure includes: a function block information acquisition unit that acquires a function block definition and an instance name from a sequence program; a function block instance name search unit that searches for the location of use of the instance name acquired by the function block information acquisition unit from the sequence program; a function block analysis unit that analyzes the access status, including at least one of the call location, parameter assignment location, or parameter reference location of the instance defined by the instance name, based on the function block definition acquired by the function block information acquisition unit and the search result of the function block instance name search unit; and a function block information display control unit that displays the analysis result of the function block analysis unit on a display unit. [Effects of the Invention]

[0007] According to one embodiment, it is possible to prevent programming errors such as failing to assign or reference parameters in a function block, thereby preventing accidents caused by unintended behavior. [Brief explanation of the drawing]

[0008] [Figure 1] This is a diagram showing the functional block configuration of a PLC programming device according to the first embodiment. [Figure 2] This figure shows an example of a read sequence program. [Figure 3] This figure shows an example of a screen displaying analysis results. [Figure 4] This is a flowchart explaining the analysis process of a PLC programming device. [Figure 5] This figure shows an example of the configuration of a PLC programming device according to the second embodiment. [Figure 6] This figure shows an example of the settings screen for showing / hiding alerts. [Figure 7] This figure shows an example of the configuration of a PLC programming device according to the third embodiment. [Figure 8] This figure shows an example of a screen displaying analysis results. [Figure 9] This figure shows an example of the editing screen. [Figure 10A] This figure shows an example of a sequence program that assigns and references parameters when an instance is invoked. [Figure 10B] This figure shows an example of a sequence program that uses separate substitution and separate referencing for parameters. [Figure 10C] This figure shows an example of a sequence program where initial values ​​are set for parameters in the type declaration of a function block. [Figure 10D] This figure shows an example of a sequence program without parameter substitution or referencing. [Figure 11] This figure shows an example of adding parameters to the function block definition section of a sequence program. [Modes for carrying out the invention]

[0009] The first to third embodiments will be described in detail with reference to the drawings. Here, each embodiment shares a common configuration: it reads a selected sequence program, obtains a function block definition and an instance name from the read sequence program, searches for the usage of the instance name in the read sequence program, analyzes the access status including at least one of the instance call location, parameter assignment location, or parameter reference location based on the search results of the obtained function block definition and instance name, and displays the analysis results. However, in the first embodiment, all alerts in the analysis results are displayed. In contrast, the second embodiment differs from the first embodiment in that the display / hide of alerts is selected for each parameter based on user input. Furthermore, in the third embodiment, if an access status is selected based on user input, the system transitions to an editing screen where the selected access status can be edited, which differs from the first and second embodiments. First, the first embodiment will be described in detail below, and then the parts that are particularly different from the first embodiment in the second and third embodiments will be described.

[0010] <First Embodiment> FIG. 1 is a diagram of the functional block configuration of a PLC programming device as an information processing device according to the first embodiment. The PLC programming device 1 is a computer, a tablet terminal, etc. known to those skilled in the art, and may be directly connected to a PLC not shown via a connection interface not shown. Further, the PLC programming device 1 may be connected to a PLC not shown via a network not shown such as a LAN (Local Area Network) or the Internet. In this case, the PLC programming device 1 may include a communication unit not shown for communicating with a PLC not shown by such a connection. As shown in FIG. 1, the PLC programming device 1 includes a CPU 10, a storage unit 20, an input unit 30, and a display unit 40.

[0011] The input unit 30 is an input device such as a keyboard, a mouse, or a touch panel arranged on the display unit 40 described later, and receives input from the user.

[0012] The display unit 40 is a display device such as an LCD (Liquid Crystal Display), and displays a display screen for displaying information about function blocks and the like based on a display instruction from a function block information display control unit 140 described later.

[0013] The storage unit 20 is, for example, an SSD (Solid State Drive), an HDD (Hard Disk Drive), etc., and stores n sequence programs P1 to Pn (n is an integer of 2 or more) together with an OS and various software. Each of the sequence programs P1 to Pn has a function block definition section, a variable declaration section, and a program section, similar to the sequence programs shown in Figures 10A to 10D.

[0014] The control unit 10 includes a CPU, ROM, RAM, CMOS memory, etc., which are configured to communicate with each other via a bus, and is known to those skilled in the art. The CPU is a processor that controls the PLC programming device 1 as a whole. The CPU reads the system program and application program stored in ROM via the bus and controls the entire PLC programming device 1 according to the system program and application program. As a result, as shown in Figure 1, the control unit 10 is configured to realize the functions of the function block information acquisition unit 110, the function block instance name search unit 120, the function block analysis unit 130, and the function block information display control unit 140. Various data such as temporary calculation data and display data are stored in RAM. The CMOS memory is backed up by a battery (not shown) and is configured as a non-volatile memory that retains its memory state even when the power to the PLC programming device 1 is turned off.

[0015] The function block information acquisition unit 110 acquires, for example, the function block definition and instance name from a selected sequence program Pi among n sequence programs P1 to Pn based on user input via the input unit 30 (where i is an integer from 1 to n). Specifically, the function block information acquisition unit 110 reads the selected sequence program Pi. Figure 2 shows an example of a read sequence program Pi. Figure 2 also shows the number of lines in the program portion of the sequence program Pi. The function block information acquisition unit 110 acquires the function block definition name "MY_FB", input parameters "IN1", "IN2", "IN3", output parameter "OUT", and input / output parameter "none" from the function block definition section of the sequence program Pi that it has read, as a function block definition. The function block information acquisition unit 110 also acquires the instance (variable) names "fbinst1", "fbinst2", and "fbinst3" from the variable declaration section of the sequence program Pi.

[0016] The function block instance name search unit 120 searches for the location where the instance name obtained by the function block information acquisition unit 110 is used in the selected sequence program Pi. Specifically, the function block instance name search unit 120 searches for the instance name "fbinst1" in the program section of the sequence program Pi shown in Figure 2, for example, and extracts "fbinst1.IN1:=3;" on line 5, "fbinst1.IN2:=fbinst1.IN2*2;" on line 6, and "fbinst1(IN1:=5,IN3:=4,OUT=>out1);" on line 13. Furthermore, the function block instance name search unit 120 searches for the instance name "fbinst2" and extracts "fbinst2(IN1:=6,IN2:=12,IN3:=11);" from line 23. Furthermore, the function block instance name search unit 120 searches for the instance name "fbinst3" and extracts "fbinst3.IN1:=100;" on line 30, "fbinst3();" on line 31, and "fbinst3.OUT=>out3;" on line 40.

[0017] The function block analysis unit 130 analyzes the access status, including at least one of the call location, parameter assignment location, or parameter reference location of the instance defined by the instance name, based on the function block definition obtained by the function block information acquisition unit 110 and the search results of the function block instance name search unit 120. Specifically, the function block analysis unit 130 analyzes the access status in the program section of the sequence program Pi shown in Figure 2, including the call locations of instance names "fbinst1", "fbinst2", and "fbinst3", the assignment locations of input parameters "IN1", "IN2", and "IN3" for instance names "fbinst1", "fbinst2", and "fbinst3", and the reference locations of output parameter "OUT", based on the function block definition obtained by the function block information acquisition unit 110 and the search results of the function block instance name search unit 120. The function block analysis unit 130 then determines, based on the call locations of the acquired instance names "fbinst1", "fbinst2", and "fbinst3", the assignment locations of the input parameters "IN1", "IN2", and "IN3" for each instance name "fbinst1", "fbinst2", and "fbinst3", and the reference location of the output parameter "OUT", whether there is an assignment process for input / input / output parameters before the instance call location, whether there is a reference process for output / input / output parameters after the instance call location, and whether there are two or more assignment processes for input / input / output parameters for a single instance call.

[0018] In other words, the function block analysis unit 130 determines that the assignment process is being performed twice because there are two assignment locations for the input parameter "IN1" at the call location of the instance name "fbinst1" on line 13 of the program section of the sequence program Pi in Figure 2, namely on line 5 and line 13, and decides to output an alert. Furthermore, the function block analysis unit 130 determines that there is no reference to the output parameter "OUT" after the instance call location of the instance name "fbinst2" on line 23 of the program section of the sequence program Pi in Figure 2, and decides to output an alert. Furthermore, the function block analysis unit 130 determines that there is no assignment location for the input parameter "IN3" before the instance call location of instance name "fbinst3" on line 31 of the program section of the sequence program Pi in Figure 2, and decides to output an alert. The function block analysis unit 130 also determines that there is no assignment location for the input parameter "IN2" before the instance call of instance name "fbinst3" on line 31, but since the initial value "10" is set in the function block definition section, it may be configured to output a warning.

[0019] The function block information display control unit 140 displays the analysis results of the function block analysis unit 130 on the display unit 40. Figure 3 shows an example of a screen displaying the analysis results. As shown in Figure 3, when calling an instance with instance name "fbinst1", the function block information display control unit 140 notices that the input parameter "IN1" is assigned in two places, on the 5th and 13th lines. Therefore, it displays the box for the input parameter "IN1" on the 13th line, which is the second assignment location, in red or another color, and displays an alert such as "It has been assigned twice!". In addition, in the call of the instance with the instance name "fbinst2", since there is no reference location for the output parameter "OUT", the function block information display control unit 140 displays the frame of the output parameter "OUT" in a color such as red and displays an alert such as "There is no reference location!". In addition, in the call of the instance with the instance name "fbinst3", since there is no assignment location for the input parameter "IN3", the function block information display control unit 140 displays the frame of the input parameter "IN3" in a color such as red and also displays an alert saying "There is no assignment location!". Note that in the call of the instance with the instance name "fbinst3", since there is only an initial value setting for the input parameter "IN2" and no assignment location, the function block information display control unit 140 may display the frame of the input parameter "IN2" in a color such as yellow and display a message such as "There is no setting other than the initial value."

[0020] <Analysis Process of PLC Programming Device 1> Next, referring to FIG. 4, the flow of the analysis process of the PLC programming device 1 will be described. FIG. 4 is a flowchart for explaining the analysis process of the PLC programming device 1. The flow shown here is executed each time one of the n sequence programs P1 to Pn, i.e., the sequence program Pi, is selected.

[0021] In step S11, the function block information acquisition unit 110 acquires the function block definition from the function block definition unit of the selected sequence program Pi'.

[0022] In step S12, the function block information acquisition unit 110 acquires the instance information including the instance name from the variable declaration unit of the selected sequence program Pi.

[0023] In step S13, the function block instance name search unit 120 searches for and extracts the instances of instance names included in the instance information read in step S12 from the selected sequence program Pi.

[0024] In step S14, the function block analysis unit 130 analyzes the access status, including the call location of the instance defined by the instance name, the parameter assignment location, or the parameter reference location, based on the function block definition read in step S11 and the search results from step S13.

[0025] In step S15, the function block information display control unit 140 displays the analysis results from step S14 on the display unit 40.

[0026] In step S16, the function block information acquisition unit 110 determines whether or not there is a next instance. If there is no next instance, the process proceeds to step S17. On the other hand, if there is a next instance, the process returns to step S12.

[0027] In step S17, the function block information acquisition unit 110 determines whether or not there is a function block definition. If there is no function block definition, the PLC programming device 1 terminates the analysis process. On the other hand, if there is a function block definition, the process returns to step S11.

[0028] As described above, the PLC programming device 1 according to the first embodiment can prevent programming errors such as omissions in assigning or referencing parameters of function blocks, and can prevent accidents caused by unintended behavior. Furthermore, the PLC programming device 1 can easily grasp the status of parameter assignments and references in function blocks, thereby reducing the burden on the user. The first embodiment has been described above.

[0029] <Second Embodiment> Next, a second embodiment will be described. As described above, the first embodiment displays all alerts in the analysis results. In contrast, the second embodiment differs from the first embodiment in that it selects whether to display or hide alerts for each parameter based on user input. This allows the PLC programming device 1A to prevent programming errors such as omissions in assigning or referencing parameters of function blocks, thereby preventing accidents caused by unintended behavior. The second embodiment will be described below.

[0030] Figure 5 shows an example of the configuration of the PLC programming device 1A according to the second embodiment. Elements having the same functions as those of the PLC programming device 1 in Figure 1 are denoted by the same reference numerals, and detailed explanations are omitted. As shown in Figure 5, the PLC programming device 1A includes a control unit 10a, a storage unit 20, an input unit 30, and a display unit 40. The storage unit 20, input unit 30, and display unit 40 have the same functions as the storage unit 20, input unit 30, and display unit 40 in the first embodiment. Sequence programs P1 to Pn are equivalent to sequence programs P1 to Pn in the first embodiment.

[0031] The control unit 10a includes a CPU, ROM, RAM, CMOS memory, etc., which are configured to communicate with each other via a bus, and are known to those skilled in the art. The CPU is a processor that controls the PLC programming device 1A as a whole. The CPU reads the system program and application program stored in ROM via the bus and controls the entire PLC programming device 1A according to the system program and application program. As a result, as shown in Figure 5, the control unit 10a is configured to implement the functions of the function block information acquisition unit 110, the function block instance name search unit 120, the function block analysis unit 130, and the function block information display control unit 140a. The function block information acquisition unit 110, the function block instance name search unit 120, and the function block analysis unit 130 have the same functions as the function block information acquisition unit 110, the function block instance name search unit 120, and the function block analysis unit 130 in the first embodiment.

[0032] The function block information display control unit 140a displays the analysis results of the function block analysis unit 130 on the display unit 40, similar to the function block information display control unit 140 in Figure 1. Furthermore, the function block information display control unit 140a selects whether to display or hide alerts for each parameter based on user input via the input unit 30. Specifically, the function block information display control unit 140a displays a setting screen to toggle the display / hide of alerts, as shown in Figure 6, when, for example, the user places the mouse pointer of the input unit 30 at the location of the instance name "fbinst1" on the analysis result display screen shown in Figure 3, or when the user touches the location of the instance name "fbinst1" on the touch panel of the input unit 30. Based on the user's input, the function block information display control unit 140a hides the alert for the second parameter "IN1" of the instance name "fbinst1" as shown by the dashed rectangle, by selecting to hide the parameter "IN1" on the setting screen. By doing so, the PLC programming device 1A can prevent programming errors such as missing parameter assignments or references in function blocks by hiding alerts in areas intended by the user or areas that the user has determined not to be errors, and displaying only the most important alerts.

[0033] The analysis process of the PLC programming device 1A is the same as in Figure 4, and a detailed explanation is omitted. However, in step S15 of Figure 4, the function block information display control unit 140a displays the analysis results from step S14 on the display unit 40. When the user touches the location of the instance name "fbinst1" etc. on the touch panel of the input unit 30, it displays a setting screen to switch between displaying and hiding alerts, and hides the alerts for parameters that are selected to be hidden on the setting screen based on the user's input.

[0034] As described above, the PLC programming device 1A according to the second embodiment can prevent programming errors such as missing parameter assignments or references in function blocks by hiding parts intended by the user or parts that the user has determined not to be errors, and displaying only the more important alerted parts, thereby preventing accidents caused by unintended behavior. Furthermore, the PLC programming device 1A can easily grasp the status of parameter assignments and references in function blocks, thereby reducing the burden on the user. The second embodiment has now been described.

[0035] <Third Embodiment> Next, the third embodiment will be described. As described above, the first embodiment displays all alerts in the analysis results. The second embodiment differs from the first embodiment in that it allows the user to select which alerts to display or hide based on user input for each parameter. In contrast to these, the third embodiment differs from the first and second embodiments in that when an access status is selected based on user input, the user is redirected to an editing screen to edit the selected access status. This allows the PLC programming device 1B to prevent programming errors such as omissions in assigning or referencing parameters of function blocks, thereby preventing accidents caused by unintended behavior. The third embodiment will be described below.

[0036] Figure 7 shows an example of the configuration of the PLC programming device 1B according to the third embodiment. Elements having the same functions as those of the PLC programming device 1 in Figure 1 are denoted by the same reference numerals, and detailed explanations are omitted. As shown in Figure 7, the PLC programming device 1B includes a control unit 10b, a storage unit 20, an input unit 30, and a display unit 40. The storage unit 20, input unit 30, and display unit 40 have the same functions as the storage unit 20, input unit 30, and display unit 40 in the first embodiment. Sequence programs P1 to Pn are equivalent to sequence programs P1 to Pn in the first embodiment.

[0037] The control unit 10b includes a CPU, ROM, RAM, CMOS memory, etc., which are configured to communicate with each other via a bus, and are known to those skilled in the art. The CPU is a processor that controls the PLC programming device 1B as a whole. The CPU reads the system program and application program stored in ROM via the bus and controls the entire PLC programming device 1B according to the system program and application program. As a result, as shown in Figure 7, the control unit 10b is configured to implement the functions of the function block information acquisition unit 110, the function block instance name search unit 120, the function block analysis unit 130, and the function block information display control unit 140b. The function block information acquisition unit 110, the function block instance name search unit 120, and the function block analysis unit 130 have the same functions as the function block information acquisition unit 110, the function block instance name search unit 120, and the function block analysis unit 130 in the first embodiment.

[0038] The function block information display control unit 140b displays the analysis results of the function block analysis unit 130 on the display unit 40, similar to the function block information display control unit 140 in Figure 1. Furthermore, if one access status is selected from the analysis results displayed based on user input via the input unit 30, the function block information display control unit 140b transitions to an editing screen such as a text editor for editing the selected access status. Specifically, the function block information display control unit 140a, for example, in the analysis result display screen shown in Figure 8, when the user selects the instance name "fbinst2" indicated by a dashed rectangle using the mouse or touch panel of the input unit 30, transitions to an editing screen for editing the program part of the sequence program Pi, as shown in Figure 9, and jumps to the code position of the selected instance name "fbinst2" indicated by shading. By doing so, the PLC programming device 1B can easily edit the code in the corresponding section according to the analysis results.

[0039] The analysis process of the PLC programming device 1B is the same as in Figure 4, and a detailed explanation is omitted. However, in step S15 of Figure 4, the function block information display control unit 140b displays the analysis results from step S14 on the display unit 40. If the user selects an instance name such as "fbinst2" using the touch panel of the input unit 30, the system transitions to an editing screen for editing the program section of the sequence program Pi and jumps to the location of the code for the selected instance name. In this case, once editing the code for the selected instance name is complete, the process proceeds to step S16.

[0040] As described above, the PLC programming device 1B according to the third embodiment can prevent programming errors such as omissions in assigning or referencing parameters of function blocks by transitioning to an editing screen where the code of the corresponding part is edited according to the analysis results, thereby preventing accidents caused by unintended behavior. Furthermore, the PLC programming device 1B can easily grasp the status of parameter assignments and references in function blocks, thereby reducing the burden on the user. The third embodiment has now been described.

[0041] Although the first, second, and third embodiments have been described above, the PLC programming devices 1, 1A, and 1B are not limited to the embodiments described above, and may include modifications, improvements, etc., to the extent that the objective can be achieved.

[0042] <Example 1> In the first, second, and third embodiments, the sequence programs P1 to Pn were stored in the storage unit 20 of the PLC programming devices 1, 1A, and 1B, but are not limited to this. For example, the sequence programs P1 to Pn may be stored in an external device such as a server.

[0043] <Modification 2> Furthermore, in the first and second embodiments described above, the PLC programming devices 1, 1A, and 1B analyze the access status of each instance and parameter for each instance (step S16) and each function block definition (step S17), as shown in Figure 4, and sequentially display the analysis results in step S15. However, the invention is not limited to this. For example, the PLC programming devices 1 and 1A may analyze the access status of each instance and parameter for all instances and all function block definitions and display the analysis results.

[0044] <Variation 3> Furthermore, for example, in the third embodiment described above, the PLC programming device 1B analyzes the access status of instances and each parameter for each instance (step S16) and each function block definition (step S17), as shown in Figure 4, and sequentially displays the analysis results in step S15. If an instance name is selected, it transitions to an editing screen for editing the program section of the sequence program Pi, jumps to the code position of the selected instance name, and edits it. However, it is not limited to this. For example, the PLC programming device 1B may analyze the access status of instances and each parameter for all instances and all function block definitions, display the analysis results, and if an instance name is selected, it may transition to an editing screen for editing the program section of the sequence program Pi, jumps to the code position of the selected instance name, and edits it.

[0045] Furthermore, each function included in the PLC programming devices 1, 1A, and 1B in the first, second, and third embodiments can be implemented by hardware, software, or a combination thereof. Here, implementation by software means that it is implemented by a computer reading and executing a program.

[0046] Programs can be stored and supplied to a computer using various types of non-transitory computer-readable medium. Non-transitory computer-readable mediums include various types of tangible storage mediums. Examples of non-transitory computer-readable mediums include magnetic storage media (e.g., flexible disks, magnetic tapes, hard disk drives), magneto-optical storage media (e.g., magneto-optical disks), CD-ROMs (Read Only Memory), CD-Rs, CD-R / Ws, and semiconductor memory (e.g., mask ROMs, PROMs (Programmable ROMs), EPROMs (Erasable PROMs), flash ROMs, RAMs). Programs may also be supplied to a computer using various types of transient computer-readable mediums. Examples of transient computer-readable mediums include electrical signals, optical signals, and electromagnetic waves. Transitory computer-readable mediums can be supplied to a computer via wired communication channels such as electric wires and optical fibers, or via wireless communication channels.

[0047] Furthermore, the step of writing the program to be recorded on the recording medium includes not only processes that are performed chronologically in that order, but also processes that are not necessarily performed chronologically, but are executed in parallel or individually.

[0048] In other words, the information processing device of this disclosure can take various forms having the following configurations.

[0049] (1) The PLC programming device 1, which is an information processing device of the present disclosure, comprises: a function block information acquisition unit 110 that acquires a function block definition and an instance name from a sequence program Pi; a function block instance name search unit 120 that searches for the location of use of the instance name acquired by the function block information acquisition unit 110 from the sequence program Pi; a function block analysis unit 130 that analyzes the access status including at least one of the call location, parameter assignment location, or parameter reference location of the instance defined by the instance name, based on the function block definition acquired by the function block information acquisition unit 110 and the search result of the function block instance name search unit 120; and a function block information display control unit 140 that displays the analysis result of the function block analysis unit 130 on a display unit 40. This PLC programming device 1 prevents programming errors such as omissions in assigning or referencing parameters of function blocks, thereby preventing accidents caused by unintended behavior.

[0050] (2) In the PLC programming device 1 described in (1), the function block analysis unit 130 determines whether there is an assignment process for input / input / output parameters among the parameters before the instance call position, whether there is a reference process for output / input / output parameters among the parameters after the instance call position, and whether there are two or more assignment processes for input / input / output parameters for one instance call. The function block information display control unit 140 may display an alert on the display unit 40 if the determination result of the function block analysis unit 130 falls under any of these conditions.

[0051] (3) In the PLC programming device 1A described in (2), the function block information display control unit 140a may select whether to display or hide alerts for each parameter based on user input.

[0052] (4) In the PLC programming device 1B described in any of (1) to (3), the function block information display control unit 140 may transition to an editing screen for editing the location of the selected access status when an access status displayed based on user input is selected. [Explanation of Symbols]

[0053] 1, 1A, 1B PLC Programming Device 10, 10a, 10b control unit 110 Function block information acquisition unit 120 Function Block Instance Name Search Unit 130 Function Block Analysis Unit 140, 140a, 140b Function Block Information Display Control Unit 20 Memory section 30 Input section 40 Display section P1~Pn Sequence Program

Claims

1. A function block information acquisition unit that obtains the function block definition and instance name from the sequence program, A function block instance name search unit searches for the location where the instance name obtained by the function block information acquisition unit is used from the sequence program, A function block analysis unit analyzes the access status, including at least one of the call location, parameter assignment location, or parameter reference location of the instance defined by the instance name, based on the function block definition obtained by the function block information acquisition unit and the search results of the function block instance name search unit. A function block information display control unit that displays the analysis results of the function block analysis unit on the display unit, An information processing device equipped with the following features.

2. The function block analysis unit determines whether there is an assignment process for input and input / output parameters among the parameters before the instance call location, whether there is a reference process for output and input / output parameters among the parameters after the instance call location, and whether there are two or more assignment processes for input and input / output parameters for one call of the instance. The information processing apparatus according to claim 1, wherein the function block information display control unit displays an alert on the display unit if the determination result of the function block analysis unit falls under any of the following categories.

3. The information processing apparatus according to claim 2, wherein the function block information display control unit selects whether to display or hide the alert for each parameter based on user input.

4. The information processing device according to any one of claims 1 to 3, wherein when the function block information display control unit selects the access status displayed based on user input, it transitions to an editing screen for editing the selected access status.

Citation Information

Patent Citations

  • Debugging device

    JP2007102384A

  • Sequence program editing apparatus

    JP2009009462A

  • PLC control program development device and program

    JP2009104227A

  • Development assisting device, control method for development assisting device, information processing program and recording medium

    JP2022135170A

  • JPP7126637B